NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Set TestStand Configuration Directory

Solved!
Go to solution

HI,

 

I'm trying to set TestStand Cfg directory from a LabVIEW OI (I customized the full featured OI shipped with TestStand). This works fine only if I restart TestStand. I understand I only need to shutdown the Engine. My question is how can I restart the Engine without restarting everything? (there is no such thing as a Start Engine method) Could a GetEngine method work? What would be the best way to accomplish this task? I don't want my customer to restart the software. 

 

I need to set the configuration directory because different softwares might be installed on the same station with different configurations (different station globals for example), or maybe developping 2 applications for 2 clients on the same computer.

 

Ps: I also posted this question on LAVA: http://lavag.org/topic/14439-configuring-teststand-cfg-directory/ 

 

Thank you all in advance,

 

Regards,

 

Rodéric L
Certified LabVIEW Architect
0 Kudos
Message 1 of 16
(5,845 Views)

Roderic -

 

If you are intent on avoiding restarting the application, one option in LabVIEW would be to have a wrapper VI that basically consists of a Subpanel on the Front Panel. This wrapper VI would then use VI Server to open a reference to your UI VI, insert the UI VI into the Subpanel, then run the VI. When you want to change the config directory, you can do so within the UI, then exit the UI VI (note that the wrapper VI will still be open and visible). In the wrapper VI you would then close then re-run the UI VI using the VI reference.

 

This wasn't the best explanation. Please let me know if you think this would be a suitable solution for you and whether or not you run into trouble implementing this. Hope this helps.

Manooch H.
National Instruments
Message 2 of 16
(5,842 Views)

manooch,

 

thanks for the reply, looks like its gonna work, but it would be long to load the software... Is there another way to restart the Engine? It seems unintuitive.

 

What would be the best way to reload my software using ActiveX? VI Server looks complicated to set up.

Rodéric L
Certified LabVIEW Architect
0 Kudos
Message 3 of 16
(5,835 Views)

Hello Rodéric,

 

I saw your post on Lava forum. I would appreciate if you can tell me the method you used to re-start TestStand engine after calling shutdown method?

 

I'm not using any LabVIEW OI & am looking out to implement the feature using TestStand environment itself.

 

Thanks

Amit

0 Kudos
Message 4 of 16
(5,710 Views)
Solution
Accepted by topic author Rodéric

Hi Amit,

 

You can reopen the engine reference using the automation open function after completing the shutdown procedure outlined here:

 

 Shutting Down the Engine - NI TestStand 2010 Help

 

An example of this in LabVIEW:

 

1.png

 

Hope this clarifies!

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 5 of 16
(5,704 Views)

Thanks,

 

Problem Statement:

I want to change the TestStand Data File Path Programatically from TestStand environment itself.

In my deployment system I'm using the NI supplied basic Operator Interface without any customization.

 

Attempt To Solution:

I'm changing the CFG folder path in "SequenceFileLoad" callback then using "RunState.Engine.ShutDown(True)" statement I shutdown the TS engine.

Even if I execute your LabVIEW code from TestStand I'm able to shutdown but after that it doesnt restart. It seems it is possible only if the environment is LabVIEW and not TS

 

Challenge:

After shutting down TS engine I need a way to re-start the TS engine.

 

I would appreciate if you can explain me the approach in this scenario.

0 Kudos
Message 6 of 16
(5,688 Views)

Hi,

   I made vi as per your suggestion, i get following error

 

FieldPoint:  Success
=========================
LabVIEW:  Error connecting to GPIB driver or device.
=========================
NI-488:  Error connecting to driver or device.
=========================
VISA:  (Hex 0x0) Operation completed successfully.

        

    Please share the callback vi

 

Thanks

Niranjan Kamble

CLAD

Thanks & Regard's

Niranjan Kamble's
CLA/CTD
0 Kudos
Message 7 of 16
(5,567 Views)

Hello Rodéric,

                   i want to set Cfg folder path through operator interface.vi so I've placed the following program into operator interface.vi before intitalize.vi (the operator interface.vi is located @ C:\Programm files\National Instruments\Testsand2010\opeartor Interface\LabVIEW.....)

 

 

SetCfgFilePathVi.jpg

 

            The Teststand maneger reference from operator interface.vi is passes through this vi, as i run the operator interface.vi this program executes without error but i get error at the next property node "IApplicationMgr --> Start" which is placed into intialize.vi

 

Error : Two Application maneger is opened

 

          I have tried two options, for each i get same error, the options are as follows

 

1) The TSUI.IApplication maneger reference is opened and closed in operator interface as well as the above program seperately

2) I have passed only one TSUI.IApplication maneger reference through out operator interface

          

 

Thanks & Regards

Niranjan Kamble
CLAD/Teststand
0 Kudos
Message 8 of 16
(5,546 Views)

I used the shutdown method, and it worked fine.

Rodéric L
Certified LabVIEW Architect
0 Kudos
Message 9 of 16
(5,535 Views)

Hello Rodéric,

                   Can you share the code u r using ??

Thanks & Regards

Niranjan Kamble
CLAD/Teststand
0 Kudos
Message 10 of 16
(5,519 Views)