Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 66753

Reading Holding Registers Float Modbus RTU

$
0
0

I'm having an issue with ready any floating point number correctly off of a Shark 100 Power Meter.

I can sucessifully read a block of registers containing the meter name and serial number as 16 bit characters.

 

For example when I read registers 1-16 on the map and flattening them to a string, I get a fully working string returned.

 

ModbusMap.png

 

When I try and read holding registers 1012-1013 (Amps A) I get really funny numbers when I convert to a float.

 

Here is my code so far

Modbus_Back_Panel.png

With my front pannel settings:

Modbus_Front_Panel.png

 

Expected Value I'm looking to have returned: 11.11 Amps

 

but

When I use an indicator to read the registers: 19265, 0

Same value when I do a conversion

When I do a type casting to a float: 1.26484E+7

 

I've tried some different combinations such as reading only one register and joining the numbers, both in big-endian and little-endian order, still no luck.

Please Help!

 

Here is the modbus float definition as defined the owners manual:

RegisterMapFloatDef.png


Viewing all articles
Browse latest Browse all 66753

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>