SIEMENS S7
Flagship of Industrial Automation: Siemens S7 Protocol and Communication
When it comes to industrial automation, one of the first brands that comes to mind is Siemens. They use the S7 Communication (S7Comm) protocol to enable communication between PLC (Programmable Logic Controller) systems. This protocol is the "common language" that allows devices in the Siemens ecosystem to exchange data with each other and the outside world.
1. What is the Siemens S7 Protocol?
The S7 Protocol is a high-level communication protocol specific to the Siemens SIMATIC S7 family (S7-300, S7-400, S7-1200, S7-1500). It operates on the standard Ethernet (TCP/IP) layer and typically uses Port 102.
Key Features:
-
Connection-Oriented: A handshake occurs between the Client and the Server before data transfer begins.
-
Block-Based Access: Provides direct access to data blocks (DB), inputs (I), outputs (Q), and markers (M) within the PLC.
-
Functional Variety: Supports not only data read/write but also control commands such as stopping/starting the PLC (Run/Stop).
2. Differences Between S7-300/400 and S7-1200/1500
As Siemens technology evolved, so did the operation of the protocol. The most important difference to note in modern systems is the "Optimized Block Access" feature.
-
S7-300/400: Data is accessed directly via memory addresses (e.g., DB1.DBX0.0).
-
S7-1200/1500: In these next-generation PLCs, data is held with symbolic names. For an external device (Client) to access this data, two settings must be configured in the PLC program:
-
Permit access with PUT/GET: This option must be activated in the hardware settings.
-
Optimized Block Access: The "Optimized" feature of the data block to be accessed must be turned off (Standard access must be used).
-
TIA Portal: Step-by-Step Guide to Activating PUT/GET Permission
In Siemens S7-1200 and S7-1500 series PLCs, granting PUT/GET permission is a critical security step for external devices (such as HMI, SCADA, or IIoT Gateways like Hubbox) to access PLC data.
Step 1: Hardware Configuration
-
Open your TIA Portal project.
-
Right-click on your PLC in the Project Tree menu on the left and select Properties.
-
In the window that opens, find the Protection & Security section under the General tab.
Step 2: Permitting Connection Mechanisms
-
Click on Connection mechanisms under Protection & Security.
-
Check the box labeled "Permit access with PUT/GET communication from remote partner".
Step 3: Setting Data Blocks (DB) to Standard Access
In the S7-1200/1500 series, data is usually stored as "Optimized." However, external devices generally use standard memory addressing.
-
Right-click on the Data Block (DB) you want to read and enter its Properties.
-
Click on the Attributes tab.
-
Uncheck the "Optimized block access" box.
-
After this process, you will see the "Offset" column appear in your DB table (e.g.,
DB1.DBX0.0).
Step 4: Compile & Download
For these changes to take effect, you must compile the hardware configuration and download it to the PLC:
-
Select the PLC and click the Compile button in the top menu.
-
After ensuring there are no errors, click Download to device to upload it to the PLC.
Important Security Note
Enabling PUT/GET makes your PLC more accessible to the outside. Ensure your PLC is not directly connected to the internet; use a secure VPN layer like Hubbox or a robust firewall in between.