LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I pause labview in a loop at certain iterations, which are given by an array?

I have Labview running a process in a large loop, and am looking to be able to specify certain iterations where I'd like Labview to pause until there is some user input, ie if total iterations were i=1 to 10 and I gave it an array with [3, 6, 7] it would pause after iterations 3, 6, and 7 and wait for user input (really, a dialog box would be fine, I just need it to stop iterating and wait until I do something to the setup myself...if possible, some sort of dialog box that also let me change the elements in the array for the future would be ideal). I can define the array [3 6 7] through a file ok (it is input from another .vi), but I am unsure how to get Labview to check each iteration to see if i=any element in my array. I am a fairly experienced programmer, but only a novice with Labview so I'm thinking mainly in for loops. I could see some sort of case working (ie case for i=3, i=6, i=7), but I don't know how to code this so that Labview would set up the cases on its own without me hard coding them (the length of the "stop" array and the value of the elements will vary with each run).

 

Thanks very much for your help, its really appreciated.

 

Scribs 

Message 1 of 3
(3,818 Views)

See picture

pausingExecution.png


Paul
0 Kudos
Message 2 of 3
(3,815 Views)

Paul, I really appreciate your quick response. Your Labview code solves the problem I described, but as it turns out I didn't fully describe my situation...

 

I implemented the solution you suggest, and everything works fine except that during the pause I want to be able to switch to a different .vi and run it, but if there is a dialog box opened by any .vi then all .vi's are locked. Is there another method to pause for user input that I could employ (maybe have it pause somehow and wait for a press of a button on the .vi), or a way to keep a dialog from locking all open .vi's? I probably should have mentioned this before as well, but I think I am using Labview 6 (or 6i?).

 

Thanks again for your help, really appreciate it.

 

Scribs

0 Kudos
Message 3 of 3
(3,777 Views)