Perspective particular page log out

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:

  • On the view, create custom.viewOpenedAt. Create an expression binding on it:
    now(0).
  • Create custom.autoLogoutDelay : 120000 (120 s = 2 minutes).
  • Create custom.loginTimeout. Create an expression binding on it:
    (now(1000) - {view.custom.autoLogoutDelay }) > {view.custom.loginTimeout}
  • Add a change script to 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.

2 Likes

Do any think missing my end,

image

for viewOpenedAt:

for loginTimeout:

for loginTimeout change script:

I had followed @Transistor and made below changes .

  1. On View event Startup script
    self.view.custom.viewOpenedAt = system.date.now()

  2. removed the now(0) binding from viewOpenedAt

Change it to (now(1000) - {view.custom.autoLogoutDelay}) > {view.custom.viewOpenedAt}