NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I Retrieve the value of a parameter of the callee from within the postsubstep using activex/com?

Using ActiveX or an expression how do I get the ArgVal of a parameter from the sub-sequence E.g. the callee using a substep post-expression defined within the Step Types using the Sequence Adapter module?  My sub-sequence does not share FileGlobals and I do not wish to use StationGlobals,.  The parameters of a sequence are passed by value or reference from the callee to the caller; how do I get a copy of the parameter or parameters passed by reference from the callee to the caller?  Please include an example.  

 

0 Kudos
Message 1 of 5
(2,636 Views)

It's not clear what you are asking here.  I opened your example and it looks like you are getting the values correctly from the sub sequences.  What is your specific goal with this?  Maybe there's a better way?

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5
(2,603 Views)

Yes I can get the values passed from a parameter from the callee to the caller from the reference that I pointed to in edit mode E.g. Local variable, Fileglobal, Station Global..;  but I want to get a copy of the parameter that is passed when the sequence is running.  

 

Lets go a step further, lets say that I dynamically created a parameter using a expression or active x.  The callee would have to pass the parameter back to the caller; how do I get the data passed back to the caller?

0 Kudos
Message 3 of 5
(2,599 Views)

If they put a constant or use the default value checkbox you may have a bit of an issue.

 

You could use the Evaluate function and then you don't need to know what is in there.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 5
(2,591 Views)

Yes you are right using the default value or "pass by value" would create problems.  The sequence will never be used this way.  

 

"You could use the Evaluate function and then you don't need to know what is in there."  How do I do this from a Step Type SubSteps post-step?  The Parameters will be for the caller not the callee.  The sequence Module can be anything. We might or might not be using a process model or single stepping.  The Runstate.PreviousStep, Runstate.Caller, Runstate.CallingStep will return an error when used within the post step.  RunState.Step is invalid because we are not processing a step. I am sure there is a easy way; I just have not figured out how to write the expression.

I have not figured out how to obtain a parameter from the callee as of yet.  The only way I have found is to pass the sequence content from the callee to the caller as a parameter.  This would require changing hundreds and hundreds of subsequences;

or

programmatically creating a parameter and passing the sequence content; which I have not figured out how to do.

0 Kudos
Message 5 of 5
(2,586 Views)