From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Control TestStand User Manager From SQL Database

Solved!
Go to solution

Hello Community,

 

I am working with multiple test stations. Whenever I make a change to the user manager or station globals I always need to copy the files "Users.ini" and "StationGlobals.ini" to the other computer. Is there a way to control the TestStand user manager and station globals through a SQL Database?

0 Kudos
Message 1 of 5
(976 Views)
Solution
Accepted by topic author MechUnit

You can pull user info from anywhere in the Front End Callback.  I always bypass the Users.ini because it's a terrible way to store user info.  You just have to know what you are doing.

 

For Station Globals, I wouldn't have a good answer for you.  Maybe you can have a engine callback in your sequence file for when it loads, inside of there you could read the database and inject those into station globals.  My rule of thumb is always avoid station globals.... generally they are a bandaid.

 

Regards,

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5
(944 Views)

Hello Jigg,

 

Would you be able to post an example to help me get started or tips? I have the FrontEndCallbacks.Seq open and I see Logout and Login in Main. Any help is appreciated. Thank you!

0 Kudos
Message 3 of 5
(939 Views)

Hello Jigg,

 

I ended up skipping the login step and added an action step for a vi I made. The vi returns the user name to be logged in and stores it to a local variable. Then the next step I used the following statement, RunState.Engine.CurrentUser = RunState.Engine.GetUser(Locals.LoginName).

0 Kudos
Message 4 of 5
(924 Views)

This sequence shows how to bypass the users.ini file by just logging in an operator.

 

Let me know if you have any questions.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 5 of 5
(916 Views)