Hello,
A customer ask us if there is a solution to restart automatically PcVue on each PC if the version of each one is not the reference version.
Is anybody have a solution ?
Hello,
I have a nice demo project based on the SvRestart sample project (originally done by Raphael if I'm not wrong). It's designed to work both in standard client/server & Terminal Server.
I can adjust it and sent it to you after dinner (I'm in Customer site now).
B)
Thank you to send me your project.
I will look at it.
Yes, SvRestart project is used to restart automatically PcVue.
But it doesn't do it automatically when the reference version changed.
Actually PcVue doesn't know anything about the reference therefore you must make a script that is checking periodically the reference folder to detect if the reference version is the same then the running version on your station (SYSTEM.LOCALHOST.VERSION.PROJECT or .LIBRARY).
Hello, you can have e look to KB313.
It exists another tool called SvStopStart, derived from SvRestart, which is a bit more advanced as more options:
- timeout to stop SV (after timeout, SV + HDS are killed)
- delay before restarting SV
- shutdown computer when SV is stopped (when a UPS properly asked to stop the computer...)
- silent mode (when run by a service)
For both Tools, we should check if they are still working on recent OS (last update of SvRestart in 2007, and 2011 for SvStopStart...).
Now some considertaions about how to restart stations in a project.
Automatic restart is quite a good idea, but it 's also a bit dangerous in my mond... Do you really want to restart both of your servers (in the case of redundant servers) and have a blackout during several minutes ?
What I will suggest is to restart the passive server, and when it's done, restart the active one. For that, use a variable in which you indicates the number of the station you want to restart. this variable is watched by all the other station, and when the number corresponds to their own station number they will restart. On the Dev station, you'll then have to create a SCADA Basic program which will ask to restart the passive server, waits to see it restarted, and then ask to restart the other server.
An other problem that I see, is that on client stations, users could be working on something that must not be interrupted by an automatic restart. Then, just display a pop-up telling "your station will restart within 1mn. Press Cancel to postpone". You can manage a local bit variable that you set to 1, it will then display some graphical element somewhere indicating that the station will need to be restarted. You even can run Cyclic action with a 1h delay to resubmit a restart.
Yep, good points Florent.
Hey, I didn't know that you did another SvRestart called SvStopStart. You cheated on me as SvRestart was my baby 🙂
Well, I needed this improved version for Vergnet. I though it was the other Nico who made it. Remember me to pay you your royalties with several beers next time we meet 😉
One day, we should do a sample multistation project with this kind of features...
Hello,
as promised I send you my SvRestart re-work.
In my experience, the main goal is to restart PcVue with proper arguments in command lines (command line will change in case of WTS and non-WTS stations, for example). My script should automatically build good command-line parameters.
This project is based on:
- a cyclic script that run on any machine
- a bit variabile for any station (LAN.RST.NameOfTheStation)
After declaring (manually) a new REF version, it's necessary to click on the "Broadcast" button. At this point, any LAN.RST.NameOfTheStation bits goes to 1. The cyclic action on any remote station seen this value, reset his variable to 0 and initiate the SvRestart procedure.
To adapt to your project you need to create the LAN.RST... variables (with adeguate client/server lists) and execute at the startup the GENERALE script. Don't forget to copy the SvRestart.exe in TP folder. You have also to modify the list of the station's bits inside of the GENERALE script.
I thank also Florent for his new version of SvRestart... 🙂 I will use it for sure in the future.
Hope it helps,
Indeed, if i am not mistaken the exe itself has been done firstly by Vincent Riviere and then Niko made some modifications.
But I am the father of the concepts :p
Thanks everybody for these informations.
Maybe I will use this project to inform our customer.
I'm agree with Florent about his carefully message. My opinion is also to not restart automatically a SV without inform users. But customer is the king...
About informing customer of the restart, this is my solution:
execute the restart only if on the local station the variable @USER is empty.
So, my script basically should restart the local station only if not currently used by an operator.


