LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use of boolean property node in LabView 6i

I am running LabView 6i version 6.0.2.

 

I am using a reference to a front panel boolean control to stop the execution of a state machine in a subVI.  The subVI has a property node linked to this reference.  This property node shows that it is "Bool", but when I set the property node's element to "value", the value is not a boolean type.  I can't figure out how to set the boolean property node's element so that I can read the state of the boolean control.  How should I configure this?  

0 Kudos
Message 1 of 4
(2,793 Views)

Hi B_Harmon,

this can come from two points, first you use mechanical action "latch" or second you didn't use a strict refnum.

 

Mike

Message Edited by MikeS81 on 02-03-2009 04:57 PM
0 Kudos
Message 2 of 4
(2,784 Views)

The data type of the value property is a variant.  It is possible to convert a variant to a boolean, but you probably don't want to do that.

The reason is that you have the mechanical action of the boolean set to "latch ...", and that means that the value property isn't very useful.

Change the mechanical action to "switch ...", then the value property will be a boolean.

Note that this means that you will probably have to reset the boolean programatically after the user clicks on it.

0 Kudos
Message 3 of 4
(2,780 Views)

Changing the mechanical action of the switch seems to have done the trick...changing the switch state back after reading it isn't a big deal.

 

Thanks

0 Kudos
Message 4 of 4
(2,764 Views)