182
Compile
: Checks the Macro for errors and displays them in the lower text box of the Workspace Dialog.
If no errors are found, the Macro is compiled and the Workspace Dialog is closed. The macro name is displayed in the
DownLoad
Macro Dialog list.
Cancel
: Closes the Workspace Dialog. If the Macro has not been compiled successfully, the macro name is displayed in the
Not DownLoad
Macro Dialog list.
Help
: Calls up the help topic for Macro editing.
14.3 Syntax
A Macro is made up of statements. The statements contain constants, variables and operators. The statements are put in a
specific order to create the desired output.
14.3.1 Constants and Variables
14.3.1.1 Constants
Constants are fixed values and can be entered directly into statements as:
Constant Type
Note
Example
Decimal Integer
1234, -345, 0, 1138463220
Hexadecimal
Must begin with
0x
0x2A, 0xFFFF, 0x20B54A
ASCII
Strings must be enclosed in single quotes
‘a’, ‘test3’, ‘47’
Boolean
True, False
Example statement using a constant:
C = 397
Where: C is a variable and 397 a constant.
Note:
PLC and System registers and bits cannot be directly put into a Macro. Use the
GetData and SetData Statements to assign their values to Macro Variables for later use in
mathematical manipulation.
Workspace Dialog showing a compile error.
Summary of Contents for MMI-1500
Page 2: ...ii...