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 TCP Slave support for Coils/InputRegisters (bit)

yyannekk
2016-03-14
2016-12-01
  • yyannekk - 2016-03-14

    The Pi ModbusTCPSlave Device seem to only support Holding and Input Registers but no Coils/Discrete Inputs?
    In the main Config I can set start addresses, but I don't have access in the IO mapping

    IMG: ModbusTCPAEAbbild.PNG

    IMG: ModbusTCPSlave.PNG

     
  • xselvasx - 2016-03-14

    Normally there is an area for input register and an area for holding register, you can read the same area as discrete input and coil.
    For example if you read the first discrete input is the same as reading the first bit of the first input register.
    10001 = 30001 bit 0
    10002 = 30001 bit 1

    00001 = 40001 bit 0
    00002 = 40001 bit 1

    inside the PLC (slave tcp):
    30001 = %QW0 and 10001 = %QX0.0
    40001 = %IW0 and 00001 = %IX0.0

     
  • proaquatics - 2016-12-01

    Is this the same for ModBus Serial RTU? I have a HMI that is reading (FC-1) and writing (FC-15) coils to a CoDeSys PLC that is set up as a ModBus Serial Slave device. Only the Holding & Inputs registers show up in the I/O mapping. So will the coil read and writes from the HMI master show up in the mapping in the same way it does for TCP...(i.e. 00001 =40001 bit 0)?

    Also...how would you then read and write the 30000 & 40000 registers?

     

Log in to post a comment.