LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data out from While Loop


Hi,

I have a very simple question. I simplify my main problem to this. There is a while loop that constantly working. I want to see a and b similar always. How can I take data continiously out of loop.

Thank you.

0 Kudos
Message 1 of 5
(117 Views)

Start with the tutorial and learn about dataflow.

 

Your shift register makes no sense since you never use it's inner output. It just works as tunnel. If you want to see the value while the loop is running, the terminals belong inside the loop. Simple as that!

 

Since you wired a constant to the termination conditions, your VI cannot be stopped, just aborted. So fix that too. Once you can stop it, the terminals will show the last values after the loop completes.

0 Kudos
Message 2 of 5
(115 Views)
Hi,

Thank you for your response. As I mentioned, this is a simplified version of the VI for my main issue. I actually have a VI that reads an analog input using DAQmx inside a while loop. When the value exceeds 24, I want to close a relay using the NI-Switch VI. I believe the relay control should be outside the loop, as placing it inside causes issues with the relay behavior. Therefore, I thought that if I move the relay control outside the while loop, it would resolve the problem. I would appreciate any additional advice on this.

0 Kudos
Message 3 of 5
(69 Views)

@afg484848 wrote:
 

I believe the relay control should be outside the loop, as placing it inside causes issues with the relay behavior. Therefore, I thought that if I move the relay control outside the while loop, it would resolve the problem. I would appreciate any additional advice on this.


Obviously you are not doing it right.

 

If you would describe the "issues" we get a clearer picture. Maybe attach the real code?

0 Kudos
Message 4 of 5
(57 Views)

A node (such as a structure, vi or indicator) can't execute until all inputs are available. B's input isn't available until after the loop stops ...

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 5
(45 Views)