Site icon RSTL Automation LLC

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

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:

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:

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:

Troubleshooting Common Issues

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

Next Steps

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

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

Exit mobile version