Chapter 5 Macro Program
133
I Programming
Call format
:
G66 P9201 Aa Bb Cc;
(
the argument in this example is assumed
)
Macro
program
:
O0001
G90 G17 G00 X0 Y0 Z0
;
G00 X150 Y20
;
-----------------------position
G66 P9201 A-10 B-40 C2000
;
-----pass the argument, be ready for machining
G00 X100 Y20
;
------------------------position to h1, call macro program (hole machining)
G00 X50 Y65
;
--------------------------position to h1, call macro program (hole machining)
M09
;
---------------------non-movement code, does not call macro program
G00 X0 Y23.5
;
---------position to h1, call macro program (hole machining)
G67
;
--------------------------------------cancel macro program modal call
G00 X150 Y20
;
-------------------------positioning return
M30;
Called
macro
program
:
O9201
(
machining process
)
G81 G98 R#1 Z#2 F#3
;
M99
;
5.2 Variables
An ordinary machining program specifies a G code and the travel distance directly with a numeric value,
for example, G01 and X100.0. With a custom macro program, numerical value can be specified directly or
using variables, for example, G#101 X#102. When variables are used, the variable value can be changed
by programs or using operation on the MDI panel.
z
Representation and using methods of variables
Differ from argument (data), variables are considered as the carrier of data, for example, #1,
#101 …are variables; A100, B200 …are arguments. Data of arguments A100, B200 should be transferred
to variable #1 and #2. When using or programming macro programs, numerical value can be specified
directly (such as G01, X100) or using variables (such as G#01, X#07). When variables are used, the
variable value can be changed by programs or using operation on the panel.
The address value of a macro body can be specified by variables. The variable value can be set by the
main program or be assigned the calculated value when executing the macro body. Multiple variables can
be identified by numbers.
(1) Variable representation
A number sign # followed by a variable number is shown as follows:
#i (i = 1, 2, 3, 4 ……). For example: #5, #109, #1005
(2). Omission of decimal point
When a variable value is defined in a program, the decimal point can be omitted. For example:
when defining #1=123, the actual value of variable #1 is 123.000.
(3). Referencing variables
Содержание 980MDc
Страница 19: ...GSK980MDc Milling CNC User Manual XVIII ...
Страница 20: ...1 I Programming Programming Ⅰ ...
Страница 21: ...GSK980MDc Milling CNC System User Manual 2 I Programming ...
Страница 139: ...GSK980MDc Milling CNC System User Manual 120 I Programming ...
Страница 191: ...GSK980MDc Milling CNC System User Manual 172 I Programming ...
Страница 192: ...173 Ⅱ Operation Ⅱ Operation ...
Страница 193: ...GSK980MDc Milling CNC System User Manual 174 Ⅱ Operation ...
Страница 200: ...Chapter 1 Operation Mode and Display 181 Ⅱ Operation ...
Страница 201: ...GSK980MDc Milling CNC System User Manual 182 Ⅱ Operation ...
Страница 249: ...GSK980MDc Milling CNC System User Manual 230 Ⅱ Operation ...
Страница 253: ...GSK980MDc Milling CNC System User Manual 234 Ⅱ Operation ...
Страница 259: ...GSK980MDc Milling CNC System User Manual 240 Ⅱ Operation ...
Страница 265: ...GSK980MDc Milling CNC System User Manual 246 Ⅱ Operation ...
Страница 293: ...GSK980MDc Milling CNC System User Manual 274 Ⅱ Operation ...
Страница 295: ...GSK980MDc Milling CNC System User Manual 276 Ⅱ Operation ...
Страница 319: ...GSK980MDc Milling CNC System User Manual 300 Ⅱ Operation ...
Страница 320: ...301 Ⅲ Installation Ⅲ Installation ...
Страница 321: ...GSK980MDc Milling CNC System User Manual 302 Ⅲ Installation ...
Страница 345: ...GSK980MDc Milling CNC System User Manual 326 Ⅲ Installation ...
Страница 391: ...GSK980MDc Milling CNC System User Manual 372 Ⅲ Installation ...
Страница 392: ...Appendix 373 Appendix Appendix ...
Страница 393: ...GSK980MDc Milling CNC System User Manual 374 Appendix ...
Страница 394: ...Appendix 375 Appendix Appendix 1 Outline Dimension of GSK980MDc L N ...