10-31-2018 09:40 AM
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.
thanks....
Solved! Go to Solution.
11-01-2018 03:09 AM
Send an example of the array you get and the expected value.
11-01-2018 04:32 AM
I'm getting array values are 16967,54476,16072,33183 and expected values are 49.9707 and 0.3823.
11-01-2018 08:52 AM
If we could see the VI you have written so far, that would help us give you advice on it.
11-02-2018 12:43 AM - edited 11-02-2018 12:49 AM
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.
11-02-2018 03:35 AM
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 ?
11-02-2018 03:56 AM
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.
11-02-2018 04:16 AM - edited 11-02-2018 04:22 AM
11-02-2018 04:28 AM
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
11-02-2018 05:09 AM - edited 11-02-2018 05:15 AM
Have you seen my last post ?