Jump to content

Can't see decimals on tags - ni opc server/client


dsasorin

Recommended Posts

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.

Link to comment
  • 3 weeks later...

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.