LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop while loop at the end of an automated process

Hello,

 

I developped an automated process which consisted of several for loops running different recipes in sequence. I also have a while loop that read csv file generated during the automated process and display process information on the homescreen. My problem right now is I am not sure how to stop the csv read while loop automatically at the end of the process so that the entire program will stop.  Please see picture for details.

 

Thanks

 

FLiu

0 Kudos
Message 1 of 3
(3,209 Views)

It is much easier to see what you are doing and to understand your situation and problem if you attach a VI file instead of a picture of (part of) a Block Diagram.  We often want to see the "missing pieces", and may want to test your code or our modifications to it.

 

Please attach the VI.

 

Bob Schor

Message 2 of 3
(3,198 Views)

As Bob already said, your image is insufficient.


@FLiu wrote:

 

I developped an automated process which consisted of several for loops running different recipes in sequence.


Your image does not show any for loops.


@FLiu wrote:

I also have a while loop that read csv file generated during the automated process and display process information on the homescreen. My


OK. we see a while loop.

  • Why do you think you need to set the font size with every iteration? Is there some other process that fights it?
  • Why do you form the file path with every iteration? Shouldn't it be sufficient do do that once before the loop?
  • Use build path instead of string operations. Makes it work independently of OS.
  • Why is the master stop control disconnected and replaced with a local variable inside the loop? Eliminate the middleman!
  • You don't really need the sequence structure. One read of the empty file at the beginning of the program does not hurt, but actually helps remove potential stale data from the indicators (e.g. from a previous run).
  • Where is the terminal of the test status indicator?
  • What's the point of subdiagram labels if the are left empty?

@FLiu wrote:

My problem right now is I am not sure how to stop the csv read while loop automatically at the end of the process so that the entire program will stop.


There are plenty of ways to share information between parallel processes (queues, notifiers, shared variables, global variables, local variables, etc.). Where do you have problems? What have you tried?

 

 

Message 3 of 3
(3,150 Views)