LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

While loops

Hello all,
 
I have two while loops that need to be running.  The second while loop (Power supply while loop) is dependent on the first.  The first while loop (Interlock while loop)  is made up of safty interlocks (Flow, pressure, etc).  The interlock while loop needs to run the entire time the test is being performed.  If the safty interlocks are within paramaters I will get a True value from that iteration (250ms per iteration)  The true value (here is the problem) then needs to be passed to a boolean expression indicator connected to a case structure.  Within  the "True" case structure is the second while loop that will only run with a  "True" boolean expresion.  During all of this the Interlock while loop has to continue with its iterations.  If the interlock loop returns a "False" statement at any time it would stop the power supply that I am controling. 
 
I hope that was not to hard to follow.
 
Thanks.
0 Kudos
Message 1 of 14
(4,138 Views)

It was a little hard to follow but what next?

 

 

What are you looking for on the forum???

 

 

Regards

CLAD
Using Labview 5.1,6.1,7.1.8.0
0 Kudos
Message 2 of 14
(4,130 Views)

Sorry got destracted when I was trying to finish the message. 

 

What I need is how to pass the boolean expression out of the while loop while it contiues to run.

0 Kudos
Message 3 of 14
(4,130 Views)

Hi,

 

 There are many threads on this forum discussing your problem.

I have attached one relevant to your problem. Hope it helps.

 

"http://forums.ni.com/ni/board/message?board.id=170&message.id=97217&requireLogin=False"

 

Post back if you face difficulties.

 

Regards

CLAD
Using Labview 5.1,6.1,7.1.8.0
0 Kudos
Message 4 of 14
(4,117 Views)

Not what I was looking for so I will post my VI below.  It was written in 7.0  I put lables on the VI to help communicate my problem. 

The MAJOR thing is the top loop must always be running while the power supply ramps up.  So every 250ms I will get a T/F statement from the interlock loop (Top Loop) making sure my conditions are safe.

 

Thanks.

0 Kudos
Message 5 of 14
(4,100 Views)

I am a bit confused by your implementation.  I was able to open your VI but there are a lot of subVI missing.  Anyway, it looks like you have a while loop in parallel with a case statement.  Any it seems like you are asking to have the while loop generate a condition that will select either the true or false for that case statement.  The way you currently have it the case statement will try to execute once at the same time as the while loop.  If you wire (for example) a local variable that is generated in the while loop it will read a value that was default and not from the while loop.

In your bottom structure (case with a while) I think you need to rearange the order of the structures and have the case inside the while loop.  If not, then I will need some more info on what you are trying to do.  Basicly what I am suggesting is for each iteration of the bottom loop, use the case statement to check you interlock.

If you make that change, to get the data from the top loop to the bottom loop you can use the queue or notifier functions, local variables, or functional variables.

Message 6 of 14
(4,088 Views)

Hi,

I have made a sample example for you to try.

Try it and you can modify your program accordingly.

 

Hope it helps.

Post again should you have any doubts.

 

Regards

Message Edited by labviewmission on 10-20-2006 02:54 PM

CLAD
Using Labview 5.1,6.1,7.1.8.0
0 Kudos
Message 7 of 14
(4,076 Views)
We may need a 7.0 version. At least I do Smiley Sad
0 Kudos
Message 8 of 14
(4,070 Views)
Try This
 
Regards
CLAD
Using Labview 5.1,6.1,7.1.8.0
Message 9 of 14
(4,065 Views)
Yes, this is exactly what I was tring to explain in my post too. Thank you, labviewmi...
0 Kudos
Message 10 of 14
(4,060 Views)