LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waiting on scope to trigger, or aborting before trigger

I'm using the IVI scope vi's to acquire waveforms- I use the "IVIScope Read
Waveforms.vi" to do this.
I don't want it to time out, so I pass -1 to the timeout- that works fine.

But- how can I allow the operator to abort at this stage? Right now the
only way I can do this is to manually force a trigger, or terminate the
program prematurely.

Thanks.
Chad
0 Kudos
Message 1 of 4
(3,075 Views)
Set a timeout and put the acquire waveform in a loop. Have the loop exit when a waveform is acquired (the scope read did not time out) or when the user pushes an abort button. This is probably the easiest way to do it.

Another possibility, though, is to setup an abort execution check in a parallel loop. Check for an abort button push and use the STOP.vi.

Rob
0 Kudos
Message 2 of 4
(3,075 Views)
but then don't I have to worry about not catching a trigger, because I would
be setting up the scope every hundred milliseconds?

the second option- a parallel loop- is that like an event structure? I'm
not sure how to make things work in parallel in LV?
If I can use this event structure, then I can execute the IVIScope Abort.vi
?


"Rob Cole" wrote in message
news:50650000000500000055700000-1017707437000@exchange.ni.com...
> Set a timeout and put the acquire waveform in a loop. Have the loop
> exit when a waveform is acquired (the scope read did not time out) or
> when the user pushes an abort button. This is probably the easiest way
> to do it.
>
> Another possibility, though, is to setup an abort execution check in a
> parallel loop. Check for
an abort button push and use the STOP.vi.
>
> Rob
0 Kudos
Message 3 of 4
(3,075 Views)
No, just leave the scope setup outside the loop and only put the read inside the loop. You shouldn't miss a trigger that way.

A parallel loop is just another loop on the diagram. As long as there is no dependent data (no data wired from one loop to the other) then both loops will execute at the same time.

I don't know about IVISope Abort. I've never used the IVI stuff since the vast majority of the equipment that I work with does not have IVI drivers (and probably never will).

Rob
0 Kudos
Message 4 of 4
(3,075 Views)