Solution
When a
Sequence Call Step is created in a TestStand sequence, the called sequence prototype is automatically loaded, so the parameters (if any) are automatically loaded. However, when adding a Sequence Call Step in a dynamically created sequence, the called sequence prototype is not loaded.
So, some sort of load command needs to be specified in the XML file using which the sequence is generated.
To that end, the pre-expressions property of the Sequence Call can be used to execute the
LoadPrototype method. Modify the Sequence Call step in the XML file as follows:
<Step Adapter="Sequence Adapter" Name="Call subSequence" Type="SequenceCall">
<Prop LookupString="Module.SFPath">.\sampleXML\LabVIEW Load Test.seq</Prop>
<Prop LookupString="Module.UseCurFile">false</Prop>
<Prop LookupString="Module.SeqName">MainSequence</Prop>
<Prop LookupString="Module.UsePrototype">False</Prop>
<Prop LookupString="TS.PreExpr">Step.Module.LoadPrototype(0x1), Step.Module.ActualArgs.BoolParam.expr=True, Step.Module.ActualArgs.StrParam.Expr=\"Locals.TEST\"</Prop>
</Step> There are 3 pre-expressions added in the above XML sample. The first one is to load the prototype and the rest are to set values of the loaded parameters.
Note that Module.UsePrototype property needs to be set to False as this enables the 'Use Prototype of Sequence' option available in the
Sequence Call Module Tab.
The result of generating a sequence call using this format is shown below: