LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Concurrent VI execution

I am a Teststand newbie and am trying to obtain a timing measurement from a tek scope while using Teststand. I need to run a VI that sets up the scope then waits for a trigger. While the VI is waiting for a trigger I need to run another VI to cause the trigger to occur. So I guess what I am asking is, is there a way to run 2 vi's concurrently or even better run 1 vi then a few seconds later run another while the first one is still being ran (waiting for a trigger)?

Thanks,
Brian
0 Kudos
Message 1 of 21
(4,568 Views)
looks like I posted this to the wrong forum. I will repost it to the teststand forum.
0 Kudos
Message 2 of 21
(4,542 Views)
Hi Brian,

Split up your VI for your scope to do the configuration, initiate reading, fetch reading rather than use the Measurement VI or Configure/Read VI's of the scope.

That way you dont have to have 2 VI's running concurrently.

So you can do the following:

Configure your scope, this will include setting trigger to external.
Configure other instruments..

Initiate Scope to take reading. (scope will wait for next trigger to occur)(VI will return to caller)

Generate Trigger...

Poll the status of the scope until completed taking measurement or timeout period


if no errors get measurement using Fetch command.

In TestStand you can have one step that configures the scope.
You would other steps to complete the rest of your setup before the step to initiate any measurement.

Another step to initiate a new reading.

Another to do the polling and a final step to get the measurement using the Fetch command.

Hope this is of some help

Regard
Ray Farmer
Regards
Ray Farmer
Message 3 of 21
(4,540 Views)
Ray,

I guess my problem is the initialing the scope to take a reading it wont return to caller it just sits and waits for the trigger and times out before I can create the stimulus to cause the trigger.

Brian
0 Kudos
Message 4 of 21
(4,540 Views)
Hi Brian,

If you are calling the Read function, this function performs the Initiate and then Fetch functions.

By not using the Read function and using the lower function VIs you will be able the set the scope to wait for a trigger, (Initiate VI will return to the Caller,) allowing to you to set your trigger. Then you can go back to your scope and get your measurement.

Do you have an example of the VI's and TestStand SequenceFile.

If not I'll try do you and example using the IVI step types

Regards
Ray Farmer
Regards
Ray Farmer
Message 5 of 21
(4,531 Views)
Hi Ray,

Here is the Setup VI the sets up the scope. The last Subvi in the sequence called the Start Acq VI wont let return to caller until it receives a trigger and it is the Scope Driver VI.

Thanks for the help,
Brian
0 Kudos
Message 6 of 21
(4,525 Views)
Here is the VI I am using to get the measurement.
0 Kudos
Message 7 of 21
(4,527 Views)
Here is the still unfinished sequence. "PW Test Setup" step setups up scope, "PW Stimulation" is what causes the trigger to occur, and "Get PW Msrmnt" gets measurement from the scope. This is repeated a few times in the sequence.
0 Kudos
Message 8 of 21
(4,529 Views)
Brian,

could you re-post those VI's in LabVIEW 7.0.

Regards
Ray Farmer
Regards
Ray Farmer
Message 9 of 21
(4,513 Views)
I'm not sure if I did it right but here is the setup VI
0 Kudos
Message 10 of 21
(4,440 Views)