EMC INDUSTRIAL GROUP LTD Macros
MW61A_IM_ALL_SV6.09d_en 19/47
Register Instructions
197 MENU ‹argument›
‹argument› action
1 start_menu
3 next_quick
5 next_service
6 next_factory
7 next_altered
198 MACRO ‹argument›
‹argument› action
1 start_macro
2 next_macro
3 next_ altered _macro
Print Instructions
200 PRINT_VALUE
201 PRINT_NAME
202 PRINT_UNITS
203 PRINT_HINT
204 PRINT_DATE
205 PRINT_TIME
206 PRINT_SECONDS
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›
“format” is an ASCII format code of the form CcDdBb. c is the column
width, d is the number of decimal places and b is the count by. Any one
or combination of the three parts can be included. (e.g. C10d2b5 sets the
column width to 10, the decimal places to
2 and the count by to 5; C10
sets column width to 10). The default is 0.
‹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)