OptoBlog

A closer look at OptoTagPreserve

Posted by Ben Orchard on Oct 9, 2019, 12:06:37 PM

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:

OptoTagPreserve


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:

  1. From PAC Control debug, stop your strategy.
  2. Run the OptoTagPreserve utility (command line options here).
  3. Update your controller firmware.
  4. Use PAC Control to download your strategy to the controller (do NOT run it yet!).
  5. Use OptoTagPreserve to restore your persistent tag values.
  6. 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.

 

Topics: Firmware, PAC Control, OptoTagPreserve, groov EPIC, snap pac

Written by Ben Orchard

Subscribe to Email Updates

Recent Posts

Posts by Topic

see all