Hello there,
Does anybody know how to log out of a particular page every 2 min?
Please let me know the approach. Thanks in advance.
Ignition version 8.1.28
Windows 10
Perspective Module
Hello there,
Does anybody know how to log out of a particular page every 2 min?
Please let me know the approach. Thanks in advance.
Ignition version 8.1.28
Windows 10
Perspective Module
Hi, how about using an onStartup event that would start a counter / get the time / run system.util.invokeLater()
, and then execute system.perspective.logout()
?
system.util.invokeLater() this function only vision scope not in perspective.
Try this:
custom.viewOpenedAt
. Create an expression binding on it:now(0)
.custom.autoLogoutDelay : 120000
(120 s = 2 minutes).custom.loginTimeout
. Create an expression binding on it:(now(1000) - {view.custom.autoLogoutDelay }) > {view.custom.loginTimeout}
custom.loginTimeout
and script the logout.Note that now(0)
executes once on startup of the view. now(1000)
will update every second. My understanding is that now()
will update at the default scan rate.
I had followed @Transistor and made below changes .
On View event Startup script
self.view.custom.viewOpenedAt = system.date.now()
removed the now(0) binding from viewOpenedAt
Change it to (now(1000) - {view.custom.autoLogoutDelay}) > {view.custom.viewOpenedAt}