|
GPP2 Variable Initialization
GPP2 includes many variables of several types (system variables, user variables and interaction variables). Some of these variables are initialized before each run (for example, SEQ_START is initialized from the relevant DF2 parameter). Interaction variables are initialized with the last values used by the user for that post-processor.
It is common practice to use the STARTUP block in order to initialize other variables (mostly user-defined variables). However, this requires that the initial values are included inside the EX2 program. Any change requires re-compilation of the post-processor.
In order to allow GPP developers to customize post-processors without re-compilation, GPP2 has introduced the concept of INIT files. These files are simply text files that are read and executed by GPP2 before each run. They can be used to initialize any GPP2 variable. See the INIT_FILE command for more details on how to write INIT files and how to use them.
The order of initialization is important to understand, since the same variables may be initialized using more than one method.
When the post-processor is first loaded, the DF2 file is read, as well as all INIT files. The last values of the interaction variables are also read from a special file, overriding the original values specified in the EX2 file.
Before each run (execution of a toolpath) of GPP2, the following process takes place.
-
Specific system variables are initialized from DF2 data.
-
All INIT files are executed, assigning values to any variable listed in them.
-
Interaction variables are re-assigned the values on the screen (overriding any EX2 or INIT file values).
GPP2 also allows the user to restore the default values for interaction variables. Pressing the Restore Defaults button loads the original values specified in the EX2 file and then executes the INIT file statements (potentially modifying the variables).
|