LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

not getting correct number from index array

I am using an index array to get values from an array. The number in the array is 44.998. The number I get out of the index array is 45.00. What do I need to do to get the actual number?
0 Kudos
Message 1 of 6
(3,103 Views)
Unless you convert it to some orther format the number is still 44.998, however the precision of the indicator that you use to view the number has its precision set to just two digits.

Right-click on the indicator and select format & precision and change the precision digits to 3 or more. (If the precision is set to 2 LabVIEW will round the displayed number to 45.00, it's just what is displayed that is affected though, not the actual data).

If however you are converting it to another format (either on purpose using a conversion function or inadvertently by wiring it to something that has a different format, making LabVIEW automatically convert it (look for a grey coersion dot at the end of the wire), avoid doing that...or make sure that format is DBL or SGL...
0 Kudos
Message 2 of 6
(3,103 Views)
Try Increasing the Precision on your Indicator. Right Click on the Indicator and Choose Format and Precision. Increase the digits of precision to 3,4,5 and Check

Also Make sure the Reprsentation is Double or Extended Double.

Good Luck.

Mache
Good Luck!

Mache
0 Kudos
Message 3 of 6
(3,103 Views)
I'm not using an indicator. The output of the Index Array is wired directly to a Number to Decimal String so I can use it in a SCPI command over a GPIB bus. Must I use an indicator and a variable or property node?
0 Kudos
Message 4 of 6
(3,103 Views)
The function you're using outputs integers only. To create a floating point string representation, use either Number to Fractional String or Format into String with %f as the format string.
0 Kudos
Message 5 of 6
(3,103 Views)
Through trial and error I came up with what I needed. I am using a Format Value. Thanks Dennis.
0 Kudos
Message 6 of 6
(3,103 Views)