First, OptoTagPreserve has been updated! If you are a fan of this useful utility program (as I am), be sure to download the latest version.
If you're new to PAC Control, or haven't tried OptoTagPreserve, here is why you should take a closer look.
OptoTagPreserve™ is a command-line utility that can archive and restore tags and values in PAC Control™ strategies running on a groov® EPIC processor (GRV-EPIC-PR1), SNAP PAC R-series or S-series controller, or on SoftPAC™. Your tags can be saved to a password-protected binary file, an XML document, OptoScript, or an init.txt file.
As the name implies, the primary purpose of OptoTagPreserve is to preserve variable states when you need to update firmware on your controller. Remember, updating firmware erases battery-backed data, which includes persistent variables and variables initialized on strategy download.
A quick way to tell which tag variables are persistent in your strategy is to view them in the strategy tree. They'll be colored green, like these two in the image below:
When you do a firmware update, these tag values are lost. But using OptoTagPreserve just before the firmware update will keep their values safe in a text or binary file on your PC.
So before you update firmware, use OptoTagPreserve to archive tag values to your computer, and then restore those tags after firmware is loaded and your strategy has been downloaded. Just be sure to restore them before you run your strategy for the first time after your firmware update. This way, the whole process will be very close to a "bumpless" update.
So a quick overview of the process looks like this:
- From PAC Control debug, stop your strategy.
- Run the OptoTagPreserve utility (command line options here).
- Update your controller firmware.
- Use PAC Control to download your strategy to the controller (do NOT run it yet!).
- Use OptoTagPreserve to restore your persistent tag values.
- Now, run your strategy and check for correct operation.
Check out the technical note included with the file for more information.
Don't forget that you can use OptoTagPreserve at any time, not just for firmware updates. You can also use OptoTagPreserve to:
- Save a backup copy of strategy tags and data.
- Create “templates” of variables to copy to other strategies and other controllers.
- Recover from an accidental erasure of the processor’s or controller’s data.
- Transfer strategy configuration between controllers, including groov EPIC® processors.
It really is a very useful utility.
Till next time. Cheers, Mate.