Is it possible to send a real value close to 0 through modbus?

evicta
2023-02-24
2023-02-25
  • evicta - 2023-02-24

    I have a Real (0.05) and I want to convert it into a Word so I can send it through Modbus. I can send it to two register locations so 2 Words would work.

    I have the OSCAT Basic library installed and I am using REAL_TO_DW. This turns the Real 0.05 to a DWORD of 1028281787.
    Then I use WORD_OF_DWORD to get Bytes 0 and 1. However, the two words I get are 15690 and 22000.

    Am I going about this the wrong way? Would a Real even closer to 0 (like 0.0000005) be harder to send through Modbus?

     

Log in to post a comment.