EMC INDUSTRIAL GROUP LTD Macros
MW94A_IM_ALL_SV6.09f_en 23/53
Print Instructions
207 PRINT_MENU_HEADING
208 PRINT_MENU_PATH
209 PRINT_QUICK_KEY
212 FORMAT “format”
213 NEWLINE
214 NEWPAGE
215 TAB ‹column›
218 LIST ‹macro›
219 DUMP ‹macro›
‹column› is a number 1 to 99. Columns are numbered from 0.
‹macro› is number 1 to 99. If ‹macro› = 101, lists macro
VALUE.
Calculation Instructions
Calculations are done on a stack in RPN (reverse polish notation). When a value is entered onto the
stack with a RECALL or VALUE instruction, the other values on the stack are moved up first.
An instruction like ADD or MUL opera
tes on the values in VALUE and Y and places the result in VALUE. Z
is moved to Y and T is copied to Z.
The operation follows the values. e.g RECALL ‹weight› VALUE “2” MUL., this multiplies the weight by 2.
e.g. 2 + 3 x weight =
VALUE “2” VALUE “3” RECALL ‹weight› MUL ADD
STACK
RECALL or VALUE ROLL ADD, SUB, MUL, DIV, MOD
T T lost
copied
Z
Y
VALUE
RESULT (using VALUE & Y)
220 VALUE “number” “number” is an ASCII number (e.g. 123.4) If there is no number, then the
stack is pushed up.
221 ADD VALUE = VALUE + Y
222 SUB VALUE = VALUE + Y
223 MUL VALUE = VALUE + Y
224 DIV VALUE = VALUE + Y
225 MOD VALUE = VALUE + Y
226 SWAP_VALUE&Y VALUE and Y swapped
227 ROLL stack rolled down
230 CLEAR_VALUE VALUE is set to zero
231 CLEAR_ALL VALUE, Y, Z and T all set to 0
232 INC_ VALUE VALUE = VALUE + 1
233 DEC_ VALUE
VALUE = VALUE – 1
235 CHANGE_SIGN sign of VALUE changed, plus and minus
236 ABS absolute value of VALUE (e.g. ABS(-12.54) = 12.54)
237 INT integer value of VALUE (e.g. INT(12.54) = 12)
238 FIX fixed value of VALUE (e.g. INT(12.54) = 13)