LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make the expression node output show digits of precision?

I am using the expression node to do a simple calculation, x/32-273. It is giving me an integer, example 45 when I want to see one digit of precision, example 45.2. How do I make the expression node output 1 digit of precision? I have been though the help but must be missing it.
0 Kudos
Message 1 of 2
(2,475 Views)
The expression node does not determine the number of displayed digits at all. All calculations are made with full precision.

You must ensure two things:
Check the data type. If the wires are blue you are doing integer calculations and decimal digits cannot exit. Inser a "To DBL" before the expression node or change the data type of all input controls and output indicators (Right-click..representation..DBL).
If you are doing floating point calculation (expression node and wires are both orange) and you don't see the decimal digits, right-click on the indicator and select formatting. Choose a format that shows the desired number of decimals.
0 Kudos
Message 2 of 2
(2,470 Views)