05-13-2013 01:32 AM
Hello,
I use two different applications on my computer and one of them should run in LV 2011, the other one in LV 2012. Both versions are installed and it works fine as long as I start the correct LV version manually before starting the application (by starting and closing the required LV version from C:\Program Files (x86)\National Instruments\... before starting my application).
I want to do this automatically in a command script, so basically I want to do the following:
* Check which LV version is currently active (which LV version was started last)
* If the currently active LV version is NOT the required one: change to the required LV version (by starting LV and closing it, or preferably doing it differently if someone could tell me how)
* If the currently active LV version is the required one: Do nothing
There are two problems I could not solve so far:
* How do I get the currently active LV version (I checked windows registry, but I only see my installed LV versions, and not which one is currently active)
* How can I close LV with a batch script (or how can I change the currently active LV version w/o opening and closing it)
Thanks in advance,
Tobias
PS: I did the same for different TestStand versions, by reading out the TestStand system environment variable and if requuired changing the TestStand version via the command line of the TS Version Selector. This works fine, but there is no system environement variable that tells the currently active LV version.
Solved! Go to Solution.
05-13-2013 03:05 AM
Tobias,
the "current active LV version" is simply the last development environment version you started. So instead of trying to get information on the active version, i would rather always start the correct version of LV ADE.
Another idea:
If the applications you start are "finished", why dont you create executables out of them? An EXE always loads the correct LV RTE version (if installed, if not, the EXE will not run displaying an error dialog).
Norbert
05-13-2013 03:44 AM
Hi Norbert,
in my applications I start an executable that starts the TestStand Engine and the TS sequences use LV VIs to perform steps. So I cannot start always the correct LV version, since LV is started out of the TS Engine and in TS I can only configure to use the currently active LV development version, but I cannot tell TS to use a different LV version (starting the requried LV Run-Time version can be configured, but as I said this is not possible for the LV development environment).
This might sound a bit complicated, but we use this environment for all our test tools in our site due to other advantages. To put the whole environment in an executable would be pretty complex and might be a far term solution but this is currently out of sight.
Tobias
05-13-2013 04:17 AM
Tobias,
which version of TS are you using?
And you know that for a TS deployment, you should make sure that the LV adapter is configured to be "Runtime Engine" rather than "Development Environment"?
Moving the TS module VIs into an executable is nothing i would do. I would rather leave them "as is" or create a packed project library (PPL, *.lvlibp) out of them.
Norbert
05-13-2013 04:34 AM
We are using different versions of TS, depending on when the specific project was started. So the current projects run TS 2012 SP1.
Now and then we add a new project on an existing station in our production. And then we have the problem I try to solve that the new project should run the new TS and LV version, but since we don't want to change the exisiting project the old project should continue to run the old TS and LV versions. As I said I solved this for TS, but not for LV so far.
Also for our new projects we do configure the LV Adapter to Runtime Engine, but we only recently got so far. So our old projects still run with the LV Development Environment. Hence I have the described problem.
05-13-2013 04:44 AM
Hm, a very unpleasant situation, indeed....
Those different versions of LV:
If the answer to 1 is NO and to 3 YES, the simplest trick would be to open all modules with the newest LV version always. In my experience, upconversion is not an issue if the versions are not too far from each other. Huge steps can introduce issue though, esp. including question 2.
Did you try searching the Windows Registry for a key showing the last started LV version?
Norbert