Announcement

Collapse
No announcement yet.

I cannot seem to write 32 bit float values

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    I cannot seem to write 32 bit float values

    Hi, I am using the modbus plug-in, all the other types seem to work correctly, but for the float32 type, I am only able to read the mobus value register. When I try and write to it, the value seems to never be sent.

    #2
    I haven't seen any response to this post. Issue is still present.

    Error in log file:

    Error in Write: Exception of type 'Modbus.SlaveException' was thrown. Function Code: 134 Exception Code: 2 - The data address received in the query is not an allowable address for the server (or slave). More specifically, the combination of reference number and transfer length is invalid. For a controller with 100 registers, the PDU addresses the first register as 0, and the last one as 99. If a request is submitted with a starting register address of 96 and a quantity of registers of 4, then this request will successfully operate (address-wise at least) on registers 96, 97, 98, 99. If a request is submitted with a starting register address of 96 and a quantity of registers of 5, then this request will fail with Exception Code 0x02 “Illegal Data Address” since it attempts to operate on registers 96, 97, 98, 99 and 100, and there is no register with address 100.

    Modbus reads the value from this register, but gives the error when I try and write to it.

    dbus Debug Updating device [test] - Address:125 - Type:HoldingRegister(Float32) to [21.1000003814697]
    Aug-08 12:26:07 PM Modbus Debug Read Slave: 1 Address: 125 HoldingRegister:Float32 as 21.1000003814697
    Aug-08 12:26:07 PM Modbus Debug Reading Slave: 1 Address: 125 HoldingRegister:Float32

    Enabled Multi Register, now system writing, but the wrong value shows up on the other side.

    Aug-08 12:45:38 PM Modbus Debug Updating device [test] - Address:125 - Type:HoldingRegister(Float32) to [2.75506488473974E-39]
    Aug-08 12:45:38 PM Modbus Debug Read Slave: 1 Address: 125 HoldingRegister:Float32 as 2.75506488473974E-39
    Aug-08 12:45:38 PM Modbus Debug Reading Slave: 1 Address: 125 HoldingRegister:Float32
    Aug-08 12:45:37 PM Modbus Writing Slave: 1 Address: 125 HoldingRegister:Float32 as 30
    Aug-08 12:45:37 PM Modbus Debug CAPI Control set value: 30 for device ref:241
    Aug-08 12:45:37 PM Device Control Device: Modbus System test to (value) (30) by/from: CAPI Control Handler
    Last edited by JoelWener; August 8, 2017, 11:47 AM. Reason: missing info

    Comment


      #3
      Hi Joel, I think I've identified the issue, the write functions are currently limited to UShort (or unsigned 16-bit integers) rather than float32 types.

      Fixing it is another issue, give me some time to re-work some code and test.

      There's a new version (3.9.6431.26038) in the updater, can you try that please?

      In the interim, can you get Modpoll.exe to work? If so, please send me the modpoll command line you used to set the correct value, it would a big help. http://www.modbusdriver.com/modpoll.html
      Last edited by beerygaz; August 10, 2017, 07:31 AM.
      Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

      Comment


        #4
        Update version.

        Hi,

        I cannot seem to locate the updated version. Version 3.9.6364.2610 appears to be the latest version available. I will try modpoll and let you know. Thanks.

        Comment

        Working...
        X