Variables to be restored on startup

Some parameters may need to be saved when changed and restored to their original values when RTES restarts. Or same parameters may need to be captured like a recipe and loaded on demand.
RTES provides such facility with the FILE or XFILE command to save the variables and the GET command to read them back in.
FILE is restricted to a single set of variables
XFILE allows several sets of variables to be saved and reloaded
Saving and loading the variables may be done on command or automatically.
Following is an example of how to save and reload several sets of values for the same variable parameters.

Let us name the variables parameters:

PART_TYPE
PART_TEMP
PART_HI
PART_LO
PART_RANGE

We want to save:
The value of PART_TYPE
The description of PART_TYPE
The value of PART_TEMP
The value of PART_HI
The value of PART_LO
The rule that evaluates PART_RANGE

We create a text file name PART.FMT. This file contains the following:

The system is now ready to use.
Set the values, text, rule. For example:
SET PART_TYPE 1
TEXT PART_TYPE Buick 1957
SET PART_TEMP 120
SET PART_HI 125
SET PART_LO 100
RULE PART_RANGE=PART_HI-PART_LO

Save your set of parameters. For eaxample:
XFILE PART MODEL1.CMD

This will create a file named "MODEL1.CMD" containing:

Similarly, you may create MODEL2.CMD, MODEL3.CMD, etc

When you execute:
GET MODEL1.CMD
The contents of that file is executed as a set of individual commands

To automate the 'saving' process, you may include the XFILE command in a task or an EXEC statement.

To automate the 'loading' process, you may include the GET command in the AUTOEXEC task, or in an EXEC statemnet that evaluates on startup or on demand.