It's my very first time with Modbus but I have worked with some other networking protocols before and programmed PLCs using all of Structured Text, FBD, and LAD.
I have this ModbusTCP code to read the input registers of a connected device. The problem is that the request messages are not being sent (Wireshark does not record any traffic) even though the xExecute input of the ClientRequestReadInputRegisters function block is changing as I desire when the clientTCP object is connected. I have also adjusted the frequency of the requests to ensure that the Modbus server can handle them that fast. However, the value of ClientTCP.udiNumReqNotProcessed keeps rising with each rising edge on ClientRequestReadInputRegisters.xExecute, although ClientTCP.udiNumMsgSent stays at 0. Is there something I need to do to have the requests processed?
It may also be important to know that the ClientRequestReadInputRegisters function block returns no errors or exception codes. I believe that this means I have the correct values for all necessary fields for a ModbusTCP request.
Please help if you have some Modbus experience with Codesys.
I have exactly the same problem and I urgently need help.
When I login and run the program codesyscontrol.log and Wireshark shows the same messages which refer to opening TCP connection. So Modbus TCP/IP connection is opened, but no messages are sent from the program.
• udiNumMsgSent is 0 and udiNumReqNotProcessed keeps rising
• eErrorID is OK
• And the eExecption:= RESPONSE_SUCCESS
Log in to post a comment.