LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I write Float to Modbus register?

I'm new to Modbus. I have been depending on the Modbus I/O server in LV DSC but the bugs in that have driven me to attempt to use the NI Modbus library. I've been trying to read and write 32 bit floats to modbus registers. I know what the contents of these registers are by using diagnostic routines, but the Modbus vis are not picking up the second 16 bit register that contains the decimal information. Instead the register reads zeros. All my attempts to write to the same modbus registers fail. There are no error messages. The diagnostics show nothing written. Please look at my vis.
Download All
0 Kudos
Message 1 of 4
(4,964 Views)

Don't have the libraries but have you tried reversing the hi lo order?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 4
(4,957 Views)

The problem is resolved. Part of it was that I was using +1 addressing when it apparently was unnecessary plus having a word order problem. So when reading I was trying to decode an empty register for the decimal part.

 

My problem with writing the float was different in that no changes to any registers were being made. I relaunched labview and power cycled the Watlow and now it works. It is very frustrating that the NI MODBUS library does nothing diagnostically to tell you why the controller is ignoring you.

0 Kudos
Message 3 of 4
(4,952 Views)

JT1958 wrote:

 It is very frustrating that the NI MODBUS library does nothing diagnostically to tell you why the controller is ignoring you.


That may seem to be the case, but in reality, the controller is doing nothing to tell the Modbus library why it is ignoring you.

0 Kudos
Message 4 of 4
(4,947 Views)