This solution can be applied to more than 3 Siemens PLCs, S7-200 or S7-200 Smart to achieve a wireless communication from the main Modbus communication protocol.
Applicable PLC models: S7-200 and S7-200 SMART
Communication Protocol: Modbus-RTU
Communication relations: one master 8 slave
Communication distance: 5KM
Communication: All-digital encryption wireless transmission
Wireless communication terminal: DTD434MC Siemens PLC dedicated wireless communication terminal
Add MODBUS library file
S7-200PLC Modbus communication, Siemens itself has no direct related instructions, so you need to add STEP7 inside Siemens official Modbus library file. After adding a library file, the following figure will appear.
Click [open] and the following figure will appear
When you open the Modbus-related folder respectively, the following instructions can be directly invoked.
Master station program
The main station program we use time-sharing cycle acquisition to read and write the status of the eight slaves. Program programming uses the millisecond timer [T32] as the communication acquisition cycle of the system. We can adjust the parameters according to actual needs. If you use GPRS communication methods, you need to adjust the communication cycle according to the actual situation in order to avoid unnecessary late charges.
Slave program
The slave station program only needs to be consistent according to the communication format settings of the master station, and then the slave station responds to the instructions to communicate normally. For the 8 slave communication programs, all the other parameters are the same except for the address, which can be adjusted according to the actual use in the later period.
Instructions call instructions
[Modbus Master Port0(v1.2)] Command of communication port 0 used as Modbus master.
[MBUS_MSG] Communication port 0 Modbus master read and write instructions.
[Modbus Master Port1 (v1.2)] Command for communication port 1 used as Modbus master.
[MBSU_CTRL_P1] Modbus master initialization command for communication port 1.
[MBUS_MSG_P1] Modbus master read and write commands for communication port 1.
[Modbus Slave Port0 (v1.0)] Communication port 0 as a Modbus slave instruction.
[MBUS_SLAVE] Communication port 0 as a Modbus slave responds to master read and write commands.
Edge Sealing Machine,Automatic Sealing Machine,Heat Sealing Machine,Automatic Edge Sealing Machine
Dongguan Yuantong Technology Co., Ltd. , https://www.ytbagmachine.com