NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass Parameters to SubSequence in TestStand

Hi,


in TestStand 4.0 i will call a Sequence and pass its Parameters to the SubSequence. In the SubSequence there are some non-initialized, String type Parameters (only Parameters, global variable are not allowedSmiley Sad)

For example:
In Sequence there are Parameter1 = "one",
Parameter2 = "two";
In SubSequence there is Parameter1 = "";

When the
SubSequence is called, i want to pass the value of Parameter1 In Sequence to the Parameter1 in SubSequence, then create dynamically in SubSequence a new Parameter2 with value "two". Can any one help me?


Regards
MY
0 Kudos
Message 1 of 5
(4,727 Views)

Hey My NI,

I'm not sure why you would want to create a parameter dynamically.  In fact I think that's a bad idea because it won't match up with the prototype correctly in the calling sequence.  I will attach a simple sequence that shows what I think you want but once you have the parameter in the SubSequence you need to say what you want to do with it.  Do you want to pass it back to the calling sequence?  Do you want to assign it to a local? 

Regards,

Message Edited by Sam R on 10-11-2007 06:42 PM

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5
(4,710 Views)
Hi Sam, thank you for your reply.

Those SubSequences are actually not from me. I make a calling Sequence as a template, which is able to call all those SubSequences. It is a good idea to pass Parameters from calling Sequence to Subequence by reference. Your attached Sequence helped me a lot. Thank you.

Another question, i have a C++ DLL like "void Function ( string FilePath, ??? SequenceParameter )", this function saves Name and Value of a SequenceParameter into txt File. The SequenceParameter will be selected in Expression Browser Dialog Box. Which type shall i define for the SequenceParameter in my DLL function? With String-Type i got only its value.


Regards
MY
0 Kudos
Message 3 of 5
(4,693 Views)
Hey My NI,
 
I'm glad that helped you out.  For your parameter list in C++ it depends on which data type you are using.  In the TestStand Reference Manual it states:
 
"TestStand stores numbers as 64-bit, floating-point values in the IEEE 754 format."
 
So if you are passing numbers then you need to use the C++ datatype that corresponds to that.  I'm not as familiar with C++ so I don't know which datatype would line up the best.
 
Hope that helps,
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 5
(4,677 Views)
Thanks again for your help, jiggSmiley Happy
Regards
MY
0 Kudos
Message 5 of 5
(4,625 Views)