Siemens S7-1200 Tutorial – Complete Beginner Guide with TIA Portal (2026)

Last Updated: April 2026 | Written for beginners and engineers new to Siemens PLC programming.

This Siemens S7-1200 tutorial is your complete beginner guide to the world’s most widely used compact PLC. The S7-1200 is the standard entry point for Siemens automation — used in packaging machines, conveyor systems, water treatment plants, building automation, and thousands of other applications globally.

In this complete S7-1200 tutorial you will learn:

  • What the Siemens S7-1200 is and how it compares to other Siemens PLCs
  • All 5 CPU models explained — which one to choose for your project
  • How to set up TIA Portal and create your first project step by step
  • Complete IO addressing guide — %I, %Q, %IW, %QW addresses explained
  • How to write your first ladder logic program on the S7-1200
  • S7-1200 timers and counters — TON, TOF, TONR, CTU, CTD in TIA Portal
  • How to connect and communicate — PROFINET, Modbus TCP, OPC-UA

What Is the Siemens S7-1200? – Tutorial Overview

The Siemens S7-1200 is a compact, modular PLC from Siemens’ SIMATIC family. Launched in 2009 to replace the older S7-200 series, it quickly became the world’s most popular compact PLC — combining powerful processing, built-in PROFINET communication, and seamless integration with Siemens TIA Portal programming software.

The S7-1200 sits in the middle of the Siemens PLC product range:

Siemens PLC FamilySizeTarget ApplicationComparable AB Model
LOGO!NanoSimple standalone machines, <20 IOMicro820
S7-1200CompactSmall-medium machines, up to 284 IOCompactLogix 5380
S7-1500ModularLarge machines, process control, motionControlLogix 5580
S7-400High-endLarge-scale plant control, safetyGuardLogix 5580

The S7-1200 is programmed exclusively using Siemens TIA Portal (Totally Integrated Automation Portal) — the unified engineering software for all Siemens automation products. TIA Portal supports Ladder Diagram (LAD), Function Block Diagram (FUP), Structured Text (SCL), and Sequential Function Chart (GRAPH) for S7-1200 programming.

To understand how PLCs work in general before diving into the S7-1200 specifically, read: What Is a PLC? Complete Beginner’s Guide


Siemens S7-1200 Tutorial – CPU Models Complete Comparison

Siemens S7-1200 CPU models comparison 1211C 1212C 1214C 1215C 1217C

The S7-1200 family includes 5 CPU variants. All share the same programming environment and instruction set — they differ in built-in IO, memory, and expansion capacity:

CPU ModelBuilt-in DIBuilt-in DQBuilt-in AIWork MemorySignal ModulesBest For
CPU 1211C64230KBNoneSimplest applications, learning
CPU 1212C86250KB2 SMSmall standalone machines
CPU 1214C14102100KB8 SMMost popular — general purpose
CPU 1215C14102 + 2AO125KB8 SM + PROFINET IOProcess control, analog-heavy
CPU 1217C14104 + 2AO150KB8 SM + high-speed IOMotion control, advanced apps

Each CPU is available in 3 power supply variants:

VariantPower SupplyDigital InputsDigital OutputsTypical Use
DC/DC/DC24VDC24VDC24VDC transistorModern control panels, fast switching
DC/DC/Relay24VDC24VDCRelay contactsMixed AC/DC loads, general purpose
AC/DC/Relay85-264VAC24VDCRelay contactsLegacy panels, AC power environments

💡 Recommendation for Beginners: Start with the CPU 1214C DC/DC/DC — it is the most popular S7-1200 model, has enough IO for most learning projects, and the transistor outputs are faster and more reliable than relay outputs for learning purposes.


Siemens S7-1200 Tutorial – TIA Portal Programming Software

TIA Portal (Totally Integrated Automation Portal) is Siemens’ unified engineering environment for programming all SIMATIC PLCs, HMIs, drives, and networks. For S7-1200 programming, you need STEP 7 Basic (included in TIA Portal Basic or higher).

TIA Portal Versions

VersionRelease YearS7-1200 SupportNotes
TIA Portal V162020✅ Full supportStable, widely used
TIA Portal V172021✅ Full supportAdded OPC UA improvements
TIA Portal V182022✅ Full supportCurrent stable version
TIA Portal V192024✅ Full supportLatest version

