04-24-2018 02:54 AM
Hello,
my Goal is it to make the sequencecall very flexible. I want to make a Sequence (SeqA) which is called in some other Sequences (SeqB, SeqC, SeqD, ...) to read out values. Two month later I have to read out more data for SeqC but not in the other Sequences, for example. So I add a Parameter in the SeqA but in SeqB an errormessage get shown that the Parameter is not specified.
So is it possible to set all the Parameters automatically to default?
Best regards Johannes
Solved! Go to Solution.
04-25-2018 05:02 AM
Hello Johannes,
there is no built-in setting that enables automatic default-value for parameters. You could write a TestStand API tool that updates your sequence calls.
The approach would be:
1. loop through every step in a sequence file and look for sequence call step type.
2. If you found a sequence call, get step reference. Use Step.StepType.Module to get a reference for the Module.
3. Cast Module Class to SequenceCallModule
4. retrieve all parameters and check whether ValExpr is empty. If empty, use UseDefaultValue property to set the flag.
Best regards
04-25-2018 05:19 AM
Thank you Andreas for the Information and the hint!
11-03-2020 06:04 AM
That's actually a workaround, I think it would be beneficial to add it to the core functionality. It can be just an additional flag to select.
11-03-2020 11:57 AM
I tried this and it does pass the default to the new parameter.... if you don't reload the prototype in the calling sequences.
There are still the downsides that if you are analyzing, you will get an error that you must skip past, and if you select the step, you will get the red flashing exclamation point prompting you to reload the prototype.
11-03-2020 12:13 PM
You're right, I didn't clarify it well.
The post marked as a solution is not actually a solution, but a workaround.
I think we need a good solution for that problem and it should be added to TestStand in future releases.
I proposed an additional flag that you would be able to specify for sequence parameter: https://forums.ni.com/t5/NI-TestStand-Idea-Exchange/Allow-the-sequence-parameter-to-be-used-with-def...