zanker99
Lifetime Supporting Member
Protocol: Modbus RTU
PLC: AB/Rockwell Micro850 as master
Programming environment: CCW
Background Info:
I am trying to use Modbus rtu to communicate with 20 devices for only read on one Modbus channel and on another channel I have 1 device which the PLC writes to and reads from. I have no experience using Modbus in PLC. It will be very helpful if someone who knows using mdobus RTU on PLC can help me find answers to some questions I have regarding this implementation.
Question:
1. How does one handle continuous communication with a device on Modbus RTU using a PLC like Micro850: i.e. write a command to the device, wait for it to process and read from the device.
I am using only holding registers ( say 50 registers ). "The MSG_MODBUS block for the Micro850 in CCW says that a maximum of 4 message request per channel can be processed in one scan. For ladder program, message requests are executed at the end of a ladder scan."
I am sure I am missing something here but what I am not able to understand is, if all Modbus messages in a scan are executed together at the end of the scan, how can I wait for the write command to be sent and processed before reading the response. It looks like any delays/timers before or after the MSG_MODBUS block do not take effect to provide the time required between a write and a read. Any suggestions on how to implement this?
I have an example attached. The blocks used are as follows:
TONOFF delays turning on an output on a true rung, then delays turning off the output on the false rung.
MSG_MODBUS sends a Modbus message over a serial port. A maximum of four message requests per channel can be processed in one scan. For Ladder Diagram programs, message requests are executed at the end of a ladder scan.
Thank you!
PLC: AB/Rockwell Micro850 as master
Programming environment: CCW
Background Info:
I am trying to use Modbus rtu to communicate with 20 devices for only read on one Modbus channel and on another channel I have 1 device which the PLC writes to and reads from. I have no experience using Modbus in PLC. It will be very helpful if someone who knows using mdobus RTU on PLC can help me find answers to some questions I have regarding this implementation.
Question:
1. How does one handle continuous communication with a device on Modbus RTU using a PLC like Micro850: i.e. write a command to the device, wait for it to process and read from the device.
I am using only holding registers ( say 50 registers ). "The MSG_MODBUS block for the Micro850 in CCW says that a maximum of 4 message request per channel can be processed in one scan. For ladder program, message requests are executed at the end of a ladder scan."
I am sure I am missing something here but what I am not able to understand is, if all Modbus messages in a scan are executed together at the end of the scan, how can I wait for the write command to be sent and processed before reading the response. It looks like any delays/timers before or after the MSG_MODBUS block do not take effect to provide the time required between a write and a read. Any suggestions on how to implement this?
I have an example attached. The blocks used are as follows:
TONOFF delays turning on an output on a true rung, then delays turning off the output on the false rung.
MSG_MODBUS sends a Modbus message over a serial port. A maximum of four message requests per channel can be processed in one scan. For Ladder Diagram programs, message requests are executed at the end of a ladder scan.
Thank you!