NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use Lookup strings to access LV module inputs?

Hello

 

Is it possible to use the lookup strings to access the inputs of the LabVIEW module? I know i can use them to access the step properties but I'm not sure if I can use them also for the VIs inputs?

 

In the other way I have to use reference to the LabVIEW module and then enumerate all inputs according to it's type to get through it's value. But this might be slower in comparison to lookup string.

 

Thanks for support

 

Best Regards

Maciej 

0 Kudos
Message 1 of 3
(3,066 Views)

Dear Maciej,

 

Yes, you can access the LabVIEW module with lookup strings, and also to it's parameters.

Here is an example:

RunState.Sequence.Main["Action"].Module.AsLabVIEWModule.Parameters.Item(0)

This access the first (0 index) LabVIEW module parameter in the Action step of the Main stepgroup in the current sequence.

You can read about the LabVIEWParameter type in the Reference Manual:

 http://zone.ni.com/reference/en-XX/help/370052J-01/tsapiref/reftopics/labviewparameter/

 

If you want to configure the inputs and outputs in a dialog box, you could call the API method:

RunState.Sequence.Main["Action"].Module.Specify()

 

You can browse the API Reference manual for further details and to find the mehtods and properties you might need 😉

F1 in TestStand or use the online manual: http://zone.ni.com/reference/en-XX/help/370052J-01/tsapiref/reftopics/tsadpapiobjects/

 

Best Regards,

Tamas Szekely

Applications Engineer

0 Kudos
Message 2 of 3
(2,984 Views)

Tamas' example isn't really using lookup strings, it's using the API. Using the API like this is the recommended way of accessing the module and parameter settings. It is also possible to access them using the propertyobject API and lookupstrings, but that is not recommended since it's possible for the underlying propertyobject structure to change in a future version, while the TestStand API, on the contrary, will remain backwards compatible in most cases.

 

Hope this helps,

-Doug

0 Kudos
Message 3 of 3
(2,974 Views)