07-07-2010 10:42 AM
@zyl7 wrote:
In that case, the LV step would have to store ThisContext in a TS variable and then I would have to read that memory from my main LV code... Am I right ?
This Context is already a TS variable. Just pass it to LV. The context won't change. It is only used to form property nodes to change the way TS behaves. You don't need to store the context anywhere. Consider it as a pointer to the memory area that is created when TS starts to run. RunState is the same way. It is a memory location that holds the values of variables that are changing as the sequence is running. Don't need to store Run State either. When TS shuts down, the memory is released and This Context and Run State become meaningless. That is why you should put your VI in the process model, preferably in a callback at the beginning of the process model sequence.
07-07-2010 10:45 AM
@tbob wrote:
This Context is already a TS variable. Just pass it to LV.
That is the problem ! How to pass it to LV ?
07-07-2010 11:24 AM
@zyl7 wrote:
That is the problem ! How to pass it to LV ?
I'm using LV 2009. On LV front panel, open the controls palette, go to TestStand -> Legacy -> SequenceContext.ctl. Click on it to drop it on your front panel. In the terminal pane, wire a terminal to the control. In TS, call the VI. Usually, ThisContext will auto populate the Sequence Context parameter. If not, on the line that has Sequence Context, type in ThisContext as the value or select if from the f(x) button. If you look at the variables window in TS, you will ThisContext listed. ThisContext contains all TS variables pertaining to the currently opened sequence file, plus all global variables.
Back in LV, on the block diagram, right click on the Sequence Context reference and create the property or method you wish. This is how to call all TS APIs in LV. Be sure to call this VI from a callback in the process model, not in a regular sequence. You then have to save the process model and send it to your customer.
The sequential process model is stored in C:\Program FIles\national Instruments\TestStand 4.2\Components\Models\TestStandModels\SequentialModel.seq. Your location may differ depending upon your TS version and your install.