Libraries
9.3 Modbus library instructions
S7-200 SMART
448 System Manual, 09/2015, A5E03822230-AC
Modbus slave execution error codes
Table 9- 32
Illegal baud rate or parity
3 Illegal slave address
Illegal value for Modbus parameter
Holding registers overlap Modbus Slave symbols
Illegal function request/function not supported
Illegal memory address in request
Slave function not enabled
Signal board port 1 missing or not configured
Modbus master example program
This example program shows how to use the Modbus Master instructions to write and read
four holding registers to and from a Modbus slave each time input I0.0 is turned on.
The CPU writes four words starting at VW100 to the Modbus slave. The data is written to
four holding registers in the slave starting at address 40001.
The CPU then reads four holding registers from the Modbus slave. The data comes from
holding registers 40010 - 40013 and is placed into the V memory of the CPU starting at
VW200.
Figure 9-1 Example Program Data Transfers