Modbus TCP Write Problem

Runtime
origin
2020-06-15
2020-06-15
  • origin

    origin - 2020-06-15

    Hi,

    I'm having problems writing outputs over Modbus TCP. I will describe my setup first.

    Codesys V3.5 SP16
    Raspberry Pi running Licensed Codesys 32-bit run-time
    Phoenix Contact Modbus TCP Bus Coupler 2703981 (IL ETH BK DI8 DO4 2TX-PAC)

    The Phoenix Contact Bus Coupler has one output card with 4 channels, and two output cards each with 4 channels.

    I have been able to write a Modbus Slave Channel to read the Inputs correctly and use them in a POU. I cannot figure out how to write to the output card by Modbus TCP.

    I contacted tech support at Phoenix Contact today to confirm what the correct register offsets are. They said for this basic hardware setup, inputs are 8000 and outputs are 8001. Again, inputs are working correctly. With register offset for outputs set to 8001, I get the following error: "Slave Device Failure - Unrecoverable error while performing the request". I have attached a screenshot of the modbus channel setting for the write.

    I have tried changing the Function Code because Phoenix Contact supposedly supports FC6, FC16, and FC23 but get the same error. I have also tried changing the register offset, but any other offset will give the following error: "Illegal Data Address - Slave does not support this register offset".

    Any ideas?

    Thanks.

     

Log in to post a comment.