Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Modbus Client Request Not Processed

4 days ago
  • corriibme

    corriibme - 2022-08-04

    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.


    Last edit: corriibme 2022-08-04
  • tuomas

    tuomas - 4 days ago

    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


    Last edit: tuomas 4 days ago

Log in to post a comment.