04-15-2015 08:05 AM
Hi again!
So I have used the modbus library and I get some information from my device, unfortuneatly I need some help with understadning the reading values that I get in the example I'm using ( see attached VI).
In my protocol I have a physical adress that I want to access, this address is in ASCII code, 0032h, if converting to decimal i get 50, which is the starting adress I use in my program. If I run my program I get different values like 20K and 6k range, complety random numbers in the reading register. But if I read on my power meter it says around 500W. How do I convert this number to something real?
Best regards Maurlind!
04-15-2015 08:18 AM
Most MODBus protocols will state there is a conversion from the U16 data to the real value. So read through the manual and make sure there isn't something like you need to divide by 10.
04-16-2015 04:56 AM
go to my page, i have that problem too long time a go but now its solved
http://forums.ni.com/t5/LabVIEW/MODBUS-RTU-multiple-request-amp-response-NI-VISA/m-p/2857414#M832974
Regards,
rhiesnand
04-20-2015 03:09 AM - edited 04-20-2015 03:15 AM
Hi rhiesnad!
So I looked in your older thread and tried the type cast thing with U32 to DBL and U32 to U16. The problem still exist i get huge numbers that dosen't represent the real power value.
I have attached the program that i took from your thread, the difference is that I have only one slave and not two that you had.
In your thread you also go huge numbers, and that you said that the slave was produceing values in the standard IEEE 754, mine is dosing the exact same thing. It is sending out the values in the format IEEE 754 according to my device protocol. How do i represent it in the correct form?
What is it that I'm doing wrong here?
Best regards Maurlind!
04-20-2015 06:55 AM - edited 04-20-2015 06:55 AM
I also tride the swap word function after the type cast, the only difference is that the high values is stable and pendling around 1,130E8.
Best regards Maurlind!
04-21-2015 03:22 AM
Does it matter which connection type of RS-485 you use? I'm currently using 2-wire connection, since I didn't get 4-wire connection to work properly.
Best regards Maurlind!
04-22-2015 01:23 AM
Hi!
I managed to solve my problem on my own. Turns out that from the type cast function it gave me Uint16 and I need float32 to see the problem . So I change the constant of the type cast function to SGL instead of Uint32 and put that and the numeric indicator in a for loop.
Best regards Maurlind!