Modbus communication Issue with CI853 and CI867 in the same Hardware
I have a application that have CI 853 and CI867, i show this in the attached image.
CI 853 is the "Channel" 4 and CI867 is the "Channel" 5.
CI853 communicate with 3 slaves, it's a Siemens Relay.
CI867 communicate with 1 slave from a thirdy part.
The ModbusTCP (CI867) is working fine but if I turn off the gateway of ModbusRTU (CI 853 stop the communication), the communication ModbusTCP freeze?
If I just turn on the gateway the communication back, whatever if the slaves are on or not.
Is there any relations between this CI853 and CI867?
Follow the CI867 and CI853 documentation.
Voted best answer
1. I don't know how are conected Request parameters of your application. You can check if Request parameter of READ block from CI867 depends on OK status of READ block from CI853.
2. I found following parameter for configuration of ModbusSlave of CI867 (hardware -> CI867 -> Ethernet -> ModbusTCPSlave):
When Auto connect is set to True the TCP connection is established to the Modbus TCP slave directly after a download and reestablished if it is broken, regardless of connected function block.
If Auto connect is set to False and one or more connect blocks are enabled against a ModbusTCP slave, the connection will be established. The connection will also be reestablished if it is broken. If no connect block is enabled to the slave, the CI867 will close the connection.
3. For CI853 (hardware -> CI853 -> Com -> Modbus) I usually put Poll Time = 0
Thanks for your help.
Auto connect is set to false, but connect is not the problem, I can connect CI867 Slave, however this communication freeze.
I try put poll time = 0 and Timeout = 500ms in CI853 but still freeze ModbusTCP connection.
I did one thing, down the Enable of connect block in the second node of ModbusRTU and ModbusTCP back to communicate.
But is not the root cause.
This solve the problem momentary.
The code of CI853 and CI867 are in two separate Single Control Module, and the request of Read Block depend of a valid of MBTCPConnect, the connect status is always 1, no error, Although the communication is freeze.
Usually I put the request of Read Block to depend of a valid of MBTCPConnect AND the status bits of the read blocks (NDR = read is OK, Error = has some problem). In case you read from a few slaves, all the READ blocks are connected one after one (there are similar posts in this forum about that)
Or you can use simply PulseGen for request of READ Block but then no supervision of the status of reading
Based on your explanation "the connect status is always 1, no error, Although the communication is freeze" and momentary solution of the problem with Restart of connect block:
Usually I restart Connect Block by making his EnC parameter =0 for a certain time (5 sec) every time when I found error code from some of the READ blocks. That helped me to re-establish connection when the slaves are disconnected physically and connected again for example.
When you set poll time =0, the connect block send status=1 all the time, doesn't matter if slave connection exist or not.
The big problem is, that CI853 is interfering in CI867 communications.
The problem is, when the connections of CI853 down, CI867 communication freeze.
When I set the Enable of ModbusRTU to off, CI867 communication back to normal.
But i wanna find out how CI853 can interfering in CI867 communication.
Follow the code of ModbusRTU
Then you can put your program code for connect and reading/writing for CI853 and for CI867 in different programs, and then connect this programs to different tasks, with different execution times - I suppose CI867 will need more time in case you have more connections there.