Reserve Perspective Session on Limited Licence

I have one site that does not have an unlimited Perspective licence yet. Adding one for a small project will break the bank. My idea is to buy a small (e.g. 3) limited licence to get started with.

There will be 1 fixed HMI station in the field that must never fight to get a seat. Is it possible to reserve a session by IP, host name, security zone?

(I thought I've seen something like this, but can't find anything in the docs or forum)

I don't think so. It could be done with Vision. Or, perhaps, buy a two-client Perspective license with a one-client Vision license.

Vision is a no-go. Our standards are exclusively developed for Perspective. It'll be cheaper to buy the unlimited Perspective licence (which we eventually will need anyway) than to replicate the required functionality in Vision.

The likelihood of the licence being consumed by outsiders is actually really small. The fixed HMI will be permanently on and live. So 3 licences will have to be consumed while the fixed HMI is down. Even if that happens, an administrator can just kill a rogue session from the gateway page.

Probably an acceptably low risk

You could create a Tag which stores the IPs of known Sessions. usually I'd advise against this, but with a limited count of Sessions it might be feasible. Just use a Gateway timer script to populate the Tag on a timer with system.perspective.getSessionInfo. Something like this:

session_tag_path = "[default]MyTag"
ips = []
for session in system.perspective.getSessionInfo():
system.tag.writeBlocking([session_tag_path], ips)

Then, in your onStartup Script within Session Events:

session_tag_path = "[default]MyTag"
reserved_ip = "XX.XX.XX.XX"
current_ips = system.tag.readBlocking([session_tag_path])[0]
if reserved_ip not in current_ips and len(current_ips) > 2:

There is at least one race condition to account for here, where multiple users attempt to create a session within the period specified in the Gateway timer script.

1 Like