NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass a Sequence Reference from calling Sequence to called Sequence

Solved!
Go to solution

Hello Community, 

 

I have two TestStand Sequences calling each other. Only the second sequence is known. The first one can have any name and be in any path. 

 

The first sequence, let´s call her SeqA, calls a SubSequence, called Test, from the second sequence, I´ll go for SeqB. In the subsequence Test is a call to a SubSequence from the SeqA. 

My problem is, that I´m unable to get a reference of SeqA to SeqB for the sequence call.

I already have the Sequence Context from SeqA. I would be very happy, if that would somehow be enough, to get the reference. 

I just don´t want to pass two parameters, if not necessary.

 

Greetings Fred

 

0 Kudos
Message 1 of 10
(3,675 Views)

RunState.Caller.SequenceFile.Path

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 10
(3,661 Views)
Solution
Accepted by topic author The_Fred

If you have to use the sequence context then do something like this:

Parameters.MySeqCtxt.AsSequenceContext.SequenceFile

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 3 of 10
(3,659 Views)

Good monring jiggawax, 

 

thank you very much for your answers. Both solutions work perfectly.

 

The "as solution" marked reply is the one I´ll use in my sequence. 

 

I wish you a pleasant weekend. 

 

Sincerely Fred

0 Kudos
Message 4 of 10
(3,648 Views)

Hi,

I'm currently at an almost similar situation and don't see the (maybe obvious) solution:

I'd also like to pass a sequence as a reference to a called sequence. But in my case it is not the calling sequence I want to pass.


Lets say I have two sequences:
1. TestAInputs

2. TestBInputs

 

Now I have another Sequence "TestVariableInputs" to which I want to pass either TestAInputs or TestBInputs or others in the future.

 

At the moment I don't see how to generate or select the required parameter-type.

 

Kind Regards

David

0 Kudos
Message 5 of 10
(3,130 Views)

@david_feo wrote:

Hi,

I'm currently at an almost similar situation and don't see the (maybe obvious) solution:

I'd also like to pass a sequence as a reference to a called sequence. But in my case it is not the calling sequence I want to pass.


Lets say I have two sequences:
1. TestAInputs

2. TestBInputs

 

Now I have another Sequence "TestVariableInputs" to which I want to pass either TestAInputs or TestBInputs or others in the future.

 

At the moment I don't see how to generate or select the required parameter-type.

 

Kind Regards

David


Remember that a sequence context is completely different than a sequence.  You can use an object reference to pass as a sequence.  However, my guess is that's not what you need. 

 

How are you getting references to the sequences?  Are they executing?  If so are they in the call stack?

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 6 of 10
(3,112 Views)

Hi Jigg,

thank you for your reply.

 

Oh I was not clean enough. I just want to pass the reference to a sequence, in order to call them in the called sequence then.

 

In my stated Examle it would look like (as in C):

 

TestAInputs()

TestBInputs()

 

And 

TestVariableInputs(sequence *pVariableFunc())

Then either call 

TestVariableInputs(&TestAInputs)

{

 *VariableFunc(); // which is TestAInputs() here

}

or  call

TestVariableInputs(&TestBInputs)

{

 *VariableFunc(); // which is TestBInputs() here

}

 

so maybe Passing a sequence as object reference would be fine, but how can I manage this?

 

Kind Regards

David

0 Kudos
Message 7 of 10
(3,100 Views)

How are you getting references to the sequences?  References to most anything in TestStand can be stored in Object Reference types.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 8 of 10
(3,079 Views)

How about something like this: (see attached)

 

 

EDIT: I just noticed there was more history to this thread than I thought, so I might be repeating something or not addressing the latest.

Message 9 of 10
(3,073 Views)

Hi James,

thank you, that is exactly what I was looking for. Thank you very much!

Kind Regards

David

 

0 Kudos
Message 10 of 10
(3,054 Views)