Sending real value from SCADA to PLC using MODBUS TCP protocol

Hello,

I have SIEMENS PLC connected to SCADA using MODBUS TCP (MODNET) protocol. 

I need to write a real value to a register(holding register) of PLC from SCADA. For doing the same, I have configured few registers from 40001 to 40999.

While trying to send the data, the registers are getting populated with junk values. And adjacent registers are getting populated with junk values as well for large values. 

How to populate the  holding register with the exact value entered from SCADA. 

The registers are getting the exact value when its input from MODSCAN. So I have concluded that the problem is definitely fro the SCADA end.

Can anyone help me to find a solution to this. 

Thanks,

Nayana

  • Hi Nayana,
    Depending on your device, it can encode the REAL in different format. The REAL data type requires two modbus registers. The Citect Modnet driver and Citect Real are 32-bit.
    Check out these Modnet parameters to change the word order, [MODNET]FloatMode
    0: Order of bytes =
    1 0 3 2

    1: Order of bytes =
    3 2 1 0

    2: Order of bytes =
    0 1 2 3

    3: Order of bytes =
    2 3 0 1

    The default is 0, which is byte order 1 0 3 2.

    The use of driver debugging can also assist see what is sent on the network, wireshark might also help.
    Kind regards
    Olivier
  • Hey Olivier,

    Thanks a ton.
    This saved my day.

    Best,
    Nayana