In 8.1.24 was introduced this :
Added a new Update Mode for vision: "None". This allows the project designer to handle delivering updates to running clients manually with the help of a new boolean Vision Client system tag named ProjectUpdateAvailable and a companion scripting function system.vision.updateProject() which will actually perform the project update on the Vision Client.
For former 7.9 users like us, loosing the staging with Vision was hard.
But with this new update, we can more or less mimic the staging mode.
Here is how we did it.
- Change the update mode in the clients where we want this behavior.
- Create a button somewhere into the project, only visible for you (with Security settings) that will do a system.vision.updateProject() so that you can update whenever you want after a save.
- Create a boolean memory tag somewhere in the [default] tag provider that is named after the project's name.
- Create a Scheduled event script (in Scripting / Gateway Events) that will auto reset this memory tag after a given amount of time passed.
- Create a Tag Change script in Vision / Client Events that will trigger on 2 differents tags : the new Vision Cient tag named ProjectUpdateAvailable and our memory tag.
Our script looks like that (sorry for the french in the variables names) :
maj_dispo ,publier = False ,False
if str(event.tagPath) == '[System]Client/System/ProjectUpdateAvailable':
if newValue.value == 1:
maj_dispo = True
projet = system.tag.readBlocking(['[System]Client/System/ProjectName'])[0].value
publier = system.tag.readBlocking(['[default]PUBLIER/%s' %(projet)])[0].value
elif newValue.value:
publier = True
maj_dispo = system.tag.readBlocking(['[System]Client/System/ProjectUpdateAvailable'])[0].value
if maj_dispo and publier:
system.vision.updateProject()
So basically, as long as you don't change your memory tag to True, the client will not update. Update it manually with your button in the project. This is the pseudo-staging mode.
As soon as the publish tag is True, all the instances of this client will auto-update (for as long as the publish tag is true and new updates are available).
Hopes it will help some people that were missing the staging mode and did not see this new update in the 8.1.24