Programming

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 274

INSTRUCTION MANUAL

WIRE ELECTRICAL DISCHARGE MACHINE

PROGRAMMING

MAKINO MILLING MACHINE CO., LTD.

10WC6-NF01-0007(E)
PRECAUTIONS
1. Functions not covered by this manual, in general, can not be executed.
2. The notes provided in this manual must be observed. (Otherwise, the function may not be
executed correctly or the system could be adversely affected.)
3. Specifications are subject to change for improvement without notice.
4. Please contact us if you have any uncertainty about the manual.
5. This manual targets the following power supply units:
MGW-JL power supply (U32, U53)
MGW-J1 power supply (EC32, EC64, ECQ53)
MGW-K power supply (U32K, U53K)
MGW-KII power supply (U32K, U53K)
MGW-N power supply (EU64)
MGW-NII power supply (EU64)
MGW-NIII power supply (EU86)
MGW-JP power supply (W-PG1)
MV-20 power supply (UPH-1)
MV-30 power supply (UPH-2, UH-2)
Some places in this manual specify mainly two types of power supply units:
• J type power supply unit
MGW-JL, MGW-J1, MGW-JP, and MV-20
• K type power supply unit
MGW-K, MGW-KII, MGW-N, MGW-NII, MGW-NIII, and MV-30
The nameplate of power supply unit is stuck to the main operation panel. Start operation after
checking the name of power supply unit. If you are not sure the name or the above listed power
supply unit name is not found, please contact us.
TABLE OF CONTENTS

1. INPUT OF PROGRAMS ............................................................................................... 1-1


1.1 Tape Code............................................................................................................... 1-2
1.2 Characters Used in a Program ............................................................................. 1-2

2. PROGRAM COMPOSITION ........................................................................................ 2-1


2.1 Leader ..................................................................................................................... 2-2
2.2 Taper Start .............................................................................................................. 2-2
2.3 Program Start Area................................................................................................ 2-2
2.4 Program Area ......................................................................................................... 2-2
2.5 Program End .......................................................................................................... 2-3
2.6 Tape End Area ........................................................................................................ 2-3

3. PROGRAM AREA COMPOSITION ............................................................................. 3-1


3.1 Blocks ..................................................................................................................... 3-1
3.2 Program Number ................................................................................................... 3-1
3.3 Comment Area ....................................................................................................... 3-2
3.4 Sequence Number (N) ........................................................................................... 3-3
3.5 Block Skip (/) .......................................................................................................... 3-4

4. ADDRESS WORDS...................................................................................................... 4-1


4.1 Kinds of Address Words ....................................................................................... 4-1
4.2 Input Format and Range of Command Values .................................................... 4-2
4.3 Decimal Point Input ............................................................................................... 4-5

5. COORDINATE WORDS AND COMMAND METHODS ............................................... 5-1


5.1 Kinds of Coordinate Words ................................................................................... 5-1
5.2 Least Input Increment ........................................................................................... 5-2
5.3 Machine Coordinate System and Workpiece Coordinate System ..................... 5-2
5.4 Absolute and Incremental Commands ................................................................ 5-5

6. FEED RATE.................................................................................................................. 6-1


6.1 Kinds of Feed Rate ................................................................................................ 6-1
6.2 Rapid Traverse........................................................................................................ 6-1
6.3 Dry Run Feed ......................................................................................................... 6-2
6.4 F4 Digit Feed .......................................................................................................... 6-3
6.5 Machining Feed...................................................................................................... 6-3
6.6 Touch Sensing Feed .............................................................................................. 6-3

-i-
7. PREPARATORY FUNCTIONS (G CODES) ................................................................. 7-1
7.1 Kinds of Preparatory Functions ........................................................................... 7-1
7.2 Coordinate System Setting (G92)......................................................................... 7-6
7.3 Absolute and Incremental Commands (G90 and G91)....................................... 7-12
7.4 Rapid Traverse Linear Interpolation (G00)........................................................... 7-13
7.5 Machining Linear Interpolation (G01) .................................................................. 7-14
7.6 Machining Circular Interpolation (G02, G03)....................................................... 7-15
7.7 Wire Radius Compensation (G40, G41 and G42) ................................................ 7-17
7.8 Taper Machining (G50, G51 and G52) .................................................................. 7-28
7.9 Dwell (G04) ............................................................................................................. 7-39
7.10 Change of Setting Data (G10) ............................................................................... 7-40
7.11 Work Limit (G22 and G23) ..................................................................................... 7-51
7.12 Taper Corner Tangential Insertion (G24).............................................................. 7-53
7.13 Spiral Interpolation (G25)...................................................................................... 7-58
7.14 Rotation Copying (G26)......................................................................................... 7-60
7.15 Automatic Return to and from the Reference Point (G28 and G29) .................. 7-66
7.16 Return to 2nd-4th Reference Point (G30) ............................................................ 7-68
7.17 Corner Shape Control (G43 and G44) .................................................................. 7-69
7.18 Corner Override (G45, G46) .................................................................................. 7-70
7.19 Scaling (G47 and G48)........................................................................................... 7-71
7.20 Same radius on the top and the bottom faces (G49).......................................... 7-74
7.21 Machining Coordinate System Selection (G53) .................................................. 7-76
7.22 Work Coordinate System Selection (G54-G61, G500-G515) .............................. 7-77
7.23 Rotation (G68 and G69)......................................................................................... 7-79
7.24 Mirror Image (G70 and G71).................................................................................. 7-82
7.25 X/Y axis change (G72 and G73) ............................................................................ 7-87
7.26 C-Axis Centering (G75) ......................................................................................... 7-90
7.27 Workpiece Edge Positioning (G76) ...................................................................... 7-91
7.28 Hole Centering Positioning (G77) ........................................................................ 7-94
7.29 Wire Vertical Adjustment (G78) ............................................................................ 7-96
7.30 Corner Edge Positioning (G79) ............................................................................ 7-98
7.31 Groove Width Centering Positioning (G80) ......................................................... 7-100
7.32 Plate Width Centering X axis (G81) ...................................................................... 7-101
7.33 Plate Width Centering Y axis (G82) ...................................................................... 7-103
7.34 Cylinder Center Measurement (G83).................................................................... 7-105
7.35 Workpiece Parallelism Measurement X axis (G84) ............................................. 7-107
7.36 Work Parallelism Measurement Y axis (G85)....................................................... 7-109
7.37 Automatic Measurement Machining (G86, G87) ................................................. 7-110
7.38 Z Axis Position Control (G95) ............................................................................... 7-117

- ii -
7.39 Output of Internal Data (G150-G153).................................................................... 7-119
7.40 NC Data Saving / Registration (G154) .................................................................. 7-125
7.41 Initializing data on each screen (G155) ............................................................... 7-126
7.42 Drawing Restriction (G580-G583)......................................................................... 7-128
7.43 Inch Mode Diameter Compensation x 10 Resolution (G918, G919) .................. 7-129

8. DIRECTIONS ON A MULTIPLE COMMAND OF G26, G48, G68, G71, G73, ETC. ... 8-1
8.1 Multiple Command Processing Procedures........................................................ 8-1
8.2 Coordinate System Changeover at the Time a Multiple Command is
Executed (When mirror axis locking is off) ......................................................... 8-2
8.3 Coordinate System Setting at the Time a Multiple Command is Executed
(Except for coordinate system rotation, mirror axis locking) ........................... 8-5
8.4 Mirror Axis Locking ............................................................................................... 8-5

9. MISCELLANEOUS FUNCTIONS (M CODES) ............................................................ 9-1


9.1 Kind of Miscellaneous Functions......................................................................... 9-1
9.2 Program Stop (M00)............................................................................................... 9-3
9.3 Optional Stop (M01)............................................................................................... 9-4
9.4 End of Program (M02)............................................................................................ 9-5
9.5 Discharge off (M05) ............................................................................................... 9-5
9.6 Automatic Wire Threading (M06) .......................................................................... 9-6
9.7 Automatic Wire Threading Position Update (M06L1) .......................................... 9-8
9.8 Intermediate Point Programming Function for Wire Break/Power Failure
Recovery (M06P_Q_R_) ........................................................................................ 9-9
9.9 Automatic Wire Cutoff (M07)................................................................................. 9-10
9.10 Remain/cutoff (M08) .............................................................................................. 9-11
9.11 Transfer of Condition Data on Model SEARCH Screen (M16) ........................... 9-12
9.12 Machining ON/OFF (M17 and M18)....................................................................... 9-13
9.13 Initial Hole Machining (M20) ................................................................................. 9-14
9.14 Work Tank Filling ON/OFF (M28 and M29) ........................................................... 9-14
9.15 End of Program and Rewind (M30) ...................................................................... 9-15
9.16 Water Conductivity Check (M40) .......................................................................... 9-16
9.17 Work Tank Down and Up (M58, M59) .................................................................... 9-18
9.18 Index (M60) ............................................................................................................. 9-21
9.19 Spinning (M62, M63, M64, M65) ............................................................................ 9-21
9.20 Work Changer (W, M66, M67, M68) ....................................................................... 9-22
9.21 Approach (M71)...................................................................................................... 9-26
9.22 Water Flow Rate Control (M72) ............................................................................. 9-27
9.23 Process Skip and Additional Machining (M74) ................................................... 9-28
9.24 Reference Hole Retry (M75) .................................................................................. 9-33

- iii -
9.25 M08 Control (M90).................................................................................................. 9-35
9.26 FD Program Loading (M97)................................................................................... 9-40
9.27 Subprograms (M98 and M99)................................................................................ 9-42

10. MACHINING CONDITION SELECTION (E CODE)..................................................... 10-1


10.1 Machining Condition Selection Method .............................................................. 10-1
10.2 Precautions on Programming E Numbers .......................................................... 10-2
10.3 Registrable Machining Condition E Number....................................................... 10-3

11. OTHER FUNCTIONS ................................................................................................... 11-1


11.1 Vertical Irregular Shape Mode (P0, P1, P2).......................................................... 11-2

12. PREPARATION AND EDITING OF PROGRAMS BY AN AUTOMATIC


PROGRAMMING DEVICE ........................................................................................... 12-1
12.1 Classification of Addresses Used by this NC Device ........................................ 12-1
12.2 Preparation of Programs by an Automatic Programming Device ..................... 12-2
12.3 Examples of Program Editing............................................................................... 12-3

13. METRIC SYSTEM, INCH SYSTEM AND RESOLUTION ............................................ 13-1

14. CUSTOM MACRO........................................................................................................ 14-1


14.1 General Description............................................................................................... 14-1
14.2 Subprogram ........................................................................................................... 14-3
14.2.1 Types of subprogram calls............................................................................... 14-3
14.2.2 Simple call (M98, G27) ...................................................................................... 14-3
14.2.3 Parameter call (G65) ......................................................................................... 14-5
14.2.4 Pseudo command code call (Parameter No. 140 - 171) ................................. 14-6
14.2.5 Nesting of subprograms .................................................................................. 14-9
14.3 Parameter and Variable Function ......................................................................... 14-10
14.3.1 Purpose of variables......................................................................................... 14-10
14.3.2 Variable accuracy and constant value (VARMAP) ......................................... 14-14
14.3.3 Characteristics of empty variables (#0) .......................................................... 14-15
14.3.4 Parameters and local variables (#1 - #33) ....................................................... 14-16
14.3.5 NC command code substitution...................................................................... 14-18
14.4 Operation Function................................................................................................ 14-19
14.5 Judgement and Branch Functions (IF, ELSE, GOTO) ......................................... 14-22
14.6 Repetition Function (DOWHILE)........................................................................... 14-25
14.7 Suppress Command of External Control Function
(G910, G911, G944, G945)...................................................................................... 14-25
14.8 Registration of Custom Macro ............................................................................. 14-26

15. INQUIRY....................................................................................................................... 15-1

- iv -
1. INPUT OF PROGRAMS

Programs including main and sub programs that command the NC unit to automatically operate the
machine are generally read from floppy disk drive, RS232C, tape reader, etc. to the memory, then
they are executed in the MEMORY RUN mode, with exception that they are keyed in directly from
the Main operation panel.
A paper tape used in the NC unit is a 1-inch (25.4 mm) wide, 8-channel tape, and its dimensions
(width, thickness, hole position, hole diameter, etc.) are specified by the EIA, ISO and JIS
Standards.
The following shows an example of the EIA Standard RS-227.
Note 1: An input unit to the memory differs depending on the type of power supply unit
and attachment of optional accessories.
Note 2: For input method of programs from floppy disk drive and RS232C, refer to the
Operation of Edit Screen or File Management Screen in Instruction Manual
“Operation”.

Channel 4
Channel 5
Channel 6
Channel 7
Channel 8

2.54mm±0.05mm
Channel 3
Channel 2
Channel 1
15.44mm±0.1mm Character (line)
Data hole: 1.83mm±0.05mmφ
25.4mm±0.1mm
9.96mm±0.1mm Feed hole: 1.17mm±0.05mmφ
2.54mm±0.05mm
Channel

Direction of tape feed

(a) Dimensions of a punched tape

Direction of tape feed

1 tape
2 tapes

0.108mm±0.005mm 0.27 mm or less

(b) Punched tape thickness


Punched tape dimension specification (EIA, RS-227)

1–1
1.1 Tape Code

A tape code representing a numeral, a letter, a sign, etc. is called a character. A character comprises
a combination of 8 holes. This combination is called a code. Either of the following two tape codes
can be used:
(i) EIA code: EIA RS-244-A
(ii) ISO code: ISO 840

(1) Distinction of EIA/ISO


The machine automatically judges whether a tape code punched on a paper tape is the EIA
code or ISO code. That is, after the machine starts to read the paper tape in the label skip
mode, if the code of the first end-of-block is CR in the EIA code, the subsequent codes are
read as the EIA code. If it is LF in the ISO code, the subsequent codes are read as the ISO
code.

(2) Parity check (TH check)


In order to prevent malfunction caused by misreading by the tape reader or by improperly
punched tape, if the character holes read in after the first CR or LF is detected do not satisfy
the following condition, the warning (1801: TH ERROR AT I/O INPUT) is given and the
paper tape reading is stopped.
(i) EIA code: The number of holes is odd number.
(ii) ISO code: The number of holes is even number.

Besides the above warning, the guide message


(6119: ALARM BLOCK PRESENT IN PROGRAM) is also displayed during the
PROGRAM INPUT on the EDIT screen. Although its character is processed as “~”, the
PROGRAM INPUT may be continued.

1.2 Characters Used in a Program

The characters of the EIA/ISO codes listed in Table 1.1 can be used in a program. Characters not
listed in the table are ignored. However, its parity is checked and any character’s parity error results
in TH error.

1–2
Table 1.1 Characters Used in a Program
ISO code EIA code
Meaning
Character 8 7 6 5 4 3 2 1 Character 8 7 6 5 4 3 2 1
0 0 Numeral
1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
6 6 6
7 7 7
8 8 8
9 9 9
A a Address A
B b B
C c C
D d D
E e E
F f F
G g G
H h H
I i I
J j J
K k K
L l L
M m M
N n N
O o O
P p P
Q q q
R r R
S s S
T t T
U u U
V v V
W w W
X x X
Y y Y
Z z Z
DEL Del * Deletion (of a wrong character)
NUL Blank * No punch
BS BS * Backspace
HT Tab * Tabulator
LF or NL CR or EOB End of block
CR * Carriage return
SP SP * Space
% ER Absolute rewind stop
( Control out (Comment start: in
ISO codes alone)
) Control in (Comment end: in ISO
codes alone)
+ + Plus sign
– – Minus sign
: Regarded as address N in an ISO
code
/ / Optional block skip

* : Ignored by the NC device

1–3
2. PROGRAM COMPOSITION

A program recorded on a paper tape is composed of the following.


(i) Leader
(ii) Tape start area
(iii) Program start area
(iv) Program area
(v) Program end area
(vi) Tape end area

(Only one program is recorded on a tape)

L
%
F
Program start area
Tape start area
Leader Program area

L
M 0 2 %
F

50 cm or more
Program area
Program end
area Tape end area

(Two or more programs are recorded on a tape)

L
%
F
Program start area
Tape start area
Leader Program area

L L
M 0 2
F F

Program area Leader Program area


Program end
area Program start area

L
M 0 2 %
F

Program area 50 cm or more


Program end
area Tape end area

2–1
2.1 Leader

The information punched on an NC tape before the first LF (ISO code) or CR (EIA code) is called
the leader. The leader is skipped by the label skip function when a program on the tape is input to
the memory. To realize this, place the NC unit in the label skip status by turning on the POWER
switch or pressing the RESET key, then set an NC tape to the tape reader and press the
PROGRAM INPUT key on the EDIT screen. The label of NC tape may be punched in the leader area.
Since the parity check is not executed while the leader is skipped, the label characters punched in
the leader may have any combination of holes except LF and CR. The label may be omitted when
unnecessary.

2.2 Taper Start

Punch the following character for tape start at the beginning of the tape. It is necessary for stopping
rewind operation started by the M30.

EIA ISO Meaning


ER % Tape start (rewind stop)

2.3 Program Start Area

The below character recorded immediately after the leader, that is, just before the first block of a
program, means program start. This part is necessary to reset label skip. This character
automatically judges whether the tape mode is EIA or ISO.

EIA ISO Meaning


CR LF Program start position

2.4 Program Area

The area punched between program start and end is called a program area. In the program area,
actual machining information such as move command and on/off command is punched. It is
referred to as a significant section while the leader and comment area are called insignificant areas.
The program area is explained in detail in and after Chapter 3.

2–2
2.5 Program End

The character shown below is recorded at the end of a program to indicate program end.

EIA ISO Meaning


M02 CR M02 LF Program end

When this character is detected during program execution, the machine terminates its execution and
the reset status is given.

Note: Instead of M02, the M30 (end of program & rewind) may be used.

2.6 Tape End Area

The character shown below is recorded after the end of the last program to indicate tape end. This
part is necessary for both a reel-equipped tape reader and a tape reader with no reel.

EIA ISO Meaning


ER % Tape end (search stop)

This character serves as a stop code in storing a program tape. A feed area of about 50 cm long
must be provided just after the tape end character. Also, a feed area of more than 150 cm long must
be provided when reels are used in the reel-equipped tape reader.
The same area must also be provided before the leader.

2–3
3. PROGRAM AREA COMPOSITION

3.1 Blocks

A program area is composed of several blocks consisting of a program number, comment area, etc.
Each block comprises several address words and blocks are separated from one another by an end
of block (LF in an ISO code, CR in an EIA code).
Address words are described in detail in Chapter 4.

L L L L L
%
F F F F F

Block Block Block

Note 1: Maximum number of characters in one block


During reading of a tape, a program, block by block, is read in the buffer. The
buffer capacity is 196 characters. If the one-block size exceeds this limit, the
guide message (6070: BLOCK LARGER THAN 196 CHAR.) is displayed and
reading is stopped.
Note 2: TV check (Tape vertical parity check)
The vertical block-by-block parity of a tape is checked. If the number of
characters in a block (from the code following LF to the next LF) is odd number,
the warning (1800: TV ERROR AT I/O INPUT) is displayed.
Although TV check is not applicable to the areas skipped by the label skip
function, the number of characters in the comment area (from “(“ to “)”) is
counted. The TV check function has been set to “Invalid” by the parameter
No.25 bit 0.
Note 3: Although this manual uses in program examples a semi-colon (;) in place of an
end of block (LF in an ISO code, and CR in an EIA code), LF (ISO) or CR (EIA)
must be recorded in actual cases.

3.2 Program Number

At the beginning of a program, in general, a 4-digit program number (1-9999) is assigned following
O.
The program numbers assigned can identify the programs.
Program numbers are also used in the subprogram function (M98) to specify programs to be called.
Note: Besides being recorded on an NC tape, program numbers may also be given at
the time an NC tape is stored into the memory. (See the section of storing
programs recorded on a tape in the Operation Manual.)

3–1
3.3 Comment Area

All data recorded between the control-out and control-in codes shown below is regarded as
comments and skipped, so that an index, a message, etc. can be recorded here. However, TH check
is not stopped. When a parameter for TV check is set, TV check is also performed in the comment
area.
A comment area is recorded in ISO codes only; it cannot be recorded in EIA codes.

ISO Meaning
( Control-out (comment area start)
) Control-in (comment area end)

Note 1: Do not use a tape end code (% or ER) in a comment area. Because whether an
area is a comment area or not is not checked during rewind operation. If a tape
end code is present, rewind operation stops where it exists.
Note 2: Do not record the following codes in a comment area: MUL, BS, HT, LF (ISO),
CR (EIA), % (ISO), ER (EIA), and;.
Note 3: More than one comment area can be used in a block. It may be anywhere in a
block, provided that it is not in one address word (between alphabet and
numeral).

Example: ○ G01 X5.0 (COMMENT1) ;


○ G01 (COMMENT1) X5.0 (COMMENT2) ;
× G (COMMENT1) 01 X5.0 (COMMENT2) ;
× G0 (COMMENT1) 1 X5.0 (COMMENT2) ;

3–2
3.4 Sequence Number (N)

A block may be prefixed by a 4-digit sequence number (1 - 9999) following address N. Sequence
numbers may not necessarily be arranged consecutively. They may be given to all blocks or main
points in a program. They are assigned in the ascending order as machining advances, and they are
given to main points so that a tape will not become too long and memory capacity will not become
too large.

Example:
%;
N1 G92 X0 Y0 ;
M17 ;
G01 G42 Y5000 ;
G03 J-5000 ;
G01 G40 Y-5000 ;
G00 X20000 M06 ;
M17 ;
N2 G 01 G42 Y5000 ;
……

N100 G01 G42 Y5000 ;


……

M30 ;
%

Sequence numbers are also used for specifying blocks to be called in the subprogram function
(M98).

3–3
3.5 Block Skip (/)

The block in which “/n” is specified is skipped during program execution, if a slash (/) and a
numeral (n = 1 - 3) are programmed and the f.3 (BLOCK SKIP) key of the first screen on the
NC FUNC screen is pressed to set “/n”.
The block in which “/n” is specified becomes valid if the numeral other than “n” is entered for the
block skip. That is, the block containing a slash (/) can be skipped selectively by the operator.

If the block skip on the NC FUNC screen is set to “/0”, the block skip function is turned off.

Example 1:
/1 N1234 G01 X5000 E9000 M51 ;
Data from / to the word immediately before; is skipped if the block skip is set
to “/1”. This block becomes valid if the block skip is set to other than “/1”.

Note 1: A slash (/) alone without value is equivalent to /1.


Note 2: If block skip is specified in the middle of a block, data from / to the word
immediately before; is skipped.
/2 G01 X5000/3 E9000 ;
In case of block skip “/2”, the entire block is skipped, while block skip
“/3” skips E9000.
In case of block skip “/0” or “/1”, this block becomes valid.
Note 3: The block skip is processed when data is read in the buffer, and the skipped
data is not stored in the buffer.
Even if numeral for the block skip is changed after the block is read in the
buffer, the already read block is executed.

Note 4: The block skip is invalid to the “address word search” on the EDIT screen.
Namely, the address word of a block containing a slash (/) can be searched for
regardless of a setting value for the block skip.

Note 5: The block skip is invalid to the PROGRAM INPUT on the EDIT screen.
Namely, the block containing a slash (/) is also input regardless of a setting
value for the block skip.

3–4
Example 2: Application of block skip
1 Tape common to punch and die

Y
X

S.P. X
S.P.
Punch
Block skip "/1"
Die
Block skip "/2"

%;
O2000 ;
/1 G92 X0 Y0 ;
/2 G92 X0 Y-15.0 ;
M17 ;
/1 G91 G1 G41 Y-10.0 D1 E9001 ;
/2 G91 G1 G42 Y5.0 D2 E9002 ;
X5.0 ;
Y5.0 ;
G3 X-10.0 I-5.0 J5.0 ;
G1 Y-5.0 ;
X4.5 M1 ;
X0.5 ;
/1 G40 Y10.0 M30 ;
/2 G40 Y-5.0 M30 ;
%

Note 1: Both punch and die machining may be started from the beginning of a program.
Note 2: Care should be taken so that a block without movement does not appear
consecutively (during wire radius compensation). Skipped blocks are regarded
as blocks without movement.
Note 3: In an actual punch and die combination, program an arc of R of about 0.2 at
each sharp corner.
Note 4: Usually, programs are prepared separately for punch and die machinings,
instead of making a tape common to both of them.

3–5
Example 3: Application of block skip
2 Change of machining condition

Y At the beginning of machining, the start hole condition or


water feed condition can cause wire break. To avoid this, it
Start hole
of φ4 may be necessary to change the machining condition.

X
E9000:Wire break preventive condition in approach process
E9001:Machining condition in other than approach processes
%;
O2001 ;
G92 X0 Y0 ;
M17 ;
E9001 ;
G91 G1 Y-5.0/1 E9000 ;
G41 Y-5.0 E9001 D1 ;
X5.0 ;
Y5.0 ;
G3 X-10.0 I-5.0 J5.0 ;
G1 Y-5.0 ;
X4.5 M1 ;
X0.5 ;
G40 Y10.0 M30 ;
%

Block skip “/0”


E9000 is used in approach process only.
Block skip “/1”
E9001 is used in all processes including approach.

Note: In actual, the approach function changes over the machining condition
automatically, and therefore the approach block need not be split to specify the
machining condition like the above example, except special cases.

3–6
Example 4: Application of block skip
3 Selection of a separate machining where parts are cut off one by one or a continuous
machining in multi-part machining

Separate machining Continous machining


Block skip "/2" Block skip "/1"

%;
O2002 ;
G92 X0 Y0 ;
N1 M17 ;
G91 G1 G41 Y-10.0 D1 E9001 ;
X5.0 ;
Y5.0 ;
G3 X-10.0 I-5.0 J5.0 ;
G1 Y-5.0 ;
X4.5 M1 ;
/1 X0.5 ;
/2 G40 Y1.0 ;
/1 G40 Y10.0 ;
/2 G0 X-19.5 Y9.0 M6 ;
/1 G0 X-20.0 M6 ;
N2 M17 ;
G91 G1 G41 Y-10.0 D1 E9001 ;
X5.0 ;
Y5.0 ;
G3 X-10.0 I-5.0 J5.0 ;
G1 Y-5.0 ;
X4.5 M1 ;
/1 X0.5 ;
/2 G40 Y1.0 ;
/1 G40 Y10.0 ;
/2 G0 X20.5 Y9.0 M6 ;
/1 G0 X20.0 M6 ;
M30 ;
%

3–7
4. ADDRESS WORDS

4.1 Kinds of Address Words

An address is expressed with an alphabetic letter (A-Z), which determines the meaning of a
numerical value that follows the address. The addresses used and their functions are listed in Table
4.1. Note that besides functions listed in Table 4.1, one address may have different functions.
x – 1000
Address Number
Address word

An address is expressed by an alphabetic letter, which determines the meaning of a numerical value
following it. The addresses used and their meanings are listed in the following table. One address
may be used in different meanings depending on the function kind.

Table 4.1 Functions and their corresponding addresses


Function Address
Program No. O
Sequence No. N
Preparatory function G
Coordinate word X, Y, U, V, I, J, Z, C
Auxiliary function M
Machining condition No. E
Scale factor P
Wire inclination angle T
Offset No. D
Offset amount D
Rotation angle R
Coordinate rotation No. A
Rotation copy start angle S
Rotation copy angle A
Program No. call O
Sequence No. call P
No. of blocks B
No. of repetitions R
Delay amount H
Dwell time X
Sub plane tangential contact L
radius
F4-digit feed F
(AWC) Pot No. W

4–1
An example of a block consisting of these address words is shown below.

L L
F N G X Y M D E F

Sequence

Preparatory
No.

function

Coordinate
word

Auxiliary
function

Offset
amount

Machining
condition
No.
4.2 Input Format and Range of Command Values

Address words must be programmed in the prescribed format as shown below.


This format is called a variable block format in which the number of address words in a block or the
number of letters in each address word may vary, thus making the programming convenient.
The input format for address word is expressed as follows:
Example 1:
X L + 5 3
Three decimal places
Max. five digits decimal places
Sign (+ (Usually omitted) or –)
Absolute or incremental commands
Address
Example 2:
J I + 5 3
Incremental command only

Example 3:
G 2
Max. two digits without decimal places

Note 1: Any command that does not meet the format results in an alarm.
G-01: Format error in the sign
Guide message at the time of input
(6005: ERROR IN BLOCK ON KEY-IN LINE)
G999: Format error in the number of digits
Alarm message at the time of execution
(1045: UNDEFINED G, M COMND)
• Another message may be displayed.
Note 2: In all formats, a leading zero of the address may be omitted.
G01 = G1
N0123 = N123
M06 = M6
Table 4.2 and 4.3 show the input format and command value range.

4–2
Table 4.2 Input format and command value range (metric)

Metric system
Function Address Standard resolution High resolution Note 3
Command format Command value range Command format Command value range
Program No. O O4 1 - 9999 O4 1 - 9999
Sequence No. N N4 1 - 9999 N4 1 - 9999
Preparatory function Note 8 G2 0 - 99 G2 0 - 99
G
X XL+53 XL+54
Y YL+53 YL+54
Note 4 ZL+53 ZL+54
Z
U UL+53 UL+54
Coordinate word U UL+53 0 - ±99999.999 UL+54 0 - ±99999.9999
Note 7
V VL+53 VL+54
I I I+53 I I+54
J J I+53 J I+54
C Note 10 CL+53 CL+54
Auxiliary function M Note 8 M2 0 - 99 M2 0 - 99
Machining condition No. E E4 1 - 9999 E4 1 - 9999
Scaling factor P P23 0 - 99.999 P23 0 - 99.999
Wire inclination angle T T+23 0 - ±89.999 T+23 0 - ±89.999
Offset No. D D1 0-9 D1 0-9
Offset value D D+13 0.0 - ±9.999 D+14 0.0 - ±9.9999
Rotation angle R R+33 0.0 - ±360.000 R+33 0.0 - ±360.000
Coordinate rotation No. A A1 0-9 A1 0-9
Rotation copy start angle S S+33 0 - ±360.000 S+33 0 - ±360.000
Rotation copy angle A A+33 0 - ±360.000 A+33 0 - ±360.000
Program No. call O O4 0 - 9999 O4 0 - 9999
Sequence No. P P4 1 - 9999 P4 1 - 9999
No. of blocks B B4 0 - 9999 B4 0 - 9999
No. of repetitions R R4 0 - 9999 R4 0 - 9999
Delay amount H H03 0 - 0.999 H04 0 - 0.9999
Dwell time X X53 0 -14744.7 X54 0 - 14744.7
F4-digit feed F F40 0 - 9999. F41 0 - 9999.9
(AWC) Pot No. W W2 0 - 99 W2 0 - 99

4–3
Table 4.3 Input format and command value range (inch)

Inch system
Function Address Standard resolution High resolution Note 3
Command format Command value range Command format Command value range
Program No. O O4 1 - 9999 O4 1 - 9999
Sequence No. N N4 1 - 9999 N4 1 - 9999
Preparatory function Note 8 G2 0 - 99 G2 0 - 99
G
X XL+44 XL+45
Y YL+44 YL+45
Note 4 ZL+44 ZL+45
Z
0 - ±3937.0078 0 - ±3937.00787
U UL+44 UL+45
Coordinate word Note 7
V VL+44 VL+45
I I I+44 I I+45
J J I+44 J I+45
C Note 10 CL+53 0 - ±99999.999 CL+54 0 - ±99999.999
Auxiliary function M Note 8 M2 0 - 99 M2 0 - 99
Machining condition No. E E4 1 - 9999 E4 1 - 9999
Scaling factor P P23 0 - 99.999 P23 0 - 99.999
Wire inclination angle T T+23 0 - ±89.999 T+23 0 - ±89.999
Offset No. D D1 0-9 D1 0-9
Offset value D D+04 0.0 - ±9.9999 D+05 0.0 - ±9.99999
Rotation angle R R+33 0.0 - ±360.000 R+33 0.0 - ±360.000
Coordinate rotation No. A A1 0-9 A1 0-9
Rotation copy start angle S S+33 0 - ±360.000 S+33 0 - ±360.000
Rotation copy angle A A+33 0 - ±360.000 A+33 0 - ±360.000
Program No. call O O4 1 - 9999 O4 1 - 9999
Sequence No. P P4 1 - 9999 P4 1 - 9999
No. of blocks B B4 0 - 9999 B4 0 - 9999
No. of repetitions R R4 0 - 9999 R4 0 - 9999
Delay amount H H03 0 - 0.0999 H04 0 - 0.09999
Dwell time X X44 0 - 14744.7 X45 0 - 14744.7
F4-digit feed F F31 0 - 999.9 F32 0 - 999.99
(AWC) Pot No. W W2 0 - 99 W2 0 - 99

Note 3: Resolution of command value can be changed over by parameter No. 63. For
details, refer to Appendix 1. Parameter Explanation of Instruction Manual
“Operation”.
Note 4: The Z can be used only in the models incorporating Z axis automatic function.
Note 5: A decimal point can be entered in addresses for the functions marked with .
Note 6: The least input increment varies when the resolution is changed over for the
addresses of functions marked with .

4–4
Note 7: The maximum number of digits of command value is 10 digits including sign
and decimal point.
Example: x J+99999.9999 11 digits J99999.9999 10 digits
x J -99999.9990 11 digits J-999999990 10 digits
J-99999.999 10 digits

Note 8: In a special case, G and M may be programmed with 3 digits.


Note 9: Programming examples in this manual are made in metric and standard
resolution. For difference in unit system, see Section 13. Metric System, Inch
System and Resolution.
Note 10: The address C is exclusive for the machine with C axis that supports the
coordinate value (angle) command.

4.3 Decimal Point Input

In this NC unit, data containing a decimal point can be entered. The decimal point can be used in
specifying distance, time, angle and scale factor.
Its position is mm (inch), second, degree and times respectively.
X15.1 ---- X15.1 mm (X15.1 inch)
G04X10. ---- Dwell 10 seconds
G68R30. ---- Rotation angle 30 degrees
G48P1.2 ---- Scaling 1.2 times

The decimal point can be entered for addresses of functions marked with in the above table.

Note 1: Be careful that the command value has another meaning depending on whether
it contains a decimal point or not, or whether resolution is standard mode or
high mode.
Example: Moving amount in each mode when X1. and X1 are specified

Command Metric system Inch system


code Standard resolution High resolution Standard resolution High resolution
X1. 1.0 mm 1.0 mm 1.0 inch 1.0 inch
X1 0.001 mm 0.0001 mm 0.0001 inch 0.00001 inch

4–5
5. COORDINATE WORDS AND COMMAND METHODS

5.1 Kinds of Coordinate Words

A coordinate word is used for relative movement between guide or wire and workpiece, and it is
composed of an address indicating the axis to be moved, a moving direction and a numerical value
giving the amount of movement.

Z axis
V axis
Upper guide
U axis

Wire
Y axis

Lower guide X axis

The following coordinate words are available:

(1) X and Y
These words are used to move the lower guide (Note 1) or the wire. If the U and V axes
movement is not required, the movement of lower guide can be regarded as that of the wire
except in a taper machining because the upper guide (Note 2) is fixed to the lower guide
(Normally, at the position where the wire becomes vertical).
Note 1: For the UPH-1, UPH or UH2 the lower guide corresponds to the left guide.
This is the true in the following description.
Note 2: For the UPH-1, UPH or UH2 the lower guide corresponds to the right guide.
This is the true in the following description.

(2) U and V
These words are used to move the upper guide (G00, G01 only). In a taper machining, the
moving command by the U and V is automatically determined, and therefore the U and V are
not necessarily programmed.
Note 3: For the W-PG1, the U and V axes are not provided.

(3) I and J
When the lower guide or wire moves on an arc by X and Y, the center coordinate value of the
arc is set.

5–1
(4) Z
Used to move the upper guide in the vertical direction. It can be used only for the machines
with automatic Z axis.
The Z axis move command is valid only in the linear interpolation (G00, G01), and it is, in
general, used alone.
The use of coordinate word Z together with G02 or G03 causes an alarm (1004: PLANE
INCONSISTENT IN G02, G03 COMND) or alarm (1003: G02, G03 COMND MISSING I, J
OR R VALUE).
Programming of the Z along with X, Y, U or V in the same block causes an alarm (1068:
AXIS-COMMAND IS OVER IN 1 BLOCK). Usually, only four coordinate words of X, Y, I
and J can be used in a program.

(5) C
This word is exclusive for the machine with C axis that supports the coordinate value (angle)
command.
For the machine with U and V axes, this word can be used only for individual positioning of
the C axis. For the machine without U and V axes (W-PG1), it can be used for the machining
feed by a combination with X and Y axes.
Utilize this command, though it is omitted in the following description because a using
method and specification of the C axis are not common.

5.2 Least Input Increment

The least input increment of the coordinate words is as follows:

Standard resolution High resolution


Metric system 0.001 mm 0.0001 mm
Inch system 0.0001 inch 0.00001 inch

5.3 Machine Coordinate System and Workpiece Coordinate System

There are two kinds of coordinate systems: machine coordinate system and workpiece coordinate
system. The machine coordinate system of a machine is fixed and cannot be set arbitratily. The
workpiece coordinate system can be established at any position. All coordinate words used in a
program are specified in the workpiece coordinate system.

(1) Machine coordinate system, machine origin and reference point


The machine origin (zero point of the machine coordinate) in X, Y, U, V and Z axes is at the
negative stroke end in each axis.

5–2
The reference point (to which machine returns by the reference point return operation) is
different in each axis. The reference point in X and Y axes is in the center of stroke, while the
reference point in U and V axes is on the wire vertical position (almost center of U, V stroke).
It is on the upper end of stroke in the Z axis.

Y axis stroke
U and V axes
reference point V axis stroke
(wire vertical
position) U
X U axis stroke
X axis stroke U and V axes
machine origin
X and Y axes
machine origin

The NC unit controls the current position of each axis, machining start position, pitch error
compensation and wire vertical position.
Each axis returns to its reference point by the reference point return operation (G28 or
manual), and thus the machine coordinate system is set properly. Whenever the power is
turned on, the machine coordinate system is dislocated; therefore, the reference point return
must be executed.

(2) Workpiece Coordinate System


After reference point return is performed, the position on each axis is controlled by the
machine coordinate system and can be moved in a stroke according to commands of a
program.
In preparing a program, however, the positions of a workpiece and a machining shape cannot
be known beforehand in the machine coordinate system.

Y
Workpiece

? Machining shape

The position of a workpiece in


the machine coordinate system
varies depending on where it
is set.
Machine origin ? X

It follows that in a program a position command should be given regardless of the machine
coordinate system.
Unlike the machine coordinate system, the workpiece coordinate system can be set at any
position (on the X, Y and Z axes).

5–3
The workpiece coordinate system origin for the X, Y, and Z axes is determined, given that a
point on a workpiece is the reference point. For the U and V axes, the reference point (wire
vertical position) is set to the workpiece coordinate system origin.

Y Reference point (Wire vertical position)

=
Workpiece V Workpiece coordinate
Machining system origin
shape

0 U
Workpiece
coordinate system origin 0 X
(When the workpiece edge is the origin)

All coordinate words used in a program are specified in the workpiece coordinate system.
Table 5.1 shows the origin and reference point in the machine coordinate system and the
workpiece coordinate system.

Table 5.1 Origins and reference points in the machine coordinate system
and workpiece coordinate system

Axis
X and Y axes U and V axes Z axis
Item
-U and -V ends Lower end of a stroke
Y
Origin and plus (+) Z
directions in the V
–X and –Y ends
machine coordinate V
system
X U U

Wire vertical position The origin can be set at any


Y point in the machine coor-
(G92 is invalid)
The origin can be set dinate system G92 using.
Origin and plus (+) at any point in the
directions in the machine coordinate
V Almost center
workpiece coordinate system using G92 stroke Z
(G54-G61). V
system
X U
U

Reference point Middle of stroke Wire vertical position Upper end of a stroke

5–4
5.4 Absolute and Incremental Commands

There are two ways to specify the movement amount by using the coordinate words; incremental
and absolute commands.
The incremental command (G91) specifies the movement amount in each axial direction for the
current block.
The absolute command (G90) specifies the end point of that block in the work coordinate system.
For specifying the absolute command, the work coordinate system must be set in advance using
G92, WORK SET key, etc.

Example 1:
Incremental command
Y
G91 G01 X60000 Y-30000 ;
Start point
50 (G0
1) s Absolute command
trai
ght
line G90 G01 X90000 Y20000 ;
20 End point Incremental and absolute command
G91 G01 X60000 G90 Y20000 ;
0 30 90 X
Workpiece coordinate system
or
G90 G01 X90000 G91 Y-30000 ;

Note 1: G90 and G91 are modal G codes. They are not changed by the RESET key, M02
and M30. When power supply is turned on, G91 is selected.
Note 2: G90 and G91 can be changed even on the half way of a block.
Note 3: G90 or G91 at the time of power on can be selected by the parameter No. 60 bit
0.
0: G90
1: G91 (standard setting)
Note 4: Though G90 and G91 are valid for all axes (X, Y, U, V, Z, C), specific axes can be
fixed to ABS or INC mode by setting the parameters, regardless of G90 and
G91.

Example 2: If U and V axes are fixed to INC mode, regardless of G90 and G91
Machine parameter No.520 = 0000 1100B (U, V)
Machine parameter No.521 = 0000 1100B (INC)

5–5
6. FEED RATE

6.1 Kinds of Feed Rate

In a movement command on each axis by a program i.e., automatic operation, the feed rate of each
axis varies depending on the selection of functions below:

1 Rapid traverse (G00)


2 Dry run feed (G01 - G03) Dry run ON
3 F4 digit feed (G01 - G03) M18 (Machining OFF)
4 Machining feed (G01 - G03) M17 (Machining ON)
5 Touch sensing feed (G76 - G85)

6.2 Rapid Traverse

The rapid traverse command (G00) executes the positioning by linear interpolation. The rapid
traverse rate of each axis is as listed below, though it may vary depending on the machine type.

MGW-J1, MGW-JL
X and Y axes U and V axes Z axis
Metric system 2000 mm/min. 200 mm/min. 500 mm/min.
Inch system 80 inch/min. 8 inch/min. 20 inch/min.

MGW-K/KII/N/NII/NIII
X and Y axes(Note 1) U and V axes Z axis (Note 2)
Metric system 3000 mm/min. 200 mm/min. 500 mm/min.
Inch system 120 inch/min. 8 inch/min. 20 inch/min.

MV-20, MV-30
X and Y axes U and V axes Z axis
Metric system 1000 mm/min. 100 mm/min. 200 mm/min.
Inch system 40 inch/min. 4 inch/min. 8 inch/min.

MGW-JP
X and Y axes Z axis
Metric system 1000 mm/min. 500 mm/min.
Inch system 40 inch/min. 20 inch/min.

6–1
Because the rapid traverse is taken place by linear interpolation, the moving rate shown above is
obtained in the resultant direction when plural axes are specified at a time.

Example:
The moving rate is the combined rate
Y of specified axes. When the command
is G00 X100. Y50, the combined rate
50mm End point of two axes is 1000 mm/min.

0
G0

Start Point 100mm X

Note 1: On the EU64, rapid traverse of the X and Y axes is 2000 mm/min (80 inch/min),
but the X axis is restricted to 800 mm/min (32 inch/min) while the TANK FILL key
is in ON status.
Note 2: On the U86, rapid traverse of Z axis is as high as 2000 mm/min (80 inch/min). If
you think it is too fast, change the parameter.
→ Machine parameter No.5052 Z Axis Rapid Traverse
Input range: 500 to 2000 (mm/min)
Note 3: The rapid traverse rate is set by a parameter and must not be changed.
Note 4: Machining cannot be performed by rapid traverse.
Note 5: The rapid traverse rate of the rotary axis (C axis) may vary depending on the
specification. Detailed description is omitted here.

6.3 Dry Run Feed

No machining is executed if the f · 1 key (DRY RUN) on the first screen of the NC FUNC screen is
turned on, though the G01-G03 is programmed during machining ON (M17).
The moving rate in this case is the one set in the manual mode on the manual run screen (f · 1) of
the RUN screen.

Note 1: The dry run ON status is used for program check, etc.
Note 2: Rapid traverse (G00) is always performed at the maximum rate regardless of
the dry run and machining ON/OFF status (M17 and M18).

6–2
6.4 F4 Digit Feed

When G01 - G03 is programmed during machining OFF (M18), an axis moves at the speed
specified by F code if the dry run mode is set to OFF.
An F code is modal and a 4 digit (up to 5 digits for high resolution mode) command.
The F code, feed rate and feed range in respective unit systems are as listed below. However, the
maximum speed is fixed by the maximum speed parameter for each axis.

Feed rate
Resolution Feed range
F1. F1
Metric system Standard 1.0 mm/min 1.0 mm/min 0 - 9999.
High 1.0 mm/min 1.0 mm/min 0 - 9999.9
Inch system Standard 1.0 inch/min 0.1 inch/min 0 - 999.9
High 1.0 inch/min 0.1 inch/min 0 - 999.99

6.5 Machining Feed

When G01 - G03 is programmed during machining ON (M17), machining can be performed if the
dry run mode is set to OFF.
The machining speed is automatically set in the machining power supply by the machining
conditions on the COND screen, so that the machining speed cannot be specified by a program. The
machining speed is set depending on the machining contents with a set value on the run main
condition screen (f · 1) of the COND screen as the upper limit.

6.6 Touch Sensing Feed

When touch sensing feed (G76 - G85) is programmed, the feed rate is set by a parameter, etc.,
depending on the function, and cannot be set by a program.

Note: When touch sensing feed is programmed with the dry run mode set to ON,
touch sensing is not performed.
Instead, the current block is skipped, and a message (1772: automatic
measuring skip) is displayed.

6–3
7. PREPARATORY FUNCTIONS (G CODES)

7.1 Kinds of Preparatory Functions

The preparatory function, with a 2-digit number following address G, specifies the meaning of a
command in a block. There are two major kinds of G codes:

Type Meaning
One-short G code Valid only in a block in which it is programmed
(not modal)
Modal G code Valid until another G code of the same group is programmed

For example, G01 is modal and remains valid until one of the other G codes (G00, G02 and G03) of
the same group (group 01) is programmed.

G01 X10000 ;
G01
X10000 Y10000 ;

0
G0

1
G0
X-30000 ; G01
G00 X-10000 Y-10000 ;

Table 7.1 shows the G codes lists. The G codes are numerous and it is impossible to memorize all
of them at a time. The sections that follow explain G codes. It is recommended that the G codes
marked with be memorized first as they are basic codes in a program.

Note: G codes require an address. In programming, be sure to enter a G code first.

Example 1: Incorrect O20 X5. Y3. A30. G26 R5 ;


Correct G26 X5. Y3. A30. O20 R5 ;

7–1
Table 7.1 G codes

Indicates that the function is invalid.

RESET
When power
G code Group Function M02
supply is on
M30
G00 Rapid traverse linear interpolation
G01 Machining linear interpolation Note 6. Note 5.
01
G02 Machining arc interpolation CW G00 G00
G03 Machining arc interpolation CCW
G04 00 Dwell
G10 00 Change the setting data
G22 Work limit ON Note 5.
04 G23
G23 Work limit OFF No change
G24 00 Taper corner tangential circle insertion
G25 00 Spiral interpolation
G26 00 Rotation copying
* G27 00 (Macro) Simple call
G28 Automatic return to the reference point
00
G29 Return from the reference point
G30 00 Return to 2nd-4th reference point
G40 Wire radius compensation cancel
G41 07 Wire radius compensation left side G40 G40
G42 Wire radius compensation right side
G43 Corner shape control OFF
19 G43 G43
G44 Corner shape control ON
G45 Corner override OFF
(Modal) G45 G45
G46 Corner override ON
G47 Scaling OFF
11 G47 G47
G48 Scaling on
G49 00 Same R on the top and bottom faces
G50 Taper machining cancel
G51 08 Taper machining left side G50 G50
G52 Taper machining right side
G53 00 Machine coordinate system selection
G54 Work coordinate system selection 1
G55 Work coordinate system selection 2
Note 5.
G56 12 Work coordinate system selection 3 G54
No change
G57 Work coordinate system selection 4
G58 Work coordinate system selection 5

7–2
Indicates that the function is invalid.

RESET
When power
G code Group Function M02
supply is on
M30
G59 Work coordinate system selection 6
Note 5.
G60 12 Work coordinate system selection 7 G54
No change
G61 Work coordinate system selection 8
* G65 00 (Macro) Parameter call
G68 Rotation ON
G16 G69 G69
G69 Rotation OFF
G70 Mirror image OFF Note 5.
(Modal) G70
G71 Mirror image ON G70
G72 X/Y axis change OFF Note 5.
20 G72
G73 X/Y axis change ON G72
G75 00 C-axis centering Note 13.
G76 Workpiece edge face positioning
G77 Hole center positioning
G78 Wire vertical adjustment
G79 Corner edge positioning
G80 Groove width center positioning
00
G81 Plate width center positioning (X axis)
G82 Plate width center positioning (Y axis)
G83 Cylinder center measurement
G84 Workpiece parallelism measurement (X axis)
G85 Workpiece parallelism measurement (Y axis)
G86 Automatic measurement machining
(Par side)
00
G87 Automatic measurement machining
(Width)
G90 Absolute command Note 7.
Note 5.
G91 03 Incremental command G91
No change
(MDI G91)
G92 00 Coordinate system setting
G95 00 Z axis position control
G150 Parameter output
G151 00 Machining condition output
G152 Machining time output
G153 00 Machining trace output
G154 00 NC data saving /Registration
G155 00 Screen data initialization
Note 12 G180 00 Program master conversion

7–3
Indicates that the function is invalid.

RESET
When power
G code Group Function M02
supply is on
M30
G500 Workpiece coordinates system group 1
G501 Workpiece coordinates system group 2
G502 Workpiece coordinates system group 3
G503 Workpiece coordinates system group 4
G504 Workpiece coordinates system group 5
G505 Workpiece coordinates system group 6
G506 Workpiece coordinates system group 7
G507 Workpiece coordinates system group 8 Note 5.
(Modal) G500
G508 Workpiece coordinates system group 9 No change
G509 Workpiece coordinates system group 10
G510 Workpiece coordinates system group 11
G511 Workpiece coordinates system group 12
G512 Workpiece coordinates system group 13
G513 Workpiece coordinates system group 14
G515 Workpiece coordinates system group 15
G514 Workpiece coordinates system group 16
G580 M98 restriction ON in auto scale mode
(Modal) G580 G580
G581 M98 restriction OFF in auto scale mode
G582 M98 call restriction ON in auto scale mode
(Modal) G582 G582
G583 M98 call restriction OFF in auto scale mode
* G910 (Macro) Preread resume
(Modal) G910 G910
* G911 (Macro) Preread stop
G918 Wire radius compensation x 10 Resolution OFF
(Modal) G918 G918
G919 Wire radius compensation x 10 Resolution ON

Note 1: The G codes in group 00 are not modal but one-shot codes; they are valid only
in the blocks in which they are programmed.
Note 2: The G codes in groups other than group 00 are modal; they are kept valid until
another G code of the same group is programmed.
Note 3: Any number of G codes may be programmed in a block, provided that they
belong to different groups and are programmed in the correct format. If two or
more G codes of the same group are programmed in a block, the last one is
valid.
Note 4: Modal G codes are displayed in each group number.

7–4
Note 5: Modal G codes at the time when the RESET key is pressed and M02 and M30
are executed can be selected by the parameter No. 64.
0: Current modal G code is continued.
1: The G code is changed to the one selected at the time of power on.
Note 6: G codes in group 01 at the time of power on can be selected by the parameter
No. 61 bit 0.
0: G01
1: G00 (standard setting)
Note 7: G codes in group 03 at the time of power on can be selected by the parameter
No. 60 bit 0.
0: G90 (MGW-JP standard setting)
1: G91 (Standard setting for power supply units other than MGW-JP)
Note 8: The use of a G code not applicable to this NC unit causes an alarm (1045:
UNDEFINED G, M COMAND).
However, there are some G codes specialized for the system processing.
Therefore, those G codes not listed in the manual should not be used.
Note 9: The G codes marked with are basic ones in a program.
Note 10: The G code, in general, takes 2 digits, but in a special case, it takes 3 digits.
Note 11: The G codes marked with * are for special use. For details, see the Custom
Macro Instruction Manual.
Note 12: For the G180, see the Instruction manual of Program Master (optional).
Note 13: G75 is an optional function for the W-PG1.

7–5
7.2 Coordinate System Setting (G92)

The coordinate system setting function (G92) sets a work coordinate system (either one of G54-
G61, G500-G515) anywhere in the machine coordinate system at any angle.
Usually, one work coordinate system is set for one workpiece. It is specified at the beginning of a
program before specifying the move command.

Y
Y
Workpiece 1 Machining range
X of the machine
G54
e2
k piec
Y Wor
X
Origin of machine G55
Coordinate system 0 X

Format: G92X ( ) Y( ) (Z ) (A ) ; ( ): omissible


X, Y, and Z: Program the current position in a work coordinate system (either one of
G54-G61, G500-G515) set up in G92. (The Z axis is optional).
The U and V axes cannot be programmed in G92.
A: When rotating the coordinate system, it is necessary to enter a rotating angle
in advance. On the set data (f · 4) screen of the SET screen, Enter a rotating
angle into one of parameters No. 91 to 99 (G92) coordinate system rotating
angle A1 to 9). (Unit: 1/1000°). Then, specify A number corresponding to
one of the rotating angle A1 to 9. A0 means cancelling the coordinate
system.

Usually, A__ for coordinate system rotation is omitted because the workpiece is generally fixed in
parallel with the X and Y axes of the machine coordinate system, like workpiece 1 in the above
figure. Coordinate system rotation is used when the workpiece, like workpiece 2 above, is not fixed
in parallel with the machine coordinate system.
The following are some examples of setting up a coordinate system.

7–6
Example 1: When fixing the workpiece in parallel with the machine coordinate system

Example 1.1 Let the center be the origin.


20 Machining
start point G54 G92 X16000 Y6000 ;
6

4
Y

20

16
Center

Machining shape G54 X

Workpiece

Program Example 1.2 Let a corner edge of the shape be the origin.

%; G54 G92 X26000 Y16000 ;


O1 ;
G92 X__ Y__ ; Y
M17 ;
G91 G01 G41 X-6000 ;
Y4000 ;
X-20000 ; 0
G54 X
Y-20000 ;
X20000 ; Example 1.3 Let the machine start point be the origin.
Y15700 M01 ;
Y300 ;
G54 G92 X0 Y0 ;
G40 X6000 M30 ;
Y
%

0 X
G54

When the command values of X__Y__ are changed, the origin of a work coordinate system shifts
as shown in the above figures.

7–7
Example 2: When fixing the workpiece obliquely

Example 2.1 Let the center be the origin.


20 Machining
start point G55 G92 X16000 Y6000 A1 ;
6

4
20

16
Center
Y
Machining shape X
5
Workpiece G5

A1=30.000°
Program
%;
Example 2.2 Let a corner edge of the shape be the origin.
O1 ;
G92 X__ Y__ A__ ; G55 G92 X26000 Y16000A1 ;
M17 ;
G91 G01 G41 X-6000 ;
Y4000 ;
X-20000 ;
Y
Y-20000 ;
X20000 ; X
Y15700 M01 ;
0
Y300 ; A1=30.000°
5
G40 X6000 M30 ; G5
%
Example 3.3 Let the machining start point be the origin.

G55 G92 X0 Y0 A1 ;

When command values of X__Y__ are changed as


shown in the examples, the origin of the work coordinate Y
X
system shifts as shown in the examples.
0
4
G5
Note 1: The above sample program does not
include the coordinate system rotation
cancel function. To prevent a machining
error, the coordinate system rotation
cancel should be executed after end of A1=30.000°
machining by executing (G55) G92A0; in
the MDI mode.
The coordinate system rotation can also be cancelled forcibly at the reset by
setting the set data No.64 bit B.
Note 2: In this example, the workpiece inclination A1 (= 30°) is known in advance. In
actual, it can be measured by a program as shown in example 3.
Note 3: To change the rotation angle, at first cancel it by the G92A0;
Note 4: When scaling, rotation or rotation copy is ON, the coordinate system rotation
command causes an alarm (1009: G92 SPECIFIED AFTER G48, G68 OR G26)

7–8
Example 3: Machining by coordinate system rotation after measuring workpiece parallelism

Workpiece and
machining shape Workpiece fixed

φ6

20
10
Reference A1

11
point 15 10 10
30 Program start point

%;
G54 G92 X0 Y0 ; Program start point (G54)
G91 ;
G84 X10000 Y20000 A1 R1 ; Workpiece parallelism measurement (Al is entered.)
G00 X-20000 ; Corner edge positioning start point
G79 X20000 Y11000 A1 ; Corner edge positioning
G55 G92 X0 Y0 A1 ; Coordinate system setting up at a corner edge (G55)
G00 X15000 Y10000 M06 ; Shift to the center (machining start point) (ø6)
M17 ;
G01 G41 Y-3000 D1 ;
Machining
G03 J3000 ;
G01 G40 Y3000 ;
G00 X-15000 Y-10000 M07 ; End after return to the corner edge (G55)
M30 ;
%;

Y Two coordinate systems set up

G55 A1
X
0

G54 0

Note: To ensure no machining error, coordinate system rotation cancel should be


performed after machining by executing (G55) G92 A0 ; in the MDI RUN, etc.

7–9
Notes on coordinate system setting (G92)

Note 1: G92 is one-shot G code which is valid only in that block.


Note 2: G92 is active only for the work coordinate system currently selected, not for
other work coordinate systems.
Note 3: Be sure to set a work coordinate system with the U axis perpendicular to the V
axis to avoid machining errors.
Note 4: Do not program the coordinate system setting during wire radius
compensation (G41 or G42); otherwise, offset is cancelled temporarily.
Note 5: The machine coordinate values of the point where the latest coordinate system
is set have been stored in the COORD. SET area on the position information
screen (f · 7) of the second DGN screen. The position can therefore be
confirmed.
Note 6: During coordinate system rotation, one of A1-A9 is displayed beside each
coordinate system number on the work offset screen (f · 2) of the SET screen.
Rotation is cancelled if A0 is displayed.
After machining, be sure to program G92A0; to cancel the coordinate system
rotation, and confirm on this screen that it is cancelled properly.
Note 7: The coordinate system rotation is valid only in automatic operation modes
(memory run and MDI run). In the manual operation mode, the wire moves
parallel with the machine coordinate system even if the coordinate system
rotation is specified.
Note 8: The current position (work coordinates and relative coordinates) during
coordinate system rotation is displayed on the basis of the machine coordinate
system, not in the rotated coordinate system, except for the set point of
coordinate system rotation. This means that it is difficult to confirm position on
the current position display.

7–10
Example 1: Program
G54 G92 X0 Y0 A1 ; (A1=30°)
G91 G00 X-20000 ;

Current position display at the start point


(set point of coordinate system rotation)
)
Y 54 Work coordinate
(G X
X 0.000
0 30°
Y 0.000
mm Start

10.000
20 point U 0.000
End V 0.000
point
17.320
Current position display at the end point

Work coordinate
X -17.320
Y -10.000
U 0.000
V 0.000

Example 2: Program
G54 G92 X-10000 Y-10000 A1 ; (A1=30°)
G91 G00 X-20000 ;

Current position display at the start point


) (set point of coordinate system rotation)
Y 54
(G X

0 30° Work coordinate


10mm X -10.000
10.000 13.660

m Y -10.000
10m
U 0.000
mm
20 Start V 0.000
point
End
point
3.660 Current position display at the end point
17.320

Work coordinate
X -27.320
Y -20.000
U 0.000
V 0.000

7–11
7.3 Absolute and Incremental Commands (G90 and G91)

There are two ways to specify the movement amount by using coordinate words: incremental and
absolute commands.
The incremental command (G91) specifies the movement amount in each axial direction for the
current block.
The absolute command (G90) specifies the end point of a block in the workpiece coordinate system.
For the absolute command, the workpiece coordinate system must be set in advance by specifying
G92 or by pressing the WORK SET key.

Example:

Y Incremental command
Start
point G91 G01 X60000 Y-30000 ;
50 (G0
1) s
trai Absolute command
ght
line
G90 G01 X90000 Y20000 ;
20 End
point Incremental and absolute command

0 30 90 X G91 G01 X60000 G90 Y20000 ;


Work coordinate system or
G90 G01 X90000 G91 Y-30000 ;

Note 1: G90 and G91 are modal G codes. They are not changed by the RESET key, M02
and M30.
Note 2: G90 and G91 can be changed even on the half way of a block.
Note 3: G90 or G91 at the time of power on can be selected by the parameter No. 60 bit
0.
0: G90 (MGW-JP standard setting)
1: G91 (standard setting for power supply units other than MGW-JP)
Note 4: Though G90 and G91 are valid for all axes (X, Y, U, V, Z, C), specific axes can be
fixed to ABS or INC mode by setting the parameters, regardless of G90 and
G91.
• If U and V axes are fixed to INC mode, regardless of G90 and G91
Machine parameter No.520 = 0000 1100B (U, V)
Machine parameter No.521 = 0000 1100B (INC)

• If all axes follow G90 and G91 (standard setting)


Machine parameter No.520 = 0000 0000B (G90, G91 valid in all axes)
Machine parameter No.521 = 0000 1100B (initial value)

7–12
7.4 Rapid Traverse Linear Interpolation (G00)

G00 (X__) (Y__) (U__) (V__) ; or G00Z__ ;


Perform positioning by rapid traverse linear interpolation to the position specified by coordinate
words.

Example:

Start point
50
(mm)

20 End point

0 30 90 X

Incremental command
G00 X60000 Y-30000 ;
Absolute command
G00 X90000 Y20000 ;

Note 1: G00-G03 are modal G codes, and G00 is selected by the RESET , M02 or M30.
Also, G00 is selected at the time of power on.
Note 2: For both G90 and G91, a coordinate word for the axis that does not move may
be omitted.

Start point
50 End point

0 30 90 X

Incremental command
G00 X60000 (Y0) ;
Absolute command
G00 X90000 (Y50000) ;

Note 3: Up to four axes (X, Y, U, V) can be programmed in the same block. However, Z
axis (automatic Z axis) is an optional and it is programmed in a separate block.

7–13
7.5 Machining Linear Interpolation (G01)

G01 (X__) (Y__) (U__) (V__) ; ( ): omissible


The wire or a guide moves by machining linear interpolation to the position specified by coordinate
words.

Example:

(mm)
50
End point

30
Start point

0 30 80 X

Incremental command
G01 X50000 Y20000 ;
Absolute command
G01 X80000 Y50000 ;

Note 1: G00-G03 are modal G codes, and G00 is selected by the RESET , M02 or M30.
Also, G00 is selected at the time of power on.
Note 2: For both G90 and G91, a coordinate word for the axis that does not move may
be omitted.

Start point
30 End point

0 30 80 X

Incremental command
G01 X50000 (Y0) ;
Absolute command
G01 X80000 (Y30000) ;

Note 3: Up to four axes can be programmed in the same block. Usually, only X and Y
axes are programmed.

7–14
7.6 Machining Circular Interpolation (G02, G03)

G02 (X__) (Y__) (I__) (J__) ; ( ): omissible


G03 (X__) (Y__) (I__) (J__) ;
or
G02 (X__) (Y__) R ;
G03 (X__) (Y__) R ;
There are two directions in movement along a circular, and either one if selected by G0 or G03
G02: Clockwise (CW)
G03: Counterclockwise (CCW)
The head moves to the end point specified by coordinate
Y
words X and Y at the machining rate in the circular
GO2 GO3
interpolation mode. The end point may be specified by
either G90 or G91.

(1) When specifying circle center coordinates


The circle center coordinates I and J are specified with
Y
End point (X, Y) incremental values as viewed from start point of arc,
irrespective of G90 or G91.
Start point
J
Center
I

Example:

Y (mm)
55.454 Start point

30 End point

34.546 60 96 X

Incremental command
G02 X61454 Y-25454 I25454 J-25454 ;
Absolute command
G02 X96000 Y30000 I25454 J-25454 ;

7–15
(2) When specifying circle radius (R)
The radius of circle may be specified with R instead of the center of circle specified with I and J.
Example:
Y If the moving angle exceeds 180°, specify radius R
with a negative sign.
[Incremental]
B Arc A (below 180°)
G91 G02 X30.0 Y30.0 R30.0 ;

R3
0
Arc B (over 180°)
End point G91 G02 X30.0 Y30.0 R-30.0 ;
A
[Absolute]

R3
Arc A (below 180°)

0
G90 G02 X0 Y30.0 R30.0 ;
X
Start point (0, 0) Arc B (over 180°)
G90 G02 X0 Y30.0 R-30.0 ;
Note 1: G00-G03 are modal G codes, and G00 is selected by the RESET , M02 or M30.
G00 is also selected at the time of power on.
Note 2: G02 and G03 are programmed on the X and Y planes only, but not on the U and
V planes. Presence of U or V word in the G02 or G03 block causes an alarm
(1055: U, V COMND ON G2, G3 BLOCK).
Note 3: Presence of Z in the G02 or G03 block causes an alarm (1004: PLANE
INCONSISTENT IN G02,G03 COMND).
Note 4: For both G90 and G91, the coordinate word for the axis that is on the same
position as the start point may be omitted.
(The Y coordinates of the start (The Y coordinates of the start
and end points are the same.) and end points are same.)
Y
Start
Center point
32 30 Center

20 20
Start End point
point End point

0 0
20 25 30 20 30
X
Incremental command Incremental command
G02 X10000 (Y0) I5000 J12000 ; G02 X10000 Y-10000 I10000 (J0) ;
Absolute command Absolute command
G02 X30000 (Y20000) I5000 J12000 ; G02 X30000 Y20000 I10000 (J0) ;
Note 5: Radius R of a full circle cannot be programmed.
Note 6: Programming the R of a semi-circle (180° arc) may cause a rounding error
when NC program is created, thus resulting in unexpectedly large profile
error.
Accordingly, do not use this unless X2 + Y2 = (2R)2 is established completely.
Specify the center position I and J.
Note 7: The R command takes precedence over I and J (I and J are ignored), if they are
programmed in the same block.

7–16
7.7 Wire Radius Compensation (G40, G41 and G42)

(1) Direction of wire radius compensation


There are three modes for wire radius compensation.

G code Mode
G40 Wire radius compensation cancel
G41 Radius compensation left
G42 Radius compensation right

Offset
amout
G41
G40 Movement direction
of the wire

amount
Offset
G42

G40 is programmed to move the wire exactly along the programmed path.
G41 is programmed to offset the center of the wire to the left of the program progress direction
and the offset amount is specified by a D code. G42 is programmed to offset the center of the
wire to the right of the program progress direction and the offset amount is specified by a D
code.
A program is usually executed in the finish dimensions. On the other hand, by offsetting the
wire center, its path is moved right of left to obtain the exactly desired dimensions.

20 20

Start point Offset direction (G41)


20

20

Offset amount (D code)


10

Direction of machining

(2) Changeover of the wire radius compensation mode


G41 or G42 is usually programmed together with a movement command of the block (lead) at
which the wire goes into the machining shape. On the other hand, G40 is programmed
together with a movement command of the block at which the wire leaves the machining
shape. The lead is usually vertical to the machining shape. In the example below, G41 is
programmed in the block of Y-10 mm, and G40 in the block of Y10 mm. The program is as
follows:

7–17
%;
G92 X0 Y0 ;
M17 ;
Enter a desired offset amount into D1 on
G91 G01 G41 Y-10000 D1 ;
the offset screen (f · 1) of the SET screen.
X10000 ;
Y20000 ; 20
X-20000 ;
Y-20000 ;
X9700 M01 ;

20
Offset amount
X300 ;
G40 Y10000 M30 ;
Wire movement
%
Note 1: G40-G42 are modal G codes, and G40 is selected by the RESET , M02 or M30.
G40 is also selected at the time of power on.
Note 2: Input of M02 or M30 in the G41 or G42 mode causes an alarm (1002: M02, M30
PROGRAMMED BEFORE OFFSET CANCEL (G40)).
Note 3: The D is modal code and it does not change by RESET M02, M30 or power on.
Note 4: If there are two or more lead blocks, G41 or G42 may be programmed in the first
lead block. In this case, 0 micron and ordinary offset can be used for offset
value.

Example: Changeover of machining condition in lead section


Enter the following into indirect command offsets:
D0 = 0
D1 = Offset value of machining shape

%;
G92 X0 Y0 ;
Start point
E9000 ; M/C condition in lead section
M17 ;
G91 G01 G41 Y-5000 D0 ; Radius compensation (left) mode, 0 micron
Machining shape Y-10000 E9001 ; Changeover of M/C condition in the middle of lead
X10000 D1 ; Program D1 in the machining shape section.
Machining shape

Y20000 ;
X-20000 ;
Y-20000 ;
X9700 M01 ;
X10000 ;
Program D0 in the block at which the wire leaves
Y10000 D0 ; the machining shape.
G40 Y5000 M30 ; Program G40 in the last lead block.
%

7–18
Note 5: Mode change between G40, G41 and G42 should be performed in the G00 or
G01 mode. Mode change in G02 or G03 causes an alarm (1012: G41, G42 IN
G02, G03 BLOCK, or 1013: OFFSET CANCELLED (G40) IN G02, G03 BLOCK).
Note 6: In a wire diameter (G41 or G42), be sure to program blocks that contain the
move commands if possible. If the blocks not containing the move commands
continue, the alarm (1017: MORE THAN 2 NON-MOVEMENT BLOCKS DURING
G41, G42) may occur.
Note 7: When an offset value on the SET f · 1 (OFFSET) screen is changed in the
indirect offset mode (D0-D9), the offset value changed becomes valid in the
G41 (or G42) mode after G40, or at restart after D0-D9 or stop.

(3) Input of offset value


There are two ways to enter the offset value; indirect command by offset number (D0-D9), and
direct command. For the indirect command, enter offset value to the offset number on the
SET f · 1 (OFFSET) screen.
For the direct command, enter offset value following D.
The least input increment and programmable range for offset value are as follows:

Programmable range
Least input
Resolution Indirect command
increment Direct command
(D0 - D9)
Metric system Standard 0.001 mm 0 - ±9.999 0. - ±9.999
High 0.0001 mm 0 - ±9.9999 0. - ±9.9999
Inch system Standard 0.0001 inch 0 - ±0.9999 0. - 0.9999
High 0.00001 inch 0 - ±0.99999 0. - ±0.99999

The offset value must be set properly to finish the workpiece to the specified dimension.

Note 1: The decimal point must be used like 0.000 - 0.009 when specifying 0 - 9
(µm) in the direct mode.
Without the decimal point, the offset value is processed in the direct mode
(D0 - D9). (This is true in the inch system.)
Note 2: In the use of indirect command, if ten offsets of D0 - D9 are not enough,
use the user variables to specify D#900 - D#999, so that the number of
offsets can easily be increased.
However, if macro variables are 0.000 - 0.009, the indirect commands D0 -
D9 are used.

7–19
(a) When machining the workpiece in the programmed dimensions in single machining
The offset amount is the wire radius plus the discharge gap between the wire and the
workpiece (i.e. cut width/2)

Dsicharge gap

Cut width
Wire radius

amount
Wire center

Offset
Workpiece
Programmed dimensions

See the machining condition table for the value of “cut width/2”. More precisely, perform
gap test machining to decide the offset amount.

(b) When leaving a finish allowance for secondary machining


When leaving a polishing allowance in single machining or performing micron
machining, the offset amount becomes the one of “cut width/2” plus a finish allowance.

Discharge gap
Cut width

Wire radius
Wire center
amount
Offset

Programmed dimensions
Finish allowance

See the machining condition table for the offset amount for micron machining. When
leaving a polishing allowance or a clearance in punch and die machinings the amount on
each side is added to (or subtracted from) the value of “cut width/2”.

Note 1: Negative offset values can be programmed.

G41 D120 G42 D-120

Wire
120µm 120µm
Program

Usually, the direction of offset (G41, and G42) is determined so that the
offset value becomes positive.

Note 2: The offset amount may be changed during offset by changing D in the
program. However, care must be taken to prevent erroneous wire
movements. (See the wire center path in the figures in the next section.)

7–20
Example: When tow straight lines intersect each other

G41 D120

(G
120 120

41
)D
0

20
20

0
G42 D120 0
20

(G
42
D2
Program

00
)
(4) Wire center movement
(a) Wire center movement at the time when wire radius compensation is programmed (when
G41 or G42 is programmed in the G40 mode)
At the start point of the next block, the wire path is offset by the amount specified in the
direction of the normal of the next block.
The movement command for the block programming G41 or G42 must be G00 or G01. If
it is G02 or G03, an alarm results. (1012: G41, G41 IN G02, G03 BLOCK)

Next block
Offset amount

G41 G40
block

(G40) (G40)

Wire path after


compensastion
Programmed
wire path

G42 Wire center


G42

(G40) (G40)

7–21
(b) Wire center movement when wire radius compensation is cancelled (when G40 is
programmed in the G41 or G42 mode)
The wire path is linearly interpolated so that the offset is cancelled at the end of that
block. If it is G02 or G03, an alarm. The move command in the block in which G40 is
programmed must be G00 or G01. If it is G02 or G03, an alarm results (1013: OFFSET
CANCELLED (G40) IN G2, G3 BLOCK).

…†‡‹Œ‘’“ …†‡‹Œ
G41 G41

k
loc
0b

G40
G4
G42 G42

G40 G40

Note: Be sure to program G40 in a block that contains a movement command.


If G40 is programmed in a block with no movement while the wire is still on
the machining shape, a wire bite develops on the workpiece.

%;
G92 X0 Y0 ;
M17 ;
G91 G01 G41 Y-10000 ;
X300
X10000 ;
G41 Y20000 ;
X-20000 ;
Y-20000 ;
X9700 M01 ;
X300 ;
G40 ; With no movement, offset is cancelled
Y10000 M30 ; when X300 comes to an end.
%

7–22
(c) Wire center movement during wire radius compensation (when G41 or G42 continues)
The wire center path during wire radius compensation is generally obtained in the
following procedures. First, read the current block and then the next block, and find their
movement commands.
Then, for each movement command, find a figure offset by the wire radius offset amount
set in the direction specified by G41/G42. Find an intersecting point of the offset figure.
The wire center moves to the intersecting point by linear interpolation or arc interpolation.

Intersecting Offset figure


Movement command after point
wire radius compensation

Movement command
for the next block

Movement command
for the current block

(i) When there is an intersecting point

G41
G41

G42

G42

G41

G41

G42

G42

7–23
(ii) When there is no intersecting point
If the offset figure has no intersecting point, its corner may be interpolated by three
straight lines.

a a

If the distance (l) of intersecting point exceeds the limit (standard 60 mm) specified
by the parameter No. 82 even though there is an intersecting point, its corner is
interpolated with three straight lines, like a figure with no intersecting point.
When the wire moves
around corner of a figure a Intersecting
with no intersecting point Point
after offset in the single l

block mode, the wire tem-


porarily stops at position
“a”.

(d) Wire center movement when offset value is changed in the wire radius compensation
mode
(i) When two lines intersect each other at an angle exceeding the angle specified by
parameter No. 83 (standard 3°)
The offset value changes at the intersecting point.

G41 D1
3° or more
D1 D1

D2
2
D
G42 D1
2
D
D2

(ii) When two lines intersect each other at an angle below the angle specified by
parameter No. 83 (standard 3°)
The offset value of a block
in which it is changed so G41 D1 D2 D2
0° or more and
D1

that it becomes D2 at the less than 3°


end of the block that
Preceding block The offset amount
D2

programs D2 changes gradually changes.


gradually from D1 to D2.

7–24
(iii) When there are two intersecting points in line and arc or arc and arc offset figures.
The offset value changes at the second intersecting point in the wire feed direction.

Note 1: If there is no intersecting


point in arc and arc
1st
offset figures, an alarm intersecting D2 D2
results (1001; NOT point
TANGENT DUE TO 2nd
G41 D1 intersecting
OFFSET CHANGE, D1 point
OUTSIDE RAD).
Note 2: The offset value can be
changed gradually on
the arc by specifying the
G25 (see the Section on
G25).

(5) Additional notes on wire radius compensation


(a) In the wire radius compensation mode (G41 or G42), do not specify two or more blocks
successively that do not contain the move command. Otherwise, the wire may move to
overcut by the amount of offset unlike normal compensation.
In the G41 (or G42) mode, the wire path is
interpolated by a CW (or CCW) arc (its radius is CW

the offset value).


Workpiece

(b) In the machining of a shape as shown below,


offset interference occurs in the wire radius
compensation, resulting in defective machining.
To avoid this, the machining shape must be Overcut CW

changed or a smaller wire must be used to reduce


the offset amount.
In the event of offset interference, the warning (1016: OVERCUT CAUSED BY OFFSET
OR TAPER) is displayed. At this time, operation is stopped in the dry run or graphic
mode, or it continues during machining.
It is recommended that before start of machining, the presence of offset interference be
checked in the dry run or graphic mode by means of warning display and wire path.

7–25
(i) When machining the inside of an arc smaller than the offset amount.

Overcut

(ii) When movement is small

(c) If coordinate system setting (G92), automatic wire loading (M06) or reference point
return (G28) is programmed in the wire radius compensation (G41 or G42), wire radius
compensation is cancelled temporarily. Those functions are usually programmed in the
wire radius compensation cancel mode (G40).

Wire radius compensation temporarily


cancelled at the time M6 is executed
(G41 is held)

Shape to be machined after


the wire is moved by the
1 2 machine equipped with an
Normal automatic wire loader
vector G41

The above figures show how the wire moves in the wire radius compensation (G41).
The broken lines indicate the programmed figure and the solid lines show the actual wire
path. Machining starts in the left-hand figure. The wire is cut off by M6, wire radius
compensation is cancelled temporarily during the subsequent movement, and the wire is
automatically loaded to complete machining in the left-hand figure.
If the shape in the right-hand figure is machined in this status, the wire moves as indicated
in 2. To avoid this, program G40 for block 1, and G41 or G42 for block 2.

7–26
(d) The wire radius compensation can be used together with scaling, rotation, X, Y-axis
exchange, mirror image and taper machining.
If these functions are made valid in the same block, they are executed in the following
order: For example, when scaling, mirror image, wire radius compensation and taper
machining are programmed, the machine first performs scaling, then followed by mirror
image and wire radius compensation, and finally followed by the calculation of the wire
path in taper machining.

Program
%;
G92 X0 Y0 ;
G48 X0 Y0 P1500 ; Scale factor of 1.5 times
G71 X1 Y0 ; Mirror image X on
M17;
G91 G01 G41 G52 Y-4000 D2000 T3000 ;
X16000 ; Taper angle of 3°
X-20000 Y10000 ; Offset of 2 mm
Y-10000 ;
X4000 ;
G40 G50 Y4000 ;
G70 ; Mirror image OFF
G47 ; Scaling OFF
M30 ;
%

Programmed shape
6

Scale factor of 1.5 times


4

4 16
Mirror image X

Upper guide
Lower guide

Taper angle of 3° Offset of 2 mm

7–27
7.8 Taper Machining (G50, G51 and G52)

Taper machining is a machining method that controls the lower guide (X and Y axes) as well as the
upper guide (U and V axes) to incline a machining surface at a specified angle.
Prior to taper machining, program the direction of inclination (G50, G51 and G52) and the wire
inclination angle (T).

Then enter data related to taper machining on the offset screen (f · 1) of the SET screen to proceed
to machining. This function offers the following features:

(a) Correct shapes are always obtained on the programmed plane regardless of any shape
requirements.
(b) The wire inclination angle can be changed in the course of the program.
(c) Various taper corner shapes can be obtained by using G24, G25, and G49 concurrently.
(d) The wire movement on any cross section of the workpiece can be drawn, allowing visual
check of the taper machining shape before actual machining.

(1) Direction of taper machining inclination


There are three modes to determine the direction of taper machining inclination:

G code Mode
G50 Taper machining cancel
G51 Taper machining left
G52 Taper machining right

Upper guide plane (U-V plane)


G51
G50 Note: Right guide (X-Y plane)
G52 for the UPH-1, UPH-2
or UH-2.

Programmed plane (Plane of the programmed


dimensions)

Lower guide plane (U-Y plane)


Note: Left guide (U-V plane)
for the UPH-1,UPH-2 or
UH-2.

Machining with the wire held at a vertical position is executed in the taper machining cancel
mode. This cancel mode is obtained when power supply is turned on and in the reset status.
When machining the shape with the wire tilt to the left of the specified path, its mode is
referred to as the taper machining-left mode. This mode is obtained by programming the taper
machining-left mode (G51). In this mode, the upper guide always moves on the left side of the
path specified on the programmed plane.

7–28
Likewise, when machining the shape with the wire tilt to the right side of the specified path, its
mode is referred to as the taper machining-right mode. This mode is gained by programming
the taper machining-right mode (G52). In this mode, the upper guide always moves on the
right side of the path specified on the programmed plane.

(2) Changeover of the taper machining inclination mode


Generally, G51 or G52 and the wire inclination angle (T) are programmed together with the
movement command in the block (lead) at which the wire goes into the machining shape, and
G50 together with the movement command in the block at which the wire leaves the
machining shape. That is, these functions are specified in the same blocks as in wire radius
compensation (G40, G41 and G42).

20 20

Offset direction (G42) and offset amount (D)


20

20
Direction of taper machining inclination
(G51) and wire inclination angle (T2000)
Machining Y

10
shape
X Programmed shape
(programmed plane)

Inclination
angle of 2°

Programmed plane

In the above example of taper machining of a 20 mm square figure, G51 and T2000 are
programmed together with offset (G42 and D) for the block (lead) of Y10 mm, and G40 and
G50 for the block of Y-10 mm. The program is as follows:
%;
G92 X0 Y0 ;
M1 7;
G91 G01 G42 G51 Y10000 D1 T2000 ;
X10000 ;
Y20000 ;
X-20000 ;
Y-20000 ;
X9700 M01 ;
X300 ;
G40 G50 Y-10000 M30 ;
%

7–29
Note 1: G50-G52 are modal G codes, and G50 is selected by RESET , M02 or M30. Also,
G50 is selected at the time of power on.
Note 2: The T is a modal code, and it does not change by RESET , M02 or M30.
Note 3: G51 and G52 must be programmed together with the G41 or G42 in the same
block. Otherwise, an alarm results (1064: TAPER COMAND WITHOUT G41,
G42).
Likewise, G50 must be programmed together with G40 in the same block.

Example: Changeover of the machining conditions in the lead section


Enter the following into the indirect command offsets:
D0 = 0
D1 = Offset value for a machining shape

%;
G92 X0 Y0 ;
E9000 ; Machining condition in lead section
M17 ;
3 G91 G01 G42 G51 Y7000 D0 T0 ; Radius offset, taper ON (0µm, 0°)
7 Y3000 E9001 ; Changeover of machining condition in the middle of lead
X10000 D1 T2000 ; D and T in the machining shape
Machining shape

Y20000 ;
X-20000 ;
Y-20000 ;
X9700 M01 ;
X300 ;
Set D and T to 0 for the block at which the wire leaves
Y-3000 D0 T0 ; the machining shape.
G40 G50 Y-7000 M30 ; Program G40 and G50 for the last lead block.
%

Note 4: Mode change between G50, G51 and G52 should be made in the G00 or G01
mode, same as in the case of G40, G41 and G42.
Note 5: Any block that does not contain the move command should not be
programmed in the taper machining tilt mode (G51 or G52) mode. If two or
more blocks without movement continue, overcut may result unlike normal
inclination. If the blocks not containing the move commands continue, the
alarm (1017: MORE THAN 2 NON-MOVEMENT BLOCKS DURING G41, G42) may
occur.

7–30
(3) Programming of wire inclination angle
Program a wire inclination angle with the address word T. Its least input increment and the
range of programmable values are as listed below.
Vertical
Upper guide plane
Least input Programmable
increment value range
T 0.001° ±89.999
Wire inclination
angle
Specify the wire inclination angle in an argument (i.e.
an angle on either side) to a wire vertical position.
For specification, use a positive value whether the Programmed plane
wire is inclined to the right or left in taper machining.
Specifying a negative inclination angle results in Lower guide plane
switching the taper machining mode of right and left.
Usually, the wire inclination angle is specified prior to the specification of the mode of taper
machining or in the same block as for mode setting.
The wire inclination angle can be changed in the course of the program. At this time, change
the wire inclination angle only by T without selecting G51 or G52. Generally, the inclination
angle cannot be changed on an arc.

Example: When changing the angle while the program is in progress

%;
2° G92 X0 Y0 ;
M17 ;
10


G91 G01 G41 G52 Y10000 T1000 ;
X-5000 ;
Y10000 T2000 ;
10
X10000 ;
Programmed
2° plane Y-10000 T0 ; G50 must not be entered.
X-4700 T1000 M01 ;
X-300 ;
G40 G50 Y-10000 M30 ;
%

7–31
(4) Other data setting for taper machining
For the taper machining, it is necessary to enter in advance the following data related to taper
machining, besides specifying the direction of taper machining inclination (G50, G51 or G52)
and the wire inclination angle (T).

• TAPER MODE:
Taper machining mode NC FUNC , 1, f · 8
• TAPER D.M.S:
Taper angle NC FUNC , 3, f · 8
• PROG. PLANE:
Height of program plane SET , f · 1 (OFFSET)
• SUB PLANE:
Height of sub plane SET , f · 1 (OFFSET)
• Z AXIS POSITION:
Reading of Z axis scale (Machine coordinate) SET , f · 1 (OFFSET)
• DRAW PLANE:
Height of the drawing plane
In graphic mode only SET , f · 1 (OFFSET)
• DRAW SCALE:
Scale factor
The following shows an example of data setting.
Example: Data setting for the heights in taper machining
Height data in the

24.5 Upper guide fulcrum (Z axis scale of 24.5)


plus direction

θ
Z-axis scale

P3

(10) (15)
P2´ P2

Workpiece
(25)

program plane
0
P4
P1
P6

Plate
8

Workpiece mount (table)


P5

Lower guide fulcrum

(a) Program plane


Enter height P1 from the workpiece mount to the program plane.
P1 = 8 mm + 10 mm = 18 mm

7–32
(b) Sub plane
Where to set the sub plane depends on the situation:
(i) Complete taper machining (taper machining across the entire workpiece)
Compare P2 (workpiece top face) with P2´ (workpiece bottom face) on the basis of
the program plane. And the one of a greater distance is usually considered the sub
plane. Because P2 > P2´ in this case, the sub plane is P2 (= 15 mm)
(ii) When taper machining is performed after straight machining
One end of the area for taper machining indicates the sub plane. Because the lower
end represents the program plane in this example, the upper end is regarded as the
sub plane (P2 = 15 mm).

(c) Z axis position


Enter the reading P3 of the Z-axis scale
For the machine with automatic Z axis, enter the machine coordinate.
In this example, P3 = 24.5 mm

(d) Drawing plane


Enter P4, the height at which drawing is performed in the taper “2” mode, on the basis of
the workpiece mount. Drawing can be done at any height.
Generally, drawing is performed twice, once at the height of the program plane and once
of the sub plane, to check offset interference. In this example, the first check is made at
the height of 18 mm and the second at 33 mm.

Note 1: In the taper mode (TAPER “1”), rapid dry run speed causes an alarm (503 *
: * AXIS POSITION FEEDBACK ERROR).
Note 2: P5, the distance between workpiece fixture and lower guide fulcrum, is
specified to each machine, and it has been set to the parameter No. 670.
Usually, this value need not be changed.
Note 3: P6, the distance between workpiece fixture and zero point on Z-axis scale
(Z-axis bias value), is specified to each machine, and it has been set to the
parameter No. 671. Usually, this value need not be changed.
Note 4: When setting the taper angle, it is necessary to determine whether to
specify the taper angle either in degrees, or in degrees, minutes and
seconds.
TAPER
f·8 D.M.S. key on the third screen of the NC FUNC screen
ON T XX ( °, XX’, ”)
OFF T XX ( X. X °)
Note 5: Constant machining surface may not be attained, if the Sub Plane value is
extremely smaller than the Z Position. Usually set the Sub Plane over 1/50
of the Z Position.

7–33
(5) Wire movement in taper machining
The wire movement in taper machining is determined as follows: Read the current and next
blocks and find their movement commands. Then, find the wire path on the program plane,
and then determine movements of the upper and lower guides, so that they will have the
correct shape on the program plane and the angle specified by a T code in the direction set by
G51/G52. Execute interpolation so that the upper and lower guides start and stop
simultaneously.

Upper guide path

Movement of
Program plane the next block
Lower guide
path

(a) Movement at start-up

Upper guide

Upper guide
plane
Program plane

Lower guide Program plane


G52 plane
G52 Lower guide
plane

(b) Movement at cancel

Upper guide plane

G51 G51

Program plane Upper guide


G50 G50 plane
Lower guide plane
Program plane

Lower guide
plane

7–34
(c) Movement in the taper machining mode

Upper guide plane

Upper guide
plane

Program plane G52

Lower guide plane Program plane


Lower guide
plane

Upper guide plane

G52

Program plane

Lower guide plane

(d) Movement at wire inclination angle change


(i) When wire paths intersect each other

β β β
α
Upper guide Tβ
plane
Tβ G52Tα
α

Program plane G52


Lower guide Tα
plane
Upper guide plane

Program plane
Upper guide plane

β°
β°
Program plane
α°
α°

7–35
(ii) When wire paths contact each other

Upper guide
plane
β
α Upper guide
β
α plane
Program plane G51Tα β
α
α T=β Lower guide Tβ
G52 T=β plane
Program plane
T=α
Lower guide
plane
ne
pla ne
gram e pla
Pro uid α°
Tβ per
g α°
β° Up

Tα G51

Upper guide
plane

Program plane

α

β°
2T
G5
α°

As shown above, if the wire inclination angle is changed between two contacting straight
lines, or between a straight line and an arc that contact each other, the angle changes gradually
until a newly specified angle is reached at the end of the straight line block in which the new
angle was specified.

Note: The wire inclination angle cannot be changed between two contacting arcs, or
between a straight line and an arc that contact each other. In such cases,
programming G25 changes the inclination angle on the arc (see the section on
G25 for details).

(6) Other directions on taper machining


(a) Generally, taper machining is programmed so that it starts and ends with the wire at a
vertical position.
(b) Note that the wire radius compensation is temporarily cancelled if coordinate system
setting (G92), automatic wire loading (M06), automatic wire cut-off (M07), or reference
point return (G28) is programmed during taper machining (G51 or G52). These functions
are usually programmed in the taper machining cancel mode (G50).
(c) In taper machining, a machined surface of a specified angle is usually obtained on such
figures as ones having two interesting straight lines or a straight line or an arc of which is
smoothly followed by an arc. However, surfaces of specified angles cannot be obtained in
figures consisting of a straight line followed by an arc, or two arcs contacting each other.
This is because the interesting lines on the machined surface including two figures (e.g., a
straight line and an arc) do not usually form a straight line while the wire is stretched
linearly between the upper and lower guides.

7–36
In such a case, the specified shapes can
always be obtained on the program plane,
though the inclination angle of the
machined surface does not precisely Not a straight line
coincide with the specified angle. This
error, however, is negligible in practice.

(d) In obtaining an acute angle, the deviation between the upper and the lower guides may
become large enough to trigger upper guide overtravel.

Upper guide An over travel


Program plane error occurs.
Lower guide

(e) At a sharp corner consisting of a straight line and an arc, or two arcs, straight line
interpolation may sometimes be performed at the conner, as shown below.
Program plane
Upper guide
Lower guide

Workpiece

(f) Various taper shapes can be obtained by using G24, G25, and G49 together with the
standard taper machining program (G50 - G52, and T). For details, refer to each item.

7–37
Taper corner shape Taper angle change Reference (Program)

T2
Sharp corner Possible Standard taper
T1

R common to top and Geometrically

T1
Standard taper
T1 bottom faces impossible

T1
R only on the sub plane Program a small R in
Possible if G24 is used
advance
T1

G49 is only for a


Same R on the top and
T2

Possible straight line; G24 may


T1 bottom faces
also be used for an arc.
T2

Spiral interpolation
Possible G25
(cam, etc.)
T1

Tangential contact
T2

insertion (automatically Possible G24


T1 radius setting)

Tangential contact
L
T2

insertion (radius Possible G24L


T1 specified)

7–38
7.9 Dwell (G04)

Format: G04 X__ ;


Specify dwell if it is desired to stop machining for a fixed period of time in the course of the
program. The time is specified by address word X. The setting unit and the range of programmable
values are as follows:

Resolution Feed rate Feed range


Standard 0.001 sec 0-14744.7 sec
Metric system
High 0.0001 sec 0-14744.7 sec
Standard 0.0001 sec 0-14744.7 sec
Inch system
High 0.00001 sec 0-14744.7 sec

Example:

5 G01 Y5000 ; The wire stops for 2.5 seconds


G04 X2.5 ; before moving 5 mm
5

X5000 ; in the X axis direction.

Note 1: During machining the wire stops in the machining status, and the discharge
gap is enlarged. This function is thus seldom used by the wire EDM.
Note 2: Do not program dwell together with a movement command in a block.
Example: G04 X5000 G01Y 5000 ; is interpreted as G01 X5000 Y5000 ;

Note 3: Since dwell forms a block with no movement, care should be taken when it is
programmed in functions such as wire radius compensation which prescribes
the way of making a block with no movement.
Note 4: G04 is a one-shot G code.
Note 5: The timer resolution is 0.05 sec, and the time below that limit cannot be
specified.

7–39
7.10 Change of Setting Data (G10)

The use of G10 can change various data in a program, which are normally set manually on each
screen (offsets, work offsets, parameters, taper plane data, machining conditions).

(1) Change of offset data (D0-D9) (G10 L1 command)


D0-D9 on the SET OFFSET screen can be changed.
Format: G10 L1 D_ R_ ; (Change)
or
G10 L1 D_ Q_ ; (Increment/decrement to current value)
D: Offset number (0-9)
R: Offset data
Q: Incremental offset data

(2) Change of work offset data (G10 L2 command)


The work offset (difference between machine coordinate system and work coordinate system)
which is the base of all work coordinate systems on POSITION screen can be changed by
work coordinate system.
Format: G10 L2 P_ X_ Y_ ;
P: Selection of work coordinate system
1-8: G54-G61
99: G54-G61 are all changed
X: X axis work offset data
Y: Y axis work offset data

(3) Change of parameter data (G10 L999 command)


The parameter data on the SET, SET DATA screen can be changed.
Format: G10 L999 P_ R_ ; (Change)
or
G10 L999 P_ Q_ ; (Increment/decrement to current value)
P: Parameter number
R: Parameter data (Note)
Q: Incremental parameter data (Note)
Note: R and Q data must be specified with decimal value. Binary or
hexadecimal value cannot be used.

7–40
(4) Change of taper plane data (G10L80 command)
The taper plane data on the SET OFFSET screen can be changed.
Format G10 L80 P_ R_ ; (Change)
or
G10L80P_Q_; (Increment/decrement to current value)
P: Selection of plane to be changed
0: Program plane
1: Sub plane
2: Z axis position
R: Plane height
Q: Incremental plane height

(5) Change of machining condition elements (COND MAIN screen of J type power supply
units)
Format: G10 L10 R_ P_ ;
R: Machining condition element No.
3: Mode (0-11) 12: Water mode (0-9)
4: ON time (1-64) 13: Wire feed (0-36)
5: OFF time (1-128) *14: Flow rate (00-77)
6: Current (1-39)
7: I-C (0-77) 15: Tension (0-15)
8: Voltage (1-110) 16: Water cond. (2-200)
9: Servo (0-100) 21: Servo No. (0-11)
10: Speed (0.01-50.00) 22: LLC (0-65535)
11: ADC (0-9999) 23: I-S (000-999)
24: DSC (0-16383)
P: Setting data *Not used at present

7–41
(6) Registration of machining condition (9000 series) (COND LIST screen of J type power
supply units)
Format (1st line): G10 L20 I_ J_ K_ P_ Q_ R_ ;
I: Registration format (001), E No. (9000-9999)
J: OFF T. (1-128), ON T. (1-64), Mode (0-11) , Wire dia. (1-7) ;
K: Voltage (1-110), I-C (0-77), Current (1-39)
1 : 0.05 mm
P: ADC (0-9999), Servo (0-100) 2 : 0.10
3 : 0.15
Q: Speed (0.01-50.00)
4 : 0.20
R: Servo No. (0-11) 5 : 0.25
6 : 0.30
8 7 6 5 4 3 2 1 Digit 7 : 0.35
I 0 0 1 E number

J OFF ON Mode Wire


dia.
K Voltage I–C Current
P ADC Servo
Q Speed
R Servo No.

Format (2nd line): G10 L20 I_ J_ K_ P_ Q_ R_ ;


I: Registration format (001), E No. (9000-9999)
J: Tension (0-15), Flow rate (00-77), Wire feed (0-36), Water mode (0-9)
K: Water cond. (2-200)
P: I-S (000-999), LLC (0-65535)
Q: DSC (0-16383)
R: EST. speed (0.01-50.00)

8 7 6 5 4 3 2 1 Digit
I 0 0 1 E number
Flow Flow Water
J Tension rate rate
(upper) (lower)
Wire feed mode

K Water condition

P I–S LLC
Q DSC
R Estemated machining speed

Note 1: The machining condition No. is not necessarily same as that on the
screen.
Note 2: Although the LLC and DSC values are displayed on the screen in
hexadecimal notation (0000H-FFFFH), use them in decimal notation for the
G10 command.

7–42
Example 1: Registration of metric machining condition (for both standard resolution and high
resolution)
If a machining condition is registered in common to standard resolution and high resolution,
add a decimal point only to the speed item (mm/min)marked with ★.

Registration format 001 (fixed)


E No. 9010
OFF time 19
ON time 5
Mode 0
Wire dia. 4 (0.200mm)
Voltage 40
I–C 30

Current 39

ADC 2023
Servo 30
★Speed 4.20 (mm/min)

Servo No. 0

G10 L20 I 00109010 J 01905004 K 0403039 P 2023030 Q 4.20 R 00 ; Two lines


make up one
G10 L21 I 00109010 J 0600141 K 028 P 24728581 Q 00259 R 3.80 ; instruction

★Est. speed
3.80 (mm/min)
DSC 0103H
LLC 6FA5H
I–S 247
Water cond. 28

Water mode 1
Wire feed 14

Flow rate 00 (not used at present)


Tension 6

E No. 9010
Registration format 001 (fixed)

7–43
Example 2: Registration of inch machining condition (for both standard resolution and high
resolution)
If a machining condition is registered in common to standard resolution and high resolution,
add a decimal point only to the speed item (inch/min)marked with ★.

Registration format 001 (fixed)


E No. 9010
OFF time 19
ON time 5
Mode 0
Wire dia. 4 (0.0079 inch)
Voltage 40
I–C 30

Current 39
ADC 2023
Servo 30
★Speed 0.165 (inch/min)

Servo No. 0

G10 L20 I 00109010 J 01905004 K 0403039 P 2023030 Q 0.165 R 00 ; Two lines


make up one
G10 L21 I 00109010 J 0600141 K 028 P 24728581 Q 00259 R 0.150 ; instruction

★Est. speed
0.150 (inch/min)
DSC 0103H
LLC 6FA5H
I–S 247
Water cond. 28

Water mode 1
Wire feed 14

Flow rate 00 (not used at present)


Tension 6

E No. 9010
Registration format 001 (fixed)

7–44
(7) Change of machining condition elements (J type power supply units, G10 L10
command)
The machining condition elements on the COND MAIN (SUB) screen can be changed.
Format: G10 L10 R_ P_ ;
R: Specify the element No. given in Table 7.10.1, not numbers displayed on the screen.
P: Specify decimal value in a set range in Table 7.10.1.
Example 1: G10 L10 R9 P50 ; Change OFF data of current conditions to 50.
Example 2: G10 L10 R19 P16 ; Change SV.MODE of current conditions to 10H.

Table 7.10.1 Machining condition elements


Set range Note 3 Element No.
Cond. elements Unit (G10L10R_P) Remarks
Min. Max. (G10L21I_J_)
WIRE DIA. mm 0.000 32.767 1
WORK MATERIAL TAP 0 15 2
THICKNESS mm 0.0 999.9 3
M/C CONTENTS TAP 0 255 38
MODE TAP 0 30 4 Note 10
ONA TAP 1 255 5 Note 3
ONB TAP 1 255 6 Note 3
ONC TAP 1 255 7 Note 3
OND TAP 1 255 8 Note 3
OFF TAP 0 255 9 Note 4
TS TAP 0 15 10
SCT TAP 0 255 11
RCT TAP 0 255 12
DCHG–S TAP 0 63 13 Note 5
DCHG–R TAP 0 63 14 Note 6
SV TAP 4 18 15 Note 5
RV TAP 4 18 16 Note 6
IPM TAP 6 40 17
IPS TAP 0 9 18 Note 7
SV. MODE TAP 00H FFH 19
SV. No. TAP 00H FFH 20
SV. ADJ TAP 0 255 21
SPEED mm/min 0.01 50.00 22
SM–REF TAP 00H FFH 23
PRG–ON TAP 00H FFH 24
PRG 0–1 TAP 0000H FFFFH 40
PRG 0–2 TAP 00H FFH 41
PRG 0–3 TAP 00H FFH 42
PRG 0–4 TAP 00H FFH 43
PRG 1–1 TAP 00H FFH 44
PRG 2-1 TAP 00H 255 45
PRG 2-2 TAP 00H 255 46
ADC–ON TAP 00H FFH 25
ADC 0–1 TAP 00H 0FH 26
ADC 0–2 TAP –10 10 27
ADC 1–1 TAP 00H FFH 28
ADC 1–2 TAP 00H FFH 29
ADC 2-1 TAP 00H FFH 49
ADC 2-2 TAP 00H FFH 50
WATER TAP 0 15 32 Note 8
OVERRIDE U % 0 255 33 Note 8, Note 9
OVERRIDE L % 0 255 34 Note 8, Note 9
WIRE SPEED TAP 0 36 35 Note 11
TENSION TAP 0 15 36 Note 12
CONDUCTIVITY TAP 0 200 37
EST. SPEED mm/min 0.00 50.00 39

7–45
Note 1: The data of machining condition elements (MODE, ONA, etc.) on the COND
MAIN (SUB) screen are changed temporarily. If the same E No. call command is
specified, the data set to the condition list are restored.
Note 2: The E No. called at power ON is the one saved when the power was turned off.
Note 3: For ONA, ONB, ONC, and OND, the maximum value may be limited depending
on the setting of MODE or machine parameters No.7880-7899, 7970-7999, even
if they are set within allowable range.
Note 4: For OFF, the minimum value may be limited depending on the setting of ONA-
OND, MODE, or machine parameters No.7880-7899, 7970-7999, even if it is set
within allowable range.
Note 5: For SV and DCHG-S, even if they are set within allowable range, the
relationship between both elements is limited within the range satisfying the
following expression.
SV > DCHG-S*(0.39)
Note 6: For RV and DCHG-R, even if they are set within allowable range, the
relationship between both elements is limited within the range satisfying the
following expression.
RV > DCHG-R*(0.39)
Note 7: IPS, even if set within allowable range, is limited to more than 6 when MODE is
0 to 2.
Note 8: With the FLUID turned on, if either WATER, OVERRIDE U, or OVERRIDE L is
changed, the intensity of water changes and the water could splash. Therefore,
when changing the machining condition besides WATER, always mount the
splashguard.
The intensity of WATER 0-15 has been set to the machine parameters No.7680-
7695.
Note 9: The Override U and L are restricted so that their output values do not exceed
the upper limit pressure (standard 0.73MPa) when the pressure is restricted in
the Water mode 0 - 5.
Note 10: Of the Mode 0 - 30, settable modes are 0 - 4, 10, 11, 20, 21, and 30 (optional).
Note 11: The max. wire speed of the EU64 machine is 25. The max. wire speed of the MV-
30 power supply unit is 15.
Note 12: The max. tension of the MV-30 power supply unit is 99.
Note 13: The machining condition elements displayed on each condition screen have
been set to the set data No.380-394.

7–46
(8) Addition of machining conditions (K type power supply units, G10 L20 command)
New E numbers can be added on the COND LIST screen.
Format: G10 L20 (I_ (J_) (K_)) (P_) ; ( ): omissible
I_: Start E No. to be added Default: No E No. is added.
J_: End E No. to be added Default: Only E No. of I command is added. J>=I
K_: Attribute of E No. added 0/1/2/4/6 Default: 0
0: User condition (Writable regardless of set data No.336, and erasable
regardless of set data No.336)
1: Makino standard condition (Not writable when set data No.336 bit 0 = 0, and not
erasable when set data No.336 bit 3 = 0)
2: User condition (Not writable when set data No.336 bit 1 = 0, and
erasable regardless of set data No.336 bit 2)
4: User condition (Writable regardless of set data No.336 bit 1, and not
erasable when set data No.336 bit 2 = 0)
6: User condition (Not writable when set data No.336 bit 1 = 0,and not
erasable when set data No.336 bit 2 = 0)
P_: Option command unit 0-4, Unit for length specified by G10 L21
0: Screen display unit
1: Standard resolution in mm
2: High resolution in mm
3: Standard resolution in inch
4: High resolution in inch
Example 1. G10 L20 I9199 (K6) ; Add E9199 only
Example 2. G10 L20 I9200 J9299 (K6) ; Add E9200 to E9299
Example 3. G10 L20 I9300 P2 ; Add E9300 and set high resolution in mm for
length of G10 L21
Example 4. G10 L20 P2 ; E No. is not added, but high resolution in mm for
length of G10 L21 is set.
Note 1. P_ command: The unit of option command is initialized to “0” at power ON.
Once the P_ command is specified, it is kept until the next
power ON.
Note 2. I_J_ : The last E No. (registered condition E No.) specified with I_ or J_ is
initialized to “1” at the power ON.
The last E No. (registered condition E No.) specified here is kept until the next
power ON.
For G10 L21, the condition is registered to this E No. if I is omitted.

7–47
(9) Registration of machining conditions (K type power supply units, G10 L21 command)
Machining condition elements of E numbers already exist on the COND LIST screen can be
changed.
Format: G10 L21 (I_) (J_) (K_) (P_) (Q_) (R_) ; ( ): omissible
I_: Objective E No. registered Specify objective E No. for registration.
(Default: Modal registered condition E No.)
J_: Start element No. Specify the element No. listed in Table 7.10.1
Machining condition elements.
(Default: Modal registered element No.)
K_: Element set value (1) Default: Element No.(J+0) is skipped
P_: Element set value (2) Default: Element No.(J+1) is skipped
Q_: Element set value (3) Default: Element No.(J+2) is skipped
R_: Element set value (4) Default: Element No.(J+3) is skipped

Example 1. G10 L21 I9000 J1 K0.2 ; Set E9000 WIRE DIA. of element 1 to 0.2mm.
Example 2. G10 L21 I9000 J5 K6 P5 Q4 R3 ;Set E9000 ONA, ONB, ONC, OND values of
elements 5-8 to 6, 5, 4, 3 respectively.
Example 3. If machining conditions are output with G151, one machining condition can be
output by combining G10 L20 and G10 L21.
The following shows an output example of E1031 only by executing G151 S101
E1031 M02 ;.

G10 L20 I1031 K1 P2 ; .......................E1031 added, Makino standard conditions, high


resolution in mm
G10 L21 J1 K2500 P1 Q50000 R0; ....Elements 1-4: WIRE DIA., MATERIAL,
THICKNESS, MODE
G10 L21 K32 P32 Q15 R20 ; ..............Elements 5-8: ONA, ONB, ONC, OND
G10 L21 K60 P5 Q100 R100 ; ............Elements 9-12: OFF, TS, TCT, RCT
G10 L21 K10 P10 Q8 R8 ; ..................Elements 13-16; DCHG-S, DCHG-R, SV, RV
G10 L21 K25 P7 Q0 R0 ; ....................Elements 17-20: IPM, IPS, SV.MODE, SV.NO.
G10 L21 K150 P110000 Q51 R0 ; ......Elements 21-24: SV.ADJ, SPEED, SM-REF,
PRG-ON
G10 L21 K3 P11 Q1 R85 ; ..................Elements 25-28: ADC-ON, ADC0-1, ADC0-2,
ADC1-1
G10 L21 K40 R4 ; ...............................Elements 29, 32: ADC1-2, ---, ---, WATER
G10 L21 K100 P100 Q12 R9 ; ............Elements 33-36: OVERRIDE U, L, WIRE
SPEED, TENSION
G10 L21 K30 P0 Q90000 R0 ; ............Elements 37-40: CONDUCTIVITY,
CONTENTS, EST.SPEED,
PRG0-1

7–48
G10 L21 K0 P0 Q0 R0 ;...................... Elements 41-44: PRG0-2, PRG0-3, PRG0-4,
PRG1-1
G10 L21 J49 K0 P0 Q0 R0 ; ............... Elements 49-52: ADC2-1, ADC2-2, ADC3-1,
; ADC3-2
G10 L999 P822 R3 M02 ;................... Version data is output at the end of G151

Note 1. I_ command: Objective E No. (registered condition E No.) specified with I_ is


initialized to “1” at the power ON.
Objective E No. (registered condition E No.) specified with I_ is kept until the
next power ON.
For G10L21, the condition is registered to this E No. if I is omitted.
Note 2. J_ command: The start element No. specified with J_ is initialized to “0” at the
power ON.
The last element No. (element No. registered) specified here is kept until the
next power ON.
For G10 L21, the condition is registered to this element No. if J is omitted.

(10) Deletion of E numbers (K type power supply units, G10 L22 command)
Unnecessary E numbers on the COND LIST screen can be deleted.
Format G10 L22 I_ (J_) (K_) ; ( ): omissible
I_: Start E No. to be deleted Default: No E No. is deleted.
J_: End E No. to be deleted Default: Only E No. specified with I is deleted. J>=I
K_: Attribute of E No. deleted 0:User, 1:Makino, 2:Both (Default: Both)

Example 1. G10 L22 I1 J9999 (K2) ; Delete all of E1-E9999


Example 2. G10 L22 I1 J9000 (K2) ; Delete E9000 only
Example 3. G10 L22 I1 J8899 K1 ; Delete only Makino conditions of E1-E8899
Example 4. G10 L22 I9000 J9999 K0 ; Delete only user conditions of E9000-E9999
Note 1: In deleting E numbers by G10L22 command, the E number deletion is executed,
ignoring the set data No.336 (Condition Protect Function) and the deletion
disabling attribute of each E number.
Note 2: In deleting E numbers by G10L22 command, the E numbers (E8980-E8999)
reserved by the system are not deleted, but skipped.

7–49
(11) Reference of machining conditions (K type power supply units, G10 L23 I_
command)
On the COND LIST screen, execution enabled/disabled, attribute, and next E No. of the E
numbers can be confirmed.
Format: G10 L23 I_ ;
I_: E No. to be referred to Default: No E No. is referred to.

Output #9509 = 0: Execution enabled, < > 0: Execution disabled


Output #6100 = 0/1/2/4/6: Attribute of reference condition, Unconditional= 0
Output #6101 = 0: Next E No. not found, < > 0: Next E No.

Example: G10 L23 I9000 ; If E9000 is referred to, #9509, #6100, and #6101 are
substituted.

(12) Copy of machining conditions (K type power supply units, G10 L23 I_ J_ command)
The machining conditions can be copied to another E No. on the COND LIST screen.
Forma: G10 L23 (I_) J_ ; ( ): omissible
I_: Original E No. 1-9999, Default: Original E No. = Current condition
J_: Destination E No. 1-9999, Default: No copy is made, J < > I
Output #9509 = 0: Copy completed, < > 0: Copy not completed
Output #6100 = 0/1/2/4/6: Attribute of reference condition, Unconditional = 0, Default I = 0
Output #6101 = 0: Next E No. not found, Default I = 0, < > 0: Next E No.

Example 1. G10 L23 I9000 J9001 ; E9000 is copied to E9001


Example 2. G10 L23 J9002 ; Current condition is copied to E9002

Note 1: In copying the machining conditions by G10L23I_J_ command, the copy of


machining condition is executed, ignoring the set data No.336 (Condition
Protect Function) and the write protect attribute of each E number.
Note 2: In copying the machining conditions by G10L23I_J_ command, no copy is
made if E number specified with I_ or J_ does not exist.

7–50
7.11 Work Limit (G22 and G23)

The work limit function becomes valid/invalid by the following codes

Code Function
G22 Work limit ON
G23 Work limit OFF

G22 sets up an inhibit area in machining strokes, besides the soft limit provided at the machining
stroke end. The area can be established anywhere on any axis. G23 cancels G22.

Usually, it will be more convenient if the LIMIT key for each axis on the MACH OPE screen is used.
(See Operation Manual)

Plus side soft limit


(at a fixed position)
Inhibit area
Plus side work limit

Machining stroke
(at any position)

Minus side work limit


(at any position)
Minus side soft limit
Machine origin Machining stroke (at a fixed position)
Minus side work limit
(at any position)
Minus side soft limit
(at a fixed position)

Plus side work limit


(at any position)
Plus side soft limit
(at a fixed position)
Format: G22 (X__I__) (Y__J__) (U__K__) (V__L__) ; ( ): omissible
X, Y, U, V: Specify machine coordinate values of the plus side work limit of each
axis.
I, J, K, L: Specify machine coordinate values of the minus side work limit of the
X, Y, U and V axes.
Values must be X>I, Y>J, U>K, and V>L.
G23 ; ............ Programmed in a block consisting of itself.

Only the boundaries of the work limit of each axis can be specified by X, I, Y, J, U, K,
V and L in G22. Whether to set up the inhibit area inside or outside the boundaries is
determined by a parameter.

0: Inhibit area is outside the boundaries (Standard setting)


Parameter No.70 bit 0
1: Inhibit area is inside the boundaries

7–51
Parameter No. 70 …… 0 (Standard setting) Parameter No. 70 …… 1

Inhibit area

Inhibit area

Y (V)

Y (V)
J (L)

J (L)
Machine I (K) Machine I (K)
origin origin
X (U) X (U)

Example: When setting work limits for X and Y axes.

Y Y
245

245
5

5
Machine 4 X 4 X
origin 296 296

Inhibit area set up outside work Inhibit area set up inside work
limits parameter No. 70 …… 0 limits parameter No. 70 ……1
(standard setting)

Program (common)

%;
G22 X296000 Y245000 I4000 J5000 ;
………

Normal program

G23 ;
M30 ;
%

Note 1: G22 and G23 are modal codes and they do not change by the RESET , M02 or
M30. G23 is selected at the time of power on.
Note 2: The work limit is active only during automatic operation (MDI, MEM RUN), but it
is inactive in the manual mode.
Note 3: The work limit may be omitted for the axis that does not need it.
G22 X296000 I4000; A work limit is set for the X axis only.
Note 4: Be sure to specify both positive (+) and negative (–) side boundaries for axes
requiring work limits. Omitting both side boundaries causes an alarm (1023:
G22 COMMAND ERROR).
G22 X296000; As a negative (–) side command is missing, an alarm results.
Note 5: If the end point of a movement command is inside the inhibit area while the
work limit function is on, the movement command is not executed, resulting in
alarm (1024: MOVEMENT END COORD. WITHIN PROHIBITED AREA).
Note 6: No alarm occurs though the current position is inside the inhibit area when the
work limit is on. In this case, however, it is recommended that the axis be
moved outside the inhibited area at first.

7–52
7.12 Taper Corner Tangential Insertion (G24)

As opposed to the corner R (R) on the program plane in taper machining, G24 inserts a corner R (L)
of any radius on the sub plane, which is programmed in a corner R block.

* The corner R here refers to an arc contacting both the preceding and
following blocks (they may be a linear or an arc).
L

T2
R By programming G24, it is possible to change the taper angle of the
corner R which is usually impossible in normal taper machining.
T1
Furthermore, by programming G24L, the radius on the sub plane can
SP
be specified.

G02
(1) Format: G24 (L_) (T_) { } X__ Y__ I__ J__ ;
G03

G24: Taper Corner Tangential Contact Insertion command


L_: Specifies the tangential contact on the sub plane.
If L_ is omitted, the radius will be automatically determined by the taper angle, offset
amount and corner R programmed radius of the preceding and following blocks.
T_: Specifies the taper angle of the block following the corner R of G24. If T_ is omitted,
the taper angle of the following block will be the same as that of the block preceding
the corner R.

G24 is a one-shot G code and not modal; it is valid only for the corner R of the current block.

Example 1: Figure of an angle of 20 mm and corner R of 4 mm on the program plane

%;
G92 X0 Y0 ;
M17 ;
G91 G01 Y-10000 G42 D1 G51 T1000 ;
T3°
R3

R6

X-6000 ;
.9
5

G02 X-4000 Y4000 J4000 G24 L2000 T2000 ;


4–R4 G01 Y12000 ;
T2° T4°
G02 X4000 Y4000 I4000 G24 L3950 T3000 ;
G01 X12000 ;
G02 X4000 Y-4000 J-4000 G24 L6000 T4000 ;
R
T1°

G01 Y-12000 ;
R2

G02 X-4000 Y-4000 I-4000 G24 T1000 ;


G01 X-5700 M01 ;
X-300 ;
G40 G50 Y10000 M30 ;
%

7–53
Example 2: Figure including arc blocks


L2
.1
L2

R8
.1
N3 N4 N5 N6
0.5°
N2

L2
.1
N7 Sub plane


N1 For corner arcs Program plane
whose value is R2 (Program plane)
not specified L6 (Sub plane)
0.5° N8
0.5°


%;
G92 X0 Y0 ;
G42 G51 T0 M17 G91 G01 Y-10000 ;
X-34450 ;
T500 Y25951 ;
N1 G24 L2100 T500 G02 X718 Y1535 I2000 ;
G01 X11518 Y9665 ;
N2 G24 L2100 T500 G03 X714 Y1536 I-1286 J1532 ;
G01 Y2013 ;
N3 G24 L2100 T2000 G02 X2005 Y2000 I2000 ;
G01 X10467 ;
N4 G24 L6000 T2000 G03 X1806 Y1142 J2000 ;
G02 X14446 Y-417222 J-3442 ;
N5 G24 L6000 T2000 G03 X1806 Y-1138 I1804 J862 ;
G01 X9470 ;
N6 G24 L6000 T500 G02 X2000 Y-2000 J-2000 ;
G01 Y-11614 ;
N7 G24 L6000 T5000 G03 X717 Y-1535 I2000 ;
G01 X13219 Y-11091 ;
N8 G24 L6000 T500 G02 X714 Y-1538 I-1286 J-1532 ;
G01 Y-14919 ;
T0 X-35150 ;
G40 G50 Y10000 M30 ;
%

7–54
(2) Wire path in the G24 mode
The wire path on the sub plane is determined as follows.
Example: G41 D1 G51 T1 ... ;

……
G01 Y10000 ;
G02 X15000 Y15000 I15000 G24 (L4000) T2 ;
G01 X20000 ;

……
(a) When L is programmed

L2´

D
C1´
Wire path on the sub-program plane
Sub-program plane

T2
Wire path on the program plane
Program plane
C1 L2

D T1

L1
L1´

Fig. 1

1 In Fig. 1, let programmed figures L1 and L2 of the preceding and following blocks
offset by T1+D and T2+D be L1´ and L2´ respectively.

2 Insert arc C1´ of the radius of programmed L plus D so that it will be in contact with
L1´ and L2´.
If the offset amount specified by a machining condition is D, the corner radius on the
sub plane after machining is L.

7–55
(b) When L is omitted

D L2´
Wire path on the sub-program plane
C1´ Sub-program plane

T2

Wire path on the program plane
Program plane
L2
R
P1´ C1
D T1 O

L1´ L1

Fig. 2

1 In Fig. 2, let programmed figures L1 and L2 of the preceding and following blocks
offset by T1+D and T2+D be L1´ and L2´ respectively.

2 Insert arc C1´ between L1´ and L2, whose radius R’ (=R+T1+D in Fig. 2) is normal
OP1´ connecting the figure (L1´ in Fig. 2) offset by the lower absolute value (T1+D in
Fig. 2) with center O of programmed arc C1.
If the offset amount specified by a machining condition is D, the corner radius on the
subprogram plane after machining is R+T1 in Fig. 2.

* When the preceding and following blocks are arcs, the wire path on the sub plane is
decided in the same way.

7–56
(3) Directions on the use of G24
(a) Directions on the figure
1 The G24 block specifies a circular arc and it must be tangential to both previous and
following blocks. The parameter No. 83 (OFST LOCU TANGL LMT) determines
whether these blocks are tangential or intersectional. If intersectional, the alarm results
[1058: G24 ERROR (NOT TANGENT TO BEFORE, AFTER BLKS)].

2 The center of circular arc in G24 block must not be same as that of previous and
following blocks. If same, the alarm results (1059: G24 ERROR (INTERSECT.
CANNOT BE DETERMINED)].

(b) Directions on the program


1 The following conditions must be met in a block specified by G24 and the preceding
and following blocks.
• They must have no wire radius compensation code (G40, G41 or G42).
• They must have no taper machining code (G50, G51 or G52).
• They must have no automatic wire loading code (G89, M06 or M07).
• They must have no identical R code (G49) for the top and bottom faces.
• They should have no block without movement.
• They should have no consecutive G24 blocks.

(c) Directions before machining


1 Prior to taper machining, be sure to draw figures at the height of the program plane and
the sub plane in the drawing (Taper mode = 1 or 2) and confirm their figures.

2 In a figure where the taper angle is changed in an arc block like G24 and G49, the line
contacting the preceding and following blocks is geometrically not straight.
However, in actual taper machining, wire electrodes are stretched linearly, and all lines
created become straight, so that they are set up by approximate figures.
Therefore, when changing the taper angle of an arc (G24 and G49), different set
dimensions on the sub plane for executing graphic processing require contact and
intersecting points at different positions between blocks even in the same program.
When using G24 or G49, careful attention should be paid to the dimensions on the sub
plane.
Especially when machining the inner or outer area of a workpiece in the same program,
the dimensions on the sub plane should be set identically, regardless of the thickness of
the workpiece.

7–57
7.13 Spiral Interpolation (G25)

When changing the compensation amount (D) or angle (T) in the radius compensation mode (G41
and G42) or taper mode (G51 and G52), program G25 to change them by spiral interpolation
gradually.
G25 is a one-shot G code; it is valid only in the current block, and replaced by D or T at the end of
the block.
Usually, G25 is programmed together with D or T in the block where the compensation amount (D)
or angle (T) is to be changed gradually on an arc as in example (1) and (3).
This function can also be used in such applications as shown in example (2) - (4) below.

Example:
(1) On an arc contacting the preceding and following blocks
[Spiral interpolation]
Segment a specified arc at fixed intervals, and depending on the number of segments, insert
two or more arc blocks that have different centers and radii between the preceding and
following blocks. In this case, these segments do not contact the preceding and following
blocks at the contact points. If the segments must contact them at the points, use G24 (Taper
Corner Tangential Contact Insertion).

1 G25 is not programmed 2 G25 is programmed


[Spiral interpolation]
G41 (G42) D1 ;
G41 G41
D1


D1
D1 D2 D2 D1
G42 G42 G01 X20. ;
D2 D2 G02 X10. Y-10. J-10. G25 D2 ;
G01 Y-20. ;
……

(2) On a linear line contacting the preceding and following blocks

1 G25 is not programmed 2 G25 is programmed


[Linear change]
G41 (G42) D1 ;

D1 G41 D1 G41
D1 D1 G03 X10. Y-10. I10. ;
G42 G42
D2 D2 G01 X10. G25 D2 ;
D2 D2 G02 X10. Y-10. J-10. ;
……

7–58
(3) On an arc contacting either the preceding or following block

1 G25 is not programmed 2 G25 is programmed


[Spiral interpolation]
G41 (G42) D1 ;


D1 G41 D1 G41
D1 D2 D1 G01 X20. ;
G42 D2 G42
G02 X10. Y-10. I-30. J-30. G25 D2 ;
D2 D2 G01 Y-10. ;

……
(4) On a straight line contacting either the preceding or following block

1 G25 is not programmed 2 G25 is programmed


[Linear change]
G41 (G42) D1 ;


D1 G41 D1 G41
D1 D2 D1 G01 X20. ;
G42 D2 G42
X10. Y-10. G25 D2 ;
D2 D2 Y-10. ;

……
Note: When spiral interpolation is executed, the following formula is used to
calculate the length of an arc segment.
Length of an arc segment = 50 µm + (parameter No. 730) µm
Parameter No. 73 standard set value: 0 (unit: µm)

7–59
7.14 Rotation Copying (G26)

The rotation copying function is used to machine a programmed figure repeatedly in the form of a
subprogram by rotating it on a specified position. This function, by using only a part of the figure,
can simplify the program in which the same shape appears at regular intervals when it is rotated,
such as gear, motor core, etc.

5
5

R2.
The rotation copying function of
d 1 the automatically programmed
Metho device is used to create a tape

10
according to the machining shape.
Meth
od 2 +G26

Example of the A part of the program


machining shape

Selection of the rotation copying function of the automatically programming device or G26 should
be made by taking into account machining shape, number of repetitions, complicatedness of a
program and editing, tape length, etc.

(1) Format: G26 (X_) (Y_) (S_) A_ (O_) (P_) (R_) (M_) (B_) (Q_); ( ): omissible
X, Y: Rotation center (by absolute of incremental values)
S: Copying start angle (0° - ±360.000°)
A: Rotation copying angle (0° - ±360.000°)
O: Program No. of a subprogram to be called (1 - 9999)
P: Sequence No. of a subprogram to be called (1 - 9999)
R: No. of repetitions for copying (0 - 9999)
M: To stop a program temporarily after rotation copying is executed once, M01 or M00 is
programmed.
B: Specifies the number of blocks (1 to 256) counted from the head of a called program to
execute rotation copying after it is executed for the number of times specified by R.
Omission of B results in ending the subprogram after rotation copying is executed for
the number of times specified by R. Usually, B is omitted.
Q: Number of segments (0 - 99.99)

The following is a program by G26, in which machining starts at the center in the above figure.
Example 1:
5

Main program Y 5
R2.

%; O1
G92 X0 Y0 ;
M17 ;
10

G91 G01 G42 Y10000 D1 ;


(M01) Start X
G26 (X0) Y-10000 (S0) A-90000 O2 (P3) R4 (M01) ; point
G40 G01 Y-10000 ;
M30 ;
%

7–60
Sub program (O2)
%; O2 N3
N3 (G01) X5000 ;
G02 X5000 I2500 ;
G01 Y-10000 M99 ;
% End of the subprogram

(2) Position of the center (X and Y)


Incremental values specify the position of the center seen from the position at which G26 was
programmed. In the example above, (X0)Y-10000 is programmed.
Absolute values specify work coordinate values of the center. Here, G90X0Y0 is
programmed.

Note 1: Omitting the position of the center sets it to


the point at which G26 was programmed. Start point
Note 2: The center of rotation must be at an equal
distance from the start and end point of a Center End point
subprogram to be copied.

(3) Copying start angle (S)


The copying start angle is used to specify the angle of the first copying formed at the center. A
positive (+) value is given for counterclockwise rotation and a negative (–) one for clockwise
rotation. In the example, (S0) is programmed since the first rotation direction is the same as in
the subprogram. Subprograms are usually prepared so that the copying start angle becomes
S0. Omitting S is the same as programming S0. Rotating the entire machining shape usually
requires (G68) instead of S, as shown in example 2.

Example 2:
Sub program (O2)
%;
5

5 O2 N3
Y 45° R2. N3 (G01) X5000 ;
G02 X5000 I2500 ;
X G01 Y-10000 M99 ;
%
10

Main program
%;
G92 X0 Y0 ;
G68 (X0) (Y0) R-45000 ; Rotation at -45°
M17 ;
G91 G01 G42 Y10000 D1 ;
G26 (X0) Y-10000 (S0) A-90000 O2 (P3) R4 (M01) ;
G40 G01 Y-10000 ;
G69 ; Rotation off
M30 ;
%

7–61
(4) Rotation copying angle (A)
Specifies the rotation angle in each copying in a subprogram when copying is executed two or
more times. It usually programs an angle formed by the lines between the center and the start
point and the end point. A positive (+) value is given for counterclockwise rotation and a
negative (-) value for clockwise rotation.

Start point

A In this example, A-90000 is programmed.


Center End point

The minimum command value is 0.001°. For segmentation at an angle lower than the
command value, use Q (number of segments).

Note 1: Omitting A causes an alarm. (1057: G26 COMND ERROR).


Note 2: Programming A0 repeats copying at the same position.
Note 3: When Q (number of segments) is used, see (8).

(5) Program No. (O) and sequence No. (P) of a subprogram to be called
A subprogram to be called should be given a program number of a sequence number (N) in its
first block. A subprogram is called by using O (program No.) or P (sequence No.).

Sub program
O2N3 %;
(N3) G01 X5000 ; During wire radius compensation,
G02 X5000 I2500 ; avoid creating blocks with no
G01 Y-10000 M99 ; movement whenever possible.
%

Note 1: Omitting O is equivalent to selecting the program number of the program


that is currently in execution (main program).
Note 2: Omitting P calls the head of a program specified by O.

(6) Number of repetitions for copying (R) 5


5
R2.

Specifies the number of times for rotation


copying of a subprogram. In example 1, R4
is programmed.
10

Note 1: Omitting R executes copying only once.


Note 2: Programming R0 does not execute copying.

7–62
(7) Temporary stop of rotation copying (M01 or M00)
By M01 or M00 in the G26 block, copying stops temporarily after it is executed once.
Pressing the START key resumes copying. In example 1, R4 is programmed, and copying
stops after it is executed three times by M01 or M00.

5
5

R2.
O2
(G91)

10
G26 X0 Y-10000 S0 A-90000 O2 R4 M00 ;
M00
(M01)

Note 1: M01 (optional stop) stops copying temporarily only when the OPT. STOP
key on the NC FUNC screen is turned on. M00 always stops copying
temporarily.

(8) Number of segments (Q)


The minimum command value of the rotation copying angle (A) is 0.001°. Therefore, more
accurate segmentation uses the command of the number of segments.

Example:
4.444° 0 When 360° is segmented into 81 equal parts, the
rotation copying angle per segmentation is 4.44444°.....
81st copying Let the rotation copying angle (A) be 4.444. Then the
359.964° angle at the end of the 81st rotation copying is 4.444° ×
81 = 359.964°. It is different from a desired angle of
360°.

Using Q (number of segments) in such a case, prevents lowering the degree for segmentation
in the NC device, minimizing an accumulated error.
Q: The number of segments divided at an angle specified by A (Ex. 81).
A: Angle for segmentation (Ex. 360)

Note 1: The copying start angle (S) at the time when Q (number of segments) is
programmed becomes the command of segmentation position for copying
start.

Copying start angle = A x S (segmentation position for copying start)


Q

7–63
(9) Additional precautions on rotation copying

(a) Further calling another subprogram by G26 or M98 from the subprogram called by G26
causes an alarm (1005: G48, G68 or G26 OVERLAP COMND).

(b) If coordinate system rotation or G68 (rotation) is programmed before G26 is selected, the
center for rotation and the corner forming the copying start angle of G26 move.

Example: G68 and G26


Y
%;
1
G92 X0 Y0 ;
4
G68 R45. ;
2 G01 X50. Y30. ;
2 45°
Center for 1 G26 X-20. Y0 A90. P1000 R4 ;
copying
M02 ;
30
N1000 G03 X-20. Y20. I-20. M99 ;
3
%
3 4
°
45

0 30
50 X
Center for rotation

(c) If the scaling of G48 is programmed before G26 is programmed, the center for rotation of
G26 is subject to scaling.

Example: G48 and G26

%; Y
G92 X0 Y0 ;
G48 P500 ;
G01 X50. Y30. G91 ;
ing
G26 X-20. Y0 A90. P1000 R4 ; scal
f ter
M02 ; Original center ga
yin
for copying c op
N1000 G03 X-20. Y20. I-20. M99 ; 30 for
r
nte
Ce
%

0
30 50 X
Center for
scaling

(d) G26 is a one-shot G code.

7–64
(e) Using G26 facilitates the preparation of a program when machined holes exist on the
circumference as shown in the following example.

Example: Continuous machining of 12 holes of φ10 on the circumference


Machining order
%;
O26 ;
30°

Main program
G92 X0 Y0 ;
00
R1 G91 ; Continuous machining
G26 X0 Y0 A-30. P1 R12 ; of 12 spots
Start point G26 X0 Y0 A-30. P2 R12 ; Cutting off of 12 spots
M30 ;
N1 G91 G00 Y100. M06 ; From the start point to
E9001 ; holes to be machined
M17 ;
G01 G42 D1 X5. ;

Sub program 1
Y-5. ;
N1
X-10. ;
Y10. ;
X10. ;
100

Y-4.5;
G40 X-1.;
G90 G00 X0 Y0 M07 ; Return to the start point
Center
M99 ;
N2 G91 G00 Y100. M06 ;
N2 E9001 ;
Sub program 2

M17 ;
G01 G41 D1 X5. ;
100

Y0.5 ; Cut off


G40 X-1. ;
G90 G00 X0 Y0 M07 ;
M99 ;
%

7–65
7.15 Automatic Return to and from the Reference Point (G28 and G29)

(1) Automatic return to the reference point (G28)


Format: G28 G00 (X_) (Y_) (U_) (V_) ; ( ): omissible
or
G28 G00 (Z0 );
X, Y, U, V and Z: Specify the coordinates of the intermediate point in absolute or
incremental values of the work coordinate system. This function is
available for only one axis or four axes simultaneously.
However, the intermediate point of the Z axis must be specified singly.
The wire returns by rapid traverse to the reference point via the intermediate point specified in
the above format.
Example: Return to the reference point for X and Y axes (A→B→O)

Y Intermediate (G91) G28 G00 X-15000 Y30000 ;


point B
40

10 A
0
30 45 X
Reference point

The reference point for each axis is as follows:

Axis name
X & Y axes U & V axes Z axis
Item
Y -U and -V ends Lower end of the stroke
Origin of the Z
machine coordi- –X and
V
nate system and the –Y ends
V
plus directions
U U
X
Reference point Middle of stroke Wire vertical position Upper end of the stroke

Note 1: The machine coordinate system is disordered immediately after the power on.
To adjust it correctly, the reference point return operation must be performed.
For this purpose, execute the MDI operation or 2, f • 8 (MACHINE HOME) on the
RUN MANUAL screen as follows.
o X, Y, U and V axes

G91 G00 G28 X0 Y0 U0 V0 ; IN START

o Z axis
G28 Z0 ; IN START

7–66
Note 2: Use the cancel mode (G40 or G50) for wire radius compensation and taper
machining.
Note 3: In the first return to the reference point after power supply is turned on, the
wire, after passing the intermediate point, automatically reduces its speed in
the rapid traverse status to find a correct machine origin, as in manual return to
the reference point. In the second and subsequent returns after power is
turned on, the wire is positioned by rapid traverse at the reference point.
Note 4: G28 is a one-shot G code.

(2) Return from the reference point (G29)


Format: G29 G00 (X_) (Y_) (U_) (V_) ; ( ): omissible
or
G29 G00 (Z0) ;
X, Y, U, V and Z: Specify the desired position by absolute or incremental values of the work
coordinate system after the wire passes the intermediate point. This
function is available for only one axis or four axes simultaneously.
However, the intermediate point of the Z axis must be specified singly.

After execution of G28, the wire is positioned by rapid traverse at the specified point after
passing the intermediate point specified by G28.

Example: G28 and G29 for the X and Y axes

Y Intermediate (G91) G28 G00 X-15000 Y30000 ; (A→B→O)


point B (G91) G29 G00 X35000 Y-20000 ; (O→B→C)
40

20 C
10 A
0
30 45 65
Reference point O X

Note 1: Do not program G29 for the first return from the reference point after power
supply are turned on (because the machine coordinates are not correct after
G28 execution). G29 can be used in the second and subsequent returns.
Note 2: Execution of G29 without executing G28 causes an alarm (1032: G28, G29
COMND ORDER ERROR).
Note 3: G29 is a one-shot G code.

7–67
7.16 Return to 2nd-4th Reference Point (G30)

This function returns the specified axis to the 2nd to 4th reference point. The coordinate words
specified along with the G30 determine the point (intermediate point) to which the axis is
positioned before return to the reference point.

Format: G30 P_ (X_) (Y_) (U_) (V_) (Z_) (C_) ;

For the P, specify 2 to 4 (2nd ref. point to 4th ref. point).


For the X, Y, U, V, Z, C specify at least one axis to be moved with absolute or incremental value.
The G30 provides the function as shown in Note 1, and it is used internally. The user will not
necessarily use it unless a particular problem does not arise.
Example: G91 G30 P2 X0 Y0 U0 V0 ;

This command returns the XYUV axes to the 2nd reference point without an intermediate point.

Note 1: The 2nd to 4th reference points are used at present in the function as listed
below. Each value has been set in the machine coordinates to respective
parameter numbers listed below.

Reference points Function Parameter No.


2nd ref. point AWC zero point return *070
3rd ref. point Intermediate point for AWC zero point return *071
4th ref. point Wire edge regeneration point *072

Note 2: Upto 4 axes can be specified simultaneously.


However, if Z axis or C axis is contained, the maximum number of axes
specified at a time is 2.

7–68
7.17 Corner Shape Control (G43 and G44)

Corner shape control is provided with the following two functions.


Code Function
G44 Corner chape control ON
G43 Corner shape control OFF
During machining, wire electrodes are warped by discharge resilience, causing a delay of the wire
to the wire guides. The delay amount varies depending on machining conditions, distance between
the workpiece and the guides, wire tension, and workpiece thickness.
The delay produces a difference between the NC program path and the actual machining shape,
resulting in a corner error. This error tends to become greater at sharp corners.

Upper guide
Machining
Workpiece Delay direction Machining
direction

Lower guide
Delay

Programming G44 and the delay amount H can reduce a corner error. These two are usually
programmed in the same block. If H is omitted, the last H is kept valid.

Example: G41 G01 G44 H30 X10000 ;


Standard command value of the delay amount H and necessity of G44 for that machining condition
are displayed in the machining condition table, and therefore program them by referring to the
table.

Note 1: G44 and G43 are modal G codes. Pressing the RESET key or programming,
M02, M30, or G43 selects G43. G43 is programmed when power supply is
turned on. H is a modal code and is not changed by the RESET key, M02 and
M30. The H amount remains valid even when power supply is turned on.
Note 2: Delay amount H may be changed in the course of a program. In this case, the
shape is controlled by the specified value at the next corner. Usually, value H
need not be changed.
Note 3: Corner shape control (G44) is not valid in the following cases:
o Wire radius compensation (G41 or G42) is not executed.
o Until the original machining status is obtained after wire break or power
failure.
o A corner has a block with no movement during wire radius compensation
(G41 or G42).
Note 4: The second and subsequent cuts in a micron machining should be executed
with the corner shape control off (G43)

7–69
7.18 Corner Override (G45, G46)

The following two functions are available for corner override:


Code Function
G46 Corner override ON
G45 Corner override OFF
The corner override (G46, G45) improves the shape of corner (and circular portion) in the second
and subsequent machining, while the corner shape control (G44, G43) improves the shape in the
first machining. The corner override valid/invalid or its extent can be changed by the parameters
(No. 220 - 238).
General machining conditions such as a micron machining are prepared without a premise of using
corner coverride (G46). Therefore, this function is not always necessary.
Example: Micron machining program using this function
%;
O1 ; (Main program)
G44 H30 ; Corner shape control ON
E9001 D1 M98 P1 ; 1st machining
G43 ; Corner shape control OFF
G46 ; Corner override ON
E9002 D2 M98 P1 ; 2nd machining
E9003 D3 M98 P1 ; 3rd machining
M30 ;
N1 ; (Machining shape subprogram)
G91 G01 G41 Y-5000 M17 ;
……

G40 G01 Y5000 M99 ;


%
Note 1: G46 and G45 are modal codes, and G45 is selected by RESET , M02, M30 or
G45. Also, G45 is selected at the time of power on.
Note 2: In either of the following cases, the corner override is disabled even if the G46
is programmed.
(1) Wire radius compensation (G41 or G42) is not specified
(2) Wire break recovery or power failure recovery is being executed
(3) There is an interference block or additional block by the wire radius compensation
(4) Preceding, following, or that block contains G00
(5) Preceding, following, or that block contains machining off command (M18, M06, M07).
(6) Preceding or following block of that block does not contain the move command.
Note 3: If G44 and G46 are programmed in the same block, G44 (corner shape control)
functions, but G46 (corner override) does not.
Note 4: For the improvement in machining techniques, the micron machining
conditions with a premise of changing parameters and using G46 may be
prepared.

7–70
7.19 Scaling (G47 and G48)

Scaling has the following two functions.

Code Function
G48 Scaling ON
G47 Scaling OFF

G48 enlarges or makes small programmed figures. This function is useful for program check of
small shapes or for machining of plastic molds in which shrinkage is allowed for.
G47 cancels G48.

Format: G48 (X___) (Y__) (P__) ; ( ): omissible

X and Y: Specify the position of the center for scaling by absolute or incremental values.
Omitting X and Y sets the center for scaling to the point at which G48 is
programmed.
P: Specifies the scale factor (0 - 99.999).
Omitting P selects the scaling factor programmed in scaling on the offset screen of
the SET screen. Specify P0 results in P1000 (scale factor of 1).
G47 is programmed in a block consisting of itself.

Example 1: Machining with a scale factor of 1.02 (the start point is the center for scaling)

Y Program Y Machining
(φ10) (φ10.2)
10 10

0 0
10 10
X X

%;
G92 X10000 Y10000 ;
M17 ;
G91 ;
G48 X0 Y0 P1020 ; The point at which G48 programmed is the center for scaling
G41 G01 Y-5000 ;
G03 J5000 ;
G40 G01 Y5000 ;
G47 ; Scaling OFF
M30 ;
%

7–71
Example 2: Position of the center for scaling and the machining shape (scale factor of 2)

(a) Programmed shape (b) The center of the (c) The start point is
not enlarged machining shape is the the center for scaling
center for scaling

End point

20
Y Y Y Start point
35 Start point 35 Start point 35 Center for
scaling
φ10 φ20
20 20
φ20
Center for
scaling 5
0 0 0
20 X 20 X X

%; %; %;
G92 X2000 Y35000 ; G92 X20000 Y35000 ; G92 X20000 Y35000 ;
M17 ; M17 ; M17 ;
G91 G42 G01 Y-10000 ; G91 ; G91 ;
G03 J-5000 ; G48 (X0) Y-15000 P2000 ; G48 (X0) (Y0) P2000 ;
G40 G01 Y10000 ; G42 G01 Y-10000 ; G42 G01 Y-10000 ;
M30 ; G03 J-5000 ; G03 J-5000 ;
% G40 G01 Y10000 ; G40 G01 Y10000 ;
G47 ; G47 ;
M30 ; M30 ;
% %

Note: In machining in which the position of the machining shape is very important as
in the case of (b), when the point at which G48 was programmed (start point) is
not positioned at the center for scaling, the end point is positioned as shown
above. This is not a good program. In such a case, it is recommended to start
a program from the center for scaling, as shown in example 3 below.

Example 3: Scaling at the time when the center for scaling is not the same as the position of the
machining start hole (scale factor of 2).
Actual machining size
Y
Machining start hole

Machining shape
Y not enlarged
Program start point
= Center for scaling
φ10
20 20

0 0 X
20 X 20

7–72
%;
G92 X20000 Y20000 ; The program start point is designated as the center for scaling.
G91 ;
G48 (X0) (Y0) P2000 ; G48 is programmed at the center for scaling.
G00 Y15000 M06 ; The wire moves to the machining start hole and is loaded.
M17 ; Machining ON
G42 G01 Y-10000 ;
Machining shape program
G03 J-5000 ;
G40 G01 Y10000 ; The wire returns to the machining start hole.
G00 Y-15000 M07 ; The wire is cut off, and returns to the center for scaling.
G47 ; Scaling OFF
M30 ;
%

Note 1: G48 and G47 are modal G codes. Pressing the RESET key and programming
M02 and M30 selects G47. When power supply is turned on, G47 is selected.
Note 2: Pressing the RESET key and programming M02 and M30 selects P0. When
power supply is turned on, P0 is selected.
Note 3: Do not program G48 and G47 during wire radius compensation (G41 or G42).
Note 4: The dwell time, taper inclination angle and offset amount are not subject to
scaling.
Note 5: Programming of plural G48 commands causes an alarm (1005: G48, G68 or G26
OVERLAP COMND).
Note 6: To change the work coordinate system to another one with G48 kept
maintained, see Section 8.2 Coordinate System Changeover at the Time a
Multiple Command is Executed
Note 7: Scaling can be used together with rotation, X/Y axis change, and mirror image.
When scaling is specified together with mirror image on the NC FUNC screen,
mirror image is applied to the shape subject to scaling.
For details, see Section 8.1
Note 8: As in rotation, mirror image and X/Y axis change, scaling is valid in memory
operation, but not in MDI operation (standard setting by a parameter No. 87).

7–73
7.20 Same radius on the top and the bottom faces (G49)

The G49 function forms the corner circles, between two lines, having the same radius on top and
bottom faces in a taper machining.
Ordinary taper machining Taper machining by using G49

R
R
R

Top Bottom
face face
Top Bottom
face face

G49 is a one-shot G code, and is programmed in an arc block where R is the same on the top and
bottom faces.

Example: Same R both on the top and the bottom faces that contact straight lines whose taper angle
is 2°.
%;
G92 X0 Y0 ;
M17 ;
Taper of 2°

R12 R10
G91 G01 G42 G51 Y-20000 T2000 D1 ;
R30 R20 X-80000 ;
G49 G03 X-12000 Y-12000 J-12000 ;
G01 Y-48000 ;
130
G49 G03 X30000 Y-30000 I30000 ;
G01 X130000 ;
G03 X20000 Y20000 J20000 ;
G01 Y60000 ;
G03 X-10000 Y10000 I-10000 ;
G01 X-78000 ;
G40 G50 Y20000 M30 ;
%

Note 1: The blocks preceding and following an arc block in which G49 is programmed
must be straight lines.
Note 2: The following three requirements must be met so that machining is performed
properly at programmed wire inclination angles (T) of the blocks preceding and
following an arc block in which G49 is programmed.
(a) The wire inclination angle (T) must not be specified in an arc block in
which G49 is programmed.
(b) The center of an arc for which G49 is programmed must be on the bisector
of the straight lines of the preceding and following blocks.
The following cases meet the requirements of (a) and (b) above.

7–74
Example 1: Example 2: Example 3:
Same R at a round corner Same R at a convex corner Same R at a concave corner

T1
T1 T1

T1 T1

T1
Note 3: When the wire inclination angle (T) is specified in an arc block programming
G49, the same R is obtained at an angle specified on the bisector of an arc.
This causes wire inclination angles of the
preceding and following straight line blocks to
change gradually until the specified angle is
obtained in the G49 block. Some examples are
shown below.

Example 1: T specification in G49 in the case where it is set to a value other than T0 in the
preceding and following blocks.

%;
G92 X0 Y0 ;
M17 ;
r °
pe 1 G91 G01 G41 G52 Y-15000 T2000 ;
Ta ngle
a X20000 (T2000) ; ← Preceding block
angle 2°

G49 G02 X10000 Y-10000 J-10000 T1000 ;


Taper

R
G01 Y-20000 T2000 ; ← Following block
X30000 ;
R
……

Bottom face
angle 2°
Taper

Top face (Program plane)


Taper
angle 2°

7–75
7.21 Machining Coordinate System Selection (G53)

This command specifies the position in the machining coordinate system during execution of a
program in the work coordinate system.

G00 G53 (X__) (Y__) (U__) (V__) ;


or
G00 G53 Z__ ;

G53 is one-shot G code effective for G00 and G01. The axis exchange, mirror image, scaling and
rotation are not applied to the G53 block.
Both absolute (G90) and incremental (G91) data can be programmed in the machine coordinate
system.

7–76
7.22 Work Coordinate System Selection (G54-G61, G500-G515)

There are 16 groups in the work coordinate system from G500 to G515, each having 8 work
coordinate systems of G54-G61. Total 16x8=128 coordinate systems can be used.
Specify either group of G500-G515, then either of G54-G61, so that the specified work coordinate
system of the specified group is selected.

Example 1:Setting of a work coordinate system

G500 G55 G92 X0 Y0 ; G500 group, G55 become modal and current position
becomes the origin of the work coordinate system (G55).
G59 G92 X20000 Y10000 ; (G500 group kept active) G59 becomes modal and current
position is located at X20mm and Y10mm in the work
coordinate system (G59).

(G500 group)

Y
Current wire position
(G55)
10
0 X
(G59) 0
20 X

Example 2: Shift across groups and work coordinate systems

Y (Shift from G500 G54 to G501 G55)


The modal changes to G501 G55.
20

0. ;
20. Y3
1G 55 X
90 G50 0
G0 G 30 X
G501 G55
0
X
G500 G54

For changeover of the coordinate system while axis change, mirror image of the NC FUNC , G26,
G48, G68, G71 or G73 are programmed, see Section 8.2.
Generally, one work coordinate system should be used for one workpiece or for one group of
programs and the number of work coordinate systems should be kept minimal.
Use G500-G515 groups where eight work coordinate systems are not enough, or optional pallet
magazine is used.

7–77
Y Workpiece G55
Workpiece A Y
G54
(G54) X
0
X
Y (G55)
Workpiece B
0
X

Example 3: Continuous machining of two separate workpieces (workpiece A and workpiece B are
machined in order)
Set respective origins of workpiece A and
workpiece B to G54 and G55 using the touch
sensing, and then execute the following program
Y from the G54 origin.
Workpiece A
9 φ5 Y
0
8 X
G54 Workpiece B
% ;
5×10
?
G500 ;
15 G54 G92 X0 Y0 ;
G55 0 10 G00 G91 X8000 Y9000 M06 ;
X
M17 ;
? G01 G41 Y-2500 D1 E9001 ;
G03 J2500 ;
G40 G01 Y2500 ;
(G500 group) G00 G55 G90 X10000 Y15000 M06 ;
M17 ;
G91 G01 G41 Y5000 D2 E9002 ;
X-2500 ;
Y-10000 ;
X5000 ;
Y10000 ;
X-2500 ;
G40 Y-5000 ;
M30 ;
%

Note 1: G54 - GG61, G500-G515 are modal codes, and G54, G500 are selected at the
power on. They do no change by RESET , M02 and M30 (standard setting by
parameter No. 64 bit 7).

7–78
7.23 Rotation (G68 and G69)

Rotation has the following two functions:

Code Function
G68 Rotation ON
G69 Rotation OFF

G68 rotates a programmed figure. This function is useful when the machining direction is different
from the programmed direction. G69 cancels G68.

Format: G68 (X__) (Y__) (R__) ; ( ): omissible


X and Y: Specify the position of the center for rotation by absolute or incremental values.
Omitting X and Y designates the point at which G68 was programmed as the center
for rotation.
R: Specifies the rotation angle (0 to ±360.000°).

Omitting R selects a rotation angle rotation on the offset (f · 1) screen of the SET
screen. Programming R0 selects 0°. A negative (–) or positive (+) value is
programmed for counterclockwise or clockwise rotation respectively.
G69; is programmed in a block consisting of itself.

Example 1: Machining in the case where the workpiece is rotated by 30° in the clockwise direction
(start point is the center for rotation)

%;
Y Programmed G92 X15000 Y15000 ;
direction M17 ;
20
15
G91 ;
Start point G68 X0 Y0 R-30000 ;
10 G42 G01 Y5000 ;
X10000 ;
Y-10000 ;
0 5 15 25 X
X-20000 ;
Y Y10000 ;
Machining X10000 ;
direction G40 Y-5000 ;
15 G69 ;
30°

M30 ;
%

0 15 X

7–79
Example 2: Positions of the center for rotation and the machining shape (rotation by 30° in the
clockwise direction)

(a) Program in which the (b) The center of the (c) Start point is the center
workpiece is not rotated machining shape is for rotation
the center for rotation

Y Y Start point Y
30 Start point 30 30 Center for
End point rotation
20
15 15 Center for
10 rotation

0 5 15 25 X 0 15 X 0 15 X

%; %; %;
G92 X15000 Y30000 ; G92 X15000 Y30000 ; G92 X15000 Y30000 ;
M17 ; M17 ; M17 ;
G91 G41 G01 Y-10000 ; G91 ; G91 ;
X10000 ; G68 (X0) Y-15000 R-30000 ; G68 (X0) (Y0) R-30000 ;
Y-10000 ; G41 G01 Y-10000 ; G41 G01 Y-10000 ;
X-20000 ; X10000 ; X10000 ;
Y10000 ; Y-10000 ; Y-10000 ;
X10000 ; X-20000 ; X-20000 ;
G40 Y10000 ; Y10000 ; Y10000 ;
M30 ; X10000 ; X10000 ;
% G40 Y10000 ; G40 Y10000 ;
G69 ; G69 ;
M30 ; M30 ;
% %

Note: In machining in which the position of the machining shape is important as in the
case of (b), when the point at which G68 was programmed (start point) is not the
same as the center for rotation, the end point is unsuitably located as shown
above. In this event, start a program from the center for rotation.

7–80
Example 3: Rotation in the case where the center for rotation is not the same as the position of the
machining start hole.

Y 20
Machining start hole

10
15 Let the program start point
be the center for rotation.
30°

10
0
15 X
%;
G92 X15000 Y15000 ; Let the program start point be the center for rotation.
G91 ;
G68 (X0) (Y0) R-30000 ; G68 is programmed at the center for rotation.
G00 Y15000 M06 ; The wire shifts to the machining start hole and is loaded.
M17 ; Machining ON
G41 G01 Y-10000 ;
X10000 ;
Y-10000 ; Program for the machining shape
X-20000 ;
Y10000 ;
X10000 ;
G40 Y10000 ; The wire returns to the machining start hole.
G00 Y-15000 M07 ; The wire is cut off and returns to the center for rotation.
G69 ; Rotation OFF
M30 ;
%
Note 1: G68 and G69 are modal G codes. Pressing the RESET key and programming
M02, M30 selects G69. When power supply is turned on, G69 is selected.
Note 2: Pressing the RESET key and programming M02 and M30 selects the rotation
angle of R0. When power supply is turned an R0 is selected.
Note 3: Do not program G68 and G69 during the wire radius compensation (G41 or
G42)
Note 4: For changing the work coordinate system when G68 is selected, see Section
8.2.
Note 5: Rotation can be programmed together with scaling, X/Y axis change, and
mirror image.
For example, when rotation is programmed together with mirror image on the
NC FUNC screen, mirror image is applied to the shape rotated.
Note 6: Like scaling, mirror image and X/Y axis change, rotation is valid in memory
operation, but not in MDI operation (standard setting by a parameter No. 87).
Example 4: Changeover of the coordinate system during axis change, mirror image, rotation or
scaling.
Axis change, mirror image, rotation and scaling have their own centers.
They are recorded into the NC by coordinate values of a work coordinate system.
When the coordinate system is switched, recorded center coordinate values are used as
the center coordinate values of functions of a new coordinate system.

7–81
7.24 Mirror Image (G70 and G71)

Mirror image has the following two functions:

Code Function
G71 Mirror image ON
G70 Mirror image OFF

G71 reverses the movement direction of the X or Y axis. This function is useful when the
workpiece is fixed upside down or placed 180° from the drawing shape.
Besides being programmed by G71, mirror image can also be selected by mirror (X or Y) of the
NC FUNC screen. Either of there two methods is acceptable. Generally, however, the NC FUNC

screen is used to apply mirror image to the entire program (in a work coordinate system), while G71
is used to apply mirror image to a part of the program.

(X0) (Y0) { } indicate that either one must be selected.


Format: G71 ;
X1 Y1 ( ) omissible.

X: Program X1 when X axis mirror image is made valid.


Program X0 or omit X when X axis mirror image is not made valid.
Y: Program Y1 when Y axis mirror image is made valid.
Program Y0 or omit Y when Y axis mirror image is not made valid.

Program G70 in a block consisting of itself when X and Y axes mirror image is made invalid.

Note: Don’t program mirror image ON/OFF during scaling, rotation, rotation copying, or
coordinate system rotation.

7–82
Example 1: Program using G71 and G70

Drawing shape Machining

Start point

10
Start point

4
4 20

%;
G92 X0 Y0 ;
M17 ;
G71 X1 (Y0) ;
G91 G01 G41 Y-4000 ;
X16000 ;
X-20000 Y10000 ;
Y-10000 ;
X3700 M01 ;
X300 ;
G40 Y4000 ;
G70 ;
M30 ;
%

Note 1: Use mirror image of the NC FUNC screen when applying mirror image to the
entire program. This eliminates the need of programming two blocks, G71
X1(Y0); and G70;.
Note 2: G71 and G70 are modal G codes. Pressing the RESET key and programming
M02 and M30 selects G70. When power supply is turned on, G70 is selected.
Note 3: Don’t program G71 or G70 during wire radius compensation (G41 or G42).
Note 4: For changeover of the work coordinate system when G71 is selected, see
Section 8.2.
Note 5: Mirror image can be used together with scaling, rotation, and X/Y axis change.
For example, when mirror image is programmed together with X/Y axis change
of the NC FUNC screen, mirror image is applied to the shape for which X/Y axis
change was performed.

7–83
Example 2: Combination of X with Y and machining direction in the G71 block (Machining
proceeds from 1 to 4.)

1 2
S.P. O7170 O7000 (Subprogram)

5 5
5
5 5 10

4 3

%; %;
O7170 ; O7000 ;
1 M98 O7000 R1 ; M17 ;
G0 X50.0 M6 ; G91 G1 Y-3.0 E9000 ;
2 G71 X1 ; G41 Y-2.0 D1 E9001 ;
M98 O7000 R1 ; X15.0 ;
G70 ; Y5.0 ;
G0 Y-20.0 M6 ; X-10.0 ;
3 G71 X1 Y1 ; Y5.0 ;
M98 O7000 R1 ; X-10.0 ;
G70 ; Y-10.0 ;
G0 X-50.0 M6 ; X4.5 M1 ;
4 G71 Y1 ; X0.5 ;
M98 O7000 R1 ; G40 Y5.0 M99 ;
G70 ; %
G0 Y20.0 M6 ;
M30 ;
%

Note 6: As in 2 and 4 above, when mirror image is programmed only for one axis, the
machining shape is reversed. At this time, the program usually need not be
modified, because the direction of wire radius compensation and that of taper
machining are automatically reversed.
Note 7: Since X and Y on/off changeover is modal when G71 is programmed repeatedly,
the following blocks are given, for instance:
……

G71X1Y1; Mirror image X and Y on:


……

G71X0; Mirror image X off (Mirror image Y maintains the on status)


……

7–84
Example 3: Mirror image of a program in which rotation is programmed (by using NC function)

Y R 0 R30.0
O6801 R30.0
MIRROR X OFF MIRROR X OFF MIRROR X ON
MIRROR Y OFF MIRROR Y OFF MIRROR Y OFF

X S.P.

R30.0 R30.0
MIRROR X OFF MIRROR X ON
MIRROR Y ON MIRROR Y ON

%;
O6801 ;
G92 X0 Y0 ;
G68 X0 Y0 R30.0 ;
*(1) In this example, when mirror image is programmed by a G
M17 ; code without using mirror image of the NC function screen it
G91 G1 G41 Y5.0 D1 ; must be done at the positions marked with in the left program.
X-10.0 ;
Y5.0 ;
*(1): G71 X__ Y__ ;
X10.0 ;
Y5.0 ; *(2): G70 ;
X10.0 ;
Y-10.0 ;
X-9.5M1 ;
X-0.5 ;
G40Y-5.0 ;
*(2)
G69 ;
M30 ;
%

7–85
Note 8: If mirror image is programmed by both G71 and the NC FUNC screen, the
combinations of X with Y are as follows:

PROGRAM
NC G70 G71 X0 Y0 G71 X1 Y0 G71 X0 Y1 G71 X1 Y1
FUNCTION
MIRROR X OFF X off X off X on X off X on
MIRROR Y OFF Y off Y off Y off Y on Y on
MIRROR X ON X on X on X off X on X off
MIRROR Y OFF Y off Y off Y off Y on Y on
MIRROR X OFF X off X off X on X off X on
MIRROR Y ON Y on Y on Y on Y off Y off
MIRROR X ON X on X on X off X on X off
MIRROR Y ON Y on Y on Y on Y off Y off

* For an axis on which mirror image is valid, a mirror image mark is displayed in the right of the
screen.
* For each axis, the patterns are obtained as shown below depending on the combination of a
program value and an NC function value.
Both of them are OFF ................. off
Either of them is ON ................... on
Both of them are ON................... off

Note 9: The program start point becomes the mirror symmetry axis, if the MIRROR X, Y
on the NC FUNC screen is turned on. When it is programmed by G71, the
programmed point becomes the mirror symmetry axis. The mirror symmetry
axis is updated by the G71. However, it is not updated by G92. Therefore, G92
should not be programmed on a half way of program (after axis movement
started).

Note 10: When mirror image of the NC FUNC screen is used to the entire program that
programs mirror image or axis change by G codes repeatedly, use the mirror
axis lock function.
For details, see Section 8.4 (Mirror Axis Locking).
Note 11: Like rotation, scaling and X/Y axis change, mirror image is valid in memory
operation, but not in MDI operation (standard setting by parameter No. 87).

7–86
7.25 X/Y axis change (G72 and G73)

The X/Y axis change has the following two functions:

Code Function
G73 X/Y axis change ON
G72 X/Y axis change OFF

G73 switches the axis for movement commands. For example, a movement command of X5 mm
can interpreted as that of Y5 mm. In combination with mirror image, this function is useful when
the workpiece is fixed upside down or placed 90° from the drawing shape. Besides being
programmed by G73, X/Y axis change can also be selected by axis change of the NC FUNC screen.
Either of these two methods is acceptable.

Generally, however, the NC FUNC screen is used to apply X/Y axis change to the entire program (in
one work coordinate system), while G73 is used to apply X/Y axis change to a part of the program.

G73 ;
Format: Both are programmed in a block consisting of itself
G72 ;

Example 1: Program using G73 and G72


%;
G92 X0 Y0 ;
M17 ;
G73 ;
Drawing shape Machining G91 G01 G41 Y-4000 ;
X16000 ;
X-20000 Y10000 ;
10

Y-10000 ;
4

4 X3700 M01 ;
20
X300 ;
G40 Y4000 ;
G72 ;
M30 ;
%

Note 1: Do not program axis change on/off during scaling, rotation, rotation coping or
coordinate system rotation.
Note 2: As in this example, when applying X/Y axis change to the entire program, set
the axis change mode on the NC FUNC screen to “ON”. This eliminates the need
of programming two blocks, G73; and G72;.
Note 3: G73 and G72 are modal G codes. Pressing the RESET key and programming
M02 and M30 obtains G72. When power supply is turned on, G72 and is
selected.
Note 4: Don’t program G73 or G72 during wire radius compensation (G41 or G42).

7–87
Note 5: For changeover of the work coordinate system when G73 selected, see Section
8.2.
Note 6: X/Y axis change can be used together with mirror image, scaling and rotation.
For example, when X/Y axis change (G73) is programmed together with mirror
image of the NC function screen, mirror image is applied to the shape for which
X/Y axis change was performed.

Shape for which both X/Y axis change


and mirror image X were performed
Shape for which X/Y axis
Symmetry axis for
change was performed
X/Y axis change

Drawing shape
Symmetry axis
45° for mirror image Y
Start point

Symmetry axis
for mirror image X

Example 2: Combination of X/Y axis change with mirror image and machining direction
If the machining direction is to be changed by rotating the workpiece in a unit of 90°
depending on its fixing way, etc., move 1 to positions 2 through 8 as shown in the
program below.

G73 ; G73 ;
6 G71 X1 Y0 ; 5 G71 X0 Y0 ;

2 G72 ; 1 Drawing chape


G71 X1 Y0 ;

G72 ;
3 G71 X0 Y1 ;
G72 ;
4 G71 X1 Y1 ;

G73 ; G73 ;
8 G71 X1 Y1 ; 7 G71 X0 Y1 ;

7–88
%;
G92 X0 Y0 ;
M17 ;
G73 ;
1
G71 X0 Y0 ;
G91 G01 G41 Y-4000 ; A function made valid earlier is made
invalid later.
X16000 ;
X-20000 Y10000 ; A function made valid later is made invalid
Y-10000 ; earlier.
X3700 M01 ; The same applies to rotation (G68 and G69),
scalling (G48 and G47), etc.
X300 ;
G40 Y4000 ;
G70 ;
G72 ;
M30 ;
%

Note 7: If X/Y axis change is programmed by both a G code and the NC function screen,
X/Y axis change is made valid or invalid depending on combinations of
statuses, as follows:

Program
G72 (off) G73 (on)
NC function
Axis change “OFF” off on
Axis change “ON” on off

* The “X-Y AXIS EXCHANGE” is displayed on upper right of screen while the XY axis
exchange is being executed.

Note 8: Like mirror image, rotation and scaling, X/Y axis change is valid in memory
operation, but not in MDI operation (standard setting by a parameter No. 87).

7–89
7.26 C-Axis Centering (G75) ... Valid by W-PG1 only

The function rotates the C axis and makes a measuring ball touch the workpiece from 4 directions
(±X axis, ±Y axis), then attains the center coordinates of 4 measured values as the center of the C
axis.

Format: G75 X_ Y_ Z_ R_ (I_) (J_) (K_) ;

X,Y,Z: Specify, in incremental mode, a larger value than the distance from current point to touch
sensing start point.
R: Measuring ball diameter (µm)
I,J,K: Specify rapid traverse to shorten the measuring time if the approach distance up to the edge
face to be measured is long.

Movement in +Y axis measurement


A = Measuring axis travel (Y_)
B = Measuring axis travel (Y_)
+ Measuring ball diameter (R_)
A
C = Measuring axis travel (Z_)

C * Specify Y_ larger than A.


B (For X_, specify a larger value.)

–Y
* The measurement is executed totally 4 times
+X –X
including –X, +X, +Y and -Y.
+Y

Example: G75 X10. Y15. Z10. R5.15. ;


-

The C axis rotates to the 90° position (the head faces toward –X direction) and the X axis moves
–15 mm and the Z axis moves 10 mm, when a measuring ball is brought above the head and then,
the above command is executed. From this point, the X axis moves at rapid traverse rate by 5
mm and the touch sensing is made, then the ball returns to the initial point above the head.
Further, the head is rotated in 3 directions of +X, +Y and –Y and the same measurement as in –X
direction is made, then the C axis center is performed by assuming the center point of measured
data as the center of C axis.

7–90
7.27 Workpiece Edge Positioning (G76)

(1) X,Y axis edge positioning ... except W-PG1


This function searches for a workpiece edge by the touch sensing function, and positions the
wire where the edge contacts the wire. This operation is performed for one axis (X or Y) each
at a time.
X__(I__)(A__)(L__)
Format: G76 ; Select either one
Y__(J__)(A__)(L__)

X or Y: Specifies direction of touch sensing and distance between wire and workpiece with
incremental value.
I or J: If approach distance up to the edge to be
measured is long, rapid feed may be specified I
Workpiece
to shorten the measurement time. I specifies
the rapid feed amount in X direction, and J for
Start point
Y direction.
A: Specifies angle for measurement direction. (0 to ±90.000)
L: Programmed when rough workpiece edge causes an alarm (1720: MEASURING
APPROACH NEVER TOUCHED PART). (L2 - 5)

Example: Workpiece edge positioning in X direction

G76 X10000 ;
Start point
Workpiece Workpiece
End
point

Wire radius
Distance between
the wire and
the workpiece

Note 1: Since edge positioning ends where the wire comes into contact with the
workpiece, take the wire radius into account for subsequent positioning.
Note 2: G00 - G03 are modal, and any one can be selected.
Note 3: Each function of G76 through G85 is carried out by touch sensing function.
Observe the following when using the touch sensing function.
a. Keep the contact surface (with the wire, workpiece, vertical alignment jig,
etc.) dry and free of flaws or burrs.
b. Edge positioning should be performed with dry run in the off status. When
dry run is on, a block in which touch sensing is programmed is skipped.

7–91
c. The wire speed is automatically selected to the one set by parameter
No.706 (when tank filling and measuring function is invalid) or No.7557
(when tank filling and measuring function is valid). Though standard
setting varies depending on the models, set the wire speed to 0 - 10
avoiding high speed.
d. Execute edge positioning 2 or 3 times to confirm repeatability. For this
purpose, usually touch sensing and machining are not programmed
consecutively; touch sensing alone is perform first in the MDI operation or
another mode.
e. An alarm results if the wire is in contact with the workpiece from the
beginning, or the wire contacts the workpiece in a movement in which its
contact is not programmed. (To avoid this, program L).)
f. G76 - G85 are all one-shot G codes.
g. L (2 - 5) can be used in G76, 77, 79, 80, 81 and 82 blocks. Larger L value
consumes longer measurement time, but possibility of alarm is less.
h. I and J are used to specify the rapid feed amount, but direction (sign) is not
specified.
i. The measurement approach speed is normally 50 mm/min (set to parameter
No.570). When you want to change the measurement approach speed, add
F_ command to each block of G75-G85 (except G78), so that the specified
speed is selected.
j. On the K type power supply units and the machines with the work tank
filling function (U32K, U53K, EU64, U86), the TANK FILL key turns on (Set
data No.136 bit 0 Tank filling and measuring function valid, standard
setting) to raise the measurement accuracy when the measurement except
G78 is executed.

(2) Workpiece edge positioning for W-PG1


The work edge positioning for W-PG1 is added to (1) work edge positioning function. The
workpiece edge positioning function for W-PG1 provides -Z axis edge positioning besides
X,Y axis edge positioning.
Format: G76 X_ Y_ (I_) (J_) (K_) (L_) (B_) (W_) ; ............... 1
G76 X_ Z_ (I_) (J_) (K_) (L_) (B_) (W_) ;................ 2
G76 Y_ Z_ (I_) (J_) (K_) (L_) (B_) (W_) ; ................ 3
G76 Z_ (K_) (L_) (B_) (W_) ;.................................... 4
G76 X_ (I_) (L_) (B_) (W_) ;..................................... 5
G76 Y_ (J_) (L_) (B_) (W_) ; ..................................... 6

7–92
1: –Z axis edge positioning with
X,Y axis movement
2: –Z axis edge positioning with X
Workpiece
axis movement I, J, K B
Start point
3: –Z axis edge positioning with Y
axis movement End point

4: –Z axis edge positioning without


X, Y, Z
X,Y axis movement
5: ±X axis edge positioning format
6: ±Y axis edge positioning format
X,Y,Z: Specify, in incremental mode, a larger value than the distance from current position
to touch sensing start point. (In the case of –Z axis edge positioning with X,Y axis
movement, the X and Y axes move by 1/2 of the specified moving amount in
± direction.)
I,J,K: Specify rapid traverse as necessary to shorten the measuring time if the approach
distance up to the edge face to be measured is long.
I, J, and K specify rapid traversing amount of X, Y, and Z axes respectively.
L: Specify if the workpiece edge face is rough and the alarm No.1720 “MEASURING
APPROACH NEVER TOUCHED PART” occurs. (L2-L5)
B: Specify, in absolute mode, the positioning amount after measurement.
W: Set ON or OFF of the WIRE FEED during measurement.
W0: WIRE FEED OFF + Meas. Approach + Wire Stop Output OFF
W1: WIRE FEED ON + Meas. Approach + Wire Stop Output OFF
W2: WIRE FEED OFF + Meas. Approach + Wire Stop Output ON
W3: WIRE FEED ON + Meas. Approach + Wire Stop Output ON
Default: WIRE FEED ON + Meas. Approach + Wire Stop Output ON

Note 1: In the case of -Z axis edge positioning with X,Y axis movement, specify I,J
moving amounts within 1/2 of X,Y moving amounts. (K within Z axis moving
amount)
Starting the measurement at rapid traverse over allowable X,Y moving amounts
causes the following alarm.

Alarm No.1716: MEASURING COMND SPECIFIED AXIS ERROR

7–93
7.28 Hole Centering Positioning (G77)

X__(I__)(J__)(A__)(L__) indicate that either coordinate


Format: G77 ;
Y__(I__)(J__)(A__)(L__) word must be selected.
X or Y: Touch sensing status in the four directions (X, –X, Y and –Y) from the specified axis
direction.
Numerical values specify a hole diameter or a longer length by an incremental value.
I or J: When a diameter is large, I or J can be used to over the wire by rapid traverse halfway, and
thus the time for hole center positioning is reduced. I specifies the amount of rapid
traverse in the X-axis direction, while J specifies that in the Y-axis direction.
A: Specifies angle for measurement direction. (0 to ±90.000)
L: Programmed when rough workpiece edge causes an alarm (1720: MEASURING
APPROACH NEVER TOUCHED PART). (L2 - 5)
G77 finds the hole center and positions the wire there. Specifying a different axis direction only
changes the sequence of touch sensing and it is executed in the four directions.
Example 1:
Workpiece 4
G77 X30000 ;
Start point
End
point
2 1

Touch sensing starts


φ20 from the center.
3

Example 2:
G77 X120000 I40000 J20000 ;
4
50mm
Start point J I
50mm 2 1
I J

100mm 3 100mm

Example 3:
4
G77 X30000 A45.000 ; 4 1

2 1 A

2 3
3
(Normal measurement) (Measurement by specifying angle)

Note 1: Since touch sensing is executed in the positive (+) and negative (–) directions
of each axis, the wire is positioned at the center independent of a wire
diameter.
Note 2: Any of the modals G00 through G03 can be selected.

7–94
Note 3: Checking of measurement result
On the RUN screen, press the f·4 POSITION DISPLAY key to change the
coordinate display (left) to measured value display, where you can check the
hole diameter in X and Y directions.
Note 4: With the G77, the head can make three-round travels like X→Y→X, but this can
be changed to two-round travels like X→Y (machine parameter No.605 bit 7
ON). Be sure to execute this command several times to check the accuracy.
Note 5: For the note common to G76-G85 touch sensing function, see Note 3 in section
7.27.

7–95
7.29 Wire Vertical Adjustment (G78)

Format: G78 (X__) (Y__) ; ( ): omissible


X and Y: Specify by incremental values the distance between the wire and the vertical adjustment
jig or a long distance, as well as the direction for vertical adjustment. If both the X and Y
directions are programmed, adjustment is executed in order. Either X or Y alone may be
programmed for adjustment. But the X and Y directions cannot be omitted at the same
time.

G78 positions the upper guide at right angles to the lower guide in a machine with a taper
attachment. After completion of G78, the lower guide returns to the start point on the X and Y axes,
the upper guide is set at a new position perpendicular to the lower guide on the U and V axes, and U
and V in all work coordinate systems (G54 through G61) are set to zero.

Example: Wire vertical adjustment in the X and Y directions

Vertical G78 X10000 Y10000 ; Vertical


adjustment jig adjustment jig

Approx. 5
Approx. 5

X, Y

U, V X, Y, U, V
Approx. 5 Approx. 5

Work coordinate Work coordinate


X 12.345 X 12.345

Initial point
Y 23.456 Y 23.456
U 0.000 U 0.000 Displayed values remain zero.
V 0.000 V 0.000

Machine coordinates Machine coordinates


X 222.222 X 222.222
Y 333.333
U 17.755 ⇒ Y
U
333.333
17.783 New position perpendicular to
V 17.543 V 17.526 the lower guide (reference point)

Note 1: G78 is performed regularly once every month, and in replacing wire guides,
before high-precision machining and when wire verticality is not obtained.
Note 2: When G78 is completed, the machine coordinates of a new position (reference
point) on the U and V axes are automatically stored into parameter No. 3008,
3066 (U axis) and No. 4008, 4066 (V axis) (in a unit of µm). Record these four
values whenever vertical adjustment is performed.

7–96
Note 3: There are three kinds of wire vertical aligning jigs with the thickness of 100
mm, 50 mm and 20 mm. The machine parameter setting and the Z-axis scale
position for wire vertical alignment vary depending on which jig is used. The 20
mm thick jig is exclusive for the UPH-1.
Before performing wire vertical alignment, confirm the following items (this is
particularly required when there are multiple machines or vertical aligning jigs).

Checking items:

Kind of jig
100 mm thick 50 mm thick 20 mm thick
Item
PRM 672 (Fixture gauge
100000 µm 50000 µm 20000 µm
clearance dimension)
PRM 673 (Z axis position at
120000 µm 70000 µm 30000 µm
vertical alignment)
Z axis scale position at vertical
120 mm 70 mm 30 mm
alignment

7–97
7.30 Corner Edge Positioning (G79)

Format: G79 X__ Y__ (I__) (J__) (L__) (A__) ; ( ): omissible


X, Y: Specify by incremental values the distance between current position and touch
sensing start position.
A: Specifies the workpiece inclination by the G92 coordinate system rotation angle
number (A0 - A9) of parameters No. 91 - 99 on the SET , f · 4 (SET DATA) screen.
A workpiece inclination must be entered in a corresponding number in advance.
When A is omitted, the workpiece is considered to be parallel with the X and Y axes
(angle 0°). Specifying A0 selects rotation on the OFFSET screen (f · 1) of the SET

screen.
I or J: If approach distance up to the edge to be
measured is long, rapid feed may be I

~,
}}
{|
zz
y



specified to shorten the measurement time.
I specifies the rapid feed amount in X Workpiece
direction, and J for Y direction.
L: Programmed when rough workpiece edge J
causes an alarm (1720: MEASURING
APPROACH NEVER TOUCHED PART).
(L2 - 5)
The G79 positions the wire at the corner edge by performing touch sensing once in each of X and Y
directions of the workpiece whose inclination is already known.

Touch-sensing start position Workpiece


in the X axis direction Perform
Y command

wire
radius
compen- A
value

sation
Positioning Touch-sensing start position
in the Y axis direction

X command value

The end point of corner edge positioning is compensated by half a wire diameter entered in 32:
WIRE DIAMETER on the COND screen so that the wire center is on the corner edge. Therefore
enter an accurate wire diameter is advance.

7–98
Example 1: Corner edge positioning of the workpiece at 30° to horizontal

Workpiece Workpiece

20
20
End point End point
Start point 30 Start point 30

G79 X30000 Y20000 ; G79 X30000 Y20000 A1 ;


Enter, in advance, 30000 to No. 91 (G92 coordinate
system rotation angle A1) on the SET DATA (f · 4)
screen of the SET screen.

Example 2: Corner edge positioning in each direction of the workpiece

G79 X20000 Y-15000 ; G79 X-20000 Y-15000 ;

Start point 20 20 Start point


End
15

point

15
End
point
Y
Workpiece

End X End
point point
15

15
20 20
Start point Start point

G79 X20000 Y15000 ; G79 X-20000 Y15000 ;

Note 1: Movement speeds are all set by a parameter. Any of the modals G00 - G03 can
be selected.
Note 2: Wire radius compensation by diameter compensation of the COND screen is
only executed with G79. Care should be taken that it is not performed in other
functions.

7–99

{|}~‚ƒ„…‰Š‹Œ‘’“
7.31 Groove Width Centering Positioning (G80)

X__ (I__) (A__) (L__)


Format: G80 ; Select either one
Y__ (J__) (A__) (L__)

X or Y: Specifies with incremental value the touch sensing


direction and the distance exceeding groove width.
I or J: If approach distance up to the edge to be measured is J
long, rapid feed may be specified to shorten the J
measurement time.
I specifies the rapid feed Y direction.
A: Specifies angle for measurement direction. (0 to
±90.000)
L: Programmed when rough workpiece edge causes an alarm (1720: MEASURING
APPROACH NEVER TOUCHED PART). (L2 - 5)
The G80 positions the wire in the center of groove by executing touch sensing in both directions of
a groove.
Example 1: Groove width centering in X direction

Workpiece
G80 X30000 ;

Start End
point point
20

Example 2: Groove width centering by specifying angle

G80 X70. A-45. ;


Workpiece

Note 1: Any of modal G00 - G03 can be used.


Note 2: Checking of measurement result
On the RUN screen, press the f·4 POSITION DISPLAY key to change the
coordinate display (left) to measured value display, where you can check the
groove width.
Note 3: For the note common to G76-G85 touch sensing function, see Note 3 in section
7.27.

7–100
!’“™š }~„…
š
™
“
’
!

7.32 Plate Width Centering X axis (G81)

(1) Plate width centering in X axis (G81) except W-PG1

Format: G81 X__ Y__ (I__) (J__) (A__) (L__) ;

measured is long, rapid feed may be


specified to shorten the measurement time.
I specifies the rapid feed amount in X
direction, and J for Y direction.
A: Specifies angle for measurement direction.
(0 to ±90.000)
( ): omissible

X: Specifies with incremental value the amount of movement exceeding the plate width
in X direction. The wire moves by half the specified value each in + and - directions.
Y: Specifies with incremental value the amount of movement in Y direction. The wire
moves in Y direction, then it starts touch sensing in X direction.
I or J: If approach distance up to the edge to be

L: Programmed when rough workpiece edge causes an alarm (1720: MEASURING


APPROACH NEVER TOUCHED PART). (L2 - 5)
Workpiece
I

The G81 positions the wire in the center of plate width in X direction. For the Y direction, the wire
returns to the position at which G81 was programmed, and the centering is completed.

Example 1:

Start point

10
20
21

Workpiece

Workpiece
End point

20
15

Example 2: Plate width centering by specifying angle

30
30°
G81 X40000 Y15000 ;

G81 X30. Y10. A30. ;

Note 1: Locate the start point at almost center of plate width.


Note 2: Any of modal G00 - G03 can be used.

7–101
Note 3: Checking of measurement result
On the RUN screen, press the f·4 POSITION DISPLAY key to change the
coordinate display (left) to measured value display, where you can check the
plate width.
Note 4: For the note common to G76-G85 touch sensing function, see Note 3 in section
7.27.

(2) Plate width centering in X axis (G81) for W-PG1


Format G81 X_ Z_ (I_) (K_) (L_) (B_) (W_) ; ( ): omissible
X: Specify, in incremental mode, the X direction
travel over plate width. The X axis moves by Workpiece
1/2 of specified travel in ± direction. End point
Start point
Z: Specify, in incremental mode, the Z direction
travel.
Z K B
If (B_) is specified, the Z axis executes touch
sensing in – direction after the plate width
centering in X axis direction.
I,K: Specify rapid feed as necessary to shorten the
measuring time if the approach distance up to J Measuring ball
the edge face to be measured is long.
Y
I and K specify rapid feed amount of X and Z
axes respectively.
L: Specify if the workpiece edge face is rough and the alarm No.1720 “MEASURING
APPROACH NEVER TOUCHED PART” occurs. (L2-L5)
B: Specify, in absolute mode, the positioning amount after measurement.
If B command is omitted, no measurement is made in the axes other than the plane (X
and Y axes).
(Only the plate width centering in X axis direction is executed, and the measurement in
Z axis is not executed.)
W: Set ON or OFF of the WIRE FEED during measurement.
W0: WIRE FEED OFF + Meas. Approach + Wire Stop Output OFF
W1: WIRE FEED ON + Meas. Approach + Wire Stop Output OFF
W2: WIRE FEED OFF + Meas. Approach + Wire Stop Output ON
W3: WIRE FEED ON + Meas. Approach + Wire Stop Output ON
Default: WIRE FEED ON + Meas. Approach + Wire Stop Output ON

Note: Specify I,K travel within 1/2 of X,Z travels. Starting the measurement with I,K
travel within allowable X,Y travels causes the following alarm.
Alarm No.1716: MEASURING COMND SPECIFIED AXIS ERROR

7–102
7.33 Plate Width Centering Y axis (G82)

(1) Plate width centering in Y axis (G82) except W-PG1

Format: G82 X__ Y__ (I__) (J__) (A__) (L__) ; ( ): omissible

X: Specifies by incremental value the travel in the X-axis direction.


After the completion of the X-axis travel touch sensing starts in the Y-axis direction.
Y: Specifies by an incremental value the travel equal to or greater than a place width in
the Y-axis direction. The wire moves by half the specified travel in the positive (+)
direction and in the negative (–) direction.
I or J: If approach distance up to the edge to be measured is long, rapid feed may be
specified to shorten the measurement time.
I specifies the rapid feed amount in X direction, and J for Y direction
A: Specifies angle for measurement direction. (0 to ±90.000)
L: Programmed when rough workpiece edge causes an alarm (1720: MEASURING
APPROACH NEVER TOUCHED PART). (L2 - 5)
G82 positions the wire at the center of a plate width in the Y-axis direction. For the X-axis
direction, the wire returns to the position at which G82 was programmed, and center positioning is
completed.

Example:

Start G82 X9000 Y20000 ;


10

point
10.5

Workpiece
10

End
point

Note 1: Locate the start point at the center of a plate width.


Note 2: Any of the modals G00 - G03 can be selected.
Note 3: Checking of measurement result
On the RUN screen, press the f·4 POSITION DISPLAY key to change the
coordinate display (left) to measured value display, where you can check the
plate width.
Note 4: For the note common to G76-G85 touch sensing function, see Note 3 in section
7.27.

7–103
(2) Plate width centering in Y axis (G82) for W-PG1
Format G82 Y_ Z_ (J_) (K_) (L_) (B_) (W_) ; ( ): omissible
Y: Specify, in incremental mode, the Y direction
travel over plate width. The Y axis moves by Workpiece
1/2 of specified travel in ± direction. End point
Start point
Z: Specify, in incremental mode, the Z direction
travel.
Z K B
If (B_) is specified, the Z axis executes touch
sensing in – direction after the plate width
centering in Y axis direction.
J,K: Specify rapid feed as necessary to shorten the
measuring time if the approach distance up to J Measuring ball
the edge face to be measured is long.
Y
J and K specify rapid feed amount of Y and Z
axes respectively.
L: Specify if the workpiece edge face is rough and the alarm No.1720 “MEASURING
APPROACH NEVER TOUCHED PART” occurs. (L2-L5)
B: Specify, in absolute mode, the positioning amount after measurement.
If B command is omitted, no measurement is made in the axes other than the plane (X
and Y axes).
(Only the plate width centering in X axis direction is executed, and the measurement in
Z axis is not executed.)
W: Set ON or OFF of the WIRE FEED during measurement.
W0: WIRE FEED OFF + Meas. Approach + Wire Stop Output OFF
W1: WIRE FEED ON + Meas. Approach + Wire Stop Output OFF
W2: WIRE FEED OFF + Meas. Approach + Wire Stop Output ON
W3: WIRE FEED ON + Meas. Approach + Wire Stop Output ON
Default: WIRE FEED ON + Meas. Approach + Wire Stop Output ON

Note: Specify J, K travels within 1/2 of Y, Z travels. Starting the measurement with
J, K travels within allowable Y, Z travels causes the following alarm.

Alarm No.1716: MEASURING COMND SPECIFIED AXIS ERROR

7–104
7.34 Cylinder Center Measurement (G83)

L02
R_ indicate that either coordinate
Format: G83 L03L12 (X_) (Y_) ;
(I_) (J_) word must be selected.
L13
L02 or L03: Specifies the rotational direction of a measuring circle in the cylinder center
measurement.
L02: Clockwise, L03: Counterclockwise
L12 or L13: Specifies the rotational direction of a measuring circle in the cylinder bore center
measurement.
L12: Clockwise, L13: Counterclockwise
X and Y: Specify the position of the end point of the measuring circle by absolute or
incremental values of the work coordinate system selected during measurement.
I and J: Specify the position of the center of the measuring circle by incremental values
from the start point.
R: Specify the measuring circle with radius. +R specifies an arc with short
circumferential path, while –R specifies an arc with long circumferential path.
G83 executes touch sensing to the cylinder from three points on the specified measuring circle and
thereby sets the measured center of the cylinder as the origin of the work coordinate system
currently selected. After measurement, the wire returns to the end point.

Cylinder center (L02)


End point
Wrokpiece
Center of the
cylinder
Clamping plate
Intermediate Center of a
point measuring circle

Start point
Measuring
circle

Cylinder bore center (L12)

End point
Center of the
cylinder
Inter-
mediate Center of a
point measuring circle

Start point

Wrokpiece

7–105
…†Œ“”
Example: When measuring, in the G54 mode, the center of ø30 cylinder with a semi-circle of ø46,

G54 ;

……
and setting the center as the origin of G55

G55 G91 G83 L02 (X0) Y46000 (I0) J23000 ;

At the start of this block, the modal changes to G55.

Measuring
circle

Intermediate
point

G54
measuring
circle

MEASURING COMND SPECIFIED AXIS ERROR).


End point

Center of a

G55
Center
of the
cylinder

Start point

Note 2: The cylinder center is measured independent of a wire diameter.


Cylinder center (L02)

Clamping plate

Note 1: Specifying a complete circle as a measuring circle causes an alarm (1716:

Note 3: After the completion of measurement, the cylinder center is the origin of the
work coordinate system currently selected. The wire is positioned at the
cylinder center as follows:

(G55) G90 G00 X0 Y0 (M07) ;


The wire is cut off.
Positioning the wire to the
cylinder center
Work coordinate system
during measurement

Note 4: Execution of G83 with the mirror image or axis exchange in ON status causes
an alarm (1716: MEASURING COMND SPECIFIED AXIS ERROR). Turn mirror
image and axis exchange OFF.
Note 5: Checking of measurement result
On the RUN

cylnder diameter.
screen, press the f·4 POSITION DISPLAY
coordinate display (left) to measured value display, where you can check the

Note 6: For the note common to G76-G85 touch sensing function, see Note 3 in section
7.27.
key to change the

7–106
!"‘’“”˜™š›
7.35 Workpiece Parallelism Measurement X axis (G84)

Format: G84 X__ Y__ (J__) (A__) (R__) ; ( ): omissible

!‘’“—˜™š
X: Specifies by an incremental value the amount of movement in the X-axis direction in
each operation.
Y: Specifies by an incremental value the maximum amount of movement for touch
sensing in the Y-axis direction. Be sure to specify a length equal to, or greater than
the distance between the wire and the workpiece.
J: If approach distance up to the edge to be
measured is long, rapid feed may be
specified to shorten the measurement Workpiece
time.
A: Specifies the number (one of A0 through
J J J
A9) for G92 coordinate system rotation
angle A of parameter No. 91 through No.
99 on the set data screen (f · 4) of the
SET screen to enter a measured angle (angle formed with the X axis). Omitting A or
programming A0 enters an angle in rotation on the offset screen (f · 1) of the SET

screen.
R: Specifies the number of movements in the X-axis direction. Omitting R selects R1.
Numerical values 1 through 5 may be programmed for R. Touch sensing is
performed at “R+1” point.

G84 measures the parallelism of the X axis with the workpiece and makes an angle formed by the
workpiece with the X axis entered automatically in a specified rotation number. Into the specified
rotation number.
This function is useful when it is difficult to fix the workpiece in parallel with the X axis, or to omit
the workpiece aligning procedure.

Example 1: When measuring the angle of the workpiece with the X axis at three points and
entering the value into A1

G84 X20000Y15000 A1 R2 ;
Workpiece

Distance between the wire


and the workpiece
Start point End point Angles are measured at three
20 20 points by two movement.
1st 2nd
movement movement

7–107
!&'(‘’“˜™šŸ ¡
Example 2: When executing workpiece corner edge positioning after measuring workpiece

%;
G92 X0 Y0 ;
G91 ;
parallelism

G00 X-20000 ;
G79 X20000 Y11000 A1 ;
G55 G92 X0 Y0 A1 ;

%
:
:
:
11

programs for machining, etc.


10

Specified point
for G79

G84 X10000 Y20000 A1 R1 ;


Workpiece

End point

10
A1

End point for G84

Program start point

Program start point (G54)

A1 is entered after workpiece parallelism measurement


Shift to the specified point for corner edge positioning
Corner edge positioning
Setting of a coordinate system rotated by A1 on a corner edge

Note 1: Any of the modals G00 - G03 can be selected in programming G84
Note 2: The measured angle is not displayed at the end of G84 when No. 91 - 99 are
displayed on the f · 4 (SET DATA) screen of SET screen. In this case, change
the screen to another one once, then try to display it again.
Note 3: For the note common to G76-G85 touch sensing function, see Note 3 in section
7.27.

7–108
!"‹Œ’“”™š›
7.36 Work Parallelism Measurement Y axis (G85)

Format: G85 X__ Y__ (I__) (A__) (R__) ; ( ): omissible

X: Specifies by an incremental value the maximum travel for touch sensing in the X-axis
direction. Be sure to enter a length equal to or greater than the distance between the
wire and the workpiece.
Y: Specifies by an incremental value the travel in the Y-axis direction in each operation.
I: If approach distance up to the edge to be measured is long, rapid feed may be
specified to shorten the measurement time.
A: Specifies the number (one of A0 through A9) for G92 coordinate system rotation
angle A of parameters No. 91 to No. 99 on the set data screen (f · 4) of the SET
screen to enter a measured angle (angle formed with the Y axis). Omitting A or
specifying A0 enters an angle in rotation on the offset screen (f · 1) of the SET

screen.
R: Specifies the number of travel in the Y-axis direction. Omitting R selects R1.
Numerical values 1 through 5 may be programmed for R. Touch sensing is
performed at “R+1” point.

G85 measures the parallelism of the Y axis to the workpiece, and enters an angle formed by the
workpiece with respect to the Y axis automatically into the specified rotation number.

Example: When measuring the angle of the workpiece with the Y axis at two points and entering
the value into A6.

G85 X15000 Y20000 A6 R1;


End point
(One movement)

Angles are measured at two


Workpiece points by one movement.
20

Start point
Distance between the wire
and the workpiece

Note 1: Any of the modals G00 - G03 can be selected when programming G85.
Note 2: The measured angle is not displayed at the end of G85 when No. 91 - 99 are
displayed on the f · 4 (SET DATA) screen of SET screen. In this case, change
the screen to another one once, then try to display it again.
Note 3: For the note common to G76-G85 touch sensing function, see Note 3 in section
7.27.

7–109
7.37 Automatic Measurement Machining (G86, G87)

Normal measurements (G76 - G85) put the stress on the wire positioning before machining, while
the purpose of this function (G86, G87) is to evaluate the dimensions after machining. The
roughness of surface to be measured or presence of chips or rust could affect the touch sensing
accuracy. Therefore, use of this function requires the following prerequisites:
• Micron machining must be finished before measurement (good surface roughness, with no
chip attached)
• Measurement must be executed immediately after machining (otherwise, rust will appear)
• A shape machined must be small (otherwise, rust will appear)
Also, the parameters described later can freely set:
• Whether only measurement, or both measurement and machining for compensation is
executed
• Tolerance for compensation machining
Therefore, setting values can properly be changed according to the contents of machining.
Note: The automatic measurement and machining function of the K type power supply
units is stored in the AUTO MEAS file in the standard disk.
Load this program into the edit memory and divide it, so that it can be used
(O13086).

Format
(a) Automatic measurement machining (per-side) G86 { – }: Select either one
G86{ X_ (I_) } (U_) (V_) (L_) (F_) (A_) O_ (N_) ; ( ): Omissible
Y_ (J_)

X or Y: Measurement approach direction and per-side reference value. Not omissible


I or J: Rapid approach value in X or Y direction (per-side)
U and V: Travel to measurement approach start point (incremental value of X and Y
components)
L: Measurement return length (default L = 1, unit L × 0.1 mm)
F: Measurement approach feedrate
A: Measurement approach angle (degree), below ±90°, + for counterclockwise
O: Machining shape subprogram No. to be called after measurement
N: Machining shape subprogram sequence No. to be called after measurement

Note: For the O (subprogram No.), it may be omitted only if the parameter is set to
“machining off”.

7–110
š




"
!

Œ
”
“
›
˜
—
–
‘


Š
‰
ˆ









!"&'()Š‹Œ‘’“”˜™š›Ÿ ¡¢
(b)




‡
Ž
•
Automatic measurement machining (width) G87

G87{ X__ (I__) } (U__) (V__) (L__) (F__) (A__) O__ (N__) ;
Y__ (J__)

X or Y: Measurement approach direction and width reference value. (Not omissible)

I, J, U, V, L, F, A, O, and N are same as in G86.


Example 1: Measurement of machining shape ø10

1
G87

(1) G86/G87 command and wire movement

4
5
X
φ10
2
(V)3

d' e' c' b


a
(I)
2.5

c ed
X10.

Width 10mm?
(X direction)

Program: G87 X10.I2.5 V-3. L2 ;


2
G86

Per-
side
X5.

5mm?
(X direction)

The following gives an example where the width in X direction is measured by the G87
specified at point “a” after a shape of ø10 as shown below is machined.

Point a: G87 program point (= start point of machining shape)


Point b: Measurement approach start point
Wire movement
1 The wire moves at rapid feed to the measurement
approach start point specified by U__V__. (a→b)
2 It moves at rapid feed to approach direction by the amount
specified by I__ or J__. (b→c)
The approach direction is determined by sing of X__ or
Y__, and angle of A__.
The edge face positioning by touch sensing function in the approach direction is repeated
5 times. At this time, the retract amount for each time is determined by L__xPRM603.
(c→d→e→d→e→d→e→d→e→d→e)
It returns to the measurement approach start point. (e→b)
Operation in the reverse direction of the above steps 2 to 4 is also executed in the same
manner.
(b→c´→d´→e´→b)

5 times continuously
6 It returns to the G87 (or G86) program point. (b→a)

Note 1: The wire moves along the path except step 5 if only per-side 5 mm is specified
by the program G86X5.I2.5V-3.L2;. [1 - 4) and 6]
Note 2: The mirror image and axis exchange are not applied to the measurement
functions (G76 - G87) including G86 and G87. Care should be taken when
mirror image or axis exchange is used.

7–111
(2) Example of programs
(a) G86, G87 program point
Program the G86 or G87 following a micron machining program. A machining shape
must be specified by a subprogram if the parameter 200 is set to “machining on”.
Example 1: Automatic measurement machining (width) is executed after machining of ø10 shape.

Machining
O1 (MAIN)
G92 X0 Y0 ;
Measurement Measurement
G44 H30 ;
Start point
E9001 D1 M98 O2 ; Main program
G43 ; (Call subprograms by changing
E9002 D2 M98 O2 ; E No. and D)
E9003 D3 M98 O2 ;
E9004 D4 M98 O2 ;
G87X 10. (I4.) O2 ; Automatic measurement machining
M30 ; (Automatically changes to modal M18)
O2 (SUB) ..... Subprogram for machining shape
M17 ; Machining ON
G91 G01 G42 Y5. ; The lead direction should be
G02 X-0.5 Y-0.025 J-5. M1 ; different from measurement
X0.5 Y0.025 I0.5 J-4.975 ; direction.
G40 G01 Y-5. ; Subprogram must be made so that
M99 ; the head returns to the start point
when auto measurement machining
is executed.
(b) Variations of G86, G87 command
Example 2: Use of measurement approach rotation

• G87 X10. (I4.) A30. (O2) ……{ X+ direction is rotated by 30°.


Measurement is done in 1 → 2 sequence.
1
Or following command may be used.
30°
Y+ direction is rotated by -60°.
2 • G87 Y10. (J4.) A-60. (O2) ……{
Measurement is done in 1 → 2 sequence.
X- direction is rotated by 30°.
• G87 X-10. (I4.) A30. (O2) ……{
Measurement is done in 2 → 1 sequence.
Y- direction is rotated by -60°.
• G87 Y-10. (J4.) A-60. (O2)……{
Measurement is done in 2 → 1 sequence.
Example 3: Use of approach start point

5
G87 X5. (I2.) U-2.5 V7. (O2)
Angle (A__) is applied to the U__V__.
7

2.5

7–112
(c) Programming of automatic measurement machining condition
The condition of automatic measurement machining (G86, G87) cannot automatically be
changed internally.
If machining condition for G86, G87 is to be specified, program it as follows after a
micron machining is finished.

O1 (MAIN)
G92 X0 Y0 ;
G44 H30 ;
E9001 D1 M98 O2 ;
G43 ; Usual micron machining
E9002 D2 M98 O2 ;
E9003 D3 M98 O2 ;
E9004 D4 M98 O2 ;
E9005 ; Automatic measurement machining condition registered in advance
G87 X10. O2 ;
(E9004 ;) If original condition is to be restored
M30 ;

7–113
(3) Display and output of measurement results
This function is prepared by a custom macro, and the data during measurement can be
referenced on the MACRO page of RUN PROG screen. (However, variable numbers and its
meaning are subject to change for improvement of function.)
Operation sequence:

RUN MACRO
PROG → DATA → 550 SEARCH

f·3

Variable number and its meaning

Variabel No. Meaning


#550 - #554 Finish allowance of 1st to 5th operation in command direction
Note 1: After 5th operation, five data is rearranged in the ascending
order.
Note 2: Finish allowance is indicated with + if dimensions remains
against per-side reference value, or - if overcut. This sign is not
related to ± for approach direction.
Note 3: All data is in metric (even if inch mode is used).
#555 - #559 Finish allowance of 1st to 5th operation in the direction reverse to
command. (G87 only)
The above notes 1 to 3 are also true.
#520 X machine coordinate of G86/G87 program point (in metric)
#521 Y machine coordinate of G86/G87 program point (in metric)
#522 X machine coordinate of measurement start point (in metric)
#523 Y machine coordinate of measurement start point (in metric)
#525 Offset value for automatic measurement machining (in metric)
#526 Average of intermediate 3 of 5 data in per-side measurement (in metric)
#527 In G86 mode,
same value as #526 This value is compared with each
In G87 mode, average of parameter value.
#526 in two directions
#528 Latest measurement result and evaluation flag by parameter function
0: Measurement is skipped
1: Re-measurement is executed
2: Finish allowance is proper (or 2 is given when “machining OFF” is
set)

7–114
(4) Output of measurement result
The measurement result can be output on the tape puncher or printer connected to the external
RS232C channel (optional) by setting parameter No. 200 bit 3.
In using this function, check before machining whether data is output by G86/G87. Data may
not be output depending on the kind of output unit or tape output parameters (PRM11, 21, 23,
26, 27).
Setting example:
PRM11 ..... 00001000B
PRM21 ..... 4800
PRM23 ..... 10
PRM26 ..... 00010000B
PRM27 ..... 00010000B

Output example:

(=== G87 1ST MEASURING DATA (MM) ===)


(START X(G53) =228.7698 )
G86/G87 start point machine coordinates
(START Y(G53) =185.0388 )
(PARAM.203 = 0.0100 MAX. ERR)
(PARAM.205 = 0.0200 MAX. REM)
Parameter setting values
(PARAM.206 = 0.0020 MIN. REM )
(PARAM.207 = -0.0020 D. PITCH )
(OFFSET DATA = 0.1170 ) → Offset value so far
(REFERENCE X = 3.0000 / 1SIDE ) → Reference value per side
(REMAIN (1) = 0.0087 )
(REMAIN (2) = 0.0092 )
(REMAIN (3) = 0.0095 ) Finish allowance of 5-time measured data
(REMAIN (4) = 0.0097 )
(REMAIN (5) = 0.0105 )
(REMAIN AVE. = 0.0095 ) → Average finish allowance of intermediate 3
data

Measurement in direction reversed to command


(=== G87 2ND MEASURING DATA (MM) ===)
(START X(G53) = 228.7698 )
(START Y(G53) = 185.0388 )
Hence, data is output until measurement ends.

Note 3: Data is output in inch in the inch mode (PRM63 bit 0 = 1).

7–115
(5) Parameters
For the automatic measurement and machining, the following five parameters (SET DATA) are
prepared:
No. 200 FUNCTION SELECTION Standard value: 00000100
No. 203 DEVIATION Standard value: 10 (µm)
No. 205 MAX. STOCK Standard value: 20 (µm)
No. 206 MIN. STOCK Standard value: 2 (µm)
No. 207 OFF CHANGE INCREMENT Standard value: -2 (µm)

7–116
7.38 Z Axis Position Control (G95)

The G95 changes the data of program plane, Z axis position, sub plane, and drawing plane, and for
the machines with automatic Z axis, it moves the Z axis to the specified Z axis position. Also, it
compensates the Z axis perpendicularity if offset data is registered.

Format G95 (Z__) (P__) (Q__) (R__) ; ( ): omissible

Z: Specify the machine coordinate of the Z position (reading of Z axis scale). This
command changes the Z axis position data (equivalent to G10L80P2R_ command),
and moves the Z axis on the machines with automatic Z axis.
P: Specify the program plane (equivalent to G10 L80 P0 R_ command).
Q: Specify the sub plane (equivalent to G10 L80 P1 R_ command.)
R: Specify the drawing plane.

Note 1: The Z axis perpendicularity compensation is executed only when offset data is
registered (parameter No. *085-*094). Normally, it is not registered and
therefore only change of position information and shift of Z axis are executed.
The Z axis perpendicularity compensate function is prepared as one of
countermeasures if perpendicularity becomes worse due to any reason.
Note 2: Only G95; may be specified to perform Z axis perpendicularity compensation.
In this case, however, do not specify G95 in the same block as another G or M
code or move command, but specify it alone during cancel mode of diameter
compensation (G40).
Note 3: The perpendicularity compensate function is turned off automatically by reset
operation.
Note 4: Whether Z axis is to be moved for the machines with automatic Z axis, or
whether Z axis is to be stopped for the machines with manual Z axis when the Z
axis position is changed by G95Z_ command can be selected by the parameter
No.77.
• Parameter No.77 G95 Z Axis Position Standard value 0

7 6 5 4 3 2 1 0 bit

Z axis movement by G95 on automatic Z axis machine


0: Z axis is moved to the position specified by G95Z_.
1: Z axis is not moved (only position information is
changed).

Z axis is stopped by G95 on manual Z axis machine


0: Z axis is stopped by G95.
1: Z axis is not stopped by G95.

7–117
Example:

O1 (TEST G95) ;
In manual Z axis machines, the perpendicularity
G95 Z40. P8. Q20. R8. ; compensation is turned on, and the operation stops
G54 G90 G0 X0 Y0 M6 ; with warning “1069: MOVE Z AXIS TO HEIGHT
OF Z POS. DISPLAY”.
M17 E9001 ;
G91 G1 G41 G44 G52 D1 H30 Y-5. T1.5 ; In automatic Z axis machine, axis moves
X5. ; (perpendicularity compensation becomes valid
when auto operation starts.)
Y10. ;
X-10. ;
Y-10. ;
X5. ;
G40 G50 Y5. ; Z position and sub plane are changed.
G95 Z50. J10. ; In manual Z axis machine, operation stops again.
G55 G90 G0 X0 Y0 MS ; In automatic Z axis machine, axis moves.
M17 E9002 ;
G91 G1 G41 G52 D2 H35 Y-4. T1.2 ;
X4. ;
Y8. ;
X-8. ;
Y-8. ;
X4. ;
G40 G50 Y4. ;
M2 ;

7–118
7.39 Output of Internal Data (G150-G153)

Internal data displayed on the screen can be output to the RS232C channel 2 or any O number on
the EDIT screen using the G150-G153 commands.
G150: Outputs parameters (for re-setting parameters)
G151: Outputs machining conditions (for re-setting conditions)
G152: Outputs machining time (for print out, re-setting not possible)
G153: Outputs machining history (for print out, re-setting not possible)

Whether the data are output correctly by G150-G153 commands should be tested once. They may
not be output depending on the kind of output unit or setting of related set data (No.11, 21, 23, 26,
27).
< Setting example of set data >
No.11 ······ 00001000B Edit function (2)
No.21 ······ 4800 RS232C interface (2) baud rate
No.23 ······ 10 RS232C interface (2) wait timer
No.26 ······ 00010100B RS232C interface output function
No.27 ······ 00010000B RS232C interface auxiliary function

(1) Output of parameters (G150)


The parameters (set data, machine parameters, system parameters) on the SET SET DATA
screen, and the running time (power ON, program, MC time) on the DIAGNOSE
MAINTENANCE screen can be output in the re-settable format to the RS232C channel 2 or
any O number on the EDIT screen.
Forma: G150 (O_) (L_) ; ( ): omissible
O_: Specify any O No. on EDIT screen. If O_ is omitted, the data are output to RS232C
channel 2.
L_: Output data can be selected (L1-L31).
Specify total value of "L_" of the following bit pattern.
If L_ is omitted, L8 (output of parameters by machine No. and run time) is selected.

16 8 4 2 1 L_ value
– – – 4 3 2 1 0 bit

Set data 0: Not output 1: Output


Machine PRM 0: Not output 1: Output
System PRM 0: Not output 1: Output
PRM by MC No. 0: Not output 1: Output
Run time 0: Output 1: Not output

7–119
Example 1: Output of parameters by machine number at shipment
G150 L24 ; Only parameters by machine number are output.
Example 2: At the time of general software updating
G150 L8 ; Parameters by machine number, and run time are output.
Example 3: Output of all data (for checking troubles, etc.)
G150 L15 ; Set data, machine parameters, system parameters, parameters by
machine number, and run time are output.

Registering method of saved parameters


When registering the parameters saved by G150 (L_) command to arbitrary O number, then starting
them in the MEN RUN mode, the function was changed so that the parameters to be set can be
selected by specify N number.
Enter the data outputted by G150 (L_) command to arbitrary O No. on the EDIT screen, and start O
No. (N_) in the MEN RUN mode. Register the following data using respective N numbers.
Though N No. corresponds to L of G150 command, if N No. is omitted during registration, the set
data and parameters by machine No. are set.

N1 SET N10 MCH, MCH No.


N2 MCH N11 SET, MCH, MCH No.
N3 SET, MCH N12 SYS, MCH No.
N4 SYS N13 SET, SYS, MCH No.
N5 SET, SYS N14 MCH, SYS, MCH No.
N6 MCH, SYS N15 SET, MCH, SYS, MCH No.
N7 SET, MCH, SYS N24 MCH No. (Running time is not registered)
N8 MCH No. N31 SET, MCH, SYS, MCH No.
(Running time is not registered)
N9 SET, MCH No. No N SET, MCH No.

Example: To re-register the parameters by machine No. and the running time only using the data
outputted by G150L15, start N8 of O No. in the MEM RUN mode.
As a rule, do not restore all parameters after the software revision. The changed values do not
become effective, thus causing a malfunction. Use the all parameter restoring function started by
N15 only if RAM clear is executed without revising the software.

Note : Specifying the data not outputted by G150 (L_) command by N at the
registration does not cause alarm or warning, but they are not registered.
Example: The set data are not registered even if N9 is specified for the data outputted by G150L8.

7–120
(2) Output of machining conditions (J type power supply units G151)
The user machining conditions (E9000-E9999) on the COND LIST screen can be output in the
re-settable format to the RS232C channel 2 or any O number on the EDIT screen.
Format G150 (O_) (S_ E_ (M02) ) ; ( ): omissible
O_: Specify O No. on EDIT screen to which conditions are output. If O_ is omitted, they
are output to RS232C channel 2.
S_: Specify the first E No. to be output in this block. If both S_ and E_ are omitted, this
command is equivalent to S9000 E9999 command, which outputs all user conditions.
If either S_ or E_ is omitted, this is an invalid command and no data is output.
E_: Specify the last E No. to be output in this block. S must be equal to or less than E.
If both S_ and E_ are omitted, this command is equivalent to S9000E9999 command,
which outputs all user conditions.
If either S_ or E_ is omitted, this is an invalid command and no data is output.
M02: If M02 is programmed in G151 block, M02 can be output in the program output in
the re-settable format.
M02 is automatically added if both S_ and E_ are omitted.

Example 1: G151 O1 ; All machining conditions of E9000-E9999 are output to O1 on the


EDIT screen.
Example 2: If only parts of E numbers (E9000-E9003, E9010, E9090-E9093) are to be output
O2 ; ← Multiple blocks are usually output in MEM RUN mode.
G151 S9000 E9003 ; ← E9000-E9003 are output.
G151 S9010 E9010 ; ← E9010 is output.
G151 S9090 E9093 M02 ; ← E9090-E9093 are output, then M02 is output.
M02 ; ← End of O2 program

Note: For the G151 of J type power supply units, the “unexecutable machining
conditions because of illegal elements” are not output and they are skipped
automatically.

7–121
G10 L20 I_ J_ K_ P_ Q_ R_ ;
First machining condition (two lines make up a set of
G10 L21 I_ J_ K_ P_ Q_ R_ ; command)
:
:
:
G10 L20 I_ J_ K_ P_ Q_ R_ ; Last machining condition (two lines make up a set of
G10 L21 I_ J_ K_ P_ Q_ R_ ; command)
M02 ; M02 is output

(3) Output of machining conditions (J type power supply units G151)


The machining conditions (E1-E9999) on the COND LIST screen can be output in the re-
settable format to the RS232C channel 2 or any O number on the EDIT screen.
Format G150 (O_) (L_) (S_ E_ (M02) ) ; ( ): omissible
O_: Specify O No. on EDIT screen to which conditions are output. If O_ is omitted, they
are output to RS232C channel 2.
L_: Specify attribute (user/Makino standard) of the machining conditions to be output
0: Only user conditions are output
1: Only Makino standard conditions are output
2: Both are output
Default: “2: Both are output” is selected
S_: Specify the first E No. to be output in this block. If both S_ and E_ are omitted, this
command is equivalent to S1E9999 command, which outputs all conditions.
If either S_ or E_ is omitted, this is an invalid command and no data is output.
E_: Specify the last E No. to be output in this block. S must be equal to or less than E.
If both S_ and E_ are omitted, this command is equivalent to S1E9999 command,
which outputs all conditions.
If either S_ or E_ is omitted, this is an invalid command and no data is output.
M02: If M02 is programmed in G151 block, M02 can be output in the program output in
the re-settable format.
M02 is automatically added if both S_ and E_ are omitted.

Example 1: G151 O1; All machining conditions of E1-E9999 are output to O1 on the EDIT
screen.
Example 2: G151 O2L0; Only user conditions of E1-E9999 are output to O2 on the EDIT
screen.
Example 3: If only parts of E numbers (E8980-E8999, E9010, E9030-E9039) are to be output
O3 ; ← Multiple blocks are usually output in MEM RUN mode.
G151 S8980 E8999 ; ← E8980-E8999 are output.
G151 S9010 E9010 ; ← E9010 is output.
G151 S9030 E9039 M02 ; ← E9090-E9093 are output, then M02 is output.
M02 ; ← End of O3 program

7–122
Note 1: For the G151 of J type power supply units, the “unexecutable machining
conditions because of illegal elements” are output as they are.
Note 2: Though for the G151 of J type power supply units, the machining
conditions can be output by specifying the attribute (user/Makino
standard), analogous output can be executed using S_E_ instead of the
attribute.
G151 S1 E8899 ; ← Makino STD cond. are registered between E1 and E8899.
G151 S9000 E9999 ; ← User cond. are created usually between E9000 and E9999.
G151 S8900 E8999 ; ← System reserved cond. (such as wire break recovery cond.
treated as user cond.) exist between E8900 and E8999.

(4) Output of machining time (G152)


The data on the DGN f · 4 (MACHINING TIME) screen is output on the RS232C channel 2 in
the same format as the screen. However, characters including item name are output in English.

Format: G152 (O_) ; ..... MDI RUN (or MEM RUN) mode

< Output example >

( ***** MACHINING TIME PRINT ***** )


(– NO – RUN TIME – MC TIME – O NO – N NO – E NO – WIRE LEN –)
( 01 0 : 00 0 : 00 MDI 0000 9003 1 )
( 02 0 : 00 0 : 00 0001 0000 9007 5 )
( 03 0 : 01 0 : 00 0002 0200 9007 10 )
( 04 0 : 05 0 : 03 0135 0200 2501 45 )
( 05 0 : 07 0 : 02 MDI 0000 2501 63 )
( 06 0 : 09 0 : 02 MDI 0000 2501 01 )
( 07 0 : 10 0 : 01 0148 0200 9000 09 )

Note 1: The G152 outputs actual machining time to the printer in the text format, and
output data are not re-settable.
Note 2: The number of data to be output is same as that displayed on the screen, and
its range cannot be specified (maximum 200 data).

7–123
(5) Output of machining history (G153)
The data on the DGN f · 5 (MACHINING HISTORY) screen are output to the RS232C
channel 2 or any O No. on the EDIT screen in the same format as the screen. However,
characters including item name are output in English.
Format G153 (O_) ; ... MDI RUN ( or MEM RUN) mode

< Output example >

( ***** MACHINING STATUS PRINT ***** )


(– NO – TIME – STATUS – CONT – O NO – E NO – X COORD – Y COORD –)
( 01 00 : 00 WARN 53 MDI 9000 75.461 54.273 )
( 02 00 : 00 RESET MDI 9000 75.461 54.273 )
( 03 00 : 00 ALARM 2200 MANUAL 9000 75.461 54.273 )
( 04 00 : 00 RESET MANUAL 9000 75.461 54.273 )
( 05 00 : 00 RESET MANUAL 9000 57.157 41.100 )
( 06 00 : 01 START 0306 9000 55.451 39.881 )
( 07 00 : 03 RESET 0306 9000 67.481 51.931 )
( 08 00 : 03 START 0001 9000 67.481 51.931 )
( 09 00 : 03 G92 0001 9000 67.481 51.931 )
( 10 00 : 08 RESET 0001 2501 80.511 40.631 )
( 11 00 : 09 START 0120 2501 80.511 40.631 )
( 12 00 : 09 G92 0120 2501 80.511 40.631 )
( 13 00 : 13 RESET 0120 5103 93.541 29.331 )

Note 1: The G153 outputs actual machining history to the printer in the text format, and
output data are not re-settable.
Note 2: The number of data to be output is same as that displayed on the screen, and
its range cannot be specified (maximum 200 data).

7–124
7.40 NC Data Saving / Registration (G154)

For the software updating, the NC data can be saved and registered using a floppy disk.
This function can be used only for the machines with the floppy disk drive.
(1) Format
The kind of data to be saved and registered can be selected with the setting of G154 parameter
“S”.
Format G154S_;
Setting of parameter S
S2: Save all NC data S1: Save standard NC data only
S-2: Re-register all NC data S-1: Re-register standard NC data only
* In updating the software, save NC data with S2 before updating, and then re-register
them with S-1 after updating.

(2) Starting method


(2)-1 Data saving
(a) Set the formatted and write-enabled floppy disk to the FDD in the machine.
(b) Check on the DISK DIR. screen that the floppy disk can be read.
(c) In the MDI RUN, start the following program.
G154S2;M30; or G154S1;M30;
(d) Though the warning will be displayed once, restart the program if no problem.
* Note that all NC programs are deleted from the NC unit after the program started (but,
these are saved in the floppy disk).

(2)-2 Data re-registration


(a) Set the floppy disk used in (2)-1 to the FDD in the machine.
(b) Check on the DISK DIR. screen that the floppy disk can be read.
(c) In the MDI RUN, start the following program.
G154S-2;M30; or G154S-1;M30;
* Normally, use the S-1 parameter. (Only the parameters by machine number are re-
registered.)

(3) Precautions
(a) This function should be performed under the instruction by Makino.
(b) O10000’s macro, and the data during machine operation or in graphic mode are not saved.
(c) This function can be used only for the machines with the floppy disk drive.

7–125
7.41 Initializing data on each screen (G155)

Of various data stored in the RAM, only the data stored for each screen can be initialized
selectively.
In general, the data in RAM are all initialized at a time by the RAM clear operation, but use the
G155 command to initialize only a part of data.

(1) Format
The data on each screen to be initialized can be selected with the switch "L" of G155S999.
Format G155 S999 (L__) ; ( ): omissible
Setting pattern of switch L
For each bit, 0: data not initialized, 1: data initialized.
*The data on all screens are initialized if all bits are "0" or "ON".

– – – 4 3 2 1 0 bit

SET (G155 S999 L1)


COND (G155 S999 L2)
DIAGNOSE (G155 S999 L4)
NC FUNC (G155 S999 L8)
MACH OPE (G155 S999 L16)

Example 1: G155 L999 L3 ... Initialize SET + COND data


Example 2: G155 S999 L0, L31, or no L ... Initialize SET + COND + DIAGNOSE +
NC FUNC + MACH OPE data

The following describes the switch L in detail.


L0 or omitted : Initialize SET + COND + DIAGNOSE + NC FUNC + MACH OPE data.
L1 : Initialize data on SET screen.
OFFSET screen ... Offset values D0-D9, PROG. PLANE -ROTATION
WK OFFSET screen ... G54-G61 work coordinates

OVERRIDE screen ... F feed, DSC (Note), DSG(Note)


M08 CONTROL screen ... M08 control items

7–126
L2 : Initialize data on COND screen.
J type power supply units
MAIN screen ... PATH LENGTH, REM. TIME, APPROACH
SUB screen ... FILL HEIGHT, WIRE REMAIN, OVERRIDE, WIRE
DIAMETER, WATER RESERVOIR FILTER SWITCH
MODE
K type power supply units
MAIN screen ... REM.PATH, WIRE DIA., WIRE REM., APPROACH,
FILTER
SUB screen ... DSC
L4 : Initialize data on DIAGNOSE screen.
Data on RUN TIME, MC TIME, and HISTORY screens
L8 : Initialize data on NC FUNC screen.
All function keys ON information is initialized.
L16: Initialize data on MACH OPE screen.
MACH OPE screen ... ION OFF, PUMPS OFF, REMOTE MONITOR,
WATER DWELL TIMER
AWC screen ... AWC RANDOM

Note: For the J type power supply units, the DSC and DSG data are initialized. (For
the K type power supply units, the DSC and DSG items are not provided on
the OVERRIDE screen.)

(2) Starting method


Example: Data on NC FUNC and DIAGNOSE screens are to be initialized
(a) Start the following program in the MDI RUN or MEM RUN mode. (In the case of MEM
RUN mode, specify desired O No.)
G155 S999 L12 ; (L4+L8=L12)
M30 ;
(b) Start the program, then turn the power OFF once, then ON.
(c) Open the NC FUNC, and DIAGNOSE (RUN TIME, MC TIME, HISTORY) screens to
confirm that the data have been initialized.

(3) Precautions
This function cannot initialize the data of all screens, and therefore erase the data on the
following screens by manual operation.
(a) EDIT screen: O1-O7999 programs except user’s own programs
(b) MACH OPE screen: X-Z LIMIT keys and EXPAND STROKE key

7–127
7.42 Drawing Restriction (G580-G583)

There are four functions in drawing restriction:

Code Function
G580 M98 call restriction ON in auto scaling
G581 M98 call restriction OFF in auto scaling
G582 M98 call restriction ON in drawing
G583 M98 call restriction OFF in drawing

The G580-G583 are special G codes to restrict a subprogram call in drawing on the GRAPHIC
screen. They are specified in main program, but normally they will be seldom used.
If scaling is determined with SCALE MODE on GRAPHIC screen set to 1 (M98), the number of
call times for the same subprogram is restricted, so that auto scaling time can be shortened.
The G580/G581 are modal and they are only valid when the SCALE MODE is 1. They turn on/off
the restriction of several calling of same subprogram.
That is, if G580 is specified, the number of subprogram call times is reduced, and auto scaling time
can be shortened though the drawing scale becomes rather rough. If G581 is specified, the same
subprogram is called every time and auto scaling time is long, but more proper drawing scale can be
determined.
Normally, this function need not be specified, but it is specified where dimensions between rough
machining and finish machining are extremely different and the drawing time is to be shortened.
The G582/G583 turn on/off restriction of subprogram call in actual drawing, and they are only valid
when M98 setting is 1 (only once on same position).

Note 1: Do not specify G580-G583 during diameter compensation (G41 or G42).


Note 2: G580/G581 and G582/G583 are modal, and G580 and G582 are selected
respectively at the drawing reset.
Note 3: G580-G583 are special G codes for graphic drawing control, and they do not
function in actual machining (program execution on foreground).
Note 4: G580-G583 are automatically output in the coreless machining of model plan.

7–128
7.43 Inch Mode Diameter Compensation x10 Resolution (G918, G919)

Two functions are available for the inch mode diameter compensation x10 resolution.

Code Function
G918 Diameter compensation x10 resolution OFF
G919 Diameter compensation x10 resolution ON

The G919 specifies only the offset value with x 10 resolution in the unit of 0.00001 inch in the inch
standard resolution mode. It is used when offset value in 0.0001 inch is rough.
When G919 is specified, actual offset value becomes one tenth of command code.

Example 1:

G919 ; Diameter offset D x10 resolution ON (modal ON)


:
G91 G41 D0.0912 Y1. ; D offset = 0.00912 inch
:
G918 ; Diameter offset D x10 resolution OFF (modal OFF)
:

Example 2:

G919 ;
:
G91 G42 D815 X0.5 Y0.5 ; D offset = 0.00815 inch
:
G918;

Note 1: G918 and G919 are modal, and G918 is selected by RESET , M02 or M30.
Note 2: G919 is invalid for commands other than D or metric mode.
Note 3: Values or OFFSET screen become one tenth even if D is indirect command
mode.
Note 4: The relationship between command code and actual offset value in each
resolution is as listed below:

Command Code
Resolution (Inch mode) G918/G919
D1000 D0.1
G918(OFF) 0.1 inch 0.1 inch
Standard resolution
G919 (ON) 0.01 inch 0.01 inch
G918 (OFF) 0.01 inch 0.1 inch
High resolution
G919 (ON) 0.01 inch 0.01 inch

7–129
8. DIRECTIONS ON A MULTIPLE COMMAND OF G26, G48, G68, G71, G73, ETC.

8.1 Multiple Command Processing Procedures

Graphic processing procedures are as follows when scaling, rotation, mirror image, or other
functions are specified in one command:

i. G26, G48 and G68 are processed in sequence of specified codes.


ii. Axis change
iii. Mirror image

(1) Rotation copying, scaling and rotation


These functions are processed in sequence of specified codes. When scaling is made valid first
and rotation is made valid next, scaling is also applied to a command value for the center of
rotation.
To make invalid these functions, program codes to that effect in the order that is reverse to the
time when they are made valid.

(2) Axis exchange


Axis exchange is executed only when either AXIS CHANGE on NC FUNC screen or G73 is
turned on.

(3) Mirror image


Mirror image processing varies depending on the setting of axis exchange that has priority.

Axis exchange
OFF ON
Mirror X ON Either MIR_X or Either MIR_X or
condition G71X1 is on. G71Y1 is on.
Mirror Y ON Either MIR_Y or Either MIR_Y or
condition G71Y1 is on. G71X1 is on.

MIR_X is MIRROR X on the NC FUNC screen.

MIR_Y is MIRROR Y on the NC FUNC screen.

Note 1: Do not specify scaling, rotation, rotation copying, etc. in a program that uses
axis exchange and mirror image of the NC function screen and also uses G71
and G73 after axis movement.

8–1
8.2 Coordinate System Changeover at the Time a Multiple Command is Executed
(When mirror axis locking is off)

Axis change, mirror image, G26, G48, G68, G71 and G73 have their center coordinate value. With
axis change and mirror image of the NC FUNC screen, a program start coordinate value becomes
their respective symmetry axis coordinate value.
With G71 and G73, a coordinate value at the time when it was programmed become one of a
symmetry axis and with G26, G48 and G68, their respective center command value becomes one of
each function.
A symmetry axis coordinate value and center coordinate value are work coordinate values and are
stored by in the NC device. In case the work coordinate system is switched while each function is
on, an original symmetry axis coordinate value and a center coordinate value become a symmetry
axis and a center coordinate value on a new work coordinate system.
Note 1: Symmetry axis of each function

Example 1:

20
Mirror image symmetry
20 axis in G55
Mirror image symmetry
axis in G54 10

10
P0´
G55
P0 0 10 20
G54
0 10 20 30

Main program Subprogram (O1)


G71 X1 ; G91 M17 ;
G68 R90. ; G1G 41 D0 Y5. ;
M98 O1 ; X-2.5 ;
G55 G90 G0 X10. Y5. M06 ; Y10. ;
M98 O1 ; X5. Y-10.0 ;
G69 ; X-2.5 ;
G70 ; G40 Y-5. ;
M30 ; M18 ;
M99 ;

Axis change and mirror image of the NC FUNC screen are off
Start point P0 coordinate value : X10. Y5.

Mirror image X symmetry axis coordinate value : X10.


Rotation center coordinate value : X10. Y5.

8–2
Example 2:

Mirror image symmetry


axis in G54
Mirror image symmetry 20
axis in G55
P3 P2
20
a b´ c´
10

10
c P0´ P1
b G55
P0 0 10 20
G54
0 10 20

Main program
G71 X1 ;
G68 R90. ;
M98 O1 ;
G55 G90 G0 X20. Y0 M06 ;
M98 O1 ;
G69 ;
G70 ;
M30 ;

Axis change and mirror image of the NC FUNC screen are off
Start P0 coordinate value: : X10. Y5.

Mirror image X symmetry axis coordinate value : X10.


Rotation center coordinate value : X10.5.

Figure a´ with start point P1 rotated 90° on P0´ becomes figure b´ with start point P2. Figure b´
rotated on the mirror image symmetry axis becomes figure c´ with start point P3 and this is the
figure obtained in G55.

8–3
8.3 Coordinate System Setting at the Time a Multiple Command is Executed
(Except for coordinate system rotation, mirror axis locking)

A coordinate system is set up independent of other functions and set values are not influenced by
axis change, mirror image, G48, G68 and other functions. Symmetry axis and center coordinate
values of each function described in Section 8.2 are work coordinate values.
When a new coordinate system is set up, symmetry axis and center coordinate values of each
function are updated so that new values may be the same as old ones in the machine coordinate
system.

8.4 Mirror Axis Locking

Mirror axis locking is the function to fix symmetry axis coordinate values of axis change and mirror
image X and Y of the NC FUNC screen.
When mirror axis locking is not used, each symmetrical axis coordinate value becomes the work
coordinate value of the program start point. (see Section 8.2)
The symmetry axis is not changed even by coordinate system switching because mirror axis locking
designates a symmetry axis coordinate value as machine coordinates.

When both the mirror axis lock and axis change, mirror X or mirror Y on NC FUNC screen are
turned on, the machine coordinates are the coordinates in the symmetry axis that was active on the
NC FUNC screen..
Once mirror axis locking is made valid, a symmetry axis coordinate is fixed until it is made invalid.
When G71 and G73 are programmed, a symmetry axis coordinate value is set at the program start
point temporarily. G70 and G72 restores a former symmetry axis coordinate value.
This function is used to apply axis change or mirror image X and Y to a workpiece each machining
start point of which is programmed by an absolute command in a multiple machining program or
machining that progress in regular sequence.

8–4
9. MISCELLANEOUS FUNCTIONS (M CODES)
9.1 Kind of Miscellaneous Functions

Miscellaneous functions are used to control auxiliary functions of machine and power supply unit,
and expressed with an M code followed by 1 or 2 digit integer. Table 9.1 lists miscellaneous
functions provided by this system.

Table 9.1 Miscellaneous functions

Before and after


Continuty of Command in radius
execution/allocation
M code Function function offset mode
of the function
Before After Modal One-shot Possible Impossible
M00 Program stop ○ ○ ○
M01 Optional stop ○ ○ ○
M02 End of program ○ ○ ○
M05 Discharge off ○ ○ ○
M06 Wire automatic threading ○ ○
(Cutoff) (thread) ○ ○

M07 Wire automatic cutoff ○ ○ ○


M08 Remain/cutoff ○ ○
(preprocessing) (postprocessing)
○ ○
M16 Condition data transfer ○ ○ ○
M17 Machining on ○ ○ ○
M18 Machining off ○ ○ ○
M20 Initial hole machining ○ ○ ○
M28 Work tank filling ON ○ ○ ○
M29 Work tank filling OFF ○ ○ ○
M30 End of program and ○ ○ ○
rewind
M40 Water conductivity check ○ ○ ○
M58 Work tank down ○ ○ ○
M59 Work tank up ○ ○ ○
M60 Indexing Note 9. ○ ○ ○
M62 Rotation clamp Note 9. ○ ○ ○
M63 Rotation on Note 9. ○ ○ ○
M64 Rotation unclamp Note 9. ○ ○ ○
M65 Rotation off Note 9. ○ ○ ○
M66 Auto work change Note 7. ○ ○ ○
M67 Work loading Note 7. ○ ○ ○
M68 Work unloading Note 7. ○ ○ ○
M71 Approach ○ ○ ○
M72 Water flow rate control ○ ○ ○

9–1
Before and after
Continuty of Command in radius
M code Function execution/allocation
function offset mode
of the function
M73 Core removing Note 5. ○ ○
(preprocessing) (remove) ○ ○

M74 Process skip ○ ○ ○


M75 Reference hole retry ○ ○
Note 10.

M90 M08 control ○ ○ ○


M97 FD program loading ○ ○
M98 Subprogram call ○ ○ ○
M99 Subprogram end ○ ○ ○
M200 Noncontact point ○ ○ ○
searching Note 11.

Note 1: For the machining ON or OFF (M17 or M18), the machining OFF (M18) is
selected at the power ON, RESET , M02, and M30.
Note 2: Do not program M code listed in “Impossible” column in the wire radius offset
mode (G41, G42).
Example 1: Programming of M02 or M30 in the wire radius offset mode causes an alarm (1002:
M02, M30 PROGRAMMED BEFORE OFFSET CANCEL).
Example 2: Programming of M06, M16, M17, M18, M20, M28, M29, M40, M58, M59, M60,
M62, M63, M64, M65, M66, M67, M68, M72, M74 or M75 in the wire radius offset
mode generates internally two or more blocks that do no contain the move command,
thus causing overcut or shifted path, unlike normal radius compensation.
Note 3: Do not program more than two kinds of M codes in a block. If programmed,
machine operation varies depending on the M codes programmed.
Note 4: Programming of an M code not supported by this NC unit will, as a rule, cause
an alarm (1045: UNDEFINED G, M COMND). However, there are some M codes
not opened for system processing, and therefore, use of M codes not listed
herein should be avoided.
Note 5: The M73 (core removing) is a command of optional function for the UPH-1.
Note 6: Although M code is, in general, expressed with two digits, 3-digit M code may
be programmed in a special case.
Note 7: M66, M67, and M68 are commands of optional function for the UPH-1, UPH-2,
UH-2 and W-PG1.
Note 8: Before and after allocation means that if the allocation command (X_, Y_, etc.)
and M code are programmed in the same block, whether the M code is executed
before start of allocation or after completion of allocation is determined in,
advance depending on the contents of M code.
M06, M08, and M73 are special commands, and different processings are
executed before and after allocation.
Note 9: M60, M62, M63, M64, and M65 are commands of optional function for the UPH-1,
UPH-2 and UH-2.
Note 10: Though the M75 for the reference hole retry is provided for the compatibility
with conventional models, normally use it by making a setting on the SET AWT
screen.
Note 11: For the M200, see Basic Operation 2.6.2 “Noncontact point searching function”.

9–2
9.2 Program Stop (M00)

Programming M00 stops machining temporarily after completing wire movement in the current
block. At this time, the machine and machining power supply enters into the off status.

The internal status of the NC device is retain, and pressing the START key turns of the machine
and machining power supply and resumes operation.
Note: The off status of the machine refers to a status in which wire winding and
dielectric fluid supply (flushing) are stopped.
The off status of the machining power supply refers to a status in which no
voltage is applied between wire and workpiece.
Example: Prevention of workpiece cutting in a single machining program during unmanned
operation

%;
G92 X0 Y0 ;
M17 ;
G91 G01 G41 Y-10000 ;
X10000 ;
M00 Y20000 ;
0.3 ~ 0.5 X-20000 ;
behind the
start point
Y-20000 ; The program always stops temporarily.
X9700 M00 ; Clamp the workpiece, then press the
X300 ; START key for restart.
G40 Y10000 ;
M30 ;
%

9–3
9.3 Optional Stop (M01)

Like M00, programming M01 stops machining temporarily after movement of that block.
Temporary stop is valid only when the f · 4 (OPT STOP) on the first screen of NC FUNC screen is
turned ON. If OFF, machining continues without stop.
Selection of ON or OFF of optional stop can be made even during operation.

Example: Optional stop in micron machining

%;
G92 X0 Y0 ;
M17 ;
G91 G01 G41 Y-10000 ;
X10000 ;
M01 Y20000 ;
X-20000 ;
Y-20000; In the first cut, turn the optional stop ON to
X9700 M01 ; prevent cutting off of workpiece.
X300 ; In the second and subsequent cuts, turn it OFF
G40 Y10000 M30 ; because temporary stop is not necessary.
%

Note: Program M00 or M01 together with a movement command in a block whenever
possible. Programming it in a block consisting of itself may conflict with
restrictions (not to make blocks with no movement consecutively) on wire radius
compensation (G41 or G42).

9–4
!’“™š
9.4 End of Program (M02)

Program M02 or M30 as end of program in the last block of a program. Programming M02 stops
machining temporarily after completing wire movement in the current block. Then, the machine
and machining power supply enter into the off status. Also, the NC device is reset, and all buffers
are cleared. Initialization executed for those modal G and M codes to which reset can be applied.
The last block of a program in which M02 or M30 is programmed must be in the wire radius
compensation cancel mode (G40) or taper machining cancel mode (G50).

Note 1: Like in other blocks, M02 must also be followed by EOB (LF in an ISO code, and
CR an in EIA code).
Note 2: A program number is searched when the RESET key is pressed or when M02 or
M30 is executed during memory operation.

9.5 Discharge off (M05)

Programming M05 gives machining power supply the current off status (touch sensing status) while
the wire is moved in the current block. The movement speed varies depending on the status of the
gap (distance between the wire and the workpiece) with the speed set on the COND screen as the
upper limit. Because the workpieces is not machined, the wire cannot move forward if it is very
close to or in contact with the workpiece. This means that the path in a block in which M05 is
programmed must be machined in advance, as in the case where the wire returns from a workpiece
contour to the machining start point. This function is not used very often in ordinary programs.

Example: Block in which the wire returns in slit machining

%;
G92 X0 Y0 ;
M17 ;
G91 G01 Y5000 ;
G02 X10000 Y10000 I10000 ;
G03 X-10000 Y-10000 J-10000 M05 ;
G01 Y-5000 ;
M30 ;
%

Note: The current-off status of machining power supply is a status in which a low
voltage is applied between the wire and the workpiece for discharge gap
detection. In this condition, no discharge takes place and machining remains
suspended.

9–5
9.6 Automatic Wire Threading (M06)

M06, usually programmed together with a movement command of rapid traverse (G00), makes the
wire cut off automatically before movement starts in the current block and makes the wire threaded
automatically after movement ends. This function is used when the wire cannot be moved with the
wire threaded, for example, movement between holes.
The M06 must be specified in the cancel mode (G40 and G50), if it is used in the wire radius offset
mode or taper machining mode.

Example 1: Movement between two points

G00 G91 X30000 Y15000 M06 ;


End point
The wire is cut off at the start point.
0 ↓
G0

15
The wire moves by rapid traverse.
30
Start point ↓
The wire is threaded at the end point.

Note 1: If the wire has already been cut off manually, for example, at the start point,
another cutting is not performed. The wire just moves and then threaded.
Note 2: When M06 is programmed in a block with no movement command, the wire is
cut off and threaded there. However, if the wire is already threaded, the wire
cutoff → threading is skipped. If the wire cutoff → threading is to be executed,
set the set data No.58 bit 7 (M6 skip without movement) to OFF.

Note 3: For automatic wire cutting and threading, the AWT SKIP on the NC FUNC screen
must be turned off. If it is turned on, the M06 stops operation at the start point
and end point, and therefore wire must be cut and threaded manually.
A combination of ON/OFF of AWT SKIP and DRY RUN changes the details of
M6 operation.
For further information, see the Operation, 9.5 M6 Test Mode.
Note 4: If automatic wire threading is not completed within a certain period of time, the
warning is displayed and operation is stopped. In this case, remove a cause
and press the START key to resume operation.
Note 5: For the UPH-1, the work tank automatically moves down during automatic wire
threading(M06). It stays at the down position even after automatic wire
threading is finished. Upon execution of the machining ON (M17), it
automatically moves up.
Therefore, normally the work tank down and up (M58 and M59) commands are
not necessarily specified before and after M06 and M17.

9–6
Š‹‘’!"“”š›
Example 2: Continuous machining by using automatic wire threading

10
G0

30
0
10

15
%;
G92 X0 Y0 ;
M17 ;
G91 G01 G41 X5000 ;
Y5000 ;
X-10000 ;
Y-10000 ;
X10000 ;
Y4500 ;

X-10000 ;
Y-10000 ;
X10000 ;
Y4500 ;

M30 ;
%
Do not cut the workpiece.
G00 G40 G90 X30000 Y15000 M06 ;

M17 ;
Movement to another workpiece
Program machining on after M06
G91 G01 G41 X5000 ;
Y5000 ;

Do not cut the workpiece.


G00 G40 G90 X0 Y0 M06 ;
Return the wire to the program
start point.

Note 6: When using M06 for continuous machining, prepare a program so that the wire
will not move after the workpiece is cut in an unmanned status.
Note 7: When the wire moves to the next machining shape without cutting the first
workpiece as in example 2, set the wire radius compensation mode and taper
machining mode to the cancel mode in the M06 block (G40 and G50).
Note 8: Executing M06 makes M18 (machining off) valid automatically. For subsequent
machining, program M17 (machining-on).
Note 9: During the time from wire cut to wire threading, the X, U and Z axes (X, Y, Z axes
for UPH-1, UPH-2 and UH-2) are shifted, then they return to the original position
after completion of automatic wire threading.
Therefore, take care of the following points:
(a) These axes are kept shifted if automatic wire threading is cancelled during
execution.
→ Press the M6 SHFT RETURN key to return them to the original
position.
(b) If automatic wire threading is executed at the position near soft stroke
limit, overtravel (soft limit over) may result.
(c) The axis shift direction is fixed, irrespective of mirror image or rotation.
Note 10: Various parameters for the auto wire threading are arranged on the SET

AWT screen.

9–7
9.7 Automatic Wire Threading Position Update (M06L1)
The automatic wire threading (AWT) position update function (M06L1) does not perform actual
wire threading but it only updates the position data at which AWT is executed in case of wire break
recovery or power failure recovery. In the wire break recovery/power failure recovery, AWT is
executed after the head returns to the previous M6 or program head. As a result, too long recovery
movement can damage the finished surface.
This function, with purpose of protecting finished surface and shortening recovery time, sets the
wire break/power failure recovery point by adding the M06L1 block at the AWT position.
Note 1: Although modal of M17/18 does not change even if M06L1 program is executed,
program M17 after M06L1 to prepare for the case when wire break recovery/
power failure recovery occurs later.
Note 2: The M06L1 must be specified in the cancel mode (G40 and G50), if it is used in
the wire radius offset mode or taper machining mode.

Example 1: Slit machining


O1 ;
No.1 No.2 No.3 No.4 No.5
G92 X0 Y0 ;
M98 P1 R5 ;
M30 ;

N1 ;
M17 ; Note 1: Specify M17 after
P1 P2 P3 P4 P5 G91 G1 G42 D1 Y1. ; M06L1
Start point or M6 point Y10. ;
X1. ;
By adding M6L1 block at P2-P5 points,
Y-10. ;
the wire break/power failure recovery
processing is executed at the P3 point G40 Y-1. ;
(conventionally, the head returned to P1 G0 X4. ;
point) if wire break/power failure occurs M06 L1 ; Note 2: Specify M06L1
during, for example, machining of No. 3 M99 ; after G40, G50
shape.
Example 2: Die-shape micron machining
O1 ;
G92 X0 Y0 ;
E9001 D1 M98 P1 ;
E9002 D2 M98 P1 ;
E9003 D3 M98 P1 ;
E9004 D4 M98 P1 ;
M30 ;
;
N1 (SUB) ;
G91 G01 G41 Y-10. M17 ; Note 1: Specify M17
X10. ; after M06L1
Y20. ;
X-20. ;
Addition of M6L1 block can restart Y-20. ;
operation from 2nd recovery condition X9.5 M1 ;
without returning to 1st machining even X0.5 ;
if wire break or power failure occurs G40 Y10. ;
M6 L1 ; Note 2: Specify M06L1
during 2nd machining.
M99 ; after G40. G50

9–8
9.8 Intermediate Point Programming Function for Wire Break/Power Failure Recovery
(M06 P_ Q_ R_)

In order to prevent interference between head and workpiece mounting plate during return to M6
point for wire break/power failure recovery during machining, the intermediate point can be
programmed so that the head returns to M6 via that point.

Wire break or power


Intermediate point failure point
Workpiece mounting
plate

Wire break recovery path after


M6 point setting intermediate point
Reference point
Power failure recovery path
after intermediate point

Format: M06 P_ Q_ (R_) ; P: X work coordinate of intermediate point


Q: Y work coordinate of intermediate point
R: Z work coordinate of intermediate point
Note 1: R_ is for automatic Z axis machine only. (Omissible)
Note 2: If either P_ or Q_ is omitted, an alarm results (2022: M6PQR FORMAT ERROR).
Note 3: The intermediate point is cancelled by execution of the next M6. If it is to be
updated or kept, program P_Q_R_ for every M6 blocks.
Note 4: The mirror image and axis exchange are not applied to the intermediate point
coordinates.
Note 5: The head does not move to the Z axis intermediate point coordinate R_, if the
R_ is specified at lower position than AWT point (M6) and Z axis coordinate
where wire break or power failure occurred.
Note 6: This function is valid only in one machining process (from M6 to before next
M6).
Example:
G92 X0 Y0 ;

M6 P10. Q20. ; First M6


G91 G1 X10. M17 ;

G0 X10. Y10. M6 P30. Q30. ; Second M6


G91 G1 X10. M17 ;
M30 ;

The intermediate point coordinates (P_Q_) specified by the first M6 are cleared immediately before
the second M6. If the intermediate coordinates (P_Q_) are specified by the second M6, they come
valid instead.
Note 7: This function can be used together with the automatic wire threading position
update function (M06 L1) if it is programmed as M06L1P_Q_(R);.

9–9
9.9 Automatic Wire Cutoff (M07)

M07, usually programmed together with a movement command for a programmed path, cuts off the
wire automatically before movement starts in the current block, then moves the head. This function
is used when the head cannot move with the wire threaded and it is not necessary to thread the wire
after movement.
Example 1: Movement between two points
G01 G91 X30000 Y15000 M07 ;
The wire is cut off at the start point.

15
30 The wire is moved at an F code feed rate.

Note 1: If the wire has already been cut off manually, for example, at the start point, the
head moves without cutting the wire again.
Note 2: When M07 is programmed in a block that does not contain the movement
command, the wire is cut off there.

Note 3: Automatic wire cutoff requires that the AWT SKIP on the NC FUNC screen is
turned off. If it is turned on, the M07 stops operation at the start point, thus
requiring manual cutting of wire.

Example 2:
M17 ;
G91 G41 X5. ;
Y10. ;
X-20. ;
Y-20. ;
X20. ;
Y5. ;
Y5./1 M07 ;
G40 X-5. ;
M30 ;

a. Setting the BLOCK SKIP on the NC FUNC screen to “/0” machines the workpiece except
for a part marked with broken lines in the above figure.

b. Setting the BLOCK SKIP on the NC FUNC screen to “/1” machines the entire workpiece.

Note 4: When using M06 or M07 for continuous machining, prepared a program so that
the head does not move after the workpiece is cut off during unmanned
machining.
Note 5: Execution of M07 automatically selects the M18 (machining OFF) mode. For
the subsequent machining, therefore, program the M17 (machining ON).
Note 6: For the UPH-1, the M07 causes the work tank to be moved down automatically.
It stays at the down position even after the M07 is finished.

9–10
9.10 Remain/Cutoff (M08)

The M08 executes automatic wire cutoff, same as M07. However, M08 can skip the wire cutoff by
the screen setting or M90 command execution, while M07 always executes wire cutoff.
M08 is mainly used in a die uncut block, so that rough and finish machining can be executed with
one subprogram. Also, it can stop operation before and after cutoff, set uncut length, and execute a
cutoff machining using a contour program.
Example: Die 2-piece machining
O121 ;
M90 ; Initialize: Wire cut off by M08 (remain)
G90 G0 X0 Y0 M06 ;
E1061 D1 M98 P1 ; 1st roughing subprogram call
G90 G0 X12.5 Y0 M06 ;
E1061 D1 M98 P1 ; 2nd roughing subprogram call
M00 ;
G90 G0 X0 Y0 M06 ;
E1061 D1 M98 P2 ; 1st cutoff subprogram call
G90 G0 X12.5 Y0 M06 ;
E1061 D1 M98 P2 ; 2nd cutoff subprogram call
M90 P1 ; Wire not cut by P1:M08 (contour finish)
G90 G0 X0 Y0 M06 ;
E1062 D2 M98 P1 ; 1st finishing subprogram call (common to rough)
G90 G0 X12.5 Y0 M06 ;
E1062 D2 M98 P1 ; 2nd finishing subprogram call (common to rough)
M30 ;
N1 M17 ; Subprogram common to rough and finish
G91 G01 G41 Y5. ;
X-5. ;
Y-10. ;
X10. ;
Y10. ;
X-4.5 ;
X-0.5 M08; M08 for remaining block
No. 1 No. 2
G40 Y-5. ;
M99 ;
N2 M17 ; Cutoff subprogram
G91 G01 G42 Y5. ;
X0.5 ; 12.5
G40 Y-0.5 ;
M99 ;

For detailed applications of M08, see 9.25 M08 Control (M90) in this manual.

9–11
9.11 Transfer of Condition Data on MODEL SEARCH Screen (M16) ... valid by K type
power supply units

The E No., D value, and H/L value searched on the MODEL SEARCH screen can be transferred as
modal data. On the MODEL SEARCH screen can be transferred as modal data. On the MODEL
SEARCH screen, S numbers 1 - 10 are assigned from rough cut to cut-off, so that any condition of
S number can be set with S command. As default, rough condition data are transferred.
Also, if S number is specified with E command, and O and N number of subprogram to be called
are specified with O and P commands respectively, the subprograms can be called each time the
condition data from S number specified with S command up to S number specified with E
command are transferred.

Format: M16 (S_ (E_)) (O_ (P_)) ; ( ): omissible


S : Start S No. of condition data to be transferred (1 - 10, default = 1)
E : End S No. of condition data to be transferred (1 - 10, default = S, E ≧ S)
The condition data (E No., D, H/L) are transferred as modal data in the order of S numbers
specified with S and E commands, and the subprograms specified with O and P commands are
called every data transfer.
O : O No. of subprogram to be called (if both O and P are not specified, no subprogram is called)
P : N No. of subprogram to be called (if O is not specified and only P is specified, subprogram
calling is not executed)
Note: If M16 is specified individually, rough condition data are transferred as modal
data.

Example 1: Machining is executed by transferring one condition data without calling a subprogram
Transfer E No., D, and H/L of one condition (rough cut = S1) displayed on the SEARCH
screen as modal data.

M16 S1 ; ← Start in MDI RUN (or MEM RUN) mode


The transferred condition remains even if the reset is executed because of modal data.
Start arbitrary machining program (in which E No., D, and H/L are not programmed)
in the MEM RUN mode.

Example 2: Machining is executed by calling a subprogram


Execute machining with subprogram O2 N1 using E No., D, and H/L of 3-cut conditions
(S1 - S3) displayed on the MODEL SEARCH screen.

O1 ; ← Create main program to be started


M16 S1 E3 O2 P1 ; ← Call subprogram 3 times where conditions change every time
M30 ; ← End

9–12
!‘’“˜™š
9.12 Machining ON/OFF (M17 and M18)

The M17 (machining ON) turns on the dielectric fluid supply, wire feed and machining power
supply. No machining can be executed unless it is programmed in or before a machining feed (G01,
G02 or G03) block.
The M18 (machining OFF) turns off the dielectric fluid supply, wire feed and machining power
supply.

The M17 and M18 are modal codes, and M18 is selected at the time of power on or by RESET ,
M02 or M30.

Example: Linear slit machining

%;
G92 X0 Y0 ;
M17 ;
G91 G01 Y15000 E9001 M18 ; Machining is turned

15
G00 Y-15000 ; off after machining
10 10 X10000 ; of Y15 mm.
M17 ;
G01 Y15000 M18 ;
G00 Y-15000 ;
X10000 ;
M17 ;
G01 Y15000 M18 ;
G00 Y-15000 ;
X-20000 ;
M30 ;
%

Note 1: When M17 or M18 is programmed in a movement block


M17: Machining is turned on before movement starts.
M18: Machining is turned off after movement is completed.
Note 2: If any of touch sensing functions G76 - G85, M06 or M07 is programmed in the
M17 mode, the mode is changed to M18 automatically. For the subsequent
machining, program M17 again.
Note 3: If G00 is programmed in the M17 mode, the head moves at rapid traverse while
the machining ON status is kept. Usually, execute G00 in the M18 mode.
Note 4: On the machines with the auto work tank up and down function (UPH-1, UPH-2,
UH-2, U series, and EU64 with optional auto work tank height setting function),
the work tank moves up automatically with the M17. It does not move with the
M18. Also, on the UPH-1, the work tank moves down automatically by the M06.
Therefore, normally the work tank down and up (M58, M59) commands need not
be programmed before or after the M17, M18 and M06.

9–13
Note 5: On the U32, U53, U32K, U53K, EU64, and U86, standard values of set data No.58
bit 4 and No.106 causes the TANK FILL key to be turned on by M17 or by WATER
ON. Therefore, normally the work tank filling ON and OFF (M28, M29)
commands need not be programmed before or after the M17, M18 and M06.
Note 6: The machining cannot start with the M17 if the wire touches the workpiece after
automatic wire threading. In such a case, the noncontact point search can be
executed by the M17 or M200 command. For details, see Basic Operation 2.6.2
“Noncontact point searching function”.

9.13 Initial Hole Machining (M20)

This function is to machine an initial hole in the initial hole machining unit (optional).
Execution of M20 turns off machining (M18).
In the dry run, M20 is not executed but modal code changes to M18.

9.14 Work Tank Filling ON/OFF (M28 and M29)

The M28 (work tank filling ON) fills the work tank with dielectric fluid.

Fluid surface

h Workpiece

h: Fluid height
Table

M29 (work tank filling OFF) stops filling and opens a drain valve to discharge dielectric fluid from
work tank.
Format: M28 (L_);
M29 (L_);
L0: Does not wait for completion of filling or drain.
L1: Waits for completion of filling or drain.
* Default is L1.
Example:
................ ;
G00 X_ Y_ M06 ; .......... Auto wire threading in filling OFF mode
M28 ; ............................. Waiting for filling ON completion
G01 Y5. M17 ; .............. Machining in filling ON mode
M29 ; ............................. Waiting for filling OFF completion
G01 Y-5. M17 ; .............. Machining in filling OFF mode
................ ;

9–14
Waiting function is cancelled and the program proceeds to the next block in the following cases
where waiting should not be done, even if waiting is specified by the M28 or M29.

(1) M28 is programmed in the filling ON status.


(2) M29 is programmed in the filling OFF status.
(3) During waiting by M28, the TANK FILL key on the MACH OPE screen is turned off.
(4) During waiting by M29, the TANK FILL key on the MACH OPE screen is turned on.

Note 1: M28 and M29 are valid only for the machine that can support dip machining.
Note 2: The work tank filling function is turned on/off only when TANK FILL key on the
screen is pressed or M28/M29 block is executed.
Therefore, if the TANK FILL key is turned off in the midway of operation, after
that, the work tank filling function is kept in off status.
When a machining is to be performed with the tank in full state, be sure to
program M28 (work tank filling ON) after M6 with consideration of wire break
recovery, etc.
Note 3: On the U series, EU64 machines with optional automatic tank height setting
function, the work tank moves up automatically by the M28.
Note 4: On the EU64, the tank filling off (both key operation and M29) is inhibited
during the machining and the warning (2059: FILLING OFF IS IMPOSSIBLE IN
MC POWER ON) is displayed.

9.15 End of Program and Rewind (M30)

Program M02 or M30 as end of program in the last block of a program. Programming M30 stops
machining temporarily after completing wire movement in the current block. Then, the machine
and machining power supply enter into the off status. Also, the NC device is reset, and all buffers
are cleared. Initialization is executed for those modal G and M codes to which reset can be applied.
The last block of a program in which M02 or M30 is programmed must be in the wire radius
compensation cancel mode (G40) or taper machining cancel mode (G50).

Note 1: Like in other blocks, M30 must also be followed by EOB (LF in an ISO code, and
CR in an EIA code).
Note 2: A program number is searched when the RESET key is pressed or when M02 or
M30 is executed during memory operation.

9–15
9.16 Water Conductivity Check (M40) ... Invalid by UPH-1, UPH-2

The water conductivity control (ion exchange on/off by comparison between setting value and
actual conductivity level) is made so that actual conductivity is within ±10% of setting value, but a
machining program progresses irrespective of current water conductivity. Therefore, if machining
starts immediately after high speed machining (much water is circulated) or city water is supplied,
the water conductivity may exceed the setting value.
Use of this function can check at arbitrary position of a program (generally, after rough machining)
if the water conductivity level is below +10% of setting value. If over, waiting function is applied
until setting value is satisfied so that the subsequent machining can be executed with constant water
conductivity.
Also, the water conductivity setting value (ie. reference value for waiting) can be re-set.
Format:
M40 (S_) ; ( ): omissible

S: Programmed to re-set the COND. value on COND f · 2 (SUB COND) screen by the
M40. (Setting range 2-200)
M40 is one-shot code and therefore check is executed in that block only. Usually, it is
programmed in an individual block in the machining OFF (M18) mode.
Example: Water conductivity check after rough machining
E9001 D1 M98 P1 ; ....................... Rough machining
M18 ;.............................................. Machining OFF
M40 ;.............................................. Water conductivity check
E9002 D2 M98 P2 ; ....................... 2nd machining
E9003 D3 M98 P3 ; ....................... 3rd machining
M02 ;
N1 ;................................................. Machining shape subprogram
M17 ;.............................................. Machining ON
(Machining profile program)

M99 ;
Note 1: M40 valid/invalid is specified by the f · 7 (W. COND SKIP) on the first screen of
NC FUNC .
(M40 is ignored by water conductivity skip ON)
Note 2: M40 is ignored in the graphic, dry run and machine lock modes.
Note 3: If the ion exchange resin is extremely deteriorated, the program does not
proceed to the next block if M40 is programmed. In this case, turn on the “W.
COND. SKIP” key on the NC FUNC screen, so that the water conductivity check
is cancelled and the program can go to the next block.
Note 4: Although the M40 may be specified in the machining ON (M17) status, it should
be specified in the machining OFF (M18) status for the sake of wire saving, filter
life and ion exchange resin life.

9–16
Example 1: Water conductivity check after rough micron machining

O1 (Main)
G44 H_ ;
D1 E9001 M98 O2 ; 1st rough machining
G43 ;
Blocks to M18 ; Machining OFF before M40
be added M40 ; Water cond. check before 2nd machining
D2 E9082 M98 O2 ; 2nd machining
D3 E9003 M98 O2 ; 3rd machining
D4 E9004 M98 O2 ; 4th machining
M30 ;
O2 (Machining shape, sub)
M17 ; Machining ON
G1 G41 G91 X5. ;
Y5. ;
:
:
:
G1 G40 X-5. ;
M99 ;

Example 2: To improve water conductivity for later machining (when ion exchange resin is
deteriorated or all fluid is changed)

O3;
:
: Machining program, etc.
:
M40 S_ ;
M30 ; Turn power off if necessary.

9–17
9.17 Work Tank Down and Up (M58, M59)

These commands are effective for the machines with the work tank elevating unit (UPH-1, UPH-2,
UH-2, U Series and EU64 with optional automatic height setting function).

(1) In the case of UPH-1/UPH-2/ UH-2


The work tank can be moved to the lower limit or upper limit using the M58 or M59
command.
On the UPH-1,UPH-2 and UH-2, the work tank should be moved up in the end to control the
machine temperature. These commands are used to move up the work tank before the end of
operation so that the work tank is not left and the bottom in AWC or AWT operation.
Example 1:
??? ; ← General program for machining, AWT, AWC, etc.
M59 ; ← Move up the work tank before end of operation
M02 ; ← End of program
The work tank up and down are executed automatically as necessary for other functions
(AWT, Machining ON, AWC, Tank Fill, etc.). → (c)

(a) M58 : Moves work tank down


M58 is a one-shot M code and it is specified to move the work tank down.
It is specified in an individual block during M18 mode.
Format
M58 ; Move work tank down to lower limit after WATER is turned off.
On the UPH-1, UPH-2 and UH-2, the work tank cannot be moved up or down to
intermediate height.

(b) M59 : Moves work tank up


M59 is a one-shot M code and it is specified to move the work tank up.
It is specified in an individual block during M18 mode.
Format
M59 ; Move work tank up to upper limit, but WATER is not turned off.

(c) Work tank up and down by other functions


• The work tank also moves up by the W.TANK UP key ON, Tank Fill (key ON, M28), or
Machining ON (M17).
• The work tank also moves down by the W.TANK DOWN key ON, Auto Wire Threading
of UPH-1 (M6, M7), or AWC (M66 - 68).

9–18
(2) U Series, EU64 with optional automatic height setting function
The work tank can be moved down or up in the range between lower limit and upper limit
using M58 or M59 command.
On the U Series, EU64, the work tank can be moved down or up to intermediate height by
adding L1 or H_.
As the work tank up and down are executed automatically as necessary for other functions
(Machining ON, Pallet Change, Tank Fill, etc.), in general, M58 and M59 are not necessarily
specified. → (c)
On the U Series, EU64, the work tank height for machining is automatically determined, and
therefore these commands are used when moving down or up the work tank for set-up or AWT
operation.
Example 2: Application for setting up manual work change
(M17) X_ Y_ ; ← Machining end of 1st piece
M29 L0 ; ← Tank Fill OFF (no waiting by L0)
M7 ; ← Machining OFF, wire cut-off
M58 H-50. ; ← Work tank down with Tank Fill OFF (height for set-up)
M28 L0 ; ← Tank Fill ON (no waiting by L0)
M00 ; ← Stop, set-up work
M59 L1 ; ← Work tank up with Tank Fill ON (height for machining)
X_ Y_ M6 ; ← Auto wire threading at next start point
M17 ; ← Machining of 2nd piece

(a) M58 : Work tank up/down (after Tank Fill OFF)


M58 is specified to move the work tank up/down after Tank Fill is turned off.
M58 is a one-shot M code and it is specified in an individual block during M18 mode.
Format:
1 M58 ; Move work tank down to lower limit after Tank Fill is turned off.
2 M58 H_ ; Move work tank up/down to height specified by H_ after Tank Fill is
turned off.
Specify H_ value with a decimal point in mm (or inch) in the range
between lower limit and upper limit.
Example 3: M58 H-50. ; Move work tank up/down to –50 mm below
table surface
3 M58 L1 ; Move work tank up/down to the fill height when tank is full (Note 1) after
Tank Fill is turned off.

9–19
(b) M59 : Moves work tank up/down (Tank Fill is not turned on/off)
M59 is specified to move up/down the work tank without submerging the Z axis and
without turning on/off the Tank Fill. Mainly, this command is used to move the work tank
with Tank Fill turned on, but the upper limit will be restricted where the Z axis is not
submerged. If the work tank height is an important factor, use the M58 H_ command to
move up/down the work tank.
M59 is a none-shot M code and it is specified in an individual block during M18 mode.
Format:
1 M59 ; (Tank Fill OFF) Move work tank up to upper limit.
(Tank Fill ON) Move work tank up or down to upper limit or the position
where Z axis is not submerged, whichever lower one.
2 M59 H_ ; (Tank Fill OFF/ON) Move work tank up or down to the height specified
by H_ or the position where Z axis is not submerged, whichever lower
one.
Specify H_ value with a decimal point in mm (or inch).
Example 4: M59 H250. ; Move work tank up/down to max. 250 mm
above table surface
3 M59 L1 ; (Tank Fill OFF/ON) Move work tank up/down to the fill height when tank
is full (Note 1).

(c) Work tank up and down by other functions


• The work tank also moves up by the W.TANK UP key ON, Tank Fill (key ON, M28), or
Machining ON (M17). However, if M28 or M17 is executed where the work tank is at
higher position than fluid level when tank is full, the work tank moves down reversely.
• The work tank also moves down by the W.TANK DOWN key ON or pallet change
(M600 - M620).

Note 1: The fill height when tank is full means the tank height determined
automatically by M17 or M28 command, which is the height where Z axis is
not submerged or FILL HEIGHT (COND SUB screen for J type power
supply units, or set data No. 107 for K type power supply units), whichever
lower one.
Note 2: M58 and M59 commands are effective in the dry run, M6 search, or
machine lock mode.
Note 3: M59 command is skipped during workpiece drying (optional M200
command).

9–20
9.18 Index (M60)

This function controls the index work head attached to the UPH-1.
Format M60 C_ (L_) ; or
M60 P1 ;
C_: Indexing amount (incremental or absolute value)
L_: G00 motion by L0, or G01 motion by L1 or default.
P1: Reference point return of index work head

Note: Specify the indexing amount in “degree”.

9.19 Spinning (M62, M63, M64, M65)

These commands control the spinning work head (optional) attached to the UPH-1, UPH-2 and
UH-2.

(1) M62: Spinning work head clamp


Orients the spinning work head to search the clamp position. At the reference point, the
spinning work head is clamped, and the work holder can be loaded/unloaded.
Format M62_ ;

(2) M63S: Rotation ON


Format M63 S_ ;
S : Set the rotation speed (00 - 15) when the rotation of spinning work head is turned on.

(3) M64: Spinning work head unclamp


Unclamps the spinning work head, and the workpiece can be rotated by hand.
Format M64_ ;

(4) M65: Rotation OFF


Stops the spinning work head in the clamp status.
Format M65_ ;

Note: The M62, when executed, orients the spinning work head to search the clamp
position, and clamps the spinning work head.
Therefore, program M62 where the workpiece and holder do not interfere with the
axes or peripheral equipment.

9–21
9.20 Work Changer (W, M66, M67, M68)

On the machine with the automatic work changer (AWC), this function executes the automatic
work change. For the AWC operation, the following 3 modes are available:
Sequential mode: This mode uses the works in the order of AWC magazine pot numbers. So,
the works are loaded in the magazine in the order of use. To activate the sequential AWC mode,
turn off the “AWC RANDOM” f·7 key on the first page of AWC screen.
Random mode: This mode uses the works by selecting arbitrarily the AWC magazine pot
numbers. So, the works are loaded in the magazine using any pot numbers. To activate the random
mode, turn on the “AWC RANDOM” f·7 key on the first page of AWC screen.
Free mode (only for UPH-2/UH-2): Turning on the set data No.135 bit 3 allows the random or
sequential operation to be performed depending on the specified command without operating the
f·7 (AWC RANDOM) key of the first level on the AWC screen. (This mode has been set as
standard.)

(1) W (modal): AWC work pot No.


This command changes the modal ‘W’ that indicates what pot No. of work is loaded in the
spindle now.

Format: W_ ; (Specify within AWC capacity in an independent block)

(2) M66: Work changer


This command unloaded the work in spindle to the current pot No. (modal ‘W’), then selects
the next work pot and executes work change.

Sequential mode
Format: M66;

Random mode
Format: M66 W_ ;
W_ ; Specifies the pot No. to be loaded in spindle next.
(Specify within AWC capacity)

Free mode (only for UPH-2/UH-2)


Format: M66 (W_ ); ( ) omissible
W command not present: Sequential mode
W command present: Random mode

9–22
In execution of M66 without a work in spindle, if M66 is specified with modal ‘W’ set to ‘0’
(in any change mode of Sequential, Random, or Free), the magazine return processing
(unloading) is skipped and a work in arbitrary work pot No. is loaded (loading).

Example Work changer: Free mode

W0 ; (No work in spindle)


M66 W3 ; (Work pot No. 3 → Spindle loading)

M66 ; (Spindle unloading → Work pot No.3 → Work pot No.4 →


Spindle loading)

(3) M67: Work loading


The work in current pot No. (modal ‘W’) or any pot No. (only for UPH-2/UH-2) is loaded into
the spindle.

In the case of UPH-1


Format: M67 ;
Example: If work in pot No.3 is loaded
W3 ; (Specify work pot No.3)
M67 ;

In the case of UPH-2/UH-2


Sequential mode
Format: M67 ;
Random mode
Format M67W_ ;
W_ ; specifies the work pot No. to be loaded into the spindle.

(Specify within AWC capacity range)

Free mode (only for UPH-2/UH-2)


Format M67(W_ ); ( ) omissible
W command not present: Sequential mode

W command present: Random mode

Example: If work in pot No.3 is loaded (Loading mode: Free mode)


M67W3 ; (Specify work pot No.3)

9–23
(4) M68: Work Unloading
The work in the spindle is unloaded (returned) to current pot No. (modal ‘W’) or any pot No.
(only for UPH-2/UH-2).

In the case of UPH-1


Format: M68 ;
Example: If work in unloaded to pot No.3
W3 ; (Specify work pot No.3)
M68 ;

In the case of UPH-2/UH-2


Sequential mode
Format: M68 ;
Random mode
Format M68W_ ;
W_ ; specifies the work pot No. to which the work is unloaded.

(Specify within AWC capacity range)

Free mode (only for UPH-2/UH-2)


Format M68(W_ ); ( ) omissible
W command not present: Sequential mode

W command present: Random mode

Example: If work is unloaded to pot No.3 (Unloading mode: Free mode)


M68W3 ; (Specify work pot No.3)

(5) Magazine Index


Specifying the pot No. along with the M66 - M68 causes only the magazine pot to be indexed.

Format:
M66P_ ; or M67P_ ; or M68P_ ;
P_ : Pot No. to be indexed
Caution: In this case, the work change command W_ cannot be specified.

(6) Precautions
(a) The AWC M code, if specified during or after machining, must be specified after
executing the machining power OFF (M18) and wire cut (M7, not required for W-PG1).

9–24
(b) Upon completion of AWC M code execution, respective axes (X - C axes) are at the
position as listed below:

Axis W-PG1 UPH-1/UPH-2/UH-2


X 3rd reference point 3rd reference point
Y 3rd reference point 3rd reference point
U ----- Vertical position
V ----- Vertical position
Z Reference point 3rd reference point
C 3rd reference point 3rd reference point

(c) For the UPH-1/UPH-2/UH-2, the AWC control operation starts after the work tank is
moved down, if it is in UP position.

9–25
9.21 Approach (M71)

Though the approach function can be turned on/off on the COND MAIN screen, it can also be
controlled with the M71 command in a program.
For the applications of the approach function, see Basic Operation 2.6.1 Approach function.

(1) Approach function ON


Format M71 (S_) (A_) ; ( ): omissible
M71 : Turn on the approach function.
S_ : Specify the approach 1 condition (invalid by MGW-K)
Default: Current approach 1 condition is kept.
A_ : Specify the approach 2 condition (invalid by MGW-K)
Default: Current approach 2 condition is kept.

Note 1: The approach function ON must be specified before M17 block.


Note 2: The approach 1 and approach 2 conditions must be entered in advance in the
user condition area (E9000-E9999). (J type power supply units)

(2) Approach function OFF


Format M71 L1 ;
M71 L1 : Turn off the approach function.

9–26
9.22 Water Flow Rate Control (M72) ... Invalid by K type power supply units

The water flow rate (override value, set value of water mode 5, etc.) usually specified on the screen
can be controlled with M72 in a program.
Format
M72 L_ (A_) (B_) (S_) ; or
M72 L_ (P_) (S_) ; ( ): omittable
M72: Water flow rate control
L: Water mode (2-5) for flow rate override to be changed. It does not change water
mode for machining condition.
If L_ value is other than 2-5 or if L_ is omitted, A_, B_, S_, P_ are all ignored.
A: Upper override value (0-255%) for water mode L_.
If A_ value is other than 0-255, it is ignored.
B: Lower override value (0-255%) for water mode L_.
If B_ value is other than 0-255, it is ignored. (Note 3)
P: If water mode L_ override value (0-255%) is same, it can be programmed with p_
instead of A_B.
If P_ value is other than 0-255, it is ignored.
S: Upper and lower setting values for water mode 5. (4 digits, 0000-9999)
If L_ value is other than 5 or if S_ value is other than 0000-9999, it is ignored.

Example 1: M73 L5 S0430 ; Water mode 5 setting, upper=04, lower=30


Example 2: M72 L2 A80 B120 ; Water mode 2 override, upper 80%, lower 120%
Example 3: M72 L3 P80 ; Water mode 3 override, both upper & lower 80%
Example 4: M72 L5 P100 S0205 ; Water mode 5 setting, upper=02, lower=05
Water mode 5 override, both upper & lower 100%

Note 1: M72 must be programmed in the wire radius compensation cancel mode (G40).
Programming M72 in the wire radius compensation mode (G41, G42) causes
warning (1017: MORE THAN 2 NON-MOVEMENT BLKS DURING G41, 42),
resulting in overcut.
Note 2: M72 is not executed in the graphic mode.
It is executed in the run mode, regardless of whether dry run is on or off.
Note 3: For the machines such as (UPH-1 and W-PG1) where the dielectric fluid supply
pump is not separated for upper and lower feeds, the command for lower feed
(B_) is ignored.

9–27
9.23 Process Skip and Additional Machining (M74)

Where the control numbers are assigned to each machining position or each workpiece using the
process control command M74, in case of a machining skip due to auto wire threading retry over or
wire break recovery retry over, the subsequent machining to the process assigned with the same
numbers is skipped (process skip function). This can prevent the subsequent finishing or cutoff
from being executed though the prior process such as a roughing was skipped.
Further, only the machining to skipped numbers can be executed selectively by turning on the
SKIPED.
MACH. key on the NC FUNC screen after a machining was finished (additional machining
function).
Format:
M74 (P_) (W_) (L_) (Q_) ; (0 ≦ P, W, L, Q ≦ 9999)
Programming method
(1) Basic command
M74L process No. (0 ≦ L process No. ≦ 9999)
Following M74L, specify the process No. in a range of 1-9999. The skip history data (process
control data) are cleared, if L is omitted or L0 is specified.
Example 1: 3-piece rough and finish machining

O10 (MAIN) ; Main program


M74 ; Specify at the program top to clear process control data so far
M74 L1 ; Declare machining of 1 piece (specify before M06)
No. 1
G90 G0 X0 Y0 M06 ;
rough
E1061 D1 M98 O20 P1 ;
M74 L2 ; Declare machining of 2 pieces
No. 2
G90 G0 X40. Y0 M06 ;
rough
E1061 D1 M98 O20 P1 ;
M74 L3 ; Declare machining of 3 pieces
No. 3
G90 G0 X80. Y0 M06 ;
rough
E1061 D1 M98 O20 P1 ;
M74 L1 ; Declare same machining as 1 piece
No. 1 G90 G0 X0 Y0 M06 ;
finish E1062 D2 M98 O20 P2 ;
E1063 D3 M98 O20 P2 ;
M74 L2 ; Declare same machining as 2 pieces
No. 2 G90 G0 X40. Y0 M06 ;
finish E1062 D2 M98 O20 P2 ;
No.1 No.2 No.3
E1063 D3 M98 O20 P2 ;
M74 L3 ; Declare same
No. 3 G90 G0 X80. Y0 M06 ; machining as 3
finish E1062 D2 M98 O20 P2 ; pieces
E1063 D3 M98 O20 P2 ; 40 40
M30 ;

9–28
Note 1: Normally, specify M74; or M74L0; at the top of program to clear the skip
history data.
Note 2: The M74L command must be specified before automatic wire threading
M06.
Note 3: L No. is modal, and it is kept until it is changed with M74L next time.

(2) Q step control


M72 L_ Q step No. ; (0 ≦ Q step No. ≦ 9999)
Additional machining is executed only to the step of the skipped process number, if Q step No.
is added to the M74 L_ command.
For instance, in a 3-time machining of rough, finish 1, and finish 2, if a skip occurred in finish
1, additional machining starts from rough if Q is not specified, but it starts from finish 1,
skipping a rough machining if Q is specified.
Example 2: 3-piece rough and finish machining

O10 (MAIN) ;
M74 ; Clear process control data so far
No. 1 M74 L1 Q1 ; Add Q1 to declare 1st machining
rough G90 G0 X0 Y0 M06 ;
E1061 D1 M98 O20 P1 ;
M74 L2 Q1 ; Declare 1st machining of 2 pieces
No. 2
G90 G0 X40. Y0 M06 ;
rough
E1061 D1 M98 O20 P1 ;
M74 L3 Q1 ; Declare 1st machining of 3 pieces
No. 3
G90 G0 X80. Y0 M06 ;
rough
E1061 D1 M98 O20 P1 ;
M74 L1 Q2 ; Declare 2nd machining of 1 piece
No. 1 G90 G0 X0 Y0 M06 ;
finish 1 E1062 D2 M98 O20 P2 ;
M74 L1 Q3 ; Declare 3rd machining of 1 piece
No. 1
G90 G0 X0 Y0 M06 L1 ; Wire break return point updated by M6L1
finish 2
E1063 D3 M98 O20 P2 ;
M74 L2 Q2 ; Declare 2nd machining of 2 pieces
No. 2
G90 G0 X40. Y0 M06 ; *
finish 1
E1062 D2 M98 O20 P2 ;
No. 2 M74 L2 Q3 ; Declare 3rd machining of 2 pieces
finish 2 G90 G0 X40. Y0 M06 L1 ; Wire break return point updated by M6L1
E1063 D3 M98 O20 P2 ;
M74 L3 Q2 ; Declare 2nd machining of 3 pieces
No. 3
G90 G0 X80. Y0 M06 ;
finish 1
E1062 D2 M98 O20 P2 ;
M74 L3 Q3 ; Declare 3rd machining of 3 pieces
No. 3
G90 G0 X80. Y0 M06 L1 ; Wire break return point updated by M6L1
finish 2
E1063 D3 M98 O20 P2 ;
M30 ;

9–29
If a machining was skipped due to auto wire threading retry over in the block with * mark (2nd
machining of 2 pieces) in Example 2, additional machining is skipped up to the * marked
block and starts from finish 1, with the message 1741 “M6 SEARCHED BY M74 A.W.T.
MISSED (1)” displayed.
Note 1: In executing additional machining, it is not executed actually if Q at this
time is smaller than Q at machining skip even though M74L No. at certain
position has been registered as skipped process number. Additional
machining is executed when Q is equal to or larger than Q at machining
skip. Accordingly, Q is not necessarily successive in the order of
execution, but the larger Q value must be specified in the machining to be
executed later.
Note 2: If Q is not specified, additional machining is always executed, provided
that the control number is same. However, as mentioned later, additional
machining can be selectively executed without specifying Q by turning on
the AWT key on the NC FUNC screen.
SKIP

(3) P/W pallet/work control


M74 P pallet No. W work No. ; (0 ≦ P, W ≦ 9999)
In using the pallet magazine or executing a continuous machining where multiple workpieces
are laid on the work table, the use of M74P_W_ command can control a machining skip by
pallet or workpiece.
Example 3: Continuous machining of two 3-piece works

O10 (MAIN) ;
M74 W1 ; Declare 1st work
1st
G54 ; Select work coord. system for 1st work
work
M98 O10 ;
2nd M74 W2 ; Declare 2nd work
work G55 ; Select work coord. system for 2nd work
M89 O10 ;
M30 ;
;
O10 ;
M74 ; Clear past process control data of W No. same as modal W
M74 L1 Q1 ; 1 piece
1 piece
G90 G0 X0 Y0 M06 ;
rough L1
E1061 D1 M98 O20 P1 ; L1
L2
M74 L2 Q1 ; 2 pieces L2
L3
2 pieces L3
G90 G0 X20. Y-20. M06 ;
rough
E1061 D1 M98 O20 P1 ; W1 W2
M74 L3 Q1 ; 3 pieces
3 pieces
G90 G0 X40. Y-40. M06 ;
rough
E1061 D1 M98 O20 P1 ;
M99 ;

9–30
The M74 L1 machining executed after M74 W1; and the M74 L1 machining executed after
M74W2; are seemed to be different, and controlled separately. This is the same if using P
instead of W. Also, P and W may be used simultaneously. Namely, in the process control by
M74, the machining is judged same only if three control numbers of P pallet number, W work
number, and L process number coincide.

Execution procedure:
1 Following the description above, create a program and execute it.
In case of a machining skip due to wire break recovery retry over or auto wire threading
failure, subsequent machining of same control number is skipped when M06 is specified,
and the warning message 2014 “SEARCHING NEXT PROCESS M6 BY M74” is
displayed.

2 Check whether there is a skipped machining.


If skipped, additional machining can be executed with the steps after 3.
Note 1: In case of skipped machining, "M74 SKIP xx" (xx indicates the number
of skipped parts) is displayed in the status display area at the right of
screen. This is not displayed if there is no skipped machining.
Note 2: The process control data such as cause of skip or skipped position can
be confirmed on the DIAGNOSE M74 screen.
SKIPED.
3 Move the machine to the machining start point, and turn on MACH. (f · 7) key on the

NC FUNC screen to restart the same program.

SKIPED.
Note 1: When MACH. key is turned on, “M74 SKIP xx” display in the status
display area at the right of screen changes to "SKIPPED MACHING xx".
SKIPED.
Note 2: Starting the operation with the MACH. key turned off clears the
process control data by M74; command, and additional machining
becomes impossible.
4 In the 3-piece machining in Example 1, if a skip occurred in No.2 rough machining, the
message 1741 “M6 SEARCHED BY M74. A.W.T. MISSED (1)” is displayed for the 1st
piece and additional machining is skipped and the program progresses to the M06
command of the 2nd piece, then stops.
5 Press the START button, and automatic wire threading is executed and the machining
starts.
AWT
If this part is to be skipped, first turn on the SKIP key on the NC FUNC screen, then
press the START button.
6 When No.2 rough completed, No.3 rough and No.1 finish are again skipped, and
operation stops at M06 of No.2 finish. Press again the START button, and automatic wire
threading is executed and a finish machining is performed.
SKIPED.
7 Turn off the MACH. key after all of the machining completed.

9–31
Supplementary description:
◆ Modal control numbers P, W, L, and step number Q are initialized to “0” by M02, M30,
RESET , or power ON. However, the process control data are saved.
◆ The process control data and process numbers are cleared when M74; or M74 L0 ; is
specified. However, the process control data cleared are limited to the data having same P
and W numbers. All data are cleared if M74 P0 W0 L0 ; is specified.
SKIPED.
No data is cleared even if M74; is specified when MACH. key is turned on.

◆ The M74 command itself does not cause a machining skip. Whether the next machining is
to be skipped or not by the process number is judged during automatic wire threading
(due to M06, M06 L1, or wire break recovery). To operate the process skip and additional
machining correctly, the M74 must be specified together with M06 or M06 L1.
◆ In a die machining where a finish machining is execute successively such as Example 2, it
is recommended to add M06 L1 command together with M74 Q command on and after
the second finish machining to make preparation for a wire break.
◆ In standard setting, the machining having same control number is not skipped in later
machining, even if a skip occurred due to a wire break during additional machining.
◆ In a finish machining where a machining of same process continues, only the M74 Q_
may be specified, omitting the L number on and after second time.
◆ M74 L_ Q_ command is automatically output to the program created by the model plan.
◆ Valid or invalid of process skip function can be set by the set data No.45 bit 6.
◆ The functions concerning the process control command M74 can be changed by the set
data No.78 and 79. For further information, For details, see the Operation, 16.7 Operation
of M74 Screen.

9–32
9.24 Reference Hole Retry (M75)

In the automatic wire threading (M6 or wire break


recovery), if AWT failed due to a damaged wire edge or Retraction due M6 point
to AWT failure
poor straightness, this function retracts the head from M6
point to the specified reference point once, then it cuts the Return to M6 point

wire and regenerates a new wire edge, and returns the head Wire edge is regenerated
at ref. hole (over φ2)
to the original M6 point for retry, thus improving the AWT
success rate.
This function is used to perform AWT at a small hole where the AWT could be fail. When the AWT
at the M6 point succeeded, the reference hole retry is not executed.
Normally, the function ON and OFF are performed on the screen. For details, see the Operation,
10.7 Operation of AWT Screen.

Format:
(1) Reference hole position and function activation
M75 X_ Y_; Specify the reference hole position with absolute values in the current coordinate
system, to which the head retracts in case of AWT (M6 or wire break recovery)
failure. The reference hole retry becomes active (modal) by the AWT after the
next block.
Note 1: The reference hole retry becomes inactive (modal) if M75 X_ Y_ is not
specified or after reset operation (M02, M30 or RESET key).
Note 2: If either X_ or Y_ is omitted, that axis is treated in the same manner as work
coordinate 0 command. To prevent malfunction, specify both X_Y_.

(2) Cancellation of reference hole retry in half-way


M75; Specify M75 ; without X_ Y_ if the reference hole retry is cancelled in a half-way of
program. Then, the reference hole retry becomes inactive (modal) after the next block.

9–33
!’“™š
Example: The retry hole position is changed to avoid interference between machine and obstacle.

hole
2

Reference

X0 Y-100.
Obstacle

4
3

Reference
hole
X100 Y-100.
G92 X0 Y0 ;
M75 X0 Y-100. ;
G90 G00 X_ Y_ M6 ;
M98 P1 ;
G90 G00 X_ Y_ M6 ;
M98 P2 ;
M75 ;
G90 G00 X_ Y_ M6 ;
M98 P3 ;
M75 X100. Y-100. ;
G90 G00 X_ Y_ M6 ;
M98 P4 ;
M30 ;
Sets Work coord. system
Activates ref. hole retry for 1 & 2 (X0 Y-100.)
M6 point for 1
Machining for 1
M6 point for 2
Machining for 2
Cancels ref. hole retry to prevent danger for 3
M6 point for 3
Machining for 3
Activates ref. hole retry for 4 (X100. Y-100.)
M6 point for 4
Machining for 4
Ref. hole retry inactive by reset

Note 1: The head moves between M6 point and reference hole in the XY simultaneous
linear interpolation mode.
Specify the reference hole position, free from interference between machine
and workpiece.
Note 2: Position the reference hole outside the workpiece. Or, if it is positioned on the
workpiece, its diameter must be over ø2.
Note 3: The use of this function in the wire radius compensation mode generates a
block without movement. It must be programmed in the wire radius compensa-
tion invalid mode.
Note 4: If movement between M6 point and reference hole exceeds 3 round trips, the
alarm results (2016: REFERENCE HOLE RETRY OVERTIMES). Then, the head
moves to the next M6 point in the dry run status (standard setting) for
continuous machining.

9–34
9.25 M08 Control (M90)

Though the remain or cutoff operation of M08 function is set on the SET M08 CONTROL screen,
the M08 operation can be changed with a program. The use of M90 command can rewrite the M08
CONTROL screen.
The use of M90 eliminates manual change of M08 CONTROL screen during machining.
Format:
M90 P_ S_ Q_ L_ R_ ;
P: Wire cutting (wire cut by M08)
0: Cut = Remain
1: No = Cutoff (contour finishing)
S: Block stop (stop at M08 block)
0: Non stop
1: Stop at block start point
2: Stop at block end point
Q: Shape part (machining of M08 section after M17)
0: Machining (usual machining)
1: Machining skip (after M17 command, axes move up to M08 block with machining
power turned off)
L: Block division (division of M08 block)
0: Not divide (entire M08 block is treated as an uncut block)
1: Divide (length specified with R from end point of M08 block is treated as an uncut
block)
R: Dividing length (set uncut block length)
Set the uncut block length if L1 is specified.
Note 1: If M90 ; is specified, the data are reset to the initial values as if M90 P0 S0 Q0 L0
R0 ; was executed.
Note 2: In the model plan, proper M90 command is output automatically according to
the contents of machining.

Programming method
(1) P: Wire cutting
Set whether a wire is cut or not by M08 command.
Setting data:
P0: Wire is cut (cut remains)
P1: Wire is not cut (cut off)
In a die machining, specify P0 (wire is cut = cut remains) for a rough machining so that a core
remains. After a core is cut off, specify P1 (wire is not cut = cut off), so that the entire contour
including an uncut part can be finished.

9–35
Example 1: Subprograms common to rough and finish machining

O121 ;
M90 ; Initialie: Wire cut off by M08 command (remain)
G90 G0 X0 Y0 M06 ;
M90 ; Wire is cut
E1061 D1 M98 P1 ; Rough (remain)
M00 ;
G90 G0 X0 Y0 M06 ;
E1061 D1 M98 P2 ; Cutoff machining
M90 P1 ; P1:Wire is not cut in M08 command (contour finish)
G90 G0 X0 Y0 M06 ;
E1062 D2 M98 P1 ; Finish 1 (common to rough) M90 P1 ; Wire is not cut
G90 G0 X0 Y0 M06 L1 ;
E1063 D3 M98 P1 ; Finish 2 (common to rough)
M30 ;
N1 ; Subprograms common to rough and finish
M17 ;
G91 G01 G41 Y5. ;
X-5. ;
Y-10. ;
X10. ;
Y10. ;
X-4. ;
X-1. M08 ; Specify M08 in cut remain block
G40 Y-5. ;
M99 ;
N2 ; Cutoff machining subprogram
M17 ;
G91 G01 G42 Y5. ;
X1. ;
G40 Y-0.5 ;
M99 ;

Note: M90 command must be specified before M17 (machining ON) and G41/G42
(radius compensation).

(2) S: Block stop


Set whether the operation stops or not at the M08 block.
The block stop is executed regardless of setting of P: wire cutting.
Setting data
S0: Operation does not stop.
S1: Operation stops at the start point of M08 block.
S2: Operation stops at the end point of M08 block.
Normally, set “0” (non stop) if a rough machining and a cutoff machining are executed
separately. If a core is cut off during a rough machining, specify S1 (before M08), so that the
operation stops before cutoff.

9–36
Example 2: Core is cut off during a rough machining

O122 ;
M90 P1 S1 Q0 L0 ; P1:Wire not cut S1:Stop at top of M08 block
G90 G0 X0 Y0 M06 ;
E1061 D1 M98 P1 ; Rough machining
M90 S0 ; S0: No stop at M08 block
G90 G0 X0 Y0 M06 ;
E1062 D2 M98 P1 ; Finish 1 (common to rough)
G90 G0 X0 Y0 M06 L1 ;
E1063 D3 M98 P1 ; Finish 2 (common to rough)
M30 ;
N1 ;
M17 ;
G91 G01 G41 Y5. ;
X-5. ;
Y-10. ;
X10. ;
Y10. ;
X-4. ;
X-1. M08 ; Stop at rough machining, and core is cutoff after restart
G40 Y-5. ;
M99 ;

9–37
(3) Q: Shape part machining
The M17 after M90 Q1 allows the fluid and wire feed to turn on, but does not turn on the
machining power. The machining power turns on when the M08 is specified. Thus, a cutoff
can be executed with a contour program.
Setting data
Q0: Usual machining is executed (machining power ON by M17)
Q1: Machining power is not ON from M17 up to M08 block

Example 3: 2-piece die machining, cutoff by contour program

O123 ;
M90 P0 S0 Q0 L0 ; Wire is cut, operation does not stop
G90 G0 X0 Y0 M06 ;
E1061 D1 M98 P1 ; 1st rough (remain)
G90 G0 X15.0 Y0 M06 ;
E1061 D1 M98 P1 ; 2nd rough (remain)
M90 P1 S1 Q1 ; P1:Wire not cut in M08, S1:Stop before move M08 block,
G90 G0 X0 Y0 M06 ; Q1:Machining power not ON up to M08 block
E1061 D1 M98 P1 ; Cutoff by 1st rough program
G90 G0 X15. Y0 M06 ;
E1061 D1 M98 P1 ; Cutoff by 2nd rough program
M30 ;

Note: Specifying the rough/finish machining and the cut-off machining in the
same program in the Model Plan causes M90Q1 to be executed
automatically in the cut-off machining.

9–38
(4) L: Block division, R: Dividing length
The M90 L1 (block division) can cut the wire in the middle of M08 block. In this case,
specify the cut remain length R (divided length) from the end point of M08 block.
Setting data
L0: Wire is cut at the top of M08 block when M90P1 is specified.
L1: Wire is cut at the position specified with R (divided length) from the end point of
M08 block when M90P1 is specified.
Example 4: Multiple-piece hole machining

O124 ;
M90 P0 S0 Q0 L1 R1. 0 ; L1:Block is divided, R1.0:Divided length 1mm
G90 G0 X0 Y0 M06 ;
E1061 D1 M98 P1 ; Rough machining
. . . . Omitted
M90 P1 S1 Q1 ; Cutoff with contour program by Q1 command
G90 G0 X0 Y0 M06 ;
E1061 D1 M98 P1 ; Cutoff machining (common to rough)
. . . . Omitted
M90 P1 S0 Q0 ; Contour finishing
G90 G0 X0 Y0 M06 ;
E1062 D2 M98 P1 ; Finish 1 (common to rough)
Wire is cut with
E1063 D3 M98 P1 ; Finish 2 (common to rough) 1mm left in rough
. . . . Omitted
M30 ;
N1 ;
M17 ;
G91 G01 G41 Y5. ;
G3 J-5. M08 ; 1mm cut remain in rough machining
G40 G01 Y-5. ;
M99 ;

Note 1: For M90S1 (before M08), the operation stops at the position specified with R
(divided length).
Note 2: The block division by M08 command is disabled while the radius compensation
is cancelled.

9–39
9.26 FD Program Loading (M97)

(1) General
NC programs stored in a floppy disk (referred to as FD program) inserted in the built-in floppy
disk drive (FDD) unit (optional) must be loaded into the memory on the DISK DIR. screen,
then executed in the MEM RUN mode.
The use of M97 can perform this operation (FD program loading and execution) successively.
M97 command is analogous to M98.
• M98 → Calls a program from memory, specified with O_ P_ .
• M97 → Loads FD program specified with O_ P_ , then calls it.

(2) Preparation of FD program


Create an FD program in the subprogram format (O No. not used, N No. - M99, multiple N
numbers accepted).
The file name is “AP-???.APN”.
??? takes a 3- to 5-digit number (000 - 14999).
??? is the number when specifying M97 O_ later.
Save the created file in the route directory of floppy disk.
Insert the created floppy disk into the FDD unit.

(3) Preparation and start of main program


Create the main program using proper O number, and start this O No. in the MEM RUN mode
(Note 1).
Example 1. O1 ; ← Main program
M97 O100 ; ← Load AP-100. APN to O7000 (Note 2), and call its top
M97 O200 P1 ; ← Load AP-200. APN to O7000 (Note 2), and call N1
M02 ; ← End of program

Note 1: Though M97 can be executed in the MDI RUN mode, a machining program
should be executed in the MEM RUN mode because the wire break
recovery and mirror image are disabled in the MDI RUN mode.
Note 2: O numbers to which programs are loaded are O7000 to O7299 and these
vary depending on the M97 condition (machining or drawing, or presence
of M97 Q_ ).
In executing M97, do not load any programs in a range of O7000 to O7299,
except FD programs. The O numbers to which programs are loaded are
erased and replaced with these programs by M97.

9–40
(4) M97 Format
Though usually M97 O_ ; will be enough for actual machining, the loading and calling
operation can be specified more precisely by using P_ Q_ R_ .
M97 (O_) (P_) (R_) (Q_) ; ( ): omissible
• O : FD program number (0-14999)
Specify ??? with a number of the FD program (AP-???.APN) to be loaded.

Example 2. M97 O123 ;← Load AP-123. APN (to O7000), and call the top (of O7000).
Note 3: The program is loaded from the route directory of FD. The use of sub
directories is not supported.
Note 4: If O_ is omitted, no program is loaded, but only calling is executed.

• P : Subprogram calling N number (1-9999)


Specify N number to be called for a subprogram.

Example 3. M97 O5 P1 ; ← Load AP-005. APN (to O7000), and call N1 (of O7000).
M97 P2 ; ← No program is loaded, but N2 (of O7000) is called.
Note 5: If N_ is omitted, the O No. program is called from the top.

• R : Number of repetitions (0-9999)


Specify how many times the subprogram is called.

Example 4. M97 O12345 P1 R2 ; ← Load AP-12345. APN (to O7000), and call N1 (of
O7000) 2 times.
Note 6: If R_ is omitted, the program is called once.

• Q : Destination O number (0-99)


Specify O number which FD program is loaded to, and called from.
Q_ command (0-99) allows FD program to be loaded to and called from the following O
number.
In machining (no drawing) : O(7000 + Q_ value)
In test drawing : O(7100 + Q_ value)
In tracing : O(7200 + Q_ value)

Example 5. M97 O123 P4 R5 Q6 ;← Load AP-123. APN (to O7006), and call N4 (of
O7006) 5 times.

Note 7: If same O number already exists, the previous program is deleted,


then the specified program is loaded.
Note 8: If Q_ is omitted, it is equivalent to Q0 command. The program is
O7000 for machining, O7100 for test drawing, or O7200 for tracing.

9–41
9.27 Subprograms (M98 and M99)

(1) Main program and subprogram


In repeated machining of the same shape or that by rotating the same shape, a program can be
simplified by separating into a subprogram (for repeated part) and a main program (for non-
repeated part).

The subprograms are stored beforehand into the memory on the EDIT screen, and they are
called from main program (in the MEN RUN or MDI RUN mode) using the program number
or sequence number.

Machining shape

Main program Subprogram

) O_N_
98
(M
C all
(Shape for repeti-
tive machining)
En
d(
M9
9)

Note 1: The main program can be executed in either MEN RUN or MDI RUN mode.
However, usually the MEM RUN mode is used since the wire break recovery and
power failure recovery do not function in the MDI RUN mode.
Note 2: It is possible to call another subprogram from a subprogram (nesting of
subprograms). All subprograms are stored in the memory in advance. Up to
six nesting levels can be called.

Call Call
Main program End Subprogram (1) End Subprogram (2)

9–42
(2) Subprogram call and its end (M98, M99)
A subprogram is called by M98, and ended by M99.
The formats of M98 and M99 are as follows:

Main program Subprogram


(O_) (N_):
Call
M98 (O_) (P_) (R_) (B_) ;
(N_) _ _ _ _ _ _ _ _ _ _ _ _
End
M99 (P_) (R_) ;

(a) Subprogram call


i) M90 (O__) (P__) (R__) (B__) ; ( ): omissible
ii) M98 (P__) (N__) (L__) (B__) ; ( ): omissible
There are two kinds of subprogram calling formats; (i) format consisting of O, P, R and B,
and (ii) format of P, N, L and B. Either one can be selected by parameter No. 74 bit 0.
Standard setting is format (i).
O(P): Specifies the subprogram number (O1-O9999) to be called. If O is omitted, main
program of that number is called.
P(N): Specifies the sequence number (N1-N9999) of a subprogram to be called. If P is
omitted, the head of program specified by O is searched. The O and P cannot be
omitted simultaneously.
R(L): Specifies the number of repeat times (0-9999) for call. If R is omitted, a subpro-
gram is called once.
B: Specifies the number of blocks (1-256) from the head of a subprogram after it is
executed the number of times specified by R.
If b is omitted, the subprogram ends after it is executed the number of times
specified by R.
Usually, B is omitted.

(b) Subprogram end


M99 (P__) (L__) ; ( ): omissible
or
M99 (N__) (L__) ;
P or N: Specifies the sequence number (N1-N9999) of main program to be returned after
end of subprogram.
If P or N is omitted, the next block of the block (M98 block) that called a
subprogram is returned. Usually, P and N are omitted.

9–43
L: Specifies the remaining number of repetitions for executing a subprogram in
changing the number of times specified by M98. If L is omitted, the subprogram
is executed the number of times specified by R in the M98, then it ends.
Usually, L is omitted.

Note 1: Be sure to enter an address necessary for M98 after the M98.
Example: No good O3 M98 P2 R5 ;
Good M98 O3 P2 R5 ;
Note 2: Up to 150 subprograms can be called from one O number. If over 150, an alarm
results (6132: CALLING SUBPROGRAMS MORE THAN 151).
In this case, using the subprogram nesting command, called a subprogram
(child) assigned with another O number from the main program (parent), and
call further a subprogram (grandchild) from that subprogram (child) so that the
number of subprograms to be called from each O number does not exceed 150.

(3) Program examples


Subprogram can be used in a variety of forms depending on the ways of programming O, P, R
and B used in M98 and M99.

Example 1: When O and P are programmed in M98.

O1 ;
Any block (N3) in a subprogram (O2) can be called.
...

M98 O2 P3 R3 ;
...

M30 ;

O2 ;
N1 ;
N2 ;
N3 ;
...

3 times
M99 ;

Example 2: When O is omitted in M98.

O1 ;
Any block (N100) in a calling program (O1) can be called.

M98 P100 R3 ;

M30 ;
N100 ;

3 times
M99 ;

9–44
Example 3: When P is omitted in M98.

O1 ; The beginning of a subprogram (O2) can be called.

...
M98 O2 R3 ;


M30 ;

O2 ;

...
3 times
M99 ;

Example 4: When R is omitted in M98.

O1 ;... A called subprogram is executed once.


M98 O2 P3 ;
...

M30 ;

O2 ;
N1 ;
N2 ;
N3 ;
...

Once
M99 ;

Example 5: When R is 0 in M98.

O1 ; No subprogram is called (O1), and the program proceeds to


...

the next block.


M98 O2 P3 R0 ;
...

M30 ;

O2 ;
N1 ;
N2 ;
N3 ;
...

M99 ;

9–45
Example 6: B is programmed in M98.

After blocks from O2 to M99 are executed 5 times, 3


O1 ;
blocks starting from O2 are executed, then the program

...
M98 O2 R5 B3 ; returns to O1.

...
O2 X5 ;
Y5. ;
X5. ; 5 times

...
M99 ;

Example 7: When L is programmed in M99.

O1 ; L0 programmed in M99 sets the remaining number of


...

times to zero, and the program returns to O1 irrespective of


M98 O2 P3 R3 ; the number of times specified by R in M98.
...

M30 ; If a value of 1 or higher is selected for L in M99, the


remaining number of times becomes 1 or more, and blocks
...

O2 ; from N3 to M99 are repeated indefinitely.


...

N3 ;
...

Once
M99 L0 ;

Example 8: When / and L0 are programmed in an M99 block.

If the block skip mode of the NC FUNC screen is set to


O1 ;
“/1.”, blocks from N3 to M99 are repeated 100 times. If the
...

M98 O2 P3 R100 ; mode is set to “/0” during the repetition, M99L0 is


executed, and the remaining number of times for repeating

M30 ; a subprogram becomes zero. Then, the subprogram ends


when it finishes executing the last block, and the process


O2 ;
returns to the main program.

N3 ;

/1M99 L0 ; Block skip “0”


M99 ; Block skip “1”

9–46
Example 9: When P is programmed in M99.

O1 ;
After a subprogram is repeated as many times as specified,

...
M98 O2 P3 R3 ; the process returns to the block of a specific sequence
number in the main program. If P is omitted in M99, the

...
N100 ; process returns to the block next to the one in which M98

...
was programmed.
M30 ;

O2 ;

...
N3 ;

...
3 times
M99 O100 ;

(4) Subprogram applications

Example 1: Subprogram within the machining shape

O1 Subprogram N100

%;
O1 ;
G92 X0 Y0 ;
M17 ;
G91 G01 G41 Y5000 D1 E9001 ;
After the wire moves 5 mm in the Y axis
X-5000 ;
direction the subprogram is called 5 times.
Y5000 M98 (O1) P100 R5 ;
X5000 ;
Y-5000 ;
X-49700 M01 ;
X-300 ; Note: Avoid making blocks with no movement
G40 Y-5000 M30 ; whenever possible during offset.
N100 X5000 ;
Y5000 ;
X5000 ;
Y-5000 M99 ;
%

9–47
Example 2: Rotation (G68 and G69) and subprogram (application 1)

Y 30°
1 3
O2 O3 (N33)
20
2 4
10
30°
0
10 30 X

%;
1 O2 G92 X10000 Y20000 ; M98 O3 (P33) R1 ;
M98 O3 (P33) R1 ; G69 ;
2 G91 G00 Y-10000 M06 ; M30 ;
G68 X0 Y0 R180000 ; O3 (N33) G91 G41 G01 Y-2000 M17 ;
M98 O3 (P33) R1 ; X2000 ;
G69 ; Y2000 ;
3 G00 X20000 Y10000 M06 ; G03 X-4000 I-2000 J2000 ;
G68 X0 Y0 R-30000 ; G01 Y-2000 ;
M98 O3 (P33) R1 ; X1700 M01 ;
G69 ; X300 ;
4 G00 Y-10000 M06 ; G40 Y2000 M99 ;
G68 X0 Y0 R-150000 ; %

9–48
Example 3: Mirror image (G71 and G70) and subprogram
Machining is proceeds 1 to 4.

1 2
O7170
S.P. O7000

4 3

%;
O7170 ;
G92 X0 Y0 ;
M98 O7000 R1 ;
G0 X50.0 M6 ;
G71 X1 ;
M98 O7000 R1 ;
G70 ;
G0 Y-20.0 M6 ;
G71 X1 Y1 ;
M98 O7000 R1 ;
G70 ;
G0 X-50.0 M6 ;
G71 Y1 ;
M98 O7000 R1 ;
G70 ;
G0 Y20.0 M6 ;
M30 ;

O7000 ;
M17 ;
G91 G1 Y-3.0 E9000 ;
G41 Y-2.0 D1 E9001 ;
X15.0 ;
Y5.0 ;
X-10.0 ;
Y5.0 ;
X-10.0 ;
Y-10.0 ;
X4.5 M1 ;
X0.5 ;
G40 Y5.0 M99 ;
%

9–49
Example 4: Rotation copying (G26) and subprogram (application 1)
Rotation copying in the machining shape

Y
O1 N22

M01 X

%;
O1 G92 X0 Y0 ;
M17 ;
G91 G42 G01 Y10000 ;
G26 X0 Y-10000 S0 A-90000 P22 R4 M01 ;
G90 G40 G01 X0 Y0 ;
G91 M30 ;
N22 X5000 ;
G02 X5000 I2500 ; Avoid making blocks with no movement
G01 Y-10000 M99 ; whenever possible during offset.
%

Example 5: Rotation copying (G26) and subprogram (application 2)


Rotation copying with positions and angles changed (G68 may also be used.)

Y 1 3
O3 O4 N44
20
30°
10 4
2
0
10 30 X

%; G00 X-20000 Y10000 M30 ;


1 O3 G92 X10000 Y20000 ; O4 N44 G91 G41 G1 Y-2000 M17 ;
G91 ; X2000 ;
G26 X0 Y0 S0 A0 O4 P44 R1 ; Y2000 ;
2 G91 G00 Y-10000 M06 ; G03 X-4000 I-2000 J2000 ;
G26 X0 Y0 S180000 A0 O4 P44 R1 ; G01 Y-2000 ;
3 G00 X20000 Y10000 M06 ; X1700 M01 ;
G26 X0 Y0 S-30000 A0 O4 P44 R1 ; X300 ;
4 G00 Y-10000 M06 ; G40 Y2000 M99 ;
G26 X0 Y0 S-150000 A0 O4 P44 R1 ; %

Subprograms are called, not by M98 but by G26, only in rotation copying (G26).

9–50
Example 6: Micron machining by using a subprogram (single machining)

%;
O20 ;
G92 X0 Y0 ;
G44 H30 ; Corner shape control on
E9001 D1 M98 P1 ; First machining
G43 ; Corner shape control off
E9002 D2 M98 P1 ; Second machining
E9003 D3 M98 P1 ; Third machining
E9004 D4 M98 P1 ; Fourth machining
M30 ;
N1 G91 G41 G1 Y-5.0 M17 ;
X5.0 ;
Y5.0 ;
G3 X-10.0 I-5.0 J5.0 ;
G1 Y-5.0 ;
X4.5 M1 ; 1st Turn on optional stop of NC function in the first machining.
X0.5 ; 2nd Turns off optional stop of NC function in the second and
G40 Y5.0 ; subsequent machining.
M06 L1 ;
M99 ;
%

9–51
Example 7: Micron machining by using a subprogram (multiple machining)

φ10
X
20 Subprogram N11 N12 N13
For the first For cutoff For the second
40 machining machining machining and
after

Usually, for multiple micron machining, the first machining is executed for all the holes and then
the workpiece is cut. In and after the second machining, each hole is completed first, and then the
wire proceeds to the next hole.

O1 (Main program) N11 (Shape for the first machining)


G92 X0 Y0 M17
G44 H30 Corner shape control ON G91 G01 G42 Y-5.
E9001 D1 M98 P1 First machining (for all holes) X-5.
M00 Temporary stop before cutoff Y10.
M98 P2 Cutoff machining (for all holes) X10.
G43 Corner shape control OFF Y-10.
M98 P3 Finish machining of the first workpiece X-4.5 Do not cut the workpiece.
G90 G00 X20. Y0 M06 Positioning of the second workpiece G40 Y0.5
M98 P3 Finish machining of the second workpiece M99
G90 G00 X40. Y0 M06 Positioning of the third workpiece N12 (Shape for cutoff machining)
M98 P3 Finish machining of the third workpiece M17
G90 G00 X0 Y0 M06 Return to the first workpiece G91 G01 G41 Y-5.
M30 X0.5
G40 Y0.5
N1 (Subprogram for the first machining) M99
M98 P11 First machining of the first workpiece N13 (Shape for the second machining and after)
G90 G00 X2. Y0 M06 Positioning of the second workpiece M17
M98 P11 First machining of the second workpiece G91 G01 G42 Y-5.
G90 G00 X4. Y0 M06 Positioning of the third workpiece X-5.
M98 P11 First machining of the third workpiece Y10.
G90 G00 X0 Y0 M06 Return to the first workpiece X10.
M99 Y-10.
––– - ––– - ––– - ––– - ––– - – X-5.
N2 (Subprogram for cutoff machining) G40 Y5.
M98 P12 Cutoff of the first workpiece M06 L1
G90 G00 X20. Y0 M06 Positioning of the second workpiece M99
M98 P12 Cutoff of the second workpiece
G90 G00 X40. Y0 M06 Positioning of the third workpiece
M98 P12 Cutoff of the third workpiece
G90 G00 X0 Y0 M06 Return to the first workpiece
M99
––– - ––– - ––– - ––– - ––– - –
N3 (Subprogram for the second machining and after)
E9002 D2 M98 P13 Second machining
E9003 D3 M98 P13 Third machining
E9004 D4 M98 P13 Fourth machining
M99
––– - ––– - ––– - ––– - ––– - –

9–52
Example 8: Multiple subprogram call (continuous machining by automatic wire loading)

Y
12 12 12 12 24 12 12 12 12

15
15
X

START POINT

%;
O51 ;
M17 ;
G91 G1 Y-3.0 E9000 ;
G 41 Y-2.0 E9001 D1 ; O51
X2.5 ;
Y2.5 ;
G3 X-5.0 I-2.5 J2.5 ;
G1 Y-2.5 ;
X2.2 ; Do not cut the workpiece
G0 G40 X0.3 Y5.0 M7 ;
M99 ;
O52 ; O52
M98 O51 R1 ; 12
G0 X12.0 M6 ;
M99 ;
O53 ; O53
M98 O52 R4 ;
M98 O51 R1 ;
12 12 12 12
M99 ;
O54 ; O54
M98 O53 R1 ;
15.0 15.0

G0 X-48.0 Y15.0 M6 ;
M98 O53 R1 ;
G0 X-48.0 Y15.0 M6 ;
M98 O53 R1 ;
M99 ;
The operation O55 ; O55
starts from
O55. G92 X0 Y0 ;
M98 O54 R1 ; The subprograms
end after the wire
G0X 24.0 Y-30.0 M6 ; returns to the S.P.
24.0
M98 O54 R1 ;
G0 X-120.0 Y-30.0 M6 ;
M30 ;
%

9–53
(5) Additional precautions in using subprograms

(a) Do not store in the memory the subprograms having the same program number. Likewise,
do not assign the same sequence number to plural blocks in one program.

(b) If M99 is executed in a program without M98, an alarm results (1137: M99 PRESENT IN
MAIN PROGRAM). For instance, to execute program check for a subprogram only,
perform as follows:

O1 (Main program) ; O2 (Subprogram) ;

............

.................
Machining shape
M30 ;
M99 ;
O3 (Subprogram check) ;
M98 O2 R1 ;
M30 ;

(c) If the specified program number of sequence number is not found, an alarm results (1118:
O NO. (MAIN, SUB) IS NOT REGISTERED IN MEMORY, or 1132: N NO. NOT
FOUND).

9–54
10. MACHINING CONDITION SELECTION (E CODE)

10.1 Machining Condition Selection Method

To select a machining condition, use E and 4-digit number (E0001-E9999). If E is specified in a


program, the machining condition is changed to the one specified with the number.

Note 1: Use of unregistered E number causes the alarm (1503: E NO. NOT FOUND).
Note 2: If machining condition elements of the specified E number are incomplete, the
warning results (1500: ILLEGAL MACHINING COND. SPECIFIED). To continue
operation, correct wrong elements.
Note 3: If E is not specified in a program, the machining is performed under the
condition displayed on the COND screen.
Note 4: E codes and machining conditions are modal, and they do not change by
RESET , M02, M30, or power ON.
Note 5: For detailed machining conditions, see the Instruction Manual “Machining
Conditions”.

10–1
10.2 Precautions on Programming E Numbers (J type power supply units)

(1) The foregoing composition or the number of machining conditions to be stored may be
modified or no condition may be stored depending on ROM capacity or data collection
condition.
(2) The machining conditions in E0000’s through E8000’s are stored in ROM and cannot be
changed. Therefore, when two or more E numbers are to be used in a program, it is
recommended to store machining conditions by using numbers in E9000’s.

Example:

O1 ; In case the machining status is unstable or the wire is broken when


...

: machining is started, suppose the condition is changed on the run main


E1206 ; condition screen (f · 1) or the run sub condition screen (f · 2) of the
:
...

COND screen.
E1207 ;
:
...

E1206 ; The initial condition is restored.


:
...

M30 ;

In such a case, program E numbers as follows so that subsequent machining is executed on the
changed condition.

O1 ;
Register E1206 with E9001 in advance. After changing the condition on
:
...

the COND MAIN screen, copy that condition to E9001 by f · 6


E9001 ;
ACTIVE
...

: CONDCOPY on the LIST screen.


E9002 ;
:
...

E9001 ; Changed E9001 is called.


:
...

M30 ;

10–2
10.3 Registrable Machining Condition E Numbers (K type power supply units)

(1) All machining conditions are registered to the RAM. No machining condition is registered to
the ROM.

(2) A total of 1000 machining conditions including Makino standard conditions can be registered
to the RAM.

(3) Composition of E0001-E9999


• E0001-E8899: Makino standard condition area (Note 1)
Note 1: In standard setting of the set data No.336, editing of conditions such
as deletion or rewriting is disabled, but the conditions may be edited
by changing the setting as necessary.
The condition files by wire diameter have been stored in the disk, and
therefore if the wire diameters are changed, the contents of machin-
ing condition disk must be changed.

• E8900-E8999: System reserved condition area (Note 2)


Note 2: These conditions are treated same as user conditions, but editing of
conditions such as deletion or rewriting is disabled (“disable/enable”
can be changed over with the PROTECT E NO. key). Standard values
are registered from the machining condition disk.
At present, only E8980 to E8999 have been used.
• E8980-8995 : Wire break recovery/power failure recovery conditions
E (8980+Water mode)
• E8997 : Weak discharge wire break recovery condition (valid by
setting set data No.102 bit 2 to ON)
• E8998 : Manual vertical alignment condition
• E8999 : For wire break condition saving

• E9000-E9999: User condition area (Note 3)


Note 3: In standard setting of user conditions, editing of conditions such as
deletion or rewriting is enabled ("disable/enable" can be changed
over with the PROTECT E NO. key). The user can register own
machining conditions freely.
If this area becomes full, take measures as follows.
Example 1. Output unnecessary condition Execute G151 S_ E_
Example 2. Delete unnecessary condition Delete on COND LIST screen,
or execute G10 L22 I_ J_
Example 3. Add or copy condition Add or copy on COND LIST
screen, or execute G10 L20 or
G10 L23

10–3
11. OTHER FUNCTIONS

The functions listed below are not used alone, but in combination with a G or M function.
Therefore, for description of the functions, see the section of the corresponding G or M function.

G or M function used
Function Address
together
Coordinate rotation number A G79, G84, G85, G92
Rotation copying angle A G26
Number of blocks B M98
Offset number D G41, G42
Offset amount D G41, G42
Delay amount specification H G44
Program number call O G26, M98
Sequence number call P G26, M98, M99
Scale factor P G48
Rotation angle R G68
Number of repetitions R G26, G84, G85, M98, M99
Rotation copying start angle S G26
Wire inclination angle T G51, G52
Dwell time X G04
Sub plane tangential contact radius L G24

11–1
‰Š‘—˜
11.1 Vertical Irregular Shape Mode (P0, P1, P2)

The vertical irregular shape mode (P0, P1, P2) specifies the height at which X-Y and U-V
movements in a program are made in machining a vertical irregular shape.
Effective use of this function can cope with a change in workpiece thickness or mounting method
even if made after a program was created, not requiring additional program creation.
The vertical irregular shape mode (P0, P1, P2) must be programmed in the same block as wire
radius compensation mode (G41 or G42).
If mode selection is omitted or it is programmed in the wire radius compensation cancel mode
(G40), P0 mode is selected.

P0 mode P1 mode P2 mode


U, V values
Upper guide position

Wire
U, V values U, V values
Sub plane
(Top shape)

Workpiece
X, Y values X, Y values
Program plane
(Bottom shape)

Lower guide position

X, Y values

(1) Vertical irregular shape mode 0 ... G41 P0 or G42 P0 (P0 is omissible)
X, Y values = Lower guide height
U, V values = Upper guide height
U, V values are incremental form X, Y values (values from wire vertical position).
The wire radius compensation is executed on the X-Y plane only (usually, use an NC
program of vertical irregular shape in which the wire radius is compensated on the
automatic programming unit side).

(2) Vertical irregular shape mode 1 ... G41P1 or G42P1


X, Y values = Height of program plane
U, V values = Height of sub plane
U, V values are incremental from X, Y values (value from wire vertical position).
Also, U, V axes forcibly return to vertical position in the G40 block (U, V commands are
ignored in the G40 block).

11–2
The wire radius compensation is executed on both program and sub planes (the wire
radius compensation is not necessary on the automatic programming unit side).

(3) Vertical irregular shape mode 2 ... G41P2 or G42P2


X, Y values = Height of program plane
U, V values = Height of sub plane
Either, as U, V values, the shape on sub plane.
Also, U, V axes forcibly return to vertical position in the G40 block (U, V commands are
ignored in the G40 block).
The wire radius compensation is executed on both program and sub planes (the wire
radius compensation is not necessary on the automatic programming unit side).
Example:

P1 mode P2 mode
G91; G91;
G92X0Y-20.; G92X0Y-20.;
M17; M17;
G01G41X0Y10.U0V2.929P1; G01G41X0Y10.U0V12.929P2;
X-10.Y0U6.464V3.535; X-10.Y0U-3.535V3.535;
X0Y10.U-3.535V-6.464; X0Y10.U-3.535V3.535;
X0Y10.U3.535V-6.464; X0Y10.U3.535V3.535;
X10.Y0U-6.464V3.535; X10.Y0U3.535V3.535;
X10.Y0U-6.464V-3.535; X10.Y0U3.535V-3.535;
X0Y-10.U3.535V6.464; X0Y-10.U3.535V-3.535;
X0Y-10.U-3.535V6.464; X0Y-10.U-3.535V-3.535;
X-10.Y0U6.464V-3.535; X-10.Y0U-3.535V-3.535;
G40X0Y-10.; G40X0Y-10.;
M30; M30;

Single view Top view

Start point

11–3
(4) Pseudo vector commands (I, J, K, L)
The pseudo vector command is used to prevent interference of wire radius compensation when
more than two blocks that do not contain the move command continue on one plane at the
inside offset corner on X-Y plane or U-V plane.
There may be no movement on one plane in a certain shape, though in the vertical irregular
shape mode, in general, there is movement of both X-Y and U-V planes in a block of a
program consisting of 4-axis commands (X, Y, U, V). If two or more blocks not having
movement continue on one plane, the wire radius offset on that plane cannot be calculated, and
therefore the radius compensation is made according to the vectors on the plane on which
movement is performed.
This radius compensation method is proper for outside compensation. In the case of inside
compensation, however, interference of radius compensation may occur depending on the
direction of vector on the plane on there is movement.
The pseudo vector command specifies the direction vector of the block that specifies the next
movement. With this command, operation stops at the end point of the specified block without
changing the direction of radius compensation until the next movement on that plane is
specified, thus eliminating interference in the inside shape.
(In the case of outside compensation, operation stops at the end point of the specified block,
and compensation is not made correctly. Therefore, the pseudo vector should not be used.)

(a) Pseudo vector command on X-Y plane ... I (X direction), J (X direction)


Program this in a block that contains the last movement on X-Y plane, when there is no
movement on the X-Y plane but movement on the U-V plane in the inside compensation.

(b) Pseudo vector command on U-V plane ... K (U direction), L (V direction)


Program this in a block that contains the last movement on U-V plane, when there is no
movement on the U-V plane but movement on the X-Y plane in the inside compensation.

11–4
Example:

O1; Vertical irregular shape mode 2


M17;
G91G01G42P2Y5000V5000D1;
X10000U10000; Direction vector of the block where next U, V movement is restarted.
Y20000V20000; K-10000L-1000 may be programmed because of U-10000V-1000.
X-10000U-10000;
X-2500Y-2500V-10000K-10L-1; Block having last movement on U-V plane
X-2500Y-2500; Block not having movement on U-V plane
X-2500Y-2500; Block not having movement on U-V plane
Y-2500Y-2500U-10000V-1000; Block that restarts movement on U-V plane
Y-10000V-9000;
V
X9700U9700M01; U
X300U300;
G40Y-5000V-5000;
M30;

Y
X

Note 1: The vertical irregular shape modes P1 and P2 must be programmed together
with G41 or G42 in the same block (any position in a block is acceptable).
If programmed in different blocks, these modes are invalid (but no alarm
occurs).
Note 2: The vertical irregular shape command other than P0, P1. and P2 (eg, 1. 0 P3,
etc.) causes an alarm (1077: G41/G42 P COMND ERROR).
Note 3: In the vertical irregular shape modes P1 and P2, the wire moves to vertical
position in the G40 (wire radius compensation cancel) block, irrespective of
G90 (absolute) or G91 (incremental). Also, U, V commands are ignored in the
G40 block.
Note 4: The vertical irregular shape mode cannot be programmed together with taper
mode (G51, G52) in the same program.
⇒Alarm (1078: INCONSISTENT COMND WITH G41/G42 P COMND).
Note 5: An NC program for vertical irregular shape must be prepared with linear
interpolation such as G00 and G01.
Circular interpolation such as G02 and G03 cannot be used.
⇒Alarm (1078: INCONSISTENT COMND WITH G41/G42 P COMND).
Note 6: Do not use the pseudo vector commands (I, J, K, L) for block not having
movement in the outside compensation corner.

11–5
’
‘
‹
Š




Note 7: If a vertical irregular shape program is made by the automatic programming
unit (MP-1 level 4200) and machining is performed in the P1 mode, set the
parameters for top shape, bottom shape and upper and lower guide positions
to Z1 = Z2 = plate thickness, and Z3 = 0 respectively.

Upper guide (U–V plane)

Top shape

Workpiece

Bottom shape
Lower guide (X–Y plane)
Wire

Z3
Z2
Z1

Note 8: Specific axes such as U and V axes can be fixed to ABS or INC mode by setting
the parameter, regardless of G90 or G91.
• If U and V axes are fixed to INC mode, regardless of G90 and G91
Machine parameter No.520 = 0000 1100B (U, V)
Machine parameter No.521 = 0000 1100B (INC)
• If all axes follow G90 and G91 (standard setting)
Machine parameter No.520 = 0000 0000B (G90, G91 valid in all axes)
Machine parameter No.521 = 0000 0000B (initial value)

11–6
12. PREPARATION AND EDITING OF PROGRAMS BY AN AUTOMATIC
PROGRAMMING DEVICE

12.1 Classification of Addresses Used by this NC Device

This NC device uses a large number of addresses including G, M, D, E and R. These addresses fall
into three major groups:
(1) Addresses the functions of which are defined by JIS for an NC machine tool (JIS B6314, etc.)
and always output by an ordinary automatic programming device.
(2) Addresses the functions of which are defined by JIS for an NC machine tool, but they may or
may not be output by an automatic programming device depending on its specification.
(3) Addresses used depending on NC machine tool specification.

The following is a table grouping the addresses used by this NC device according to the above
classification:

(1) Addresses output by (2) Addresses generally (3) Address specific


an automatic used by an NC to this NC
programming device machining tool device
G00, G01, G02, G03 G04, G40, G41, G42, All G and M codes
G90, G91, G92, G92, M00, M01, M02, and addresses other
X, Y, I, J M30 than those listed left

12–1
12.2 Preparation of Programs by an Automatic Programming Device

As described in the preceding section, data always output by an ordinary automatic programming
device are:
(1) Ways of movement (G00, G01, G02, G03)
(2) End point of movement (X, Y, G90, G91) and center of an arc (I, J)

However, these movement commands complete most of the program. After the block of these
commands, only minor functions that need no complicated calculations are to be added to the
program.

Addition of other
function (M17, etc.)
by program editing

Program of the Movement command


complicated by the automatic
machining shape programming device

The other functions may be output automatically depending on the specification of an automatic
programming device. Generally, however, these functions are corrected as the ones for a program
of this NC unit by editing the output program in user’s own way.

12–2
12.3 Examples of Program Editing

Example 1: Machining of a single shape (without using a subprogram)

Machining shape

7
Program with movement commands only Correct program (edited blocks are indicated by *)

%; %;
Output in most automatic
G92 X0 Y0 ; programming devices *O1 ;
G91 G01 Y-7000 ; G92 X0 Y0 ;
G03 X_ Y_ I_ J_ ; *D1E9001 ;
: *M17 ;
: Machining shape *G91 G01 G41 Y-7000 ;
:
G03 X_ Y_ I_ J_ ; G03 X_ Y_ I_ J_ ;
G01 Y7000 ; :
:
% :
G03 X_ Y_ I_ J_ ;
*G01 G40 Y7000 ;
*M30 ;
%

Example 2: Machining of a single shape (by using a subprogram)

Machining shape
7

Program with movement commands only Correct program (edited blocks are indicated by *)

%; %;
G92 X0 Y0 ; *O1 ;
G91 G01 Y-7000 ; *G92 X0 Y0 ;
Main program
G03 X_ Y_ I_ J_ ; *E9001D1M98P100 ;
: *M30 ;
: Machining shape
: *N100 ;
G03 X_ Y_ I_ J_ ; *M17 ;
G01 Y7000 ; *G91 G01 G41 Y-7000 ;
% G03 X_ Y_ I_ J_ ;
: Subprogram
:
:
G03 X_ Y_ I_ J_ ;
*G01 G40 Y7000 ;
*M99 ;
%

The entire machining shape is entered in the subprogram.

12–3
Example 3: Machining employing mirror image, rotation, etc. (without using a subprogram)

Programmed shape Machining shape

7
Program with movement commands only Correct program (edited blocks are indicated by *)

%; %;
G92 X0 Y0 ; *O1 ;
G91 G01 Y-7000 ; G92 X0 Y0 ;
G03 X_ Y_ I_ J_ ; *G71 X1 Y0 ; Mirror image on the X
: *M17 ;
: *G91 G01 G41 Y-7000 ;
:
G03 X_ Y_ I_ J_ ; G03 X_ Y_ I_ J_ ;
G01 Y7000 ; :
:
% :
G03 X_ Y_ I_ J_ ;
*G01 G40 Y7000 ;
Mirror image off
*G70 ;
*M30 ;

Example 4: Machining employing mirror image, rotation, etc. (by using a subprogram)

Programmed shape Machining shape


7

7
Program with movement commands only Correct program (edited blocks are indicated by *)

%; %;
G92 X0 Y0 ; *O1 ;
G91 G01 Y-7000 ; G92 X0 Y0 ;
G03 X_ Y_ I_ J_ ; *G71 X1 Y0 ; Main program
: *E9001D1M98P100 ;
: *G70 ;
:
G03 X_ Y_ I_ J_ ; *M30 ;
G01 Y7000 ; *N100 ;
% *M17 ;
*G91 G01 G41 Y-7000 ;
G03 X_ Y_ I_ J_ ;
:. Subprogram
G03 X_ Y_ I_ J_ ;
*G01 G40 Y7000 ;
The subprogram is used for the entire
*M06 L1 ;
programmed shape. *M99 ;
%

12–4
Example 5: Micro machining of single shape (by using a subprogram)

Program with movement commands only


Y Machining %;
shape G92 X0 Y0 ;
G91 G01 Y-5000 ;
X5000 ;
Y5000 ;

5
G03 X-10000 I-5000 J5000 ; Movement command

5
5
5 X at a time
5 G01 Y-5000 ;
X4500 ;
X500 ;
Y5000 ;
%

Correct program (edited blocks are indicated by *)

%;
*O20 ;
*G92 X0 Y0 ;
Main program

*G44 H30 ; Corner shape control ON


*E9001 D1 M98 P1 ; 1st machining
*G43 ; Corner shape control OFF
*E9002 D2 M98 P1 ; 2nd machining
*E9003 D3 M98 P1 ; 3rd machining
*E9004 D4 M98 P1 ; 4th machining
*M30 ;
*N1 ;
*M17 ;
*N1 G91 G41 G01 Y-5000 ;
X5000 ;
Subprogram

Y5000 ;
G03 X-10000 I-5000 J5000 ;
G01 Y-5000 ;
*X4500 M01 ; Turn on OPT. STOP on NC FUNC screen at 1st M/C
X500 ; Turn off OPT. STOP on NC FUNC screen at 2nd and
*G40 Y5000 ; subsequent M/C
*M06 L1 ;
*M99 ;
%

The subprogram is used for movement commands, while the main program specifies machining
conditions, offset values and calls subprograms.

12–5
Example 6: Multiple machining of the same shapes employing automatic wire loading (by using a
subprogram)

Y Machining shapes
Programmed shape
3

10
1
X
20

20
4
2

30

Machining is executed in
Program with movement commands only ascending numerical order.

%;
G92 X0 Y0 ;
X91 G01 Y-4000 ;
X16000 ; The repetitive part is created by an incremental
X-20000 Y10000 ; command (G91) in the automatic programming device.
Y-10000 ;
X3700 ; Add points not to cut the workpiece.
X300 ;
Y4000 ;
%

Correct program (edited blocks are indicated by *)

%;
* O1 ;
1 * G92 X0 Y0 ;
* M98O2 ;
2 * G00 G90 X0 Y-20000 M06 ; Main program:
* M98 O2 ; The coordinate system is set up.
3 * G00 G90 X30000 Y0 M06 ; An absolute command (G90) is
* M98 O2 ; more convenient for positioning.
4 * G00 G90 X30000 Y-20000 M06 ;
* M98 O2 ;
1 * G00 G90 X0 Y0 M06 ;
* M30 ;
* O2 ;
* M17 ;
Subprogram:
* G91 G41 G01 Y-4000 ;
X16000 ; The shape is created by an
X-2000 Y10000 ; incremental command with no
Y-10000 ; coordinate system set up,.
X3700 ;
* X300M08 ; Set cut-remain or halt using M08.
* G40Y4000 ;
* M99 ;
%

12–6
Example 7: Multiple machining of two or more shapes employing automatic wire loading (by using
subprograms)
Programmed shape Y Machining shape
(1) (2)
3

10
10
1
10
X
20

20
2
4

30

Machining is executed in
ascending numerical order.
Program with movement commands only

(1) % ; (2) % ;
G92 X0 Y0 ; G92 X0 Y0 ;
X91 G01 Y-4000 ; G91 G01 Y-5000 ;
X16000 ; X5000 ; Shapes (1) and (2) are created separately
X-20000 Y10000 ; Y10000 ; by incremental commands (G91) in the
Y-10000 ; X-10000 ; automatic programming device.
X3700 ; Y-10000 ;
X300 ; X4700 ;
Y4000 ; X300 ;
% Y5000 ;
%

12–7
Correct program (edited blocks are indicated by *)
%;
* O1 ;
1 G92 X0 Y0 ;
* M98O2 ;
2 * G00 G90 X30000 Y-20000 M06 ;
* M98 O2 ; Main program:
3 * G00 G90 X30000 Y0 M06 ; The coordinate system is set up only at one position.
* M98 O3 ; Absolute command (G90) is better for positioning.
4 * G00 G90 X0 Y-20000 M06 ;
* M98 O3 ;
1 * G00 G90 X0 Y0 M06 ;
* M30 ;
* O2 ;
* M17 ;
* G91 G41 G01 Y-4000 ;
X16000 ; Subprogram (1):
X-20000 Y10000 ;
Y-10000 ; The shape is created by an incremental command
X3700 ; (G91) with no coordinate system set up.
* X300M08 ;
* G40Y4000 ;
* M99 ;
* O3 ;
* M17 ;
* G91 G41 G01 Y-5000 ;
X5000 ;
Y10000 ; Subprogram (2):
X-10000 ;
Y-10000 ; The shape is created by an incremental command
X4700 ; (G91) with no coordinate system set up.
* X300M08 ;
* G40Y5000 ;
* M99 ;
%

12–8
Example 8: Machining shape containing the same shapes (by using a subprogram)

Machining shape Repetitive shape

N100

2.5
2.5

5
5

5
5 5

55

While the entire shape can be created by an automatic programming device, it can also be made by
using a subprogram, as shown below.

Program with movement commands only

%; Repetitive shapes are created by an incremental command


G92 X0 Y0 ; (G91) is the automatic programming device.
G91 G01 X5000 ; If the part other than the repetitive shapes is a simple
Y5000 ;
G02 X5000 I2500 J2500 ; shape, that part is programmed in editing. The part that is
G01 Y-5000 ; not a simple shape is created in the automatic
% programming device with the repetitive shapes omitted.

Correct program (edited blocks are indicated by *)

%;
* O1 ;
* G92 X0 Y0 ;
* M17 ;
* G91 G01 G41 Y5000 ;
* X-5000 ;
Main program:
* Y500 M98 P100 R5 ;
* (G01) X5000 ; Coordinate system setting up and the part other than the
* Y-5000 ; repetitive shapes are programmed.
* X-44700 M01 ;
* X-300 ;
* G40Y-5000 ;
* M30 ;
* N100 X5000 ; Subprogram:
Y5000 ; The shape is created by an incremental command (G91),
G02 X5000 I2500 J2500 ; with no coordinate system set up. Care should be taken
* G01 Y-5000 M99 ; not to make blocks with no movement since offset is
%
valid.

12–9
13. METRIC SYSTEM, INCH SYSTEM AND RESOLUTION

The metric system or inch system can be selected by parameter No. 63 setting.
Also, with the same parameter No. 63, high resolution mode that displays and specifies values in
high resolution 10 times the conventional resolution in both metric and inch systems can be
selected.
• Parameter No. 63 Command unit in linear axis

7 6 5 4 3 2 1 0 bit

Command unit *1
0: Metric system
1: Inch system

Input resolution of command unit (programmed value) *2


0: Standard resolution
[10¯3 mm] or [10¯4 inch]
1: High resolution
[10¯4 mm] or [10¯5 inch]

Output resolution of command unit (screen display and input )*2


0: Standard resolution
[10¯3 mm] or [10¯4 inch]
1: High resolution
[10¯4 mm] or [10¯5 inch]

*1: Power OFF/ON required


*2: Valid immediately after change

Conventional resolution of 0.001 mm in metric system or 0.0001 inch in inch system for display
and command value is called standard resolution mode, while ×10 resolution of 0.0001 mm in
metric system or 0.00001 in inch system is called high resolution mode.
Whether the programmed values are in standard resolution or high resolution is set by the input
resolution bit of command unit.
For example, G91 X1 ; block specifies that input resolution is:
Standard resolution mode ............... 0.001 mm (or 0.0001 inch)
High resolution ............................... 0.0001 mm (or 0.00001 inch)
However, G91 X1. ; block containing a decimal point specifies 1.0 mm (or 1.0 inch) in both
standard and high resolution modes.

13–1
Whether values displayed or input on the screen are in standard resolution or high resolution is set
by the output resolution bit of command unit. The coordinates or offset data displayed or input on
the screen are switched by this bit.

Note 1: If parameter No. 63 bit 0 is set to 1, the command unit of position data,
machining condition data and program data is switched from metric to inch.
When this bit is changed, be sure to turn the power off once, then perform
reference point return. If only the resolution (bit 2 or 3) is changed, this
operation is not required.
Note 2: Resolution switching by parameter No. 63 setting is only applied to the
coordinate display and programmed values in metric and inch with a little
exception. Therefore, resolution of taper angle, scaling factor, rotation angle,
etc. is not affected. Also, the wire length, fluid height, etc., not related directly
to machining dimensions are not affected.
Note 3: Normally, input resolution and output resolution (bit 2 and 3) are set to same
resolution though it is possible that only data display is made in high
resolution mode and data programming is made in standard resolution mode.

(1) Command unit in program


The command unit of travel value, offset value, etc. in linear axis changes when input
resolution of command unit in metric and inch systems is switched by parameter No. 63.
The following lists the command unit changed.

(a) Travel

Metric system
Coordinate Standard resolution High resolution
word Command value Command value
Command unit Command unit
range range
X, Y, U, V, Z 0.001 mm 0 - ±99999.999 0.0001 mm 0 - ±99999.9999
I, J 0.001 mm 0 - ±99999.999 0.0001 mm 0 - ±99999.9999

Inch system
Coordinate Standard resolution High resolution
word Command value Command value
Command unit Command unit
range range
X, Y, U, V, Z 0.0001 mm 0 - ±3937.0078 0.00001 mm 0 - ±3937.00787
I, J 0.0001 mm 0 - ±3937.0078 0.00001 mm 0 - ±3937.00787

13–2
(b) Dwell

Metric system
Standard resolution High resolution
Code
Command value Command value
Command unit Command unit
range range
G04X_; 0.001 sec 0 - 14744.7 0.0001 sec 0 - 14744.7

Inch system
Standard resolution High resolution
Code
Command value Command value
Command unit Command unit
range range
G04X_; 0.0001 sec 0 - 14744.7 0.00001 sec 0 -14744.7

(c) Offset value (direct command)

Metric system
Standard resolution High resolution
Code
Command value Command value
Command unit Command unit
range range
D 0.001 mm 0.0 - ±9.999 0.001 mm 0.0 - ±9.9999

Inch system
Standard resolution High resolution
Code
Command value Command value
Command unit Command unit
range range
D 0.0001 sec 0.0 - ±0.9999 0.00001 sec 0.0 -±0.99999

For indirect command, specify D0-D9 in all modes.

(d) Corner offset value

Metric system
Standard resolution High resolution
Code
Command value Command value
Command unit Command unit
range range
H 0.001 mm 0 - ±0.999 0.0001 mm 0 - ±0.9999

Inch system
Standard resolution High resolution
Code
Command value Command value
Command unit Command unit
range range
H 0.0001 sec 0 - ±0.9999 0.00001 sec 0 - ±0.99999

13–3
(e) F4-digit feed

Metric system
Standard resolution High resolution
Code
Command value Command value
Command unit Command unit
range range
F 1.0 mm/min 0 - 9999. 0.1 mm 0 - 9999.9

Inch system
Standard resolution High resolution
Code
Command value Command value
Command unit Command unit
range range
F 0.1 inch/min 0 - 999.9 0.01 inch/min 0 - 999.99

Note 1: No command value is affected by the input resolution if it is specified with a


decimal point. (G91X0.1; specifies moving command of 0.1 mm in metric
system or 0.1 inch in inch system, regardless of standard resolution or high
resolution.)
However, if a command value is specified with high resolution digits (0.0001 in
metric or 0.00001 in inch) in the standard resolution mode, the least digit is
rounded off. In this case, the warning message 1086: INPUT VALUE IS
ROUNDED OFF is displayed.

(2) Display and input unit on the screen


Display and input unit of data for various coordinates, taper machining, etc. is changed by
switching setting of output resolution of command unit in both metric and inch systems.
The following lists display items to which display and input unit changes.

(a) Coordinate display

Metric system Inch system


Items Standard High Standard High
resolution resolution resolution resolution
Various coordinates 0.001 mm 0.0001 mm 0.0001 inch 0.00001 inch

13–4
(b) Set

Metric system Inch system


Items Standard High Standard High
resolution resolution resolution resolution
Offset data for
0.001 mm 0.0001 mm 0.0001 inch 0.00001 inch
indirect command
Program plane 0.001 mm 0.0001 mm 0.0001 inch 0.00001 inch
Sub plane 0.001 mm 0.0001 mm 0.0001 inch 0.00001 inch
Z axis position 0.001 mm 0.0001 mm 0.0001 inch 0.00001 inch
Drawing plane 0.001 mm 0.0001 mm 0.0001 inch 0.00001 inch
Work offset 0.001 mm 0.0001 mm 0.0001 inch 0.00001 inch
F4-digit feed 1. mm/min 0.1 mm/min 0.1 inch/min 0.01 inch/min

(c) Machining condition

Metric system Inch system


Items Standard High Standard High
resolution resolution resolution resolution
Speed 0.01 mm/min 0.01 mm/min 0.001 inch/min 0.001 inch/min
Wire diameter 0.001 mm 0.0001 mm 0.0001 inch 0.00001 inch
Wire diameter used 0.001 mm 0.0001 mm 0.0001 inch 0.00001 inch
Water level height 1.0 mm 1.0 mm 0.1 inch 0.1 inch
Wire length 1m 1m 1 yard 1 yard
EST. speed 0.01 mm/min 0.01 mm/min 0.001 inch/min 0.001 inch/min

Note 1: The output resolution setting of command unit only changes the display and
input unit on the screen, and whether or not the offset data or taper machining
data for indirect command on the screen is used in high resolution in actual
machining is determined by the input resolution setting of command unit.
Note 2: Which modes, metric or inch, and standard resolution or high resolution are
used for display and input on the parameter screen is determined by parameter
No. 531.

13–5
Example 1: When machining is executed in inches by a millimeter-specification machine and an
automatic programming device (decimal places are three) and without parameter
change
1 Preparation of a program

Drawing of the If the dimensions of the left figure are entered in exact sizes
machining shape in millimeters by a millimeter-specification automatic
(unit: inch)
programming device (decimal places are three), the shape
becomes very small and problems such as errors occur.

0.5
Entering drawing dimensions ten times larger than the exact
sizes obtains the following:

0.5
X0.5 (inch) → Enter X5 (mm) → tape X5000 (µm)
0.4 0.4

The entire program is as follows:


%;
(unit: mm) G92 X0 Y0 ;
M17 ;
5

G91 G41 G01 Y-5000 ;


5

X4000 ;
Y10000 ;
4 4
X-8000 ;
Y-10000 ;
X3700 M01 ;
X300 ;
G40 Y5000 ;
M30 ;
%

2 Enlarging the shape by scaling (G48)


Because 1 inch equals 25.4 millimeters, the above program is edited to enlarge the machining
shape by 2.54 times.
%;
G92 X0 Y0 ;
G91 ;
G48 (X0) (Y0) P2.54 ; Scale factor of 2.54
M17 ;
G41 G01 Y-5000 ;
X4000 ;
Y10000 ;
X-8000 ;
Y-10000 ;
X3700 M01 ;
X300 ;
G40 Y5000 ;
G47 ; Scaling off
M30 ;
%

13–6
3 Enter setting conditions in millimeter. The feedrate and offset value may also be entered in
millimeter.

Note 3: In this case, the shape may be enlarged by 100 times and the scale factor may
be 0.254.

Example 2: When machining is executed in millimeters by an inch-specification machine and an


automatic programming device (decimal places are four) without parameter change.

1 Preparation of a program
Enter drawing dimensions 1/10 smaller than exact sizes in inches to prepare a program.

Prepared program
Drawing of the (unit: inch)
machining shape
(unit: mm)

10

1
8

0.8

2 Contracting the shape by scaling (G48)


Because 1 millimeter equals 0.03937 inch, the above program is edited to enlarge the
machining shape by 0.394 time.

%;
G92 X0 Y0 ;
G91 ;
G48 (X0) (Y0) P394 ; Scale factor of 0.394
:
:
:
G47 ; Scaling off
M30 ;
%

3 Enter various conditions in inches. The movement speed and offset amount may be specified
in inches.

Note 4: In this case, the shape may be contracted by 1/100 times and the scale factor
may be 3.937.
Note 5: In this manual, the program examples use the unit of millimeters. Care should
be taken in preparing programs in inches.

13–7
14. CUSTOM MACRO

14.1 General Description

14.1.1 Features of custom macro

The Custom Macro is a programming language with the “macro command code” for implementing
operation functions or judgement functions added to the NC command codes of “Address +
Numeric values” of conventional part program.
With the custom macro, a machine builder or user himself can prepare machining program or
machine control program requiring complicated calculations or condition judgements.
The custom macro differs greatly from the part program in the following points.

(1) A “variable” can be used for a ward value.


(2) Calculation can be made between variables and constants.
(3) The operation parameters of the NC unit and the internal information of the system
software can be read as variables.
(4) The “control commands” such as conditional jump or repetition can be used.
(5) A wide variety of subprogram call patterns are available. With these features, program
functions can be further enhanced and the program can be applied more extensively.

Conventional part program

Machining M
Part program NC unit
drawing Machine
(Machining program) side

Application of extended NC program


NC unit
Variable Machine
Machining Part program side
drawing Move
(Operation command M
(Machining program) command)
(Control command) Machine
Machine (Interface control
Custom macro input/output)
control
sequence
(Machine control
Operating Position information
program)
parameter Machine interface
information

14–1
14.1.2 Custom macro and run mode

In the custom macro, components of all programs can be classified as follows.

(1) NC program Main program Program which starts execution at the run
starts.
Subprogram Program which starts execution at the
subprogram call command of the main
program. The main program can pass any
parameter to the subprogram.

(2) Command code NC command code Command code by the address word used
for the conventional part programming.
Macro command code Command which operates on position
information of the NC command block
and flow of the NC program.

These components can be used in each run mode of the NC unit under the following limitations.

Table 14.1 Relationship between run mode and custom macro

Component NC program Command code


NC command Macro
Rum mode Main program Subprogram
code command code
Memory run Possible Possible Possible Possible
Impossible
MDI run Possible Possible Possible
(Note 1)

Note 1: The subprogram used in the MDI run must have been registered on the memory
by the EDIT screen prior to run start (same as normal part program).

14–2
14.2 Subprogram

14.2.1 Types of subprogram calls

There are the following types of the subprogram call patterns which can be used in the custom
macro.

Subprogram
call patterns

Simple call ··································· Subprogram is executed repeatedly for specified


times by the call command code executed by the
main side program.
Parameter call······························· Subprogram is executed as in simple call.
Any parameter can be notified to subprogram.
Pseudo command code call·········· Parameter call to specified subprogram is executed
by execution of special “G”, “M”, “T” code.

14.2.2 Simple call (M98, G27)

“M98” or “G27” command code is used.

(1) When M98 command is used:

M98 O/P_ P/N_ R/L_ ;

Repetition times

Execution start “N” number

Subprogram No.

Note 1: Mixed use of combination “O_ P_ R_” and combination “P_ N_ L_” is not
allowed. (The wire electric discharge machine is fixed to O_ P_ R_ by
parameter 74.)
Note 2: Omission of R/L results in single repetition time.
Note 3: Omission of P/N results in execution of the subprogram from its
beginning.
Note 4: Commanding with each word value substituted by any macro variable is
possible. This is also true with other subprogram call commands.

14–3
(2) When G27 command is used:

M27 O_ P_ Q_ R_ ;

Times of repetition

“N” number at which execution is terminated

“N” number at which execution is started

Subprogram number

Note 1: Omission of O results in call of calling program itself.


Note 2: Omission of P results in execution of the called program from its begin-
ning.
Note 3: No subprogram call command must appear in the block containing “N”
number indicated by Q. Omission of Q results in termination of the sub-
program upon execution of “M99” command.
Note 4: Omission of R has the same effect as specifying R1.

Example: Usage of M98/G27

P10 absent O100 (SUB)

......
O100 (MAIN)
......

N10 G91 X100 ;


P10 present

............
M98 O(P)110 P(N)10 ;
......

“Same as M98”

G27 O110 P10 ; M99 ;


.........

N11 G90 X10 ;


G27 O110 P11 Q12 ;
......

(If M99 exists, end at that block.)


......

N12 X10 ;
M98 O110 N20 ; ← Erroneous command
.....

(Own call)

M98 O110 P20 ; N20 G27 P11 Q12 ;


......

......

M99 ;

14–4
14.2.3 Parameter call (G65)

“G65” command code is used for this purpose.

G65 P_ N_ L_ X_ Y_ ;

Parameter word string

Repetition times

Execution start “N” number

Subprogram number

Note 1: L may be omitted, in which case the results is the same as specifying L1.
Note 2: N may be omitted, in which case execution is made from the first block of the
subprogram.
Note 3: Specify N and L always before parameter word string.
Note 4: In case N or L only is specified for parameter word string without specifying
both, it is necessary to add a dummy parameter other than N or L at the
beginning of the parameter word string.

Example:
G65 P100 L1 ; ⇒ G65 P100 A0 L1 ;

Parameter “L” Dummy parameter

14–5
14.2.4 Pseudo command code call (Parameter No. 140 - 171)

The pseudo command code call is used to call a subprogram that uses macro command codes
having special functions other than the command codes provided by the NC unit, then to execute
these command codes in a subprogram. Special G, M, and T codes used to call a subprogram are
defined by the parameters.

Example 1 of parameter setting

When parameters are set to values as


No. 140 20500 shown here, subprogram No. 8100 is
No. 141 8100 called by execution of command code
“M500”.

(1) Parameter No.


2 parameters per command code must be set for the pseudo command code call. Up to 16
command codes can be set with addresses of “G”, “M” and “T” combined.

Parameter 140 MACRO G, M, T(1) NO


1 set ··· 2 parameters/command code
141 MACRO G, M, T(1) “O”
142

16 sets

Assignment of parameter
171 Nos. is as listed in the
following table.

Set No. Parameter No. Set No. Parameter No. Set No. Parameter No.
1 140 - 141 7 152 - 153 13 164 - 165
2 142 - 143 8 154 - 155 14 166 - 167
3 144 - 145 9 156 - 157 15 168 - 169
4 146 - 147 10 158 - 159 16 160 - 171
5 148 - 149 11 160 - 161
6 150 - 151 12 162 - 163

Note 1: Addresses of “G”, “M” and “T” can be specified in any set of these 16 sets.
Note 2: Set the parameters not in use to “0”.

14–6
(2) Parameter setting
1 Specification of command code
Set the code Nos. of “G”, “M” and “T” calling the subprogram and the call types in
decimal 5 digits.

MACRO G, M, T, (1) No.

Command code setting

2 0 1 2 3 (Note) Setting is within


1000 thru 32767.

Code No. = 0 thru 999

Subprogram call type: 0=G65 (Without parameter)


1=G65 (With parameter)
2=M98

Command code addresses: 1=“G”


2=“M”
3=“T”

2 Specification of subprogram No.


Specify the subprogram No. corresponding to the command code in decimal value.

MACRO G, M, T (1) “O”

Specified value of Subprogram No. = 1 thru 9999

Example 2 of parameter setting


1. Parameter value 2. Program content 3. Subprogram call
140 10400
141 8001 G00 G400 X0 ; G00 X0 G65 P8001 ;
142 11401
143 8002 G01 G401 Y1. ; G01 G65 P8002 Y1. ;
144 20500
145 8101 X2. M500 Y3. ; X2. Y3. G65 P8101 ;
146 32600
147 8201 T600 ; M98 P8201 ;

14–7
(3) Executing ordinary code in pseudo command code
In a subprogram called by the pseudo command code call, such call by parameter specification
can be temporarily suppressed
Example 3 of parameter setting.

No. 140 22028

No. 141 8000

O8000
Main
#3200 = 4 ; Suppress pseudo
: command M code
M28 subprogram
:
call pseudo :
:
command code :
:
M28 ; By #3200=4, execute
: as original NC command.
: (Work tank filling)
:
:
:
:
#3200 = 0 ; Cancel pseudo command
code suppression

(4) Precautions on use of pseudo command codes


When a pseudo command code is used, attention should be paid to the following.
(a) Blocks containing other subprogram call or pseudo command codes cannot be used.
(b) In case a pseudo command code is used in a block containing other NC command codes,
the subprogram is called after completion of operation of all such NC command codes.
(c) In case same command codes as those provided by NC unit are defined as pseudo
command codes, they function as pseudo command codes.

14–8
14.2.5 Nesting of subprograms

The subprogram nesting can be counted at two different levels; simple subprogram level and macro
level.

(1) Subprogram level


Indicates the nesting level of all subprogram calls by M98, G27, G65, pseudo command code,
etc. and up to a total of 15 nesting levels of call are available.

Sub- Sub- Sub-


Main program program program
program (1) (2) (14)

Total 15 levels (User 10 levels)

Note: However, the system uses 5 levels, and therefore the user can use up to 10
levels.

(2) Macro level


Indicates the nesting level of subprogram parameter calls by G65, G66, pseudo command
code, etc. and up to a total of 6 nesting levels of call are available.

: : G66 : :
: : : : :
:
G65 :
M98 X10 :
G65 :
T100
: : : : :
: : : :
G67

T100: Pseudo command code

1 level 2 level 3 level 6 level

However, when a block containing a macro command code was executed before executing
parameter call as shown below, one level is occupied unconditionally.

Main program Main program


#101 = 1 #101 = 1
DOWHILE DOWHILE G65
[ ] G65 M98 [ ]
M98
M98
1 level 1 level

Note: However, the system uses 2 levels, and therefore the user can use up to 4
levels.

14–9
14.3 Parameter and Variable Function

14.3.1 Purpose of variables

In case a subprogram is to be created for general purpose, a function to make the machining scale
variable while the workpiece machining shape is fixed is necessary.

Machine shape Machining work


Enlarge Cutting locus by
scale a
Subprogram
L1 Cutting locus by
Reduce scale b

L2
R0 Machining scale
L1, L2, R0

Fig. 14.1 Purpose of subprogram for general use

When such a subprogram is to be implemented, the axis movement amount is an unknown value
that cannot be determined by the subprogram itself among various commands that are output to the
EDM. On the other hand, the scale information is known to the main program. In such a case, the
following definitions are applied.
Machining scale information given by the main program: ······· Parameter
Container of unknown values received by subprogram: ··········· Variable

Variables are implemented by the combination of special character “#” and variable number. A
variable can also be used for variable number itself.

Variable expression #10


{

Variable number
Indirect expression of variable ·········· # (#10)
Variables have also the following applications.
(a) Use in substitution calculation

#10 = #10 + 123 Arithmetic expression

(b) Use in judgement condition

IF#10 = #20 – 1 Conditional expression

(c) Substitution of NC command code

G01X#10Y#20–1

Variables can also be classified as shown below according to the initialization timing of value,
effective range, etc.

14–10
Table 14.2 Types of variables
Initialization
Nomenclature Q’ty Effective range Application
update
Local variable 33 Within macro Subprogram call 1. For input of macro
level parameter
2. For internal operation
Common variable Max. Within operation, mode, cleared upon 1. For internal operation
(non-holding 400 reset. Other specifications available 2. For communication
type) only for automatic operation system. between subprograms
Common variable Max. Common to all All memory clear 1. For string machine
(holding type) 500 + 50 operation modes (at maintenance characteristics
work) 2. For custom macro
parameter
System variable Not open Common to all Updated at time 1. System reference and
*1 operation modes of power ON, control
with operation or 2. Reference to operating
with screen state
operation. 3. Machine control
4. Reference to and update
of operation parameters

*1: The system variables are not open to the users to prevent system malfunction. Please contact
us if you want to use them.

14–11
Table 14.3 Applications of Common Variables and Nesting Levels

Manual Model/ Machine control system Auto run system *1

Appli-
cation
Graphic
run edit
ICON MSEQ1 MSEQ2 MSEQ3 MEM MDI SAUT system
system system

Subprogram nest level


0-4 0-4 0-4 0-4
0-9 0-9
(M98)
0 - 14 0 - 14 0 - 14 0 - 14
*2 *2 *2

0-2 0-2 0-2 0-2


Macro nest level

0-3 0-3
(G65)

0-5 0-5 0-5 0-5


*2 *2 *2

#100-#149 #100-#149 #100-#149 #100-#149 #100-#149


#100-#499 #100-#499 #100-#499 #100-#499
common variables
Non-hold type

#100 - #499
#100 - #499
#100 - #499
#100 - #499
#100 - #499
#500
Hold type common

#500 - #999 (real number) *3 - #999


(real
number)
variables

#9500
#9500 - #9549 (integer) - #9549
(integer)

*1: The MDI and MEM in automatic run system are used for user program execution.
*2: Up to 10 levels of subprograms or 4 levels of macro programs can be used for user programs.
*3: Hold type common variables are common to all run systems. For variables opened to the user,
see Table 14.4

14–12
Table 14.4 Variable Number List (Auto run system)
Name Variable number Type Q’ty Class Remarks
Local #0 (Reversed value for Both user and Double accuracy real
variables “empty variable”) A 33 system number type
#1 - #33
Non-holding System Double accuracy real
#100 - #149 A 50
type common number type
variables #150 - #249 B 100 Single accuracy
#250 - #399 B 150
#400 - #499 B 100 User
Holding type System Double accuracy real
#500 - #599 A 100
common number type
variables #600 - #699 B 100 Single accuracy
#700 - #799 B 100
#800 - #899 B 100
#900 - #999 B 100 User
#9500 - #9549 C 50 System Integer type

Note 1: Never use the variables without permission, except variables with “User” in the
Class column to prevent system malfunction.

Table 14.5 Types of Variables


Type Bit length Variable expression Range Accuracy (mantissa)
A 64 Real number 4.19×10 -307 ≦ ≦ 1.67×10308 Significant 16 digits
B 32 Real number 8.43×10-37 ≦ ≦ 3.37×1038 Significant 7 digits
C 16 Integer –32766 ≦ ≦ 32767 ±32766

Note 2: Variables for the system are normally masked, and therefore cancel the
masking by parameter No. 133, as necessary.

F E D C B A 9 8 7 6 5 4 3 2 1 0

Variable #1 - #33
#100 - #149
#150 - #249
#250 - #399
#400 - #499
#500 - #599
#600 - #699
#700 - #799
#800 - #899
Variable #900 - #999

Setting of each bit 0: Displayed 1: Not displayed


14–13
14.3.2 Variable accuracy and constant value (VARMAP)
(1) Variable accuracy
Local variables, non-holding type common variables and holding type common variables of
type A have accuracy high enough for normal calculation. The absolute value range of the
variables is as shown below.
4.19 × 10-307 ≦ 1 × 1 ≦ 1.67 × 10308
Note that the accuracy is reduced to significant 7 digits if non-holding type and holding type
common variables of type B are used..
8.43 × 10-37 ≦ 1 × 1 ≦ 3.37 × 1038
Change of variable type
The type B common variables listed in Table 14.4 can be used as double accuracy real number
type variables same as type A through the instruction shown below. However, type A and C
variables cannot be changed to other type.
Format: VARMAP (a, b, c);
a: Start variable No. for type change (100 - 999)
b: Number of variables for type change (1 - n)
c: Type attribute to be changed
0: Single accuracy real number
1: Double accuracy real number
If 1 is specified for type attribute, variables can be used as double accuracy real number. To
return to single accuracy real number, specify 0.
Variables of which type is changed are initialized to original type in the same timing as
initialization of variables.
Macro variable number and total number of variables
If type B variables are changed to double accuracy real number type by the VARMAP
instruction, continuous two variables are merged into one variable, and as a result, the next
variable of changed variable cannot be used and total number of variables is reduced by one.
: :
Attribute 0: #600 Attribute 0: #600
Attribute 0: #601 Attribute 1: #601
Attribute 0: #602
VARMAP (601, 6, 1) ;
Attribute 0: #603 Attribute 1: #603
Attribute 0: #604
VARMAP (601, 6, 0) ;
Attribute 0: #605 Attribute 1: #605
Attribute 0: #606
Attribute 0: #607 Attribute 0: #607
Attribute 0: #608 Attribute 0: #608
: :
: :

(2) Contents values


The value is within decimal 8 digits and the digits below decimal are within 4 digits. The
value for NC command codes must be within the limit specified for each command but when
they are used as parameter words, they can be specified regardless of word address.
Example:
G65 P1 Q2 M5. T1.2 ;

14–14
14.3.3 Characteristics of empty variables (#0)

The local variables and non-holding type variables become “empty” upon initialization. This
“empty” state changes to a state other than “empty” when a variable parameter is passed or the
calculation result is substituted. A variable in empty state is called an empty variable, which has
many features unlike a variable with value.

(1) Judgement of empty variable


“#0” variable is a special variable that has the same value as an empty variable.
Whether a variable is an empty variable is judged by comparison with “#0”.
Example: Conditional expression
IF#1 = #0 ·············· Empty?”
IF#1 < > #0 ·········· “Other than empty?”
Note 1: Comparison of largeness of values of empty variables is mean-
ingless.

(2) Calculation of empty variables


Empty variables are equivalent to constant “0” in an arithmetic expression.
Example: Substitution expression
#5 = 5* #1 ············· #1 = when empty, #5 = 0
Example: Conditional expression
IF (#1*5) = 0········· #1 = when empty, result is “true”.
IF (#1*5) = #0······· #1 = when empty, result is “false”.
IF #1 = 0················ #1 = when empty, result is “false”.

(3) Setting of empty variable


A variable substituted with “#0” returns to an empty variable.
Example: Substitution expression
#5 = #0 ·················· #5 = Empty variable

(4) Replacement of NC command code


In case the replacement variable of an NC command code is “empty”, the word itself is
ignored.
Example: Replacement of NC command code
X#5Y#5*1············· #5 = when empty, “Y0” only is output.

14–15
14.3.4 Parameters and local variables (#1 - #33)

The local variables are initialized by RESET operation and by subprogram parameter call. When
the latter is made, the value of the parameter word specified by the command code is stored in the
local variable corresponding to each word address.

Main program Subprogram


Parameter Variable
Case of Fig. 14.1 L1 #24
L2 #25
G65 P100 X L1 Y L2 R R0 ; R0 #18

O100 ;
NC command calculated #10 = #24−(2*#18)
with #24, #25, #18 as
input values #20 = #25−(2*#18)

G01 X #10 Y #20


Machining
command
G02 X #18 Y #18 I #18

M99

The correspondence between parameter word address and local variable number is as shown in
Table 14.6
In case the constant value of a parameter word is an integer, it is converted to a real value
considering the decimal point position determined for each word address before storage in the local
variable. The correspondence between word address and decimal point position is shown in Table
14.7 and 14.8
The storage of local variables is processed according to the following conversion equation.
(Value of parameter word)
(Value of local variable) =
10 n

where n: Decimal point position shown in Table 14.7 and 14.8.

14–16
Table 14.6 Parameter word vs. Table 14.7 Wire electrical discharge machine
local variable Word address and decimal point
position
Model
No. #0 I II mm inch
Word address
#0 Empty Empty input input
1 A A A, B, C 3 4
2 B B D, H 3 4
3 C C E, F 0 4
4 I I1 I, J, K 3 4
5 J J1 L, M, N, O, S 0 0
6 K K1 P, Q, R, T 3 4
7 D I2 U, V, W 3 4
8 E J2 X, Y, Z 3 4
9 F K2
10 I3
11 H J3 Table 14.8 Die sinking electrical discharge
12 L K3 machine
I4 Word address and decimal point
13 M
position
14 N J4
Word address mm inch
15 O K4 input input
16 P I5 A, B, C 3 4
17 Q J5 D, H, E, F 0 0
18 R K5 I, J, K 3 4
19 S I6 L, M, N, O, S 0 0
20 T J6 P, Q, R 3 4
21 U K6 T 0 0
22 V I7 U, V, W 3 4
23 W J7 X, Y, Z 3 4
24 X K7
25 Y I8
26 Z J8
27 K8
28 I9
29 J9
30 K9
31 I10
32 J10
33 K10

Note 1: Parameter word models I and II can be used as mixed.


Note 2: In case variable Nos. are overlapped as a result of mixed parameter word
models I and II, the latter parameter word becomes effective.

14–17
14.3.5 NC command code substitution

In case the numeric part of NC command code is replaced by a variable, the processing that is
exactly opposite to the parameter word processing shown in item 14.3.4 is made. When variable
replacement is made, the real number stored in each variables is converted to an integer with
decimal point position specified for destination word address taken into account. Then, the function
as the NC command code is made. The decimal point position information is in accordance with
Table 14.7 and 14.8. The fraction part which is eliminated by conversion to an integer is rounded at
the 10th digit.
The conversion equation for replacement is as follows:

(Replaced value) = (Variable value) × 10 n


n: Decimal point position indicated in Table 14.7 and 14.8

Some examples of replacement are shown below.

Example 1. When #1 = 50.12


S#1 S50
X#1 X50120 (in mm)
X501200 (in inch)
Example 2. When #2 = 0.12345
X#2 X123 (in mm)
X1235 (in inch)

14–18
14.4 Operation Function

In macro command codes, operation can be made freely with variables and constants (numerical
values).

(1) Application of operation


The variable becomes is used as it is in the operation. The general form of each is shown
below.

a. Substitution
Variable = Expression Example #10 = #20 + 1 ;

b. Judgement condition
Function Expression Relative operator Expression
Example IF#10 < #20 + 1 ;

c. NC code replacement
Address Expression Example G01X#10 – 1Y … ;

Note: Definition of “expression”


{ Expression … Variable (constant) Operator Variable (constant value) Operator …}
“Repetition”

(2) Kinds of operators


The following operators can be used in an expression excluding relative operator.

Operator (symbol)

Artihmetic operator Logical operator


+ (Sum) OR (Logical sum)
– (Difference) AND (Logical product)
* (Product) NOT (Negation)
/ (Quotient) XOR (Exclusive OR)
** (Power)

14–19
(3) Use of function
Functions can be used as variable elements of an expression. In this case, the variable
elements are defined as follows.

Variable .... Function name ( Expression )


Example #20 = #10 + SIN (#30 * 4)

There are following functions.

Function name

SIN (Sine, degree) ABS (Absolute)

COS (Cosine, degree) BIN (BCD → BIN)


TAN (Tangent, degree) BCD (BIN → BCD)
ATAN (Arctangent, deg.) ROUND (Round off)
SQRT (Square root) FIX (Fix down)
FUP (Fix up)
UMUL (H reso. multiplication) (Note 1)

UDIV (H reso. division) (Note 2)

CMIL (Converter accuracy) (Note 3)

Note 1: The magnification of UMUL varies with the setting of Set Data No. 0063 bit2
(input resolution of command). (wire EDM only)
Set Data No. 0063 bit2 = 0 (Standard resolution)
Metric : ×1000
Inch : ×10000

Set Data No. 0063 bit2 = 1 (High resolution)


Metric : ×10000
Inch : ×100000

Note 2: The magnification of UDIV varies with the setting of Set Data No. 0063 bit2
(input resolution of command). (Wire EDM only)
Set Data No. 0063 bit2 = 0 (Standard resolution)
1
Metric :
1000
1
Inch :
10000

Set Data No. 0063 bit2 = 1 (High resolution)


1
Metric :
10000
1
Inch :
100000

14–20
Note 3: The CMIL is a function to convert the unit from metric to inch when the
magnification in metric mode set in program (Set Data No. 0063 bit0 = 0) is
changed to inch mode (Set Data No. 0063 bit0 = 1).
Do not use G917 (converter accuracy command) when using the CMIL.
The use of CMIL in the program in which G917 is used causes an error in
inch conversion.

(4) Operation order


To adjust the operation order, parentheses: (––––––) can be used. The priority of operators
including parentheses are as shown below.

High • Expression in parentheses ··········· ( Expression )


• Power ··········· #10 ** 2
Order
• Multiplication/division ··········· #10 * 2

Low • Addition/substraction ··········· #10 - 2

The operation sequence is as follows.


#10 = (#11 + #12) * (#13 + #14 ** #15)
#10 = (#11 + #12) * (#13 + #14 ** #15)

5 1 2
3
4

14–21
14.5 Judgement and Branch Functions (IF, ELSE, GOTO)

Execution of blocks in specific range or change of execution of next block to other specific block
according to the result of variable value check can be made.

(1) Structure of judgement and branch commands


Two or more blocks are used for judgement and branch function. The general form is shown
below.
1 IF Condition expression ;
–-–-–-–-–-–-–-–-–-–-– Blocks 1 and 2 essential
2 [ Command code ] ;
–-–-–-–-–-–-–-–-–-–-–
3 ELSE ;
–-–-–-–-–-–-–-–-–-–-– Blocks 3 and 4 used only when necessary
4 [ Command code ] ;
–-–-–-–-–-–-–-–-–-–-–

Function
If the judgement result of block 1 is true, block 2 is selected and if it is false, blocks 3
and 4 are selected.

(2) Multiple branch function


IF < Conditional expression 1 > ;
[Selective statement string 1] ;
ELSEIF < Conditional expression 2 > ;
[Selective statement string 2] ; • Any number of branches may be
ELSEIF < Conditional expression 3 > ; used.
[Selective statement string 3] ; • Conditional expressions are
: evaluated in the ascending order.
: • Compound conditional expression
ELSEIF < Conditional expression n > ; is acceptable.
[Selective statement string n] ;
ELSE ; • Processing if neither of conditions
[Selective statement string n + 1] ; 1 to n is not satisfied.
• This ELSE statement is omissible.

14–22
(3) Conditional expression
The general form of conditional expression is shown below.
Expression Relative operator Expression

Example 1. IF#10 < #20-1


Example 2. IF (#10AND255) > #20
There are the following kinds of relative operators.

Relative operator

= (equal to) = < or < = (equal to or smaller than)


< (smaller than) > = or = > (equal to or larger than)
> (larger than) < > or < > (not equal)

Compound condition judgement can also be made. The general forms are shown below.

( Conditional expression ) Logical operator ( Conditional expression )


Logical operator ( – )
• For conditional expression negation
NOT ( Conditional expression n )
Example: IF (NOT *#10 = #20) AND (#10 < > #30) )
• A compound conditional expression may be used.
( Compound conditional expression ) Logical operator ( )
Example: IF (#10 = #20) AND (#10 = #30) ) OR (#2 = #3)
• There are the following kinds of logical operators.
AND········ Logical product, OR ···········Logical sum
XOR ········ Exclusive OR

14–23
(4) Command code
Any command code permitted in the program can be used in the command code to be selected
(and naturally, judgement branch is also possible).
After selection, the command codes in brackets are continuously executed.

IF#10 = #20 ; Macro command code


[#10 = #20 + 1] ; NC command code
ELSE ;
[#10 = #10 + 2 ; Command codes may be in multiple blocks.
G01X#10Y#20] ;
Brackets may be located anywhere.

(5) Branch command code


If the “branch command code GOTO” is specified at the end of the command code to be
selected, the block to be next executed can be changed to any block. The general form of the
branch command code is shown below.

GO TO Sequence number
Namely, N No.
Example:
IF #10 = #20 ; If the judged result is true,
these blocks are skipped
[#10 = #20 + 1 ;
GO TO 123 ] ;
Branch
G01X#10Y200 ; command

Branch
destination

N123 G00X#10Y–

14–24
14.6 Repetition Function (DOWHILE)

Repeatedly executes the block in the brackets while the judgement of the conditional expression is
“true”. The general form is shown below.
DOWHILE Condition expression ;
[ Command code ] ;
The conditional expression and the command code are same as the
judgement branch function.

14.7 Suppress Command of External Control Function

In addition to the macro command codes described in paras. 14.3 thru 14.6, suppress command by
the G code is possible.

Command G code
Suppress Release
Single block G945 G944
Pretreatment suppression G911 G910

14–25
14.8 Registration of Custom Macro

14.8.1 Preparation of program tape

Prepare by the same way as the normal part program. However, in the case of a program tape using
macro command codes, etc. in program and containing the following special characters, the tape
must be prepared in the “ISO code”.

Special characters for macro command code


# ' * , < = > " [ ]

14.8.2 Registration of program

To register an extended NC program containing special characters described above into memory,
the “parameter 25” must be set.
The values of parameters are as follows.
Setting of Parameter No. 25

(Binary notation)
7 6 5 4 3 2 1 0

When registering macro command codes, set this bit to “1”.


(It has been already set on shipment.)

14.8.3 Edit of program

Editing of the program is same as the normal editing


operation. O N G X Y Z
$ # ( ) [ ]
The characters at the lower right corner of the address
M S T I J K
on the keyboard are special characters for the macro + – * " ' ,

command codes. F D H A B C
= @ ? / < >
SHI P Q R U V W
After pressing the FT key and checking that the lamp & ! : %

Y SHI L E / SPA EOB


lights up, press [ and the “ [ “ is input. FT CE

Keyboard macro command code layout

14–26
14.8.4 Display of compile error message

The use of macro command codes specified in the program is checked automatically when the
screen is returned from the EDIT BLOCK to the EDIT LIST. If an error is found, the error message
is displayed on the message line of the EDIT LIST screen.
Error messages and their causes are listed in Table 14.9.

i. Edit list screen ii. Edit block screen


Edit list Edit block 0123
S T A R T Block Error Macro error IF#1=1 ;
0 1 2 3 ( ) ××B××E C Return to the list [ ......] ;
screen.


M99 ;

The mark indicating


O0123 (    ) 45B 3E C that the compile error
is present.
(Example of message)
6119: ALARM BLOCK PRESENT IN PROGRAM

Table 14.9 Compile error message list


Error message Error cause
1. 6119: Alarm block present in program Checking is not completed because alarm
block is present in program.
2. 6120: (MACRO) More than 20 variables in More than 20 variables are contained in
expression expression.
3. 6121: (MACRO) Illegal operator usage Illegal operator usage is found.
4. 6122: (MACRO) More than 20 operators in More than 20 operators are contained in
expression expression.
5. 6123: (MACRO) Too complicated expression Too complicated expression is present. (1)
(1)
6. 6124: (MACRO) Too complicated expression Too complicated expression is present. (2)
(2)
7. 6125: (MACRO) Too complicated division in Too complicated expression containing
expression division is present.
8. 6126: (MACRO) Memory full at compile Memory for tape memory is full.
9. 6127: (COMPILE 48H) Internal processing Not used.
error
10. 6128: (COMPILE 49H) Internal processing Not used.
error
11. 6129: Grammar error Error of macro command (judgement,
branch, repetition).
12. 6130: Illegal call Subprogram itself is called by subprogram
call. (Only die sinking EDM)
13. 6131: Nest level above 10 Compound blocks exceed 10-nest level.

14–27
14.8.5 Custom Macro Run

The completed custom macro can be operated in the same manner as normal NC programs.
However, in testing an incomplete custom macro or using special functions, the execution processes
of macro command codes and changes of variables must be checked in addition to a checking of
conventional NC command codes. In testing a program containing macro command codes, conduct
the test in the environment as shown below:

Custom macro test environment

Display of execution
block position Run screen
information

Display and change Macro


NC program of local variables and variable
common variables screen

Display and change Normal


of system variables operation
screen

14–28
15. INQUIRY

For any further information or inquiry regarding programs or NC unit operation, fill in the EDM
INQUIRY SHEET provided on the next page, and make inquiry through FAX or telephone to our
sales office or our agents.
In getting touch to us in case of a trouble, please make sure the following points:

Make explanation in concrete and detail about "when" and "what trouble" occurred by "what
operation".
In particular, confirm the following information:
(1) Screen display when a trouble occurred ········ Alarm or warning message No., or system
down No.
(2) Machine model, power supply model, software version
(The software version is displayed on the DIAGNOSE MAINTENANCE screen.)

DIAGNOSE MAINTENANCE
DATE 1997-11-28 02:57
SOFTWARE: Ver 7.504
Confirm these version numbers.
COND. : Ver 000
(Note: "COND. Ver" is for K type power supply units only)

(3) Set values of radius compensation or taper program


(D data, PROG. PLANE, SUB PLANE, Z POSITION on SET OFFSET screen)
(4) What function keys were pressed on NC FUNC or MACH OPE screen.
(5) Modal values displayed on RUN MANUAL screen
(6) Machining condition E No.
(7) Reproducibility or frequency of the trouble by same operation
(Wire break recovery or manual interruption during execution of a program)
(8) In case of a trouble during execution of the program, confirm common variables #510 and
#515 displayed on the RUN PROG, MACRO screen.
(9) In the case of AUTO RUN mode, check program No., sequence No. and contents of
program.

If possible, saving and sending the following data in a floppy disk will help us find a cause of the
trouble more quickly and easily.

(10) Parameter values output by G150 L15 ;


(11) Executed program
(12) Machining condition data output by G151, if using user condition (E9000’s)
(13) Dumped data, if executed.

15–1
EDM INQUIRY SHEET (FAX: ) Date:
(Take a copy of this sheet and fill in the following items)

Company:
Division: Name:
Address:

Telephone: (Ext.: ) FAX:

Machine Model: Power Supply Unit: Delivery Date:


Software Version: Cond. Version (MGW-K only):
Contents of Inquiry: (Explanation as detail as possible. Let us see your programs, machining
conditions, and parameters, if possible)

15–2

You might also like