NI TestStand

Showing results for 
Search instead for 
Did you mean: 

Log user in and out through LabVIEW

Hi All,


I've developed a custom GUI for teststand in LabVIEW, I've now come to the point where I want to add the capability to log users in and out. So far I can log users in correctly using the following code:


This causes no errors. When I try to log users out though, I am finding whatever I try to use generates errors, I usually have error 97 "Unknown Error".


Here's the methods that I've tried in Labview:

  1. ApplicationMgr.Logout
  2. ApplicationMgr.GetCommand (cmdKind = CommandKind_Logout)
  3. ApplicationMgr.GetCommand (cmdKind = CommandKind_LoginLogout)

Each of the above causes an error.


I am wondering if my login code is not actually logging a user in to Teststand correctly. Any pointers?


Thanks in advance


0 Kudos
Message 1 of 4

In posting this, I realise I am closing the User reference... Could that be what is causing the issue?

0 Kudos
Message 2 of 4

Hi there,


It sounds like it could be troublesome, if you close the reference after logging in, how do you get that reference back when you want to log that user out? Have you looked into this now?



0 Kudos
Message 3 of 4



Not closing it still causes the same issue. I've checked the reports and I am being logged in as the name appears on the report. But I'm still failing to log out correctly

0 Kudos
Message 4 of 4