NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I pass arguments to a TestStand sequence with LabWindows 6 ?

Hi

I have created sequences in a TestStand file.
I want to program a sequence with Labwindows 6 which would call all these existing sequences (containing parameters).

I don't have any problems to create the steps "SequenceCall" but i don't know how to pass arguments to the sequences with the TS API.

I have used the look-up strings "TS.SData.SFPath", "TS.SData.SeqName", "TS.SData.ThreadOpt" to program the sequence file / sequence and the multithread option. But now how to program the arguments passing ? I think there is something with the lookup string "ST.SData.ActualArgs"...

Thank u very much for any help
0 Kudos
Message 1 of 5
(3,596 Views)
I'm not sure if you want to pass values from TestStand to LabWindows or if you want to pass values in TestStand from a sequence call step to a called sequence.

To get TestStand variables from LabWIndows, use the following function:

tsErrChk (TS_PropertyGetValNumber(testData->seqContextCVI, &errorInfo, "Locals.StartPoint", 0, &dStartPt));

iStartPt = (int)dStartPt;

The TS_PropertyGetValNumber gets the TestStand variable Locals.StartPoint and puts it into the LabWindows variable called dStartPoint. Numbers to and from Test Stand are always a double type. The next line converts it to an integer.
To put a LabWindows value to TestStand, use TS_PropertyPutValNumber.

To pass values from a sequence call step to a called sequence, create variables in the Parameters t
ab on your main sequence. Create same variables on the Parameters tab of the called sequence. In main, specify module to be called in calling step. There is a paramters section on the Edit Sequence Call dialog box which appears. Check the Use Prototype of the Selected Sequence box. You can then list all the parameter variables in the parameters section.
Hope this is what you want.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 5
(3,596 Views)
First thank you for your answer.

My problem is: I want to program entirely with CVI a sequence which call other sequences that have been written with TestStand.

This sequence i have to create consists in several sequence call. These sequences have parameters. I have to pass arguments to these sequences.

Concretely, i have a configuration text file having this shape (to simplify):
- power supply 1 - voltage(V): 1
- power supply 2 - voltage(V): 2

With CVI, i read the file. I find there are two "calling sequence" steps. Then with the TS API (with CVI), i create 2 "calling sequence" steps calling the sequences "Power Supply1" and "Power Supply2" (these instrumentation sequences already exist, they have as parameter the voltage value).

I know how t
o create with CVI a "CallingSequence" but i don't know how to pass arguments to then (the voltage values) from CVI to my TS sequence.

Any idea ?
Thank you
0 Kudos
Message 3 of 5
(3,596 Views)
I don't even know how to create TestStand steps from within CVI, so I won't be able to help you on this one. Sorry. Why are you using CVI to create TS sequences instead of manually creating them with the sequence editor?
- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 5
(3,596 Views)
Well its a need of a customer
I have an excel or text file containing the tests scenario, the customer don't have to write them manually in TS.

Thank u anyway
0 Kudos
Message 5 of 5
(3,596 Views)