NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Polling while other steps are executing

I am using TS 3.1 and Labview 8.0 to communicate over a 485 bus.  There is a watchdog timer in the 485 controller that will error if it isn't polled every 5 seconds.  In the sequence I poll the 485 bus at differen't times, but not necessarly every 5 seconds.  What I need is to do is make a sequence that will poll the 485 bus every 5 seconds while letting the rest of the sequence continue on and if the current step of the sequence polls the 485 bus to skip that iteration.  Make sense?  Any ideas on how to do this?
 
Brian
0 Kudos
Message 1 of 3
(3,222 Views)

Hey Brian,

TestStand 3.1 does not support LabVIEW 8.0.  If you want to create a code module in LabVIEW you need to use 7.1.1 or earlier with TS 3.1.  This is not to say that it may or may not work with 8.0.  It is just not supported. 

So there is a step type called: Run VI Asynchronously.  This will spawn a new thread that will call the LabVIEW module.  Then your sequences will continue running.  The thread gets closed when the VI is done running or unless you kill the thread.  You obviously can't call that VI again until the first one is done executing.  That's why you would put a Wait before the step that calls the VI again. You can configure the wait like this: in the Wait For drop down put Thread and then select the Run VI Asynchronously step as the thread to wait for.  That way the Wait waits until that thread is done before moving on and calling the VI again.  I hope that helps.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 3
(3,203 Views)
If you use  Run VI Asynchronously, you should make your polling VI exit if the execution terminates.
 
Instead, it might be simpler to explicitly call a subsequence in a new Thread (it is an option on the sequence call step). In your subsequence, call your labview VI to poll one time. Put the polling VI in an endless loop using a While (true)/End step pair, or a Goto step.
 
Now, insert a Wait step into your loop to control the loop speed.  Finally, insert a step or steps that break out of the loop if there are any conditions other than termination that should exit your polling loop.
 
Turn off result collection for your subsequence sequence so that it does not accumulate memory.
0 Kudos
Message 3 of 3
(3,195 Views)