ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read/write in a variable using his refnum

Solved!
Go to solution
Hi,

I have and VI and a subVI. In the VI I have a boolean variable an a reference to that boolean variable. The subVI have an input to that reference (see the examples). Now, here come my question, in the subVI can I read and write the boolean value of the variable in the VI. Can I do? How?

Thanks.
Download All
0 Kudos
Message 1 of 3
(3,151 Views)
Solution

Hi kiftren,

 

Just as you used the reference on the "Register For Events" node, you can wire the reference to a property/invoke node (You can find these on the "Application Control" pallete.) Select the value property. With your current settings, the "value" property will return a variant. This is because of the "mechanical action" setting on your boolean in the main VI. Change the mechanical action to  "Switch when released". The "value" property now returns/accepts true and false.

0 Kudos
Message 2 of 3
(3,147 Views)

Hi pacific,

 

I try your solution and function correctly. If anybody want the code of pacific´s solution is attached in this message.

 

Thanks pacific

Mensaje editado por kiftren
Download All
0 Kudos
Message 3 of 3
(3,117 Views)