How to Download TIA Portal for Free (Trial)

  1. Go to Siemens TIA Portal Trial
  2. Create a free Siemens ID account
  3. Download TIA Portal V19 Trial (21-day full trial)
  4. Install on Windows 10/11 64-bit (minimum 8GB RAM recommended, 16GB ideal)
  5. For simulation without hardware: also install PLCSIM — free with TIA Portal

💡 No Hardware? No Problem: Siemens PLCSIM allows you to simulate an S7-1200 completely in software. You can write, test and run programs without any physical PLC hardware — making it the best free learning environment available.


Siemens S7-1200 Tutorial – First Project in TIA Portal Step by Step

Step 1 — Create a New Project

  1. Open TIA Portal
  2. Click “Create new project”
  3. Enter project name: e.g. My_First_S7_1200_Project
  4. Select save location
  5. Click “Create”

Step 2 — Add the PLC Hardware

  1. In the Project tree → click “Add new device”
  2. Select “Controllers” → “SIMATIC S7-1200”
  3. Select your CPU model (e.g. CPU 1214C DC/DC/DC)
  4. Find the exact firmware version that matches your hardware (printed on the CPU front)
  5. Click “Add” → Device view opens showing your CPU

Step 3 — Configure the IP Address

  1. In Device view → click on the PROFINET port (green connector on CPU front)
  2. In Properties panel below → click “Ethernet addresses”
  3. Set IP address: e.g. 192.168.0.1
  4. Set Subnet mask: 255.255.255.0
  5. Your PC must be on the same subnet: e.g. 192.168.0.100

Step 4 — Create a Program Block

  1. In Project tree → expand your PLC → click “Program blocks”
  2. Double-click “Main [OB1]” — this opens the main program block
  3. The ladder logic editor opens with an empty rung
  4. You are now ready to write your first program

Step 5 — Write a Simple Motor Start/Stop Program

Click on the empty rung and build this simple motor control circuit:

Network 1: Motor Start/Stop with Seal-In
|--[%I0.0]--+--[%I0.2]--[%I0.3/]--(%Q0.0)--|
  START_PB  |    MOTOR_FB    STOP_PB  MOTOR_RUN
            |
            +--[%Q0.0]--+
               MOTOR_RUN (seal-in)

Step 6 — Define PLC Tags

  1. In Project tree → click “PLC tags” → “Default tag table”
  2. Add your tags with names and addresses:
Tag NameData TypeAddressDescription
START_PBBool%I0.0Start push button
MOTOR_FBBool%I0.2Motor run feedback
STOP_PBBool%I0.3Stop push button (NC)
MOTOR_RUNBool%Q0.0Motor contactor output

Step 7 — Compile and Download

  1. Click Compile button (wrench icon) — check for 0 errors
  2. Connect Ethernet cable between PC and S7-1200
  3. Click Download to device button
  4. TIA Portal scans for PLCs — select your CPU
  5. Click DownloadFinish
  6. Put CPU in RUN mode — RUN LED turns green

Siemens S7-1200 Tutorial – IO Addressing Complete Reference

Understanding IO addressing in TIA Portal is essential for writing correct S7-1200 programs. The S7-1200 uses the IEC standard % prefix for all addresses:

Digital IO Addressing

AddressTypeDescriptionExample
%I0.0 – %I0.7Digital InputInput byte 0, bits 0-7First 8 digital inputs on CPU
%I1.0 – %I1.7Digital InputInput byte 1, bits 0-7Inputs from first signal module
%Q0.0 – %Q0.7Digital OutputOutput byte 0, bits 0-7First 8 digital outputs on CPU
%Q1.0 – %Q1.7Digital OutputOutput byte 1, bits 0-7Outputs from first signal module
%M0.0 – %M0.7Memory BitInternal memory bitsIntermediate storage bits

Analog IO Addressing

AddressTypeRaw Value RangeDescription
%IW64Analog Input0 – 27,648First analog input channel (4-20mA)
%IW66Analog Input0 – 27,648Second analog input channel
%QW64Analog Output0 – 27,648First analog output channel
%IW96Analog Input0 – 27,648First AI on signal module

💡 Analog Scaling: Raw analog values from 4-20mA inputs range from 5,530 (at 4mA) to 27,648 (at 20mA). Use the NORM_X and SCALE_X function blocks in TIA Portal to convert these raw values to engineering units like °C, bar, or m³/h.


Siemens S7-1200 Tutorial – Timers in TIA Portal

The S7-1200 uses IEC standard timers in TIA Portal. Each timer requires an Instance Data Block (IDB) — a memory block that stores the timer’s preset, elapsed time, and status bits.

Timer TypeTIA Portal NameFunctionOutput Bit
On-DelayTONOutput ON after input ON for preset timeQ bit
Off-DelayTOFOutput stays ON after input turns OFFQ bit
RetentiveTONRAccumulates time across multiple input cyclesQ bit
PulseTPFixed-length output pulse on triggerQ bit

TON Timer Example in TIA Portal

Preset time format: Use TIME data type — T#5S for 5 seconds, T#500MS for 500 milliseconds, T#2M for 2 minutes.

ParameterConnectionExample
IN (input)Connect to input condition%I0.0 (start signal)
PT (preset time)Set the delay timeT#5S (5 seconds)
Q (output)Connect to output or rung contact“Motor_TON”.Q
ET (elapsed time)Optional — current elapsed time“Motor_TON”.ET

For a complete guide to all timer types with 7 real examples: PLC Timer – TON, TOF, RTO and TP Complete Guide


Siemens S7-1200 Tutorial – Counters in TIA Portal

Like timers, S7-1200 counters use Instance Data Blocks in TIA Portal. The three standard IEC counter types are all supported:

CounterTIA Portal NameCountsOutput
Count UpCTUUp from 0 to PVQ = TRUE when CV ≥ PV
Count DownCTDDown from PV to 0Q = TRUE when CV ≤ 0
Up/DownCTUDBoth up and downQU when CV≥PV, QD when CV≤0

Siemens S7-1200 Tutorial – Communication Protocols

The S7-1200 has a built-in PROFINET port on every CPU — this is the primary communication interface for connecting to TIA Portal, HMIs, remote IO, and other devices.

ProtocolTypeCommon UseTIA Portal Setup
PROFINETIndustrial EthernetRemote IO, HMI, S7 communicationBuilt-in — configure in Device view
Modbus TCPTCP/IPSCADA, third-party devicesMB_CLIENT / MB_SERVER function blocks
OPC-UAUnified ArchitectureMES, cloud, IIoT platformsOPC UA server built into CPU firmware
Modbus RTURS-485 serialLegacy instruments, drivesRequires CM 1241 communication module
PROFIBUSSerial fieldbusLegacy field devicesRequires CM 1242-5 module
PUT/GETS7 protocolS7-to-S7 communicationPUT and GET function blocks

Siemens S7-1200 vs Allen-Bradley CompactLogix

FeatureSiemens S7-1200Allen-Bradley CompactLogix
SoftwareTIA Portal (STEP 7)Studio 5000 Logix Designer
Primary marketEurope, Asia, globalNorth America
IO addressing%I0.0, %Q0.0, %IW64Tag-based (Local:1:I.Data.0)
Timer preset formatT#5S (TIME data type)5000ms (DINT milliseconds)
Network protocolPROFINET standardEtherNet/IP standard
SimulationPLCSIM (free with TIA)Logix Echo (paid)
Programming languagesLAD, FUP, SCL, GRAPHLadder, FBD, ST, SFC
Entry costLower (starter kits available)Higher entry cost

Siemens S7-1200 Tutorial – Common Beginner Mistakes

Mistake 1 — Wrong firmware version selected in TIA Portal
When adding the CPU in TIA Portal you must select the exact firmware version that matches your physical hardware — printed on the front of the CPU (e.g. V4.5). Selecting the wrong version prevents downloading to the PLC. Always check the physical hardware firmware version first.

Mistake 2 — PC and PLC on different IP subnets
The most common connection issue. Your PC and S7-1200 must be on the same IP subnet. If the PLC is set to 192.168.0.1, your PC must be in the 192.168.0.x range (e.g. 192.168.0.100). Check Windows network adapter settings if you cannot connect.

Mistake 3 — Using wrong timer preset format
TIA Portal uses the TIME data type for timer presets. The format is T#5S for 5 seconds, T#500MS for 500 milliseconds, T#2M30S for 2 minutes 30 seconds. Typing just a number without T# will cause a compile error.

Mistake 4 — Forgetting to create Instance Data Block for timers/counters
When you place a TON or CTU instruction in TIA Portal, it automatically prompts you to create an Instance Data Block. Always accept this and give it a meaningful name like “Motor_Start_TON”. If you cancel, the instruction will show an error.

Mistake 5 — Not compiling before downloading
Always compile (Ctrl+B) before downloading to the PLC. TIA Portal will warn you if there are errors, but some warnings are easy to miss. A successful compile with 0 errors and 0 warnings confirms the program is ready to download.

Mistake 6 — Confusing optimized and non-optimized data blocks
S7-1200 data blocks are optimized by default — tags have no fixed memory offset and cannot be accessed by absolute address. If you need to access data by absolute address (for Modbus communication), you must uncheck “Optimized block access” in the block properties.


Frequently Asked Questions – Siemens S7-1200

What is the Siemens S7-1200 used for?

The Siemens S7-1200 is used for small to medium-scale industrial automation applications. Common uses include conveyor control, packaging machines, pump and motor control, water treatment systems, building automation, and any application requiring up to 284 IO points. It is the most widely used compact PLC in Europe and one of the most popular worldwide.

What software do I need to program the Siemens S7-1200?

The Siemens S7-1200 is programmed using TIA Portal (Totally Integrated Automation Portal). Specifically, you need STEP 7 Basic or higher, which is included in TIA Portal Basic, Professional, or Advanced editions. A 21-day free trial is available from the Siemens website. For simulation without hardware, also install SIMATIC PLCSIM which is included free with TIA Portal.

What is the difference between S7-1200 and S7-1500?

The S7-1200 is a compact PLC for small to medium applications with up to 284 IO points and 150KB work memory. The S7-1500 is a more powerful modular PLC for complex machines and process control with unlimited IO expansion, faster processing, and advanced motion control capabilities. The S7-1500 is also significantly more expensive. For most beginners and small-to-medium projects, the S7-1200 is the right choice.

How do I connect to the Siemens S7-1200 from TIA Portal?

Connect an Ethernet cable directly between your PC’s network port and the S7-1200’s PROFINET port. Set your PC’s IP address to the same subnet as the PLC (for example if the PLC is 192.168.0.1, set your PC to 192.168.0.100). In TIA Portal, click the Download button, select “Show all compatible devices”, and TIA Portal will scan and find your PLC. Select it and click Download.

Can I program the S7-1200 without hardware using a simulator?

Yes. Siemens PLCSIM allows you to simulate an S7-1200 completely in software without any physical hardware. PLCSIM is included free with TIA Portal and supports most S7-1200 instructions including timers, counters, and communication. This makes it the best free learning environment for beginners starting with Siemens PLC programming.

What programming languages does the S7-1200 support?

The S7-1200 supports four IEC 61131-3 programming languages in TIA Portal: LAD (Ladder Diagram) — the most commonly used, FUP (Function Block Diagram) — Siemens name for FBD, SCL (Structured Control Language) — Siemens name for Structured Text, and GRAPH — Siemens name for Sequential Function Chart. Each program block can use a different language within the same project.

What is an Instance Data Block in TIA Portal?

An Instance Data Block (IDB) is a memory block automatically created when you use a function block instruction like a timer (TON) or counter (CTU) in TIA Portal. It stores all the parameters and status data for that specific instruction instance — the preset value, elapsed time, current value, and output bits. You must assign a unique IDB to each timer and counter in your program. TIA Portal prompts you automatically when you place these instructions.

How is IO addressed in the Siemens S7-1200?

The S7-1200 uses the IEC standard % prefix for IO addressing. Digital inputs use %I0.0 through %I0.7 for the first 8 channels, %I1.0 onward for additional modules. Digital outputs use %Q0.0 onward. Analog inputs use word addresses starting at %IW64. Analog outputs use %QW64 onward. In TIA Portal it is best practice to use symbolic tag names (like “Motor_Run”) instead of absolute addresses, as the software maps these automatically.


Conclusion

This Siemens S7-1200 tutorial has covered everything a beginner needs. The S7-1200 is an excellent PLC for beginners. Its combination of powerful features, integrated PROFINET communication, and seamless TIA Portal integration makes it the standard compact PLC for automation projects across Europe and globally.

Key points to remember from this Siemens S7-1200 tutorial:

  • The CPU 1214C DC/DC/DC is the most popular and best starting model for most applications
  • TIA Portal is the programming environment — download the free trial with PLCSIM for simulation
  • %I, %Q, %IW, %QW addressing with symbolic tag names is the correct approach
  • Timers and counters use Instance Data Blocks — TIA Portal creates these automatically
  • Timer presets use the TIME data type — T#5S, T#500MS format

Related Guides:

Scroll to Top