Welcome to the Industrial Automation website!

NameDescriptionContent
XING-Automation
E-mail  
Password  
  
Forgot password?
  Register
当前位置:

SIEMIENS S7-1200/1500 Controller TIA Portal Programming Guide

F: | Au:FAN | DA:2025-11-24 | 514 Br: | 🔊 点击朗读正文 ❚❚ | Share:

SIEMIENS S7-1200/1500 Controller TIA Portal Programming Guide

Overview

The Siemens S7-1200/1500 Controller TIA Portal Programming Guide (V1.6 version) focuses on optimizing programming and covers the core innovations of the S7-1200/1500, such as optimization blocks, new data types VNet, direct machine code compilation, general programming specifications (block structure, symbol addressing, memory management), hardware independent programming methods, STEP 7 Safety programming points, and visual automatic generation solutions. It explicitly recommends using optimization blocks instead of non optimization blocks, symbol addressing instead of absolute addressing, and global data blocks instead of bit memory. At the same time, it provides a large number of performance optimization techniques (such as avoiding deep call hierarchy and using loop instructions reasonably), aiming to help users achieve standardized, efficient, and reusable automation program development.


S7-1200/1500 Core Innovation

1. Programming languages and compilation optimization

Language support differences:

Programming language S7-1200 S7-1500

Ladder diagram (LAD) ✅   ✅

Function Block Diagram (FBD) ✅   ✅

Structured Control Language (SCL) ✅   ✅

Statement Table (STL) ❌   ✅

Sequential Function Graph ❌   ✅

Compilation method: S7-1200/1500 generates machine code directly for all languages, without the intermediate step of "LAD/FBD → STL → machine code" for S7-300/400, ensuring consistent performance for all languages.

2. Optimize block technology (core innovation)

Optimized block vs non optimized block:

Feature optimization block (recommended) Non optimization block (only compatible)

Data storage is automatically sorted by data type, stored in declared order without gaps, and may have gaps

The addressing method can be either symbolic addressing or absolute addressing

Retention settings: A single label can be set to maintain the entire block or not to maintain it

Download feature supports uninitialized download (RUN mode update) not supported

Fast access speed (processor optimized storage) slow

Setting method: By default, "Optimize Block Access" is enabled for new blocks, which can be batch modified in the "Program Block" list; The optimization properties of instance DB inherit from the associated FB.

3. New data types

Core new type:

Data Type Applicable Controller Purpose Key Features

VARIANT S7-1500; S7-1200 (FW4.1+) dynamic pointer with type detection, replacing the ANY pointer, supporting symbol access

Date_Time_Long (DTL) both support timestamp storage containing year/month/day/nanosecond, with symbol accessible sub fields (such as DTL. Hour)

Both LReal and LReal support high-precision floating-point numbers of 64 bits and 15 decimal places, making them suitable for precise calculations

LTime only has a long-term storage range of ± 106751 days for S7-1500 and supports nanosecond level accuracy

WSRING only supports S7-1500 Unicode strings for multiple languages (such as Chinese and Latin), with a maximum of 16382 characters

4. Key instruction upgrade

MOVE series instructions:

Advantages of Instruction Usage

MOVE supports single value copying and complete copying of structures/arrays

MOVE_SLK array partial copy specifies the starting index and quantity, efficiently processing the array

MOVE_SLK_VARIANT Dynamic Type Copy Run Time Detect Data Types, Supports PLC Data Types/Arrays

The serialize/deserialize structure and byte array conversion are used for communication frame packaging/unpacking, supporting VNet input

Other instructions:

TypeOf(): detects the data type pointed to by VNet on the label (SCL only);

RUNTIME: measures program/block running time, supports performance optimization;

Multi assignment (V14+): such as # a:=# b:=# c:=0; Simplify initialization.

image.png

Universal Programming Specification

1. Program block structure

Core block type:

Key features of block type functionality

Organizational block (OB) operating system call, management program execution including loop OB (OB1), interrupt OB (OB40 hardware interrupt), etc; S7-1200 up to 100 cycles/start OB, S7-1500 supports clock interrupt OB

Function (FC) has no state block and no independent storage temporary label. Only the current call is valid, and data needs to be passed through parameters; Support direct participation of return values in SCL formulas

Function block (FB) has a status block that requires the instance DB static label to maintain its value; The instance DB structure is defined by FB and cannot be modified separately

Data Block (DB) stores data in a global DB for all blocks to access; Instance DB is only associated with FB usage

Block Reuse Techniques:

Multiple instances: FB calls other FBs to store data in their own instance DB, reducing the number of instance DBs;

Typeization block: Store FB/FC/PLC data types in the global library, supporting cross project reuse and batch updates.

2. Memory management

