NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How does the LabVIEW adapter get VI type information?

Hi, all,

 

As I've mentioned in another thread,we're trying to programmatically generate TestStand scripts.  Since we're using the LabVIEW adapter, we will need to get the type ingotmation of controls and indicators from some VIs that the scripts will use. (These are all kept in one library.)

 

I'd rather collect that type information from the VIs themselves than manually collect it or hardcode it.Then, if we add or modify the VIs, the new types will be generated.

 

The LabVIEW adapter must have the ability to do this.

 

Does anyone here know how it does?

 

Thanks much,

- Steve.

 

0 Kudos
Message 1 of 4
(3,365 Views)

SPM,

 

As you may have already noticed, in the LabVIEWModule class there is a Parameters property that contains the items connected to the VI's connector pane.  This parameters container is read-only, meaning that while you can get each individual parameter and modify it, you cannot add new parameters.

 

The parameters property will be created for you when you call Module.LoadPrototype.  This will read the VI's connector pane information from disk, and create the correct parameters property for you.  You can find an example of creating a LabVIEW step programmatically and setting its connector pane in this document:  Programmatically Create TestStand Sequence File with a Step that Calls a LabVIEW Code Module

 

Please note that this example has not been updated since TestStand 3.0, and as such uses an obsolete method LabVIEWModule.LoadPrototype.  Please use Module.LoadPrototype instead.

Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 2 of 4
(3,315 Views)

Josh,

 

Thanks! This is very interesting stuff, but you're leading me into unfamiliar territory here.

 

The reason I need it is to import the parameter signatures for available step types into an external test generation tool.

 

Just to be sure I understand, could I manipulate LabVIEWModule from a C++, C#, or Java program, or do I have to do it from a TestStand script?

 

Best,

- Steve.

 

0 Kudos
Message 3 of 4
(3,252 Views)

Steve,

You can access the LabVIEWModule class using TestStand expressions, or from another programming language becuase the TestStand API is externally exposed via ActiveX.

The example that Josh posted actually demonstrates using LabVIEW to interact with that LabVIEWModule class.

Message Edited by herosphro on 01-06-2009 08:33 AM
John B.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,231 Views)