02-14-2017 01:04 PM - edited 02-14-2017 01:08 PM
Hi,
I need to create a sequence from a Text-based script to transfer it TestStand. Since the most advanced version available from TestStand examples is the one from the XML file, I skip the XML part and just populate the Cluster manually (for now).
However, when I try to create a SequenceCall to another sequence file, it doesn't seem to work without having to use PreExpr active. The problem is that this creates a SequenceCall that cannot be modified afterwards when the sequence is opened in TestStand. The other main problem with this is that the "File Pathname" becomes an Absotule Path.
Here's a screenshot:
This SequenceCall is functional, but all the fields are greyed out and cannot be modified manually. "File Pathname" is empty when I disactivate the "SpecifyPreExpr".
How can I programmatically generate a SequenceCall that would be identical to one done in the TestStand interface when you select the File Pathname and then the (Sub)Sequence and populate the values? This is how I would like it to be (Note that the DMM.seq calls AG34410.seq and transfers the parameters data):
My main PropertyValues used are:
Module.AsSequenceCallModule.SequenceName
UseCurFile = False
SpecifyByExpr = True (won't work if this is False)
The rest is all the other stuff to fill up the Parameters and values.
Thanks
Solved! Go to Solution.
02-14-2017 10:47 PM
When you click on the red circle with the exclaimation point what does it say?
02-15-2017 11:11 AM - edited 02-15-2017 11:20 AM
Hi Jigg,
Mouseover:
"The parameters specified by the step do not match the sequemce parameters.
Click this icon to reload the sequence prototype, which maps the current arguments to the parameters from the sequence."
When I click on it, all parameters go red. It still works if I erase all the parameters, but it uses the default values of "Measure OC". "Voltage DC" measurement instead of "Current AC".
Unless there's a way to program the "Use Prototype of Sequence".
I tried with Module.LoadPrototype(0) and (1) and seems to make no difference.
http://zone.ni.com/reference/en-XX/help/370052G-01/tsapiref/reftopics/sequencecallstepadditions/
02-15-2017 04:40 PM
I threw together a simple example demonstrating what I think you want to do. Look closely at the Create Step to see everything you need to set on the new step.
Let me know if you have any questions,
02-16-2017 04:15 PM - edited 02-16-2017 04:16 PM
Thanks, that clarifed some details about the API.
From your Example I was able to generate both am SpecifyByExpression=True and a SpecifyByExpression=False SequenceCall.
The "SpecifyByExpression=True" would still need some work if I use it in the future as the LoadPrototypeFromSequence is still requires the SubSequence Template to be in the same *.seq file.
Overall I was able to do what I needed to prove that we can auto-generate a TestStand sequence from any text based test.
May Homer's Flying Pig land on your BBQ
02-16-2017 04:28 PM
Actually the LoadPrototypeFromSequence method doesn't require the sequence to be in the same file. It just so happens that this is the case in my example. You can get a reference to another sequence file and then get a reference to a sequence inside of it for the first parameter.
Glad it is working for you. Loved the Simpsons reference.