Programming instructions
6.3 Global library instructions
The image below shows how the data structure above would be assigned to the
MB_HOLD_REG input of an MB_SLAVE instruction in your program.
Each element of the array can be accessed by its symbolic name as shown below. In this
example, a new value is moved into the second element of the array which corresponds to
Modbus address 40002.
The correlation of the data element names to Modbus addresses is shown below.
"HR_DB".Data.Temp_1
"HR_DB".Data.Temp_2
"HR_DB".Data.Temp_3
"HR_DB".Data.Good_Count
"HR_DB".Data.Bad_Count
"HR_DB".Data.Rework_Count
"HR_DB".Data.Line_Stops
"HR_DB".Data.Avg_Time
"HR_DB".Data.Code_1
"HR_DB".Data.Code_2
204
Modbus address 40001
Modbus address 40002
Modbus address 40003
Modbus address 40004
Modbus address 40005
Modbus address 40006
Modbus address 40007
Modbus address 40008
Modbus address 40009
Modbus address 40010
S7-1200 Programmable controller
System Manual, 11/2009, A5E02486680-02
Need help?
Do you have a question about the SIMATIC S7 and is the answer not in the manual?