LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

halt VI when Wait Untill Done.VI is waiting

This program is for digitally triggered analog acquisition - N samples,

N channels.

There are 2 loops, one for the acquisition and one for user controls

for the graphs. When the user presses the STOP button the VI will not

stop because the WaitUntilDone VI is still waiting for the next

trigger.(Therefore it will only stop after the next trigger) Is there

anyway to interupt the wait until done and halt the VI?

Another question: When I stop this VI using the STOP button(The one I

have put) and then run the VI again the 2nd loop(controls for the

graphs) does not execute!

I am attaching the 3 VIs used. The main VI is skeletonv4.1. The other 2

are used as sub VIs.

Thanks!

Download All
0 Kudos
Message 1 of 4
(2,759 Views)
I thought I answered this, but apparently not.

I haven't looked at your code, but I solved this problem by calling AI CONTROL with a function input of CLEAR.

I used AI CONTROL with an input of START, and if it was waiting on an external trigger, it would wait forever. So when I want to abort it, I use CLEAR.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 4
(2,759 Views)
hey,
Thanks. I remember you mentioning this solution. Sorry for not making myself clear. I am using DAQmx (new feature in labVIEW 7). Is there a way w/o changing the whole code? Also if you can, please look at my 2nd question. I have no clue as to what is wrong in program.
Thanks once again.
0 Kudos
Message 3 of 4
(2,759 Views)
Loop 1 sets a local variable (X) to TRUE when it quits.

Loop 2 sees X = TRUE and quits.

You start the program again - BUT X IS STILL TRUE.

Loop 2 finishes before loop 1, sees X = TRUE and quits.

Loop 1 finishes, sets X = FALSE, but it's too late.


You need to set X FALSE, before either loop starts.

You are using code to set X.Visible to FALSE, you can do the same thing by popping up on the X terminal and choosing HIDE INDICATOR - you don't need code to do it.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 4
(2,759 Views)