Modbus TCP Server - TCP error 16#C210
I am using the library Modbus TCP 8.
When I try to set up the server, there is always a TCP error.
16#C040 16#xxxx TCP_SEND error 16#xxxx. Refer to appendix.
16#C210 The application tried to send or receive data, and the Socket is not connected (_SOCKET.ACTIVE == False).
block settings
MB_TCP_Server_51(
xActivate := xTestMBServerActivate,
xAcknowledge := MBServer.xAcknowledge,
xAutoAck := MBServer.xAutoAck,
xUDP := MBServer.xUDP_Mode,
strBindIp := '',
uiBindPort := UINT#504,
strDestIp := '',
uiDestPort := UINT#0,
tReconnectDelay := t#500ms,
tTimeout := t#0s,
uiOffsetInputRegister := UINT#150,
uiOffsetHoldingRegister := UINT#99,
uiOffsetInputs := UINT#50,
uiOffsetCoils := UINT#0,
xActive => MBServer.xActive,
xConnected => MBServer.xConnected,
xError => MBServer.xError,
wDiagCode => MBServer.wDiagCode,
wAddDiagCode => MBServer.wAddDiagCode,
udtDiag => MBServer.udtDiag,
arrModbusData := MBServer.arrModbusData);
When I try to set up the server, there is always a TCP error.
16#C040 16#xxxx TCP_SEND error 16#xxxx. Refer to appendix.
16#C210 The application tried to send or receive data, and the Socket is not connected (_SOCKET.ACTIVE == False).
block settings
MB_TCP_Server_51(
xActivate := xTestMBServerActivate,
xAcknowledge := MBServer.xAcknowledge,
xAutoAck := MBServer.xAutoAck,
xUDP := MBServer.xUDP_Mode,
strBindIp := '',
uiBindPort := UINT#504,
strDestIp := '',
uiDestPort := UINT#0,
tReconnectDelay := t#500ms,
tTimeout := t#0s,
uiOffsetInputRegister := UINT#150,
uiOffsetHoldingRegister := UINT#99,
uiOffsetInputs := UINT#50,
uiOffsetCoils := UINT#0,
xActive => MBServer.xActive,
xConnected => MBServer.xConnected,
xError => MBServer.xError,
wDiagCode => MBServer.wDiagCode,
wAddDiagCode => MBServer.wAddDiagCode,
udtDiag => MBServer.udtDiag,
arrModbusData := MBServer.arrModbusData);
Comments
According to the documentation, Modbus TCP library version 8 is designed for PLCnext Engineer version 2020.0 LTS.
The recently released Modbus TCP library version 9 is designed for PLCnext Engineer version 2021.0 LTS.
2020.0 LTS
The main question is for Modbus TCP 8 library, is it possible to fix the problem?
I started to test version Modbus TCP 9, but still I get some errors.
and now I get 16#C030 and 16#C205
Thank you.
I was using 2020.0 LTS
Now I installed the PLC next engineer version 2021.3.1
Do I need to upgrade the PLC firmware?
I am getting the following error code
16#C205
Only one use of an address is normally permitted
What does this really means and how to fix it ?
Thank you.
Is seems that the server dies at some point, but it does not show any error, in this state no data can be requested to the server, see attached image.
It is also possible to contact the developers directly using the "Contact" button on the PLCnext Store page.
I can answer one question:
Short answer: No.
However, it is always recommended to keep the PLC firmware upgraded to the latest LTS version, at least, to get the benefit of security improvements and other enhancements.
Also please note the recommended PLCnext Engineer versions for the different versions of the Modbus TCP libraries. The developers will probably recommend that you use exactly the recommended version (no earlier and no later).
(ref: #219047)
I have tested the new version, it was a bit more stable.
here are the metrics.
We still get errors. we are running requests at a second level to a meter which is next to the PLC and we have gotten 0 errors so far, and the PLC shows 9 errors over approx 65000 requests.
The PLC server on the code itself does not record any error flag, but it's not possible to request data at some point.
Also, interesting, that the response time for the Modbus message is not constant, it ranges from 200ms up to 1900 ms.
Finally, after testing for one entire day, the server becomes unresponsive, it dies but shows no error, so you basically can request data to it but on the code it seems that everything is fine...
I think the last point is really critical, since there is no acknowledgement of error from the system, this library shall not be used.
Any hint? on how to solve?
The test was performed
PLC engineer next 2021.3.1
Modbus TCP 9 library
PLC AXC_F_2152 - 2020 / hw 02