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 | 1031 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;

  • Bosch Rexroth CML10.1-NN-210-NB-NNNN-NW IndraControl L10 PLC
  • Bosch Rexroth R911173255 S20-PSDO-8/3 Safe Digital Output Module
  • Bosch Rexroth MSM040B-0300-NN-M0-CC1 Servo Motor
  • Bosch Rexroth MSK040B-0450-NN-M1-UG0-NNNN Servo Motor
  • Bosch Rexroth 3630630010 3/2 Way Directional Control Valve
  • Bosch Rexroth IndraControl S20 R911173359 S20-PN-BK+ Bus Coupler
  • Bosch Rexroth MKD041B-144-GP0-KN Synchronous Servo Motor
  • Bosch Rexroth Indramat BT 100 Industrial Panel PC
  • Bosch Rexroth MSM019B-0300-NN-M5-MH1 Servo Motor
  • Rexroth SE-B5.700.020-10.000 Synchronous Servo Motor
  • Rexroth 0608820115 Nutrunner Torque Transducer Size 4
  • Rexroth MAC090A-0-ZD-5-C/110-A-0/KI520LV Servo Motor
  • Rexroth 4WMM6J53/N Directional Control Valve
  • Rexroth HCS02.1E-W0028 IndraDrive Base Unit
  • Rexroth MDD090B-N-030-N2M-110GB0 Servo Motor
  • Mannesmann Rexroth VT11025-16 Amplifier Module 19666
  • Rexroth HCS01.1E-W0008-A-03-B-ET-EC-NN-L4-NN-FW Inverter
  • Rexroth MDD093C-N-030-N2M-110GB0 Servo Motor
  • Rexroth R162211322 Linear Guide Slider
  • Rexroth IndraControl L40 CML40.2-NP-330-NA-NNNN-NW Controller
  • Rexroth 3 842 532 421 Geared Motor 1380 rpm
  • Rexroth 4WEH 16 E67 Directional Valve Set
  • Rexroth HMS01.1N-W0110-A-07-NNNN Inverter
  • Rexroth P-057429-00000 Repair Kit
  • Rexroth MSM031C-0300-NN-M0-CH0 Servo Motor
  • Mannesmann Rexroth VT 11013 Amplifier Module
  • Rexroth 4DMC160 Transducer 0608820115
  • Rexroth 990500A Industrial Component
  • Bosch Rexroth HCS01.1E-W0003 Compact Drive
  • Rexroth 4WMM10E31/V Directional Valve R900593552
  • Bosch Rexroth EMC-032-NN-2 R021U10021 Linear Actuator
  • Rexroth VT-MX-4-10/K-AX4U-V50 Servo Interface Module
  • Rexroth 0811405144 Amplifier Card
  • Rexroth VM310 0608760109-103 Power Module
  • Rexroth HMD01.1N-W0012 IndraDrive Power Section
  • Rexroth LT303 0 608 750 084 Servo Amplifier
  • Rexroth DKCXX.3-040-7 Servo Drive 40 A
  • Rexroth 3842999760 UM 1 Return Module
  • Rexroth R911172284 Safety Controller SLC-3-CPU000300
  • Rexroth IMS2A-KWD-025-SNS-C1 R051702883 Measuring System
  • Rexroth NK350S Network Coupler MRN 3608877368
  • Bosch Rexroth CSB01.1N-AN-ENS Control Section
  • Rexroth R911330523 Power Cable RKL0045
  • Rexroth HMS01.1N-W0036 Single Axis Inverter
  • Rexroth 0 608 740 103 Connection Cable 2 m
  • Rexroth RWD-025-SNS-C2-P-2 Linear Bearing Block
  • Rexroth MSK050B-0300 Servo Motor R911309705
  • Bosch Rexroth KE312 Communication Module
  • Rexroth VCP05.2 IndraControl VCP 05 Panel
  • Rexroth CML40.2 IndraControl L PLC R911170254
  • Rexroth R911170826-206 Sercos Interface Module 24V DC
  • Mannesmann Rexroth VT 11030-12A 00010992 Valve Amplifier
  • Rexroth VT 11011-12 Amplifier Module R900010958
  • Bosch Rexroth SF-A1.0012.060-14.050 Servo Motor
  • Bosch Rexroth HCS01.1E-W0008-A-03-B R911325246 Inverter
  • Rexroth MDD093C-N-030-N2M-110PB2 Servo Motor
  • Bosch Rexroth MSK030B-0900-NN-M1-UG1-NNNN Servo Motor
  • Rexroth R900588201 4WE10E33/CG24N9K4 Solenoid Valve
  • Bosch Rexroth SR-A2.0020.030-00.000 Servo Motor 1070076772
  • Rexroth CML40.1-NP-220-NA-NNNN-NW Controller 1070170261-104
  • Yaskawa / Omron SGDM-01ADA - Sigma II Servo Drive 100W
  • Omron / KEP NT3S-ST123B-E - Interactive Display Operator Panel HMI
  • Yaskawa XD-01-MN01 - XtraDrive Servo Drive Controller
  • Applicom PC2000ETH - Ethernet Communication Interface Card
  • Fanuc A02B-0200-B523 - 6-Slot PLC Rack Chassis Series 160-MB
  • Endress+Hauser COS61-A2F0 - Dissolved Oxygen Sensor Probe
  • Kieback & Peter DDC4200L - Building Automation DDC Controller Display
  • Siemens 6ES5955-3LF12 - Simatic S5 Power Supply Module
  • Siemens 6ES5928-3UA21 - Simatic S5 PLC Central Processing Unit
  • Fanuc A06B-6077-H106 - Power Supply Module
  • KEB 15.F5.G1G-360A - Frequency Inverter Drive
  • Bonfiglioli Vectron ACU 210 - Frequency Inverter AC Drive
  • Allen Bradley MPL-A320H-MJ22AA - AC Servo Motor
  • Schneider (Telemecanique) XBTG2220 - Magelis Graphic Touch Panel HMI
  • Schneider (Telemecanique) XBTF011110 - Magelis Membrane Keyboard Overlay
  • Record STM20 - Automatic Sliding Door Processor Controller
  • Jetter JX2-SV1 - Servo Drive Controller Module
  • Siemens 6SL3120-1TE13-0AA4 - Sinamics S120 Motor Module Inverter
  • Grundig Electronic NPP 04 - Control Unit Module
  • Grundig NPA 01 - Power Supply Unit
  • Panasonic MDDCT5325B14 - AC Servo Drive Driver
  • Jetter JX2-SV1 - Servo Drive Controller Module
  • Schneider (Telemecanique) ATV32HU15M2 - Altivar 32 AC Frequency Inverter Drive
  • Sick ICR845-2E0020 - Image Code Reader Barcode Scanner
  • Endress+Hauser COM253-WX0110 - Dissolved Oxygen Analyzer Meter
  • Schneider (Telemecanique) XBTGT4230 - Magelis Advanced Touch Panel HMI
  • Siemens 6AV6640-0CA11-0AX1 - Touch Panel Operator Panel HMI
  • Jetter JX2-CNT1 - Counter Module PLC I/O
  • Omron NT3S-ST123B-E - Interactive Display Touch Terminal HMI
  • Omron C200HE-CPU42 - Sysmac C200HE PLC Modular System
  • Schneider Electric PM820MG - Multifunction Power Meter
  • Jetter JC-243 - JetControl Motion Controller PLC
  • Axor MTS-200-14/28-RX-S-0186 - Servo Drive Controller
  • Allen Bradley Ultra 3000i - Digital Servo Drive
  • Pro-face AGP3301-S1-D24 - Touch Screen Operator Interface HMI
  • Image AB 372151-00 - Keyboard Terminal Stand Mount
  • Harmonic Drive HA-220-5 - Harmonic Gearbox Servo Actuator
  • Omron NQ5-SQ000-B - Programmable Touch Panel HMI
  • Noax S12S-N8B-C1000 - Industrial Panel PC
  • Grundig Electronic NSP 02 - Control Unit Module
  • Omron NX-TS3201 - Temperature Sensor Input Unit PLC Module
  • Exor (UniOP) eTOP 11-0050 - Operator Panel Touch HMI
  • Schneider (Telemecanique) XBT P021010 - Magelis Operator Panel HMI
  • Omron NS5-SQ00-V2 - Touch Screen Operator Terminal HMI
  • Jetter JM-204-480 - Motion Controller Drive Module
  • Schneider (Telemecanique) XBTF024510 - Magelis HMI Touch Panel
  • Allen Bradley 22B-D010H204 - PowerFlex AC Drive Inverter
  • Yaskawa SGDV-2R8A15A - Sigma V Servo Pack Drive
  • National Instruments NI 9485 - C Series Solid-State Relay Output Module
  • Schindler SMICE 61.Q - Elevator Control Board PCBA
  • Schneider Electric (Telemecanique) TSXSUP40 - Power Supply Unit
  • Jandel SE272131 - Cylindrical Two Point Probe Sensor
  • National Instruments NI 9516 - C Series Motion Analog Input Module
  • Schneider Electric TSX3722101 - TSX Micro PLC Base Unit
  • Applicom International PC2000 V3.7.1 - Communication Card Interface
  • National Instruments cRIO-9014 - CompactRIO Controller Module
  • Qualiflow AFC-260 - Mass Flow Controller
  • Schneider (Telemecanique) HMIGTO3510 - Magelis GTO Color Touch Panel HMI
  • ESR Pollmeier BN 6751.3817 - Servo Controller Drive
  • Omron NT30-ST131-E - Touch Screen Operator Terminal HMI
  • Vickers / Moog BRM-P1-CF2100 - Brushless Servo Motor Drive
  • Festo SPC-200 - Multi-Axis Controller Module
  • Sartorius YDI 150 HD - Data Input Terminal Control Panel
  • Square D / Schneider (Telemecanique) XBTPM027110 - Magelis Operator Terminal HMI
  • Schneider (Telemecanique) HMIGTO2300 - Magelis GTO Color Touch Panel HMI
  • Schneider Electric ASIABLB3004 - Switched Mode Power Supply
  • Schindler MCCE 4.Q A - Elevator Control Board PCBA
  • Yaskawa SGDB-05VD - Servopack Servo Drive Amplifier