Behavior of Macro unit
Program
Macro program is handled as the data of Macro processing unit. When saving scene data, the program is saved as processing unit data.
When defining following subroutine, System will call and execute the subroutine Automatically.
Label Name of Subroutine
|
Processing
|
*McrInit
|
Nearest processing after loading Macro program
|
*MeasureDispG
|
Display measure result processing
|
*MeasureDispT
|
Display measure result processing (text display)
|
*MeasureProc
|
Execute measure processing
|
*RenumProc
|
Processing unit refer to number for renewing
|
Image Data
Each Macro processing unit can contain as much as 32 image data.
CopyMeasureImage command can appoint which image to save.
We can use
DrawMeasureImage command to show saved image on the screen. We can use
SetMeasureImage command to apply for measure image of afterwords unit.
External Reference Data
- Using the name of the variable as external reference data identification name, you can renew or refer the value of the variable by Macro program of other unit, serial command, CoreRA API and so on.
- Furthermore, use external reference data seting I/F, we can use following action indication of identification.
Identification
|
Action
|
direct
|
As designateded data, We can appoint command line string, and execute the command line's process directly.
|
gosub
|
As designateded data, We can execute subroutine process of appointed label by designated label string.
|
load
|
As designated data, We can appoint document name, and then reading program from designated document.
|
save
|
As designated data, We can appoint document name, and then save program to relevant document.
|
Example of Using serial UnitData Command
UnitData <Processing unit number> direct AA&=100
Execute AA&=100 processing (Put 100 to integer variable AA&).
UnitData <Processing unit number> gosub *SUB0000
Execute *SUB0000 subroutine's processing.
UnitData <Processing unit number> load C:\Program.mcr
Load program from C:\Program.mcr.
UnitData <Processing unit number> save C:\Program.mcr
Save program to C:\Program.mcr document.

Note
The value of Macro variables are not changed when "clear measurement" is executed.