LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Starting new while loop while old one still running

Hi!
I am attempting to write video images to AVI files. I want to give the user the option to decide when they want to begin to capture the images. I place the "start recording" button in one loop and the image acquisition and AVI Write subVIs in another loop. LabVIEW won't allow me to continue on with the image acquisition loop until I finish with the "start recording" loop. Any ideas how to fix this (to allow the image acquisition to start and continue having LabVIEW check for a button press on "start recording")?
0 Kudos
Message 1 of 3
(2,521 Views)
You have a data dependency between the two loops, thus they cannot run in parallel. The second while loop can only start once the avi refnum leaves the first loop. This only happens once the first loop finishes. You need to remove the data dependency.

(I don't have IMAQ. Under LabVIEW 7, your VI crashes while loading (insane objects, etc.). It opens fine in LAbVIEW 7.1)
0 Kudos
Message 2 of 3
(2,521 Views)
Thanks. I suspected as much. In any event, I can't seem to find a good configuration of while loops and case structures which will produce the desired results. I want to start acquiring images and allow the user to choose to start recording at any time he desires. This issue is further complicated by the fact that the status of the "Start recording" must be checked at all times, but only initialized once, while the AVI Write Frame depends on that first initialization step but must be looped continuously aferwards in order to 'keep up' with the images being acquired. In the newly attached example, I placed the case structure inside the image acquisition while loop and the avi write frame inside a while loop inside of that case structure. unfortunately,
labview decides to stay inside the avi write frame while loop after entering, instead of returning to the image acquisition while loop. i can't place the avi write frame inside the general image acquisition while loop because then labview will think i want to initialize the avi write frame right away and will return an error when avi write frame isn't provided with an avi refnum. Ideas?
0 Kudos
Message 3 of 3
(2,521 Views)