Memory type and access speed (from fast to slow):

Optimize the temporary labels, FC/FB parameters, and non persistent static labels of the block;

Optimize the retention labels of blocks and optimize the global database;

  • Guardmaster 440R-D22R2 Safety Relay Specifications
  • NL12880BC20-10ND Industrial Display Panel Data
  • LFI 12X5326-S1 Slide-in Control Board Technical Data
  • Modicon AS-9370-001 Programmable Controller Data
  • Mitsubishi Kakoki E-01B-4130 PLC Module Overview
  • Guardmaster 440R-D22S2 Dual Input Safety Relay Data
  • NL10276AC30-48D Industrial LCD Display Panel Data
  • GE ICMFA000000-ABAC Field Control Module Specification
  • Siemens 6SN1123-1AB00-0BA1 SIMODRIVE Module Review
  • Siemens 6SL3210-1SE23-2AA0 Power Module Technical Data
  • Schmersal T.250-11z-t Limit Switch
  • Schmersal T.250-11z-t Limit Switch
  • Honeywell 900H32-0102 ControlEdge 900 PLC
  • Siemens 6FX1132-1BA01 PCB B84141-A-A40
  • BEMAC UST-202-D 1307D PLC Circuit Board
  • Mitsubishi HS-MF23-S2A Servo Motor
  • B&R 3AI775.6 Analog Input Module
  • Omnipure 69003 Rev 11 3-Phase Gate Board PCB
  • Pilz 751134 PNOZ s4 C Safety Relay
  • Proface PFXGM4301TAD HMI Graphic Panel
  • Keyence KV-RC8BXR Programmable Controller
  • Siemens 6GK7243-1BX30-0XE0 CP 1243-1 Ethernet Module
  • Mitsubishi GT2310-VTBA GT2310-VTBD HMI 10.4 Inch
  • Schmersal SRB-NA-R-C.21-24V Safety Relay Module
  • Emotron 01-2520-40 M20 Shaft Power Monitor 3x380-500V
  • Omron CQM1 SYSMAC PLC System PA203 ID211 OC221
  • ABB CI830 3BSE013252R1 Profibus DP V1 Module
  • B&R 4PP035.0300-01 Power Panel PLC Module
  • SICK S30A-6111CL S3000 PROFINET Safety Laser Scanner
  • Siemens 6ES7215-1HG40-0XB0 CPU 1215C AC/DC/RLY
  • Automation Direct H2-ECOM100 Ethernet Module Details
  • Siemens 6GK1143-0TB01 CP 1430 TF Module Review
  • Siemens Simatic 505 10 Slot PLC Rack Technical Review
  • Automation Direct EZ-SP Message Display Unit
  • Mitsubishi A1SJ71QE71N-B5T Ethernet Interface Unit
  • Modicon AS-P810-000 Modbus Plus Processor Unit
  • Honeywell 51309241-175 TK-PPD011 PWA Specifications
  • Omron S8AS-24006N Smart Power Supply Specifications
  • Beckhoff EL3218-0018 EtherCAT Terminal Specifications
  • Omron CJ1W-PRT21 PROFIBUS-DP Interface Unit
  • Inovance AC810-0122-U0R0 PLC Controller
  • Cypress CY7C1021CV33-10ZXCT 1Mb SRAM IC
  • GE Fanuc IC695CPU315-CD PLC CPU Module RX3i
  • Drager 8312088 PCB Safety Module PAC 5500
  • Weltronic H70-T02A S430-V1.2 Weld Timer PLC
  • B&R 3AM051.6 PLC Analog Input Module
  • Schneider BMENOC0301 Communication Module M580
  • Mitsubishi FX3UC-32MT-LT PLC Controller
  • Omron TZ-1G TZ-1GV TZ-1GV2 TZ-1GV22 Motion Switch
  • Mitsubishi AJ71C21-B1-S2 PLC Controller 424749
  • Beckhoff EL5042 EtherCAT Encoder Terminal BiSS C
  • Eaton easyE4 Programmable Relay 12 Inputs 8 Outputs
  • Carel PCO5 P+ 500BAA000L0 Programmable Controller
  • Siemens 6ES7223-1PL22-0XA0 EM223 I/O Module 16DI 16DO
  • Lenze EMF2179IB DeviceNet Communication Module
  • Mitsubishi Q173DCPU Motion CPU Module
  • B&R X20AT2222 Temperature Input Module Pt100
  • Siemens SITOP UPS1100 Battery Module 7Ah 6EP4134-0GB00-0AY0
  • Mitsubishi QJ71DN91 DeviceNet Master Slave Module
  • B&R X20AO4622 Analog Output Module 4 Channels
  • B&R X20CP1486 Controller Manual
  • Siemens 6ES7134-4GB51-0AB0 Module Manual
  • Schneider LMC201CAA10000 Controller Manual
  • Fuji Electric NP1L-RS4 Module Guide
  • Mitsubishi FX2N-16LNK-M Master Guide
  • Yaskawa SGDM-08ADA SGMAH-08AAA41 Manual
  • Fanuc A20B-0008-0470 Board Manual
  • Calpeda T 70/B Module Specifications
  • Eurotherm TC3000 Power Drive Specifications
  • Mitsubishi QJ71GP21S-SX Module Manual
  • B&R X20AI4622 Analog Input Module 4 Channels
  • Siemens Simatic S5 PLC I/O and CPU Modules
  • Tel 38950 PCB Board 5044-000171-11 AP9Z-2033A
  • Sanyo PLC-XTC50L Multimedia Projector
  • Siemens 6GK7243-5DX30-0XE0 CP 243-5 AS-Interface
  • Omron V680-CA5D02-V2 RFID Controller
  • Pilz 570640 PSEN SL-1.0P Safety Switch
  • Schneider LXM62DD27D21000 Servo Drive
  • Pilz 401112 PITswitch en1.1a-5m-s Emergency Stop Switch
  • Pilz 774350 P2HZ X3 Safety Relay
  • Siemens S30810-Q1113-X4-6/02 EWSD Module Board
  • Honeywell 30751044-008 ROM PLC Control Board
  • Allen-Bradley 440R-W23219 MSR310P Safety Relay
  • Siemens 6GK5204-2BB10-2AA3 Industrial Ethernet Switch
  • Siemens YSU C32353ADDAGS C98043 PC Board
  • Schneider TM241CEC24T PLC Controller Modicon M241
  • VARIAN E15000591 PLC PCB Assembly 132102
  • Schneider Electric HMIG3U PLC Controller Module
  • Siemens 6ES7148-4FC00-0AB0 ET200 IO Module
  • Siemens A5E30484420 Simatic IPC Redundant PSU
  • Allen Bradley 1771-A3B Chassis Manual
  • Schneider BMEH586040 Processor Manual
  • Mitsubishi GT2508 Graphic Panel Manual
  • Mitsubishi FX2N-16LNK-M Link Module Manual
  • Beckhoff EL3011 Analog Terminal Manual
  • Siemens 6SN1145-1AA01-0AA1 Infeed Manual
  • Proface SP5000 Series Display Specifications
  • NUM 0204203001 Axes Board Manual
  • Square D LV434001 Ethernet Interface Manual
  • Omron NA5 Series HMI Module Specifications
  • ABB 57619104E Inverter PCB Control Board
  • Allen-Bradley 100-E205ED11 MCS-E Contactor 205A
  • Omron NS12-TS01-ECV2 Series Operation Panel
  • Allen-Bradley 440R-EM4R2 Guardmaster Safety Relay
  • Omron CS1D-DPL01 Duplex System PLC Module
  • Beckhoff CX2030-0115 Embedded PC Controller
  • ABB Pluto S20 v2 Cfs Safety PLC 2TLA020070R4700
  • B&R X20AT4222 Analog Input Module RTD
  • Inovance H3U-3624MT PLC Controller
  • GE Fanuc IC698CPE010 PLC CPU Module
  • Texas Instruments Siemens 505-6208-A Analog Input Module
  • VDISP 0035416 Card Module Industrial Display Controller
  • HITACHI TX09D80VM3CCA 3.5 Inch LCD Screen 240x320
  • Siemens 545 555 1105 1106 PLC Controller
  • H2-ECOM100 PLC Communication Module Ethernet
  • B&R X20CS1012 PLC Module X20 CS 1012
  • Siemens 6ES7212-1HF40-0XB0 PLC Module 24VDC
  • Omron C120-0C222 IO Module 3G2A6-0C222
  • Electromatic Denmark PLC TYPE 200816 Industrial Controller
  • SANYO PLC-XTC50L Projector 50-60Hz LCD Installation
  • LTi SO84.450 Servo Drive Controller - 450A Three-Phase BG7
  • LTi SO84.375 Servo Drive Controller - 375A Three-Phase BG7
  • LTi SO84.325 Servo Drive Controller - 325A Three-Phase BG7
  • LTi SO84.250 Servo Drive Controller - 250A Three-Phase BG7
  • LTi SO84.170 Servo Drive Controller - 170A Three-Phase BG6a
  • LTi SO84.143 Servo Drive Controller - 143A Three-Phase BG6a
  • LTi SO84.110 Servo Drive Controller - 110A Three-Phase BG6
  • LTi SO84.090 Servo Drive Controller - 90A Three-Phase BG6