12-16-2010 11:00 AM
I am attempting to look for a -40 to get a true out. Using a "less or equal" function I place a constant of -39 on y and when the x reaches -39 or the -40 the out put remains false.
12-16-2010 11:09 AM
It works correctly for me.
Are you sure you are passing -39? Or is there rounding errors that are not showing in the control.
Is the display format of your control set to the max number of digits to show any rounding.
But rounding would not explain -40.
Create a small VI with nothing but the less than or equal funtion with it's input and output as a test case.
12-16-2010 12:04 PM
12-16-2010 12:06 PM
works fine here. do you possibly have the input wires crossed?
12-16-2010 01:03 PM
The wires are orange. Trying to figure out how to post the code here.
12-16-2010 01:05 PM
Works fine for me too in a simple vi with just this simple set up. In the code I run the probes and the numbers are right but the state does not change.
12-16-2010 01:07 PM
Orange is doubles, which often have rounding errors. Place an indicator showing the values compared and increase the decimals shown to 15. It's common there's a 8th place decimal (or similar) causing the problem. 🙂
/Y
12-16-2010 01:08 PM
sorry check that the color is like pink
12-16-2010 01:11 PM
pink is string not numeric you need to convert the strings oe use numerics.
12-16-2010 01:13 PM
Pink also could be a cluster of mixed data types.
The order of the data in your cluster will effect the comparisons.