Siemens SIMATIC S7-200 System Manual page 369

Programmable controller
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

Example of Programming the Modbus Slave Protocol
Using the Modbus Protocol Library
Network 1
//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 values, allow
//access to 1000 holding registers (2000
// bytes) starting at VB0.
LD
SM0.1
CALL
MBUS_INIT,1,1,9600,2,0,128,32,1000,
&VB0,M0.1,MB1
Network 2
//Execute the Modbus Slave Protocol on
//every scan.
LD
SM0.0
CALL
MBUS_SLAVE,M0.2,MB2
Chapter 12
355

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents