Libraries
9.3 Modbus library instructions
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
447
The Error output contains the result of executing the instruction. This output is only valid if
Done is ON. If Done is OFF, the error parameter is not changed.
Table 9- 31 Example program of S7-200 SMART CPU operating as a Modbus slave
Initialize the Modbus Slave protocol on
the first scan. Set the slave address to
1, set port 0 to 9600 baud with even
parity, all access to all I, Q and AI val-
ues, allow access to 1000 holding reg-
isters (2000 bytes) starting at VB0.
LD SM0.1
CALL MBUS_INIT, 1, 1, 9600,
2, 0, 128, 32, 1000, &VB0,
M0.1, MB1
Execute the Modbus Slave protocol on
every scan.
LD SM0.0
CALL MBUS_SLAVE, M0.2, MB2
Modbus slave execution error codes (Page 448)