dsasorin Posted January 20, 2011 Report Share Posted January 20, 2011 Hi. I use labview 8.6 + dsc module. I want to read tags from a power analyzer on modbus rtu protocol. i have the register map of the device. I configured ni opc server and tags needed. The problem is that i don't know how to read the entire value from register. For exemple, U12 is 217.45 Volts. My tag is configured to read a word (16bit) register, but the value that i see with opc client is just 217. I can't see decimals. If it was 21745, then it was an easy job to scale that value (divide by 100). So, how can i see decimals ? Were should i look for ? Thanks. Quote Link to comment
EricLarsen Posted February 8, 2011 Report Share Posted February 8, 2011 A single mod bus register is a 16 bit register and can only contain integer values. Therefore, your instruement is probably rounding off the floating point value to an integer before storing it. The typical way for an instrument to pass floating point values is to break up a 32 bit floating point number into 2 consecutive 16 bit registers. You can then read the two registers and combine the values using the method described here: http://digital.ni.com/public.nsf/allkb/2462D01074BDB1A886256D9600506763 You'll have to configure your power analyzer to pass the floating point value this way. Check the documentation to see if this is possible. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.