10-16-2012 10:39 AM
Hi,
we want to run a LabVIEW VI (LV2011) parallel to the execution of a test sequence from TestStand (TS2010). The VI should visualize the state of the hardware, while the test sequence is written in TestStand. This would be a nice feature for debugging the TestStand sequence while watching the hardware state on the LabVIEW panel, too.
This is where it comes to our problem. Imagine that you have a MainSequence calling a sub-sequence in a new thread, which runs the LabVIEW-VI. After the call, the MainSequence continues its progress as it is configured to do so. But if we want to execute the MainSequence in single step mode parallel to the VI runtime, we cannot do this. The controls for "Step Out" etc. are grayed out.
I've tried to build a very simple example to explain what I mean. It's just one sequence and one LabVIEW VI, no real functionality, just take it as an example for our problem.
Any hints? What are we doing wrong? Is there something that must be changed in the LabVIEW VI?
Best regards
Manuel
Solved! Go to Solution.
10-17-2012 11:58 AM
You should be using the Termination Monitor and ExternallySuspended APIs for the asynchronously running VIs. There are wrapper VIs around these APIs in the TestStand LabVIEW palette.
For more details see the API help for the following:
Thread.ExternallySuspended
Execution.InitTerminationMonitor
Execution.GetTerminationMonitorStatus
Unless I am misunderstanding what you are asking, if you use these APIs you should be able to make things work like you are wanting them to.
-Doug
10-18-2012 08:50 AM
Hi,
thank you. We use "Run VI Asynchronously" from the LabVIEW Utility Palette instead, now it works fine.
Best regards and thanks for the help!
Manuel
02-12-2013 04:56 AM
02-12-2013 09:24 AM - edited 02-12-2013 09:24 AM
First use a sequence call step set to run a sequence in a New Thread. Then, if you are going to have a long running VI in that thread, consider using the APIs I discussed in my previous post at the beginning and end of the code in the VI. The TestStand palette in LabVIEW has wrapper VIs around those APIs in order to make them easier to use.
-Doug