NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically Login through Teststand API

Solved!
Go to solution

Dear Member,

 

I have a Login VI in LabVIEW, I m trying to use the same VI to Login Teststand, through API . But I m not able to find the right property and method for same.

 

Can anyone help me to solve this issue.

0 Kudos
Message 1 of 5
(8,812 Views)

Honestly, i don't understand what you are trying.

Login is located in the FrontEndCallbacks.seq file and is executed by the engine as soon as a user wants to log in. Do you place your VI there?

What do you refer to with "using TestStand API"?

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(8,792 Views)

Hi,

 

My requirement is, I have a custom user management VI developed in LabVIEW, I want to use that in my Application.

In one of my subpanels , I m calling teststand API for test case execution. so when I start Teststand through ActiveX control from LabVIEW,its asking to enter user name and password through default popup, But i want to bypass this popup and pass the username and password from LabVIEW to Teststand and programmatically login Teststand.
image.png

 

0 Kudos
Message 3 of 5
(8,790 Views)
Solution
Accepted by VipinrajKK

I make my own FrontEndCallbacks.seq. I started with the default one in C:\Users\Public\Documents\National Instruments\TestStand 2017 (64-bit)\Components\Callbacks\FrontEnd

 

I skip the "CVI Login" step and replace it with my own code, which can be in LabVIEW or whatever language you choose.

 

To pass the login information to TestStand, use this TestStand API call: RunState.Engine.GetUser("LoginName").ValidatePassword("password") 

(Obviously, replace "LoginName" with something like "Administrator" and "password" with the password.)

 

If that step returns true, set the current user with RunState.Engine.CurrentUser = RunState.Engine.GetUser("LoginName")

Message 4 of 5
(8,784 Views)
Solution
Accepted by VipinrajKK

Thank you Pulidotech,

 

I m using below method to handle the same.

 

1. Disable/Skipped the login from FrontEnd Callbacks sequence

2. Added an action step to read a text file (saved in windows public documents)  to get user name, (From LabVIEW Custom  Login VI  ,based on my login type (Administrator,Technician,Operator) I will update the file with user name (Administrator,Technicain1,Operator1) configured in Teststand.

3. Created "MyUserName" local variable to save the user name read from previous step.

4. Created an expression step--> (RunState.Engine.CurrentUser = RunState.Engine.GetUser(Locals.MyUserName)) 

 

forum.PNG

 

0 Kudos
Message 5 of 5
(8,758 Views)