NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a Watchdog timer for LabView OI auto exit after x minutes inactive

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

0 Kudos
Message 1 of 6
(5,185 Views)

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.

maineventloopo.jpg

Also, I've attached the Top Level VI for your convenience.

Hope this helps!

Jervin Justin
NI TestStand Product Manager
0 Kudos
Message 2 of 6
(5,178 Views)

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

0 Kudos
Message 3 of 6
(5,156 Views)

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

Jervin Justin
NI TestStand Product Manager
0 Kudos
Message 4 of 6
(5,153 Views)
like to do the opposite ... how do I avoid having an operator login?
0 Kudos
Message 5 of 6
(4,892 Views)

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.

Cheers,
Kelly R.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(4,859 Views)