LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean showing false instead of true

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

0 Kudos
Message 1 of 9
(6,759 Views)

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

Tim
GHSP
0 Kudos
Message 2 of 9
(6,745 Views)

Of course it's FALSE.  3 is not less than -.008.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 3 of 9
(6,743 Views)

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.

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 4 of 9
(6,741 Views)

'3" is obviously not less than "-0.0" so I don't understand why you would think the indicator should be true.

0 Kudos
Message 5 of 9
(6,735 Views)

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.

0 Kudos
Message 6 of 9
(6,713 Views)

I'm an idiot.

 

Thanks guys

Message 7 of 9
(6,700 Views)

@Andrew Aji wrote:

I'm an idiot.

 

Thanks guys


That response made my day. Smiley Very Happy  Andrew, your a good guy to be able to laugh at yourself.

- tbob

Inventor of the WORM Global
0 Kudos
Message 8 of 9
(6,688 Views)

And Yes, you're not an idiot.  We all make boolish mistakes sometimes. Smiley Happy

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 9 of 9
(6,671 Views)