Inactivity Timer to Close mappView Client

Is there some way to implement an inactivity timer in mappView to automatically close a client after a period of time?

A customer would ideally like only 1 client connected at a time, but if a user doesn’t close their client after finishing their work, they need a method of making sure other users can get access after some time.

I’ve seen that you can use ArFirewall to temporarily block an IP, but this seems like a rather convoluted solution.

Hi Alessandro,

I don’t know how to close a MappView client. Using ArFirewall might be a solution.

To track activity in the MappView client, you can bind the system variable clientInfo.activityCount to a PLC variable.

If activityCount isn’t incrementing, the MappView client is inactive.

To find out which client is affected, you can use ListBindings with slotId as the selector. See this example: Display client information for all clients

Perhaps this will help you :wink:

Best regards, Simon

1 Like

Hi Simon,

Thanks, I’m fine with the activity timer side of it.

I’m more wondering if there’s some better way of closing a mappView client instead of using ArFirewall.

Hi,

I’m not 100% sure, but my interpretation is:
completely closing a mappView client session would more or less mean remotely closing the browser window / tab, which is not possible by mappView.
As long as the session is still active even if it’s not in use, the browser will keep trying to get data from the mappView server, or will try to reconnect the session if it was inactive before (for example if the browser window was in background for some time).
So when the session gets inactive, another client could connect, and the former client will not get the session again - but there’s no reliable way to force this (at least as I know, but I’m not a mappView expert).

In some setups, for example when using a dedicated operation panel, this could be solved by a mappView independent 2nd communication between the PLC and the client operating system, where for example a flag from the PLC triggers the execution of a client operating system script that closes the browser. But for sure this just makes sense when the client operating system is just and only the system hosting the machines visualisation panel.

Best regards.

1 Like

Hi @aenoch , what kind of solution have you implemented? can you update us?