LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I introduce a value inside a loop in a subvi? is the rare solution global variable?

I have a subvi that counts the number of times that a digital input changes to a high value, during a certain time. In this subvi this input is inside a while loop, so I have any problem.
But I have used this subvi in other vi, so the digital input goes inside the loop, only, the first time.
I knwo that a solution is using a global variable. But is the rare solution?
I´ve attached the vi, the varible that goes inside only one time is "Entrada Digital" !

Thanks for your attention!!

Graci
Download All
0 Kudos
Message 1 of 2
(2,557 Views)
Create a reference to Entrada Digital control (right click and create reference) and pass this reference to your subVI. In the sub VI use property node to get the value instead of wiring from a digital control.
0 Kudos
Message 2 of 2
(2,557 Views)