LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

the threshold function does not respect units

Solved!
Go to solution

The Threshold 1D Array Function does not require the array and the threshold to bear the same units; anything goes, except that the conversion dot is placed on the threshold when the array bears any, even if the threshold bears the same unit as the array.

0 Kudos
Message 1 of 6
(2,436 Views)

threshold 1d array requires an array input. Not clear about the problem

0 Kudos
Message 2 of 6
(2,411 Views)

Hi,

 

for me it seems to respect units:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 6
(2,403 Views)

Change the array unit to seconds, volts or whatever; the wiring will not be broken.

0 Kudos
Message 4 of 6
(2,383 Views)
Solution
Accepted by topic author e3tech

Hi e3tech,

 

that's why you see a coercion dot… When there is a coercion dot is is your job to test the impact of coercion on your algorithm!

 

Many LabVIEW functions don't respect the unit, there are numerous threads on this topic. (My personal favorite is the Square function on the numerics palette, which calculates 1m*1m=1m.) There are also entries in the LabVIEW Idea Exchange for this problem.

 

You can add your own comments over there or ask NI for a CAR on this special part of the overall lack of "unit" support in numeric functions…

(I use units very seldom nowadays because of this lack of support. When I use them it's mainly for UI and often requires special handling/error checking.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 6
(2,373 Views)
0 Kudos
Message 6 of 6
(2,336 Views)