07-19-2022 02:44 AM - edited 07-19-2022 03:12 AM
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
07-19-2022 09:34 AM
It hasn't changed.... BOWN!
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,
07-19-2022 10:13 AM
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
07-20-2022 09:58 AM
You would have to do that in the step pre-expression. You can't do it at the attribute level.
Hope this helps,
07-21-2022 02:09 AM - edited 07-21-2022 03:07 AM
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
07-21-2022 10:26 AM
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.
07-22-2022 01:09 AM
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