NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically "Default-Value" of a Parameter in a Sequence-Call

Solved!
Go to solution

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

0 Kudos
Message 1 of 6
(4,184 Views)
Solution
Accepted by topic author JoMa23

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

Andreas Gareis
Senior Applications Engineer, NI
Certified LabVIEW Developer & TestStand Architect
Download All
0 Kudos
Message 2 of 6
(4,151 Views)

Thank you Andreas for the Information and the hint! 

 

0 Kudos
Message 3 of 6
(4,147 Views)

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.

0 Kudos
Message 4 of 6
(3,205 Views)

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.

0 Kudos
Message 5 of 6
(3,195 Views)

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...

Mateusz Owczarek

Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 6 of 6
(3,192 Views)