NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Callee sequence Local Variables to Calling Sequence

Hello all,

 

I would like to access callee sequence local variables from calling sequence without using any parameters passing method.

Could anyone please advise on this?

 

Best regards,

Thank you.

0 Kudos
Message 1 of 9
(1,936 Views)

Why trying to bypass proven methods? 
You will create tight coupling which is bad programming practice after all

0 Kudos
Message 2 of 9
(1,913 Views)

There are other fundamental issues with what you are asking than what Oli pointed out.  Unless you call it asynchronously you cannot do it.  This is because the context only lasts for the life of the call.  There's nowhere in the Caller that you can access the context, unless like i said, it is in parallel.  So basically from the Caller's perspective the life of the Callee is literally the Module call of the sequence call step in which it resides.

 

Maybe you can help us understand why this is a requirement and we can help you arrive at a solution that works?

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

Hi ,

 

Please try this in the called sequence :

RunState.Caller.Locals.variablename

 

Ravi

0 Kudos
Message 4 of 9
(1,881 Views)

@RaviShrigiri wrote:

Hi ,

 

Please try this in the called sequence :

RunState.Caller.Locals.variablename

 

Ravi


I understood it the opposite direction as you have here.

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

Hi Jiggawax,

I have many times read your suggestions/solutions and its very helpful. Thanks for all your support.

 

For this case do you mean to say that the user wants to access variables of a called sub sequence from a main sequence.

 

Ravi

0 Kudos
Message 6 of 9
(1,837 Views)

Still... there is no description of the actual use case and why this tight coupling is neccessary.

 

0 Kudos
Message 7 of 9
(1,827 Views)

@~jiggawax~ wrote:

There are other fundamental issues with what you are asking than what Oli pointed out.  Unless you call it asynchronously you cannot do it.  This is because the context only lasts for the life of the call.  There's nowhere in the Caller that you can access the context, unless like i said, it is in parallel.  So basically from the Caller's perspective the life of the Callee is literally the Module call of the sequence call step in which it resides.

 

Maybe you can help us understand why this is a requirement and we can help you arrive at a solution that works?


Hi jigg,

 

The reason i wanted to do so is because i cannot afford to add new parameters to my existing sequence architecture. I am not allowed to do so as i am not the only one who use the sequence.

 

Best regards,

0 Kudos
Message 8 of 9
(1,463 Views)

@RaviShrigiri wrote:

Hi ,

 

Please try this in the called sequence :

RunState.Caller.Locals.variablename

 

Ravi


I believe i tried this method before but somehow it doesn't work for my case.

0 Kudos
Message 9 of 9
(1,462 Views)