Hi, everyone here i'm using Modbus TCP to get the Energy Meter data, the actual data format is swapped float/ big Endian, I'm getting data in an array and it displays values in decimal, can anybody help me to swap the value and get the correct value.
Solved! Go to Solution.
I tired lot of swapping logic but i'm not yet succeed, please help me get actual value. I attached pic of some logic tired.
In order to help you, we need the communication protocol of your Energy Meter which describes the encoding of the values. Which model do you use ?
One thing that jumps out is that you are getting an array of U16 data from the Read Input Registers function, then using a Type Cast function to convert the indexed U16 values to U16? This seems unnecessary.
Anyway, if the elements in the 'register values' array are the same data type as the values being sent, they should be the same values if they are being read correctly. What data types are being sent to the NI hardware? Try using a conversion function from the Numeric palette, perhaps.
I'm getting data from Electrical meter through Modbus TCP , actual data format coming out from Meter is Long&Real, I'm using modscan software to verify the data, under modscan i'm using swapped float type to see the actual data.
Actual data takes 2 words space for single value, but in Labview it displays in 1 word (decimal), I think there will be problem, I have to use two decimal values coming from registers and swap it to get the actual data, this is my idea, but i'm struggling how to effectively use the join and swapping function to get the actual data.
I'm new to LabVIEW software, but i tired some logic using these functions but not yet succeed, Kindly guide me to get the actual data.
Is any Modbus block available to get the swapped float data directly without any swapping? if it available, that will be more useful.
Thanks in advance
Have you seen my last post ?