RSTL Automation LLC

Free shipping worldwide. 

Step-by-Step Guide: Setting Up Your First Siemens S7-1200 Project in TIA Portal

Getting Started with Siemens S7-1200 and TIA Portal

Setting up your first S7-1200 project doesn’t have to be intimidating. In this tutorial, I’ll walk you through creating a complete working project from scratch – including hardware configuration, programming, and online testing.

What You’ll Need

  • Computer with TIA Portal V16 or later installed
  • S7-1200 CPU (any model – we’ll use CPU 1214C in this example)
  • Programming cable (Ethernet cable or USB-PMI adapter)
  • Power supply (24V DC or 120-240V AC depending on model)

Step 1: Create a New Project

Open TIA Portal and follow these steps:

  1. Click “Create new project” on the start page
  2. Enter a project name (e.g., “My_First_S7_Project”)
  3. Choose a storage location
  4. Click “Create”

Pro tip: Create a logical folder structure from the start. Future you will thank present you.

Step 2: Add Your Device

Now let’s add the S7-1200 CPU:

  1. Click “Add new device” in the project tree
  2. Select “PLC” → choose your CPU model
  3. Name it something meaningful (e.g., “Main_PLC”)
  4. Click “OK” – TIA Portal will open the device view

You’ll see the CPU with its built-in I/O. Click on the CPU to see its properties in the inspector window.

Step 3: Configure Hardware

Before programming, let’s set up the basics:

  • PROFINET interface: Assign an IP address (e.g., 192.168.1.10)
  • Protection: Set up password protection if needed
  • Time: Configure the PLC’s time (synchronize with PC)

To add expansion modules, drag them from the hardware catalog to the “Add distributed I/O” section of the CPU.

Step 4: Create Your First Program

Now for the fun part – let’s write some actual PLC code!

Go to “Program blocks” and double-click “Main [OB1]” – this is where your main program will live.

Simple Toggle Logic Example

Let’s create a program that turns on an output when a button is pressed:

// Ladder Logic
|   I0.0   |----[ ]----( )   |
|   Start  |    Q0.0       |
|          |     Motor      |

In LAD (Ladder Diagram), this looks like a normally-open contact in series with a coil.

Creating the Logic in TIA Portal

  1. In OB1, drag a “normally open” contact from the instructions pane
  2. Assign it to address I0.0 (your start button)
  3. Drag a “coil” and assign it to Q0.0 (your motor)
  4. Name them: “Start_Button” and “Motor_Output”

Step 5: Save and Compile

Before going online, save your work:

  • Click the “Save” icon or press Ctrl+S
  • Click “Compile” (blue icon) – fix any errors that appear

Compilation errors are shown in the “Info” pane at the bottom. Common issues include missing addresses or syntax errors.

Step 6: Go Online and Test

Here’s the exciting part – let’s run it on the real PLC!

  1. Connect your computer to the S7-1200 via Ethernet
  2. Click the “Go online” button (green arrow)
  3. Accept the connection when prompted
  4. Switch the PLC to RUN mode if not already

Now you can:

  • Monitor – Watch the program execute in real-time
  • Force – Manually set inputs to test logic
  • Modify – Change values without stopping the PLC

Troubleshooting Common Issues

What if things don’t work? Here’s our checklist:

  • Can’t go online? Check IP addresses match on PLC and PC
  • No connection? Verify Ethernet cable and switch settings
  • Program not running? Ensure PLC is in RUN mode
  • Outputs not working? Check wiring and power supply

Next Steps

You’ve just created your first working S7-1200 project! From here, you can:

  • Add more complex logic (timers, counters, math operations)
  • Expand with signal modules
  • Connect an HMI for operator interface
  • Add communication to other devices

Stay tuned for our next tutorial on using timers and counters in TIA Portal.

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
Click outside to hide the comparison bar
Compare
Shopping cart close