NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Container Parameters

Hi,

 

it can be a simple and stupid question, but I don’t get why, when I define a container as a parameter of a sequence called in the main sequence. That parameter can’ be expanded to fill the different field with the variables that I need. I created also custom type variable for trying to achieve this aim but nothing. I thing that passing a container as parameter can be helpful in particular when you need to pass a lot of variables regarding the same “object.

I have already found something here: https://forums.ni.com/t5/NI-TestStand/Container-Variable-not-expandable-in-calling-sequence/td-p/271... but I hope that something changed.

 

Thank you for the attention!

 

Best Regards,

Zuc

Download All
0 Kudos
Message 1 of 7
(1,056 Views)

It hasn't changed.... BOWN!

https://forums.ni.com/t5/NI-TestStand-Idea-Exchange/Allow-Sequence-Adapter-to-expand-containers-in-t...

 

One thing that I do is add an attribute to the step and then put my discrete values in there.  Then pass the attribute as the parameter.  This still keeps my values at the step level so when I copy it around it is more "moveable".

 

Regards,

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

Perfect!

 

but can you assign, for example, a FileGlobal to the attribute in order to change it during the execution without causing runtime error or something dangerous?

 

Thank you very much for your help!

 

Best Regards,

Zuc

 

0 Kudos
Message 3 of 7
(1,030 Views)

You would have to do that in the step pre-expression.  You can't do it at the attribute level.

 

Hope this helps,

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

So, for sake of completeness, you are saying to use Locals.Local.Attributes = FileGlobals.FileGlobal in the pre-expression of the step while with a statement step I control the FileGlobal variable value. It’s not so automatic but it’s better than create 150’000 parameters for a sequence… at least I think so.. I hope so! If you have any other idea to help me in organizing the parameter passed in a sequence call let me know!

 

Thank you for the help!

 

Best Regards,

Zuc

0 Kudos
Message 5 of 7
(1,003 Views)

Sorry to mislead you.  I was saying to make it a step attribute... not a local variable.

 

So Step.AsPropertyObject.Attributes.MyContainer = FileGlobals.MyContainer in the pre-expression.

 

This way your step specific information is at the step level.  When you copy the step you don't have to drag along the local variable.  Also, it keeps your local variables cleaner.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 6 of 7
(991 Views)

Ok, I think that's a possible solution even if it's not properly what i was hoping. It would be nice if the cantainer passing as parameter will be implemented since managing them in the step panel is easier that manage them as attributes!

 

So thank you for the help Ji have a nice day!

 

Best Regards,

Zuc

0 Kudos
Message 7 of 7
(981 Views)