LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data not leaving loop

Solved!
Go to solution

I have a serial comunication VI to communiate with some radios.  I send a message to the radios and receive a responce which I can see on the PRC 150 Return.  I wanted to move the LED indicatiors outside the loop but when I do the data that is generated in that loop never leaves the while loop.  Any ideas on why I can't leave the while loop?

 

No prop

0 Kudos
Message 1 of 5
(3,126 Views)

You cannot get data out of a loop through a single tunnel, while the loop is running.

Place the LED indicators inside the loop, or consider using a "wireless" data communication method.

 

Adam Boros

0 Kudos
Message 2 of 5
(3,114 Views)

I am able to get the message to propgate for this section and the only difference is this section uses tcp/IP vs serialnoprop2.png

0 Kudos
Message 3 of 5
(3,107 Views)
Solution
Accepted by topic author dmarcus

This is basic LabVIEW 101 and dataflow programming.

A node will only return data once the node has completed.
A while loop or a for loop will only return data on the wire once the loop has completed all its code and has stopped. 

 

Our while loops do not seem to be stopped, as a FALSE has been send to the Conditional stop terminal.

Message 4 of 5
(3,095 Views)

We really like to see code, not pictures of code.  If you had attached your VI, we'd be able to not only see the whole thing, but be able to tell what Version of LabVIEW you are using.

 

For quite a few years, released Versions of LabVIEW supported wiring the Error Line to the While's Stop terminal, and also allowing the Error Line and a Boolean wire to "share" inputs to an Or gate used to stop While Loops.  If you stop the loop on an error, you can "export" the Error (or related information) by passing it out of the loop using Tunnels, as you have done.  The trick is to Stop on Error (which is usually a reasonable thing to do).

 

Bob Schor

0 Kudos
Message 5 of 5
(3,081 Views)