07-07-2010 01:24 PM
Hello,
I am monitering flag sensors on a rotary motor and I want a simple way to show which flag sensors are triggered continuously while the vi is running.
Attached is a pic of when the vi is running. The Boolean (probe 81) is signaling false when it should be signaling true. The data coming out of the DAQ vi is measuring the correct voltage (probe 80). I would post this on the Multifunction DAQ page however I think it is a programming issue rather than a DAQ issue.
Any help on why this is happening? Suggestions to fix this?
Thanks,
Andrew
07-07-2010 01:29 PM
Last time I went to school 3 was greater than -0.00813494 so it should be false since you are looking to see if 3 is less than -0.00813494
07-07-2010 01:30 PM
Of course it's FALSE. 3 is not less than -.008.
07-07-2010 01:31 PM - edited 07-07-2010 01:33 PM
Hi Andrew,
Seems like your code is working right. 3 is not less than -0.0081...
*edit*
I've never seen this many people answer a post at the same time. *grin* We just need more easy ones!
All you need to do to fix your code Andrew is to right click on the Less Than function and replace it with a Greater Than function.
07-07-2010 01:32 PM
'3" is obviously not less than "-0.0" so I don't understand why you would think the indicator should be true.
07-07-2010 01:50 PM
If you want to know if the voltage in the data array ever goes above 3, use an "Or Array Elements" function after the "> 3".
Then it will display true if the voltage ever goes over 3 instead of displaying a true/false for every measurement.
07-07-2010 02:09 PM
I'm an idiot.
Thanks guys
07-07-2010 02:21 PM
@Andrew Aji wrote:
I'm an idiot.
Thanks guys
That response made my day. Andrew, your a good guy to be able to laugh at yourself.
07-07-2010 02:48 PM
And Yes, you're not an idiot. We all make boolish mistakes sometimes.