LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to shut down my VI?

Excellent suggestions! It increased the processing speed of my program greatly. But the stop button still doesn't seem to work. The program flow seems to stop at the Read WDT and waits for the trigger. So once it gets the trigger, the program continues and go on to stop the program.

0 Kudos
Message 11 of 15
(682 Views)

That is what is supposed to happen. There is absolutely nothing wrong with the stop button. You have a complete misunderstanding. You have programmed the scope to wait for a trigger and that is what your program is doing. Simply clicking on 'Stop' does not affect the scope at all and I don't understand why you think it should.

 

How long does it actually take to get a trigger? What have you set the timeout to? Have you tried calling the Abort function in a separate loop?

0 Kudos
Message 12 of 15
(674 Views)

You mean like a loop within the actual loop?

0 Kudos
Message 13 of 15
(672 Views)

No. Like in a loop that is outside your main loop. Dataflow would prevent a loop inside your main loop from being read. Use an event structure in this separate loop.

 

Your problem is aborting the fetch with an external trigger defined. Do a search for 'scope trigger abort' and see some of the solutions.

0 Kudos
Message 14 of 15
(662 Views)

Like was stated before, what do you have set as the timeout of your niScope Read function (http://zone.ni.com/reference/en-XX/help/370592N-01/scopeviref/niscope_read__poly/)? What you have described so far is EXPECTED BEHAVIOR because of the way you have programmed things. If you don't want to wait on the trigger before being able to stop the program, you should set the timeout very small (probably .2 or less since it is defined in seconds) and then programmatically check for a timeout error right after that function executes. If you get a timeout error, programmatically clear it and continue executing until the user presses stop or some other condition causes it to quit.

0 Kudos
Message 15 of 15
(644 Views)