From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

In Teststand how to use ActiveX Automation to change Adapter property?

In Teststand how to use ActiveX Automation to change Adapter property? For example, I need to change LabVIEW adapter configuration and set LabVIEW Run-time engine version to 7.1, rather than 7.0.
 
Thanks
Jacky
0 Kudos
Message 1 of 4
(3,475 Views)

Dear Jacky,

You can use ActiveX Automation to access and change that LabVIEW run-time engine. Simply place an activeX step in your sequence and then right-click on the step and click "Specify Module". Then as the Automation Server select the NI TestStand Adapter API. Then from there, you can select the LabVIEWAdapter class, and choose the method called SetServerInfo. This method has two parameters which are serverType and serverInfo. The serverType parameter specifies the type of LabVIEW server (either a LabVIEW ActiveX server or a LabVIEW Run-Time Engine). The serverInfo parameter identifies the LabVIEW server that the LabVIEW Adapter currently uses. For a LabVIEW Run-Time Engine, the string is the path to the run-time engine.

All the LabVIEW Run-Time Engine dll's are stored in the path C:\Program Files\National Instruments\Shared\LabVIEW Run-Time\. From there choose your version and then find lvrt.dll. 

Hope this helps!

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 2 of 4
(3,450 Views)

 The ActiveX Reference needs to be specified, what's the value?

 Thanks!

0 Kudos
Message 3 of 4
(3,447 Views)
Hi Jacky,
 
In your sequence file, you will have two activeX steps. The first will get an object reference to the LabVIEW Adapter and the step will actually use this reference as the object reference.
 
 
I have attached a sequence file (and two screenshots just in case there is a sequence version issue) that gets a reference to the LabVIEW Adapter and then calls the GetServerInfo method to gather some information. I tested this out to make sure it worked by setting my LabVIEW adapter to use the Run-Time Engine, set a breakpoint in the code, and looked at the local variables I created. The two local variables showed the correct information.
 
Hope this helps!
 
Best Regards,
Jonathan N.
National Instruments
Message 4 of 4
(3,422 Views)