DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Subtracting to Value properties

Solved!
Go to solution

 

I am trying to calculate and display the ESN_Mileage.  it seems this calculation below will only produce "9.999999999999" which is not correct.

 

 

 

DIM

ESN_M1, ESN_M2, ESN_Mileage

IF Data.Root.ChannelGroups(1).Channels.Exists("ECM Distance") then

ESN_M1=Data.Root.ChannelGroups(1).Channels("ECM Distance").Properties("maximum").Value

ESN_M2=Data.Root.ChannelGroups(1).Channels("ECM Distance").Properties("Minimum").Value

ESN_Mileage = (ESN_M2 - ESN_M1)

Call MSGbox(ESN_Mileage)

End if

0 Kudos
Message 1 of 3
(5,239 Views)

Could you please provide some clarification? is the total supposed to be 10 but it's always showing 9.9999? or does the calculation always produce 9.99999 regardless of what the inputs are?

 

Regards,

 

Daniel G.
Semiconductor & Wireless
National Instruments
0 Kudos
Message 2 of 3
(5,221 Views)
Solution
Accepted by topic author Jcheese

My script was correct - had corrupt data

Thanks though

0 Kudos
Message 3 of 3
(5,218 Views)