CTH200 Series PLC User Manual
※ MBUS_INIT parameter configuration explanation
Set slave station address 1
Set maxIQ 64 I/O(000001-0000064 and 010001-010064)
Set maxAI 32 analog inputs(030001-030032)
Set maxhold number of V area holding register(word as unit )
Starting address of S7-200 V area holding register that Modbus master
station can visit (such as &VB0).
【Use Modbus master station protocol instructions】
※ Modbus master station protocol instructions occupy CTH200CPU resource
1) According to different Modbus protocol libraries, the FPORT 0 or 1 is used as the slave station
protocol. When Port 0 or Port 1 is used as Modbus protocol communication, it cannot be used for
any other purpose, including communication with MagicWorks PLC or SETP7-Micro/WIN,
FPORT communication. The MBUS_INIT controls Port is set to Modbus is still PPI.
2) All SM corresponding to selected FPORT
3) Occupy 119 byte program space
※ MBUS_CTRL instruction
Use SM0.0 to call MBUS_CTRL instruction to initialize master station and enable it.
Parameter explanation:
Set communication
mode: 1 enable
Modbus protocol, and
0 recovery system to
PPI protocol.
11200, 2400, 4800, 9600,
19200, 38400, 57600,
115200
1—Odd parity
2—Even parity
All settings
use one
stop bit.
Time master station
wait for slave station,
ms as unit.
Completion bit,
automatically set 1
after initialization.
Initialization error
code
1—illegal parity selection
2—illegal baud-rate selection
3—illegal mode selection
Valid only
when
Done bit is
1.
※ MBUS_MSG instruction
Use SM0.0 to call Modbus RTU master station R/W subroutine MBUS_MSG, send a Modbus
request after First connected. One R/W function (MBUS_MSG) enable at same time.