Site icon RSTL Automation LLC

Siemens S7-1200 Complete Programming Guide: From Beginner to Professional

Industrial Automation Equipment - Siemens Schneider ABB PLC Controller

πŸš€ Master Siemens S7-1200 PLC Programming

The Ultimate Guide for Industrial Automation Professionals

πŸ“– 15 min read
πŸ’Ό Professional Level
βœ… Updated 2024

πŸ”° Introduction: Why Choose S7-1200?

The Siemens S7-1200 has become the #1 choice for small to medium automation projects worldwide. But why?

50K+
Installations Daily
85%
Market Share in EU
$299
Starting Price

πŸ’‘ Key Advantages

βš™οΈ Hardware Configuration Deep Dive

Let’s break down the S7-1200 family and help you choose the right CPU for your project.

CPU Model Digital I/O Memory Best For Price Range
CPU 1211C 6 DI / 4 DO 50 KB 🎯 Beginners $250-300
CPU 1212C 8 DI / 6 DO 75 KB 🎯 Small Projects $300-350
CPU 1214C ⭐ 14 DI / 10 DO 100 KB 🎯 Most Popular $400-450
CPU 1215C 14 DI / 10 DO + 2 AQ 125 KB 🎯 Advanced $550-600

πŸ’‘ Pro Tip: Start with CPU 1214C

For 90% of projects, the CPU 1214C offers the best balance of price and performance. It has enough I/O and memory for most applications while keeping costs reasonable.

πŸ’» Programming with TIA Portal

πŸ“¦ Required Software

TIA Portal V17+
Full Version ($1500+)
TIA Portal Basic
Starter Edition (~$300)
Trial Version
21 Days Free

πŸ”§ Step-by-Step Setup

1

Create New Project

Open TIA Portal β†’ Create new project β†’ Name it β†’ Save

2

Add Device

Select PLC β†’ Choose your CPU model β†’ Confirm

3

Configure IP Address

PROFINET β†’ Set IP (e.g., 192.168.1.10) β†’ Subnet mask

4

Write Your First Program

Open OB1 β†’ Drag LAD contacts β†’ Assign addresses β†’ Save

πŸš€ Advanced Programming Techniques

⏱️ Using Timers (TON, TOF, TP)

// TON (Timer On-Delay)
// When I0.0 turns ON, Q0.0 turns ON after 5 seconds
I0.0 ---[TON T#5S]---( )--- Q0.0

// TOF (Timer Off-Delay)  
// When I0.1 turns OFF, Q0.1 stays ON for 3 seconds
I0.1 ---[TOF T#3S]---( )--- Q0.1

// TP (Pulse)
// Generates a 2-second pulse when triggered
I0.2 ---[TP T#2S]---( )--- Q0.2

πŸ”’ Using Counters (CTU, CTD, CTC)

// CTU (Count Up)
// Counts to 10, then sets output
I0.3 ---[CTU C#10]---( )--- Q0.3

// CTD (Count Down)
// Counts down from preset value
I0.4 ---[CTD C#5]---( )--- Q0.4

πŸ› οΈ Real-World Project: Conveyor Control

🎯 Project: Bottle Filling Station

πŸ“₯ Inputs

  • I0.0 – Start Button
  • I0.1 – Stop Button
  • I0.2 – Bottle Sensor
  • I0.3 – Level Sensor
  • I0.4 – Emergency Stop

πŸ“€ Outputs

  • Q0.0 – Conveyor Motor
  • Q0.1 – Filling Valve
  • Q0.2 – Capper
  • Q0.3 – Reject Solenoid
  • Q0.4 – Alarm Light

πŸ“ Sample Logic

// Main Control Logic
Network 1: Start/Stop Latch
I0.0 (Start) ---[S]--- Q0.0 (Motor)
I0.1 (Stop) ---[R]--- Q0.0

Network 2: Bottle Detection & Filling
I0.2 (Bottle) AND Q0.0 (Motor Running) ---[TON T#2S]--- Q0.1 (Fill)

Network 3: Level Check
I0.3 (Full) AND Q0.1 (Filling) ---[=]--- Q0.0 (Stop Motor)

πŸ”§ Troubleshooting Common Issues

❌ Can’t Go Online

β†’ Check IP addresses (must be same subnet)

β†’ Verify Ethernet cable

β†’ Disable Windows Firewall

⚠️ PLC Stuck in STOP

β†’ Check diagnostic buffer in TIA Portal

β†’ Look for fatal errors

β†’ Reset to factory defaults if needed

πŸ’‘ Outputs Not Working

β†’ Verify 24V power supply

β†’ Check wiring connections

β†’ Confirm PLC is in RUN mode

πŸ“¦ Ready to Start Your Project?

We stock all S7-1200 CPU models with fast worldwide shipping.

πŸ“… Last Updated: April 2024 | πŸ‘οΈ 15,000+ Views | ⭐ Helpful? Rate this article

Exit mobile version