iuhytvYUTCU
Member
I am working on a project, inside an AB CLX, I implemented the Modbus TCP Client AOI published on AB website, to interreact with a Modbus ASCII device (HACH PCX2000).
The Controller connects using Ethernet port, to a TCP-ASCII bridge, then the bridge module connects to the device through RS485.
The needed operations seemd to be easy, until I put the whole thing to test.
At the beginning of the procedure, a single character 'c' is sent to the device. Then 'e' is sent. Both of them need no reading back. Final operation is to send 'A', and then immediatly read from the device, the data I need ('A' is the command to tell the device to report). These operations work as intended when testing under PC-USB-RS485-Device structure.
First issue is that it takes random time delay for device to recongnize 'c' and 'e'. When checking RS485 activity on PC (PC-USB-RS485 line is wired), I can see more then needed characters appeared on the line, however I can not confirm what are they. It is seen that the PLC sent multiple batches of data in a time span, and not every batch of data that PLC send is identical, only when PLC sent a line including 0#63 (character c) the device will finally recongnize.
Second wierd thing is that I have to set the bridge in Modbus over TCP/IP transparent transmission mode for the whole thing to work, which is not true according to my understanding; the bridge should not transparently drop the modbus TCP data on the serial line, am I wrong?? Although I am not convinced, again.
Final problem is that after sending 'A' I was not succcessfully reading back the device report. Actually I have to say I don't know how to use the AOI in this scenario that the controller sends out a command and then reads right away, especially behind a modbus protocol bridge, or is this basically impossible/incompatible?
Any understanding or suggestions, folks? Big thanks to any words in adv!!!
The Controller connects using Ethernet port, to a TCP-ASCII bridge, then the bridge module connects to the device through RS485.
The needed operations seemd to be easy, until I put the whole thing to test.
At the beginning of the procedure, a single character 'c' is sent to the device. Then 'e' is sent. Both of them need no reading back. Final operation is to send 'A', and then immediatly read from the device, the data I need ('A' is the command to tell the device to report). These operations work as intended when testing under PC-USB-RS485-Device structure.
First issue is that it takes random time delay for device to recongnize 'c' and 'e'. When checking RS485 activity on PC (PC-USB-RS485 line is wired), I can see more then needed characters appeared on the line, however I can not confirm what are they. It is seen that the PLC sent multiple batches of data in a time span, and not every batch of data that PLC send is identical, only when PLC sent a line including 0#63 (character c) the device will finally recongnize.
Second wierd thing is that I have to set the bridge in Modbus over TCP/IP transparent transmission mode for the whole thing to work, which is not true according to my understanding; the bridge should not transparently drop the modbus TCP data on the serial line, am I wrong?? Although I am not convinced, again.
Final problem is that after sending 'A' I was not succcessfully reading back the device report. Actually I have to say I don't know how to use the AOI in this scenario that the controller sends out a command and then reads right away, especially behind a modbus protocol bridge, or is this basically impossible/incompatible?
Any understanding or suggestions, folks? Big thanks to any words in adv!!!