NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the LabVIEW adapter programmatically?

I have been attempting to find a method thorough the TestStand API in LabVIEW 8.0.1 to change the LabVIEW Runtime adapter programatically within mand not having the operator close the application and then restart it.  Mu application is a customized version of the Full-Featured LabVIEW operator interface.
 
One solution is to use the Adapters -> Configure method that brings up a dialog box that allows the user to select the appropriate LabVIEW run-time engine version.  Unforunately, I do not want an operator to have to make a choice of what version to run.  Using the window, and selecting a new version works as expected within my operator interface as I do not need to close the application.
 
My other solution is to modify the <TestStand> \CFG\TestExec.INI with a new path to the approrpriate Run-Time Engine
 
[Config._AdapterCfg]
_FlexGAdp_ServerName = "LabVIEW"
_FlexGAdp_RTSPath = "C:\\Program Files\\National Instruments\\shared\\LabVIEW Run-Time\\8.0\\lvrt.dll"
 
Where the_FlexGAdp_RTSPath is changed depending on the run time engine needed within the code module.
 
By changing the TestExec.INI file I read it was necessary to shutdown and then restart the TestStand Engine.  I have found quite a bit of information of shutting down the TestStand engine but nothing on starting it back up.  So to shutdown the engine from my LabVIEW operator interface I use the Engine -> Shutdown : Final = True method.  I wait about 10 seconds.
 
When I start up the engine using ApplicationMgr -> Start.  It does not appear that the engine is started as I get a 17500 error saying the engine was shutdown when I attempt to run a sequence.
 
Is there a better way to perform this Engine shutdown/startup method?  Since I am using the UI controls do I need to perform an Application Shutdown and then Application Start?
Any thoughts would be appreciated?
 
Thank you,
Paul H
0 Kudos
Message 1 of 4
(3,826 Views)
Hey Paul,
 
Before we go too much into depth, why is that you need to access this setting?  That is, why can't the code modules be called from the most recent version of LabVIEW (or upgraded to a more recent version)?
Thanks,

Andy McRorie
NI R&D
0 Kudos
Message 2 of 4
(3,807 Views)
I work in the Aeronautical industry and often times we get orders for products sometimes up to 5 or more years after writing the software.  Hence my thought would be that software we are developing now (say written in LabVIEW 8.0) could we tested as is, say 2 years in the future. Otherwise the LabVIEW code would have to be upgraded or "released" each time it needs to be tested in order to fit the current LabVIEW adapter setting within TestStand.  Releasing in our industry means writing more documentation and then having to test the code again. Plus the intended use of the functional test system is to test over 100 varied products.  Having to update the documentation and upgrade the software for the new LabVIEW each time an older software module needs to be tested is a not a feasible solution.
 
A perfect example, is that right now we are upgrading the test systems to LabVIEW 8.2.  All the code that we previously released in LabVIEW 8.0.1 needs to be "released" again for this new LabVIEW version.  Otherwise if there is method to change the LabVIEW adapter during run-time to match the LabVIEW version it was developed in it would save us a tremendous amount of time.
 
 
Paul H
 
0 Kudos
Message 3 of 4
(3,796 Views)
Hey Paul,
 
The best way to accomplish what you are trying to do is as follows:
 
When you "Specify Module" for a LabVIEW step, you can click on "Advanced".  At the bottom of this screen is a checkbox for "Always Run VI in LabVIEW Run-time Engine".  With this setting enabled, TestStand will automatically determine the VI version and run the appropriate runtime engine.
 
If you have several steps already defined, I wrote a sequence that will programmatically check this box for every LabVIEW step in a given sequence file.  I have attached the sequence file that performs this function.  If this is a feature that you might use often, you can add it to the Tools menu by specifying Tools->Customize to then Add the menu option for this sequence file.  I have created the sequence file in such a way that if you add it to the Tools menu, you can simply open a sequence file that you have written and select Tools->(new menu option) and it will automatically check the box on the steps of the open sequence file.  Otherwise, it will prompt you for the sequence file.
 
Hope this helps!
Thanks,

Andy McRorie
NI R&D
Message 4 of 4
(3,786 Views)