The scheme can be applied to more than three Siemens PLCs, S7-200 or S7-200Smart to realize a wireless communication between the main and multi-module communication protocols.
Applicable PLC models: S7-200 and S7-200SMART
Communication protocol: Modbus-RTU
Communication relationship: a master 8 from
Communication distance: 5KM
Communication method: full digital encryption wireless transmission
Wireless communication terminal: DTD434MC Siemens PLC dedicated wireless communication terminal
Add MODBUS library file
Modbus communication of S7-200PLC, Siemens itself has no direct related instructions, so you need to add the official Modbus library file provided by Siemens to STEP7. After adding the library file, the following figure will appear.
Click [Library] and the following figure will appear.
Open the folder related to Modbus separately and the instruction that can be called directly as shown in the figure below will appear.
Master program
The master station program uses the method of time-sharing cycle acquisition to read and write the status of 8 slaves in sequence. Program programming uses the millisecond timer [T32] as the communication acquisition cycle of the system. We can adjust the parameter size according to actual needs. If the GPRS communication method is used, in order to consider the traffic cost, the communication cycle needs to be adjusted according to the actual situation, so as to avoid unnecessary post-costs.
Slave program
The slave program only needs to be consistent according to the communication format setting of the master station, and then the slave station responds to the command to communicate normally. 8 slave communication programs, except for the address, the other parameters are the same, and can be adjusted according to the actual use.
Instruction call description
[Modbus Master Port0 (v1.2)] Communication port 0 is used as the command used by the Modbus master.
[MBUS_MSG] Modbus master read/write command for communication port 0.
[Modbus Master Port1 (v1.2)] Communication port 1 is used as the command used by the Modbus master.
[MBSU_CTRL_P1] Modbus master initialization command for communication port 1.
[MBUS_MSG_P1] Modbus master read/write command for communication port 1.
[Modbus Slave Port0 (v1.0)] Communication port 0 is used as a command for the Modbus slave.
[MBUS_SLAVE] Communication port 0 responds to the master read/write command as a Modbus slave.
Laptops,windows Laptops,win11 Laptops,win10 Laptops
Jingjiang Gisen Technology Co.,Ltd , https://www.gisengroup.com