Perspective Bindings going Idle. (Tv Screen Displays)

Hi all,

I am having some issues with my Perspective workstation session timing out. The setup is one session on a single PC with the "monitors", one actual monitor and 2 TVs for displaying data. The TVs will not have any interaction and the monitor screen might not get touched for days at a time. This whole project evolves around scripted and binding tag history.

It's my understanding that bindings on a page will not update if the page has timed out. In order to keep the page updated I have tried a few things.

  1. Adding a page refresh gateway script that searches for all sessions and all page IDs and refreshes them. This seems to have resulted in an assortment of issues.
    ClientSession 19May2025 21:30:12 WebSocket disconnected from session.
    ClientSession 19May2025 21:30:12 WebSocket disconnected from session.
    ClientSession 19May2025 21:30:12 WebSocket disconnected from session.
    Refresh Page 19May2025 21:30:12 Refresh page failed
    Refresh Page 19May2025 21:30:12 Refresh page1b40808f
    Refresh Page 19May2025 21:30:12 Refresh page2817efe8
    Refresh Page 19May2025 21:30:12 Refresh page2312ba17

  2. I then tried adding a custom parameter that gets updated every 5 minutes with system.perspective.sendMessage("keepAlive", scope="session") inside the onChange property. I also tried adding a system.perspective.refresh() but that caused disconnection issues.

After removing the refresh code, I'm not getting any errors but I'm not confident that the bindings on the TVs are updating.

I guess my main question is what's the best way to ensure that all pages displays UpToDate binding data?

Also, side note: whenever I restart the gateway I get a few log warnings of addDays but got null, indicating the date memory tags are being set to null on startup. I set all datetime memory tags to midnight, however the issue still occurs occasionally. It's odd as the historized data is showing the correct data even though it's giving a null warning.

I know there's a lot there so apologies for that. Any help would be appreciated, thanks.

What exactly are you talking about here? In theory a page will never time out unless there is something browser side that makes it stop running the page due to ram economising.
Bindings just keep running, unless you make them stop.
Forcing a refresh of the pages seems counter intuitive.

It seems to me that the bindings on the page stop updating after certain amount of time. I feel as tho this is because the bindings are not being refreshed, for example the tag historians is not querying. Its my understanding that in order to refresh the data and query the historian, i would need to change either the start or end time.

Just was wanting to not have to change anything inside the binding itself but still keep it querying the historian.

Are you polling the tag history in your binding? Can you show us some of the bindings?

Also have a look at refreshBinding()

To be honest I have not as i though refreshing page would in turn refresh the bindings,

The bindings will refresh every time the underlying data from the first (non transform) part of the binding changes.
On a query binding, setting it up to poll will update the underlying data at that poll rate and therefore update the bindings.

Also you can manually force the refresh of a binding using refreshBinding()

You might even get away with setting your start or end date using a constantly updating binding with now(x)

1 Like

Thank you very much, For future project i will be looking into using poll rates and for my own reference ill look into refresh Bindings

Yes i have decided to go with this, wanted to see if there was anything else before i went though and changed the bindings, thank you