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
(158 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
(126 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
(121 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
(106 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
(98 Views)