Thumbnail

Variable State Saver

by Synthiam

Save and Restore variable data to a file.

Requires ARC v7 (Updated 2/6/2022)

How to add the Variable State Saver robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Scripting category tab.
  5. Press the Variable State Saver icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Variable State Saver robot skill.

How to use the Variable State Saver robot skill

The Variable State Server skill allows a robot to retain important variable data between sessions, enhancing its ability to remember past interactions or states, thus providing users with a more consistent and personalized experience. By enabling automatic or manual saving and loading of variable states, this skill ensures that a robot can quickly restore its operational context upon startup, making it more efficient and adaptable to ongoing tasks and user preferences.

If you have some variables that you wish to store and reuse for the next ARC robot session, this plugin is for you. The plugin can be controlled by manually pressing the buttons or programmatically using the provided ControlCommand() parameters. Check the Cheat Sheet to see what commands this plugin accepts.

Main Window

User-inserted image

You may manually load and save the state/values of the specified variables from this window. You can perform those functions by pressing the Save or Load button with the mouse. Pressing Set To Defaults will set all variables to their default values.

Configuration

The first tab of the configuration for this robot skill contains the variables and their default values you wish to save. Only the variables that are specified here will be saved. These are global variables, so they begin with a $ (dollar sign). In JavaSript or Python, the SetVar() command will set the values to the global variable.

User-inserted image

The second tab has options for automatically saving the variable states. This can be done when the project is closed, when an EZB is disconnected, or both.

User-inserted image

Control Commands

There are a few control commands for this robot skill. The control commands can be viewed by right-clicking in the editor, selecting the variable state server, or viewing the list in the Cheat Sheet tab when editing scripts.

User-inserted image

Initialization

When connecting to a robot, you may wish the variables to be pre-defined. This can be done with the LOAD ControlCommand() for this robot skill. Place that ControlCommand() in your init script. Using the Connection Control, you can execute scripts when a connection is established to the robot. Read the connection control manual by clicking here.

Save Location

The variable states are not saved with the project. The variable state files are saved per project in the [My Documents]\ARC\Variable States folder. Each project will be saved with the filename for the respective states. A project without a filename will be named "unknown".


ARC Pro

Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming