NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Administrator approval

I have a TestStand 2012/LabView 2012 program and need to add a user message when a duplicate serial number is scanned.  This message must require the entry of the TestStand Administrator password before continuing.  Does TestStand provide this function?  If not, how can I programmatically access the administrator password?

0 Kudos
Message 1 of 9
(4,072 Views)

Hello

 

Actually you can make a match with the password using those methods (ValidatePassword and User):

First we need to get the user using this link: http://zone.ni.com/reference/en-XX/help/370052P-01/tsapiref/reftopics/user/  see this: http://zone.ni.com/reference/en-XX/help/370052P-01/tsapiref/reftopics/engine_getuser_m/

 

After that

 

http://zone.ni.com/reference/en-XX/help/370052P-01/tsapiref/reftopics/user_validatepassword_m/

This method return a Boolean value

 

I hope this information will be useful to you.

 

Regards 

0 Kudos
Message 2 of 9
(4,055 Views)

This looks like it might work but I have no idea how to implement Engine Callbacks.  Can anyone provide an example sequence with Engine Callbacks?

0 Kudos
Message 3 of 9
(4,048 Views)

Hi

 

Actually I was thinking that we can do something like this:

 

Capture.JPG

 

Regards

0 Kudos
Message 4 of 9
(4,042 Views)

I will try this later today.  I think it is close to what I need.  Could you comment on using your proposed solution for the following sequence:

 

Operator login during production test

Test error

Administrative login required to clear error

Return to operator login

Continue production test

 

 

0 Kudos
Message 5 of 9
(4,038 Views)

I threw this little example together.  I think it does what you want.

 

You may want to add looping in case they accidentally click the wrong button.

 

 

I also recommend adding a Privilege called ClearErrors.  In my example I look for the GrantAll for Configure.  This is kind of a hacky way to determine if they are an admin.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 6 of 9
(4,027 Views)

In reviewing these solutions, two questions:

 

1.  I cannot seem to locate the TestStand functions shown in the LabView VI screenshots (sorry, not a LabView expert. Yet).

2.  Is the TestStand administrator password programmatically accessible?  I do not see the need to actually login as Administrator.  All that is needed is to enter (and validate) the administrator password to approve clearing the error and to continue testing.  Doing this would also eliminate the need to log back out and re-login as operator.

0 Kudos
Message 7 of 9
(4,010 Views)

The problem is that you could have many administrators.  Unless in your case you only have one and it is called Administrator.

 

If that is the case then you could use:

RunState.Engine.GetUser("Administrator").Password

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 8 of 9
(4,004 Views)

Only one administrator in this case.  I see the administrator password is encrypted.  How do I compare an entered password (unencrypted) to this value?

0 Kudos
Message 9 of 9
(3,994 Views)