Libraries
9.3 Modbus library instructions
S7-200 SMART
432 System Manual, 09/2015, A5E03822230-AC
Modbus RTU master protocol
Modbus master instructions use the following resources from the CPU:
● MBUS_CTRL execution initializes the Modbus master protocol and dedicates the
assigned CPU port (0 or 1), for Modbus master communication.
When a CPU port is used for Modbus communications, it cannot be used for any other
purpose, including communication with an HMI.
● Modbus master instructions affect all of the SM locations associated with Freeport
communications on the port assigned by the MBUS_CTRL instruction.
● Modbus master instructions use interrupts for some functions. These interrupts must not
be disabled by the user program.
● Modbus master instructions program size
– 3 subroutines and 1 interrupt routine
– 1942 bytes of program space for two master instructions and support routines
– Variables for Modbus master instructions require a 286 byte block of V memory. The
starting address for this block is assigned by the user and is reserved for Modbus
variables.
Note
To change the CPU communication port from Modbus back to PPI so that you can
communicate with an HMI device, set the mode parameter of the MBUS_CTRL
instruction to a zero (0).