06-04-2009 01:05 PM
I am using simple LabView OI for my test system. I would like OI to automatic logout or exit after X minutes inactive. This will force the next operator must login before he or she can run any test in this test system.
I am appreciated for any help.
Thanks
VI123
06-04-2009 08:32 PM
Hi VI123,
The easiest way I can think of is to modify the Timeout case of the Main Event Loop to call ApplicationMgr.Logout.
See the attached screenshot below, this is modified from the LabVIEW Simple OI. Note that I added a constant 30000 (30secs) to the timeout node of the event structure.
Also, I've attached the Top Level VI for your convenience.
Hope this helps!
06-05-2009 11:21 AM
Jervin,
Thank you for your help.
Your way is simple but I would like to have a control over the timeout. I would like to disable timeout at SETUP and enable timeout at CLEANUP. This will prevent timeout to activate during TEST UUT.
Thank you again for your help.
VI123
06-05-2009 12:36 PM
Hi VI123
Using the same architecture, you could modify the timeout to be a control/variable. Then in the setup/cleanup, send a UIMessage from your Sequence (or Process Model) and in your OI, register a UIMessage Callback VI that will get called when the UIMessage is sent. Update the control/variable from this callback VI.
For more information on UIMessages, refer to:
NI TestStand Advanced Architecture Series: Best Practices for NI TestStand User Interface Developmen... - Section Communication from the Test to the User Interface
NI TestStand Help: UIMessage
NI TestStand Help: PostUIMessageEx
02-22-2010 11:16 PM
02-24-2010 01:17 PM
Hi Micho,
Here is a link to example code that will show you how to achieve this behavior for your user interface. The login will automatically log in the current Window's user.