03-26-2015 01:31 AM - edited 03-26-2015 01:33 AM
Hi there.
Currently using LabVIEW 2012/TestStand 2012.
I am attempting to edit the LabVIEW Text Sequence Translator, and in the CreateStep.vi I am trying to create a step that is of type WIS_Sequence_Call (a custom version of NI_Types.ini-->SequenceCall).
I need to set the file pathname, sequence name and parameter values in the step. I believe I need to get access to the SequenceCallModule class to do this.
This help file SequenceCallModule states in the description: "To access the properties and methods of a specific module class, query the Module object for the interface of the module-specific interface you want to acquire.".
What exactly is meant by "query" here? It looks like "Specify" might be what I am after, but I want this done programmatically, ie no dialog boxes.
See my snippet below.
Thanks.
Solved! Go to Solution.
03-27-2015 10:30 AM
Christopher,
To get to the SequenceCallModule class you will need to follow the appropriate call chain. Take a look at the TestStand API Reference Poster. It will be in a directory similar to C:\Program Files (x86)\National Instruments\TestStand 2014\Doc\Manuals. SequenceCallModule is in the Adapter-Specific Classes. You will need to follow the PropertyObject -> Module -> SequenceCallModule call chain.
03-27-2015 07:24 PM
Thanks for the reply Charles.
I have been using the 2012 version of the poster.
I can get access to the Module class from the Step Class as shown in the snippet above, but I can't see how to get to SequenceCallModule? The "To more specific class" VI doesn't seem to work for TS refs. Is there no way to derive the SequenceCallModule from this?
Also I can use the TSAdp.SequenceCallModule reference, but I need to link this to the relevant step that I've just created. Can NI please provide me with a link to any examples on this?
Thanks
03-30-2015 08:34 AM - edited 03-30-2015 08:36 AM
Use the Connectivity->ActiveX->Variant To Data node. Set the type to SequenceCallModule, give it the Module interface as input. You need to close both the Module and SequenceCallModule interfaces when you are done with them.
What this does is call QueryInterface on the input. The Module COM object implements both the Module and SequenceCallModule interfaces in this use case.
Hope this helps,
-Doug
03-30-2015 03:59 PM
Thanks Doug!
I never knew that the Variant to Data VI had an ActiveX purpose also! So obvious now!
Cheers, really appreciate it.
07-09-2015 10:45 AM
Hello,
I ran into the same problem, and came to the same solution posted here. However, variant to data throws an error for me, and I cannot figure out why.
See attached screenshot. I am 100% sure that the step reference passed in is valid. Please let me know if I'm missing something, or if there is possibly something wrong with my install.
I have tried it with "To Variant" prior to variant to data, and it also throws an error.
Thanks,
Jon
07-10-2015 01:08 AM - edited 07-10-2015 01:09 AM
Hi Jon,
I am pretty much doing the same thing, except I used a control for the TSAdp.SequenceCallModule reference, rather than a constant:
07-13-2015 04:52 PM
Christopher,
Thank you for your reply, from your picture I found my error.
When creating my steps, I was using the "NoneAdapterKeyName" instead of the "SequenceAdapterKeyName" which entirely explains my problem. It was very difficult to debug though, because I was able to do virtually everything else with the step other than the SequenceCallModule cast.
-Jon
07-13-2015 06:49 PM
Awesome!