01programming - SZGH CNC1000MDb (V3.1) 3
01programming - SZGH CNC1000MDb (V3.1) 3
SZGH-CNC1000MDb
Milling Control System
-PROGRAMMING-
V3.1
-BOOK1-
Warning
Warning notices are used in this publication to emphasize that hazardous voltages, currents,
temperatures, or other conditions that could cause personal injury exist in this equipment or may be
associated with its use.
In situations where inattention could cause either personal injury or damage to equipment, a
Warning notice is used.
Caution
Caution notices are used where equipment might be damaged if care is not taken.
Note
Notes merely call attention to information that is especially significant to understanding and
operating the equipment.
This document is based on information available at the time of its publication. While efforts
have been made to be accurate, the information contained herein does not purport to cover all
details or variations in hardware or software, nor to provide for every possible contingency in
connection with installation, operation, or maintenance. Features may be described herein which
are not present in all hardware and software systems. GE Fanuc Automation assumes no obligation
of notice to holders of this document with respect to changes subsequently made.
Shenzhen Guanhong Automation makes no representation or warranty, expressed, implied, or
statutory with respect to, and assumes no responsibility for the accuracy, completeness, sufficiency,
or usefulness of the information contained herein. No warranties of merchantability or fitness for
purpose shall apply.
WARNING
Applied when there is a danger of the user being injured or when there is a danger of both the user
being injured and the equipment being damaged if the approved procedure is not observed.
CAUTION
Applied when there is a danger of the equipment being damaged, if the approved procedure is not
observed.
NOTE
The Note is used to indicate supplementary information other than Warning and Caution.
I
2 GENERAL WARNINGS AND CAUTIONS
Warning
1. Never attempt to machine a workpiece without first checking the operation of the machine.
Before starting a production run, ensure that the machine is operating correctly by performing a trial run using, for
example, the single block, feedrate override, or machine lock function or by operating the machine with neither a
tool nor workpiece mounted. Failure to confirm the correct operation of the machine may result in the machine
behaving unexpectedly, possibly causing damage to the workpiece and/or machine itself, or injury to the user.
2. Before operating the machine, thoroughly check the entered data. Operating the machine with incorrectly
specified data may result in the machine behaving unexpectedly, possibly causing damage to the workpiece and/or
machine itself, or injury to the user.
3. Ensure that the specified feedrate is appropriate for the intended operation. Generally, for each machine, there is
a maximum allowable feedrate. The appropriate feedrate varies with the intended operation. Refer to the manual
provided with the machine to determine the maximum allowable feedrate. If a machine is run at other than the
correct speed, it may behave unexpectedly, possibly causing damage to the workpiece and/or machine itself, or
injury to the user.
4. When using a tool compensation function, thoroughly check the direction and amount of
Compensation. Operating the machine with incorrectly specified data may result in the machine behaving
unexpectedly, possibly causing damage to the workpiece and/or machine itself, or injury to the user.
5. The parameters for the CNC and PMC are factory-set. Usually, there is not need to change them. When,
however, there is not alternative other than to change a parameter, ensure that you fully understand the function of
the parameter before making any change. Failure to set a parameter correctly may result in the machine behaving
unexpectedly, possibly causing damage to the workpiece and/or machine itself, or injury to the user.
6. Immediately after switching on the power, do not touch any of the keys on the MDI panel until the position
display or alarm screen appears on the CNC unit. Some of the keys on the MDI panel are dedicated to
maintenance or other special operations. Pressing any of these keys may place the CNC unit in other than its
normal state. Starting the machine in this state may cause it to behave unexpectedly.
7. The operator’s manual and programming manual supplied with a CNC unit provide an overall
description of the machine’s functions, including any optional functions. Note that the optional
functions will vary from one machine model to another. Therefore, some functions described
in the manuals may not actually be available for a particular model. Check the specification of
the machine if in doubt.
8. Some functions may have been implemented at the request of the machine–tool builder. When using such
functions, refer to the manual supplied by the machine–tool builder for details of their use and any related
cautions.
NOTE: Programs,parameters, and macro variables are stored in nonvolatile memory in the CNC unit.
Usually, they are retained even if the power is turned off. Such data may be deleted inadvertently, however, or it
may prove necessary to delete all data from nonvolatile memory as part of error recovery.To guard against the
occurrence of the above, and assure quick restoration of deleted data, backup all vital data, and keep the
backup copy in a safe place.
II
3 WARNINGS AND CAUTIONS RELATED TO PROGRAMMING
This section covers the major safety precautions related to programming. Before attempting to perform
programming, read the supplied operator’s manual and programming manual carefully such that you are fully
familiar with their contents.
Warning
1.Coordinate system setting
If a coordinate system is established incorrectly, the machine may behave unexpectedly as a result of the program
issuing an otherwise valid move command.
Such an unexpected operation may damage the tool, the machine itself, the workpiece, or cause injury to the user.
2. Positioning by nonlinear interpolation
When performing positioning by nonlinear interpolation (positioning by nonlinear movement between the start
and end points), the tool path must be carefully confirmed before performing programming. Positioning involves
rapid traverse. If the tool collides with the workpiece, it may damage the tool, the machine itself, the workpiece,
or cause injury to the user.
3. Function involving a rotation axis
When programming polar coordinate interpolation or normal–direction (perpendicular) control, pay careful
attention to the speed of the rotation axis. Incorrect programming may result in the rotation axis speed becoming
excessively high, such that centrifugal force causes the chuck to lose its grip on the workpiece if the latter is not
mounted securely. Such mishap is likely to damage the tool, the machine itself, the workpiece, or cause injury to
the user.
4. Inch/metric conversion
Switching between inch and metric inputs does not convert the measurement units of data such as the workpiece
origin offset, parameter, and current position. Before starting the machine, therefore, determine which
measurement units are being used. Attempting to perform an operation with invalid data specified may damage
the tool, the machine itself, the workpiece, or cause injury to the user.
5. Constant surface speed control
When an axis subject to constant surface speed control approaches the origin of the workpiece coordinate system,
the spindle speed may become excessively high. Therefore, it is necessary to specify a maximum allowable speed.
Specifying the maximum allowable speed incorrectly may damage the tool, the machine itself, the workpiece, or
cause injury to the user.
6. Stroke check
After switching on the power, perform a manual reference position return as required. Stroke check is not possible
before manual reference position return is performed. Note that when stroke check is disabled, an alarm is not
issued even if a stroke limit is exceeded, possibly damaging the tool, the machine itself, the workpiece, or causing
injury to the user.
7. Absolute/incremental mode
If a program created with absolute values is run in incremental mode, or vice versa, the machine may behave
unexpectedly.
8. Plane selection
If an incorrect plane is specified for circular interpolation, helical interpolation, or a canned cycle, the machine
may behave unexpectedly. Refer to the descriptions of the respective functions for details.
9. Compensation function
III
If a command based on the machine coordinate system or a reference position return command is issued in
compensation function mode, compensation is temporarily canceled, resulting in the unexpected behavior of the
machine. Before issuing any of the above commands, therefore, always cancel compensation function mode.
Warning
1. Manual operation
When operating the machine manually, determine the current position of the tool and workpiece, and ensure that
the movement axis, direction, and feedrate have been specified correctly. Incorrect operation of the machine may
damage the tool, the machine itself, the workpiece, or cause injury to the operator.
2. Manual reference position return
After switching on the power, perform manual reference position return as required. If the machine is operated
without first performing manual reference position return, it may behave unexpectedly. Stroke check is not
possible before manual reference position return is performed.
An unexpected operation of the machine may damage the tool, the machine itself, the workpiece,or cause injury to
the user.
3. Manual handle feed
In manual handle feed, rotating the handle with a large scale factor, such as 100, applied causes the tool and table
to move rapidly. Careless handling may damage the tool and/or machine, or cause injury to the user.
4. Disabled override
If override is disabled (according to the specification in a macro variable) during threading or other tapping, the
speed cannot be predicted, possibly damaging the tool, the machine itself, the workpiece, or causing injury to the
operator.
5. Origin/preset operation
Basically, never attempt an origin/preset operation when the machine is operating under the control of a program.
Otherwise, the machine may behave unexpectedly, possibly damaging the tool, the machine itself, the tool, or
causing injury to the user.
6. Workpiece coordinate system shift
Manual intervention, machine lock, or mirror imaging may shift the workpiece coordinate system. Before
attempting to operate the machine under the control of a program, confirm the coordinate system carefully. If the
machine is operated under the control of a program without making allowances for any shift in the workpiece
coordinate system, the machine may behave unexpectedly, possibly damaging the tool, the machine itself, the
workpiece, or causing injury to the operator.
7. Software operator’s panel and menu switches
Using the software operator’s panel and menu switches, in combination with the MDI panel, it is possible to
specify operations not supported by the machine operator’s panel, such as mode change, override value change,
and jog feed commands.
Note, however, that if the MDI panel keys are operated inadvertently, the machine may behave unexpectedly,
possibly damaging the tool, the machine itself, the workpiece, or causing injury to the user.
IV
8. Manual intervention
If manual intervention is performed during programmed operation of the machine, the tool path may vary when
the machine is restarted. Before restarting the machine after manual intervention, therefore, confirm the settings of
the manual absolute switches, parameters, and absolute/incremental command mode.
9. Feed hold, override, and single block
The feed hold, feedrate override, and single block functions can be disabled using custom macro system variable
#3004. Be careful when operating the machine in this case.
10. Dry run
Usually, a dry run is used to confirm the operation of the machine. During a dry run, the machine operates at dry
run speed, which differs from the corresponding programmed feedrate. Note that the dry run speed may
sometimes be higher than the programmed feed rate.
11. Cutter and tool nose radius compensation in MDI mode
Pay careful attention to a tool path specified by a command in MDI mode, because tool nose radius compensation
is not applied. When a command is entered from the MDI to interrupt in automatic operation in tool nose radius
compensation mode, pay particular attention to the tool path when automatic operation is subsequently resumed.
Refer to the descriptions of the corresponding functions for details.
12. Program editing
If the machine is stopped, after which the machining program is edited (modification, insertion, or deletion), the
machine may behave unexpectedly if machining is resumed under the control of that program. Basically, do not
modify, insert, or delete commands from a machining program while it is in use.
WARNING
1. Memory backup battery replacement
When replacing the memory backup batteries, keep the power to the machine (CNC) turned on, and apply an
emergency stop to the machine. Because this work is performed with the power on and the cabinet open, only
those personnel who have received approved safety and maintenance training may perform this work.
When replacing the batteries, be careful not to touch the high–voltage circuits (marked and fitted with an
insulating cover).Touching the uncovered high–voltage circuits presents an extremely dangerous electric shock
hazard.
NOTE:The CNC uses batteries to preserve the contents of its memory, because it must retain data such as
programs, offsets, and parameters even while external power is not applied. If the battery voltage drops, a low
battery voltage alarm is displayed on the machine operator’s panel or screen. When a low battery voltage alarm
is displayed, replace the batteries within a week. Otherwise, the contents of the CNC’s memory will be lost.
Refer to the maintenance section of the operator’s manual for details of the battery replacement procedure.
V
electric shock hazard.
NOTE:The absolute pulse coder uses batteries to preserve its absolute position. If the battery voltage drops, a
low battery voltage alarm is displayed on the machine operator’s panel or screen. When a low battery voltage
alarm is displayed, replace the batteries within a week. Otherwise, the absolute position data held by the pulse
coder will be lost.
3. Fuse replacement
For some units, the chapter covering daily maintenance in the operator’s manual or programming manual
describes the fuse replacement procedure.
Before replacing a blown fuse, however, it is necessary to locate and remove the cause of the blown fuse. For this
reason, only those personnel who have received approved safety and maintenance training may perform this work.
When replacing a fuse with the cabinet open, be careful not to touch the high–voltage circuits (marked and fitted
with an insulating cover).
Touching an uncovered high–voltage circuit presents an extremely dangerous electric shock hazard.
Special Attention:
1. All the functions of A axis are effective when configure with fourth axis system.
2. When use this system for the first time, please read carefully all the details of each chapter so as to make it
work more efficientive and safer.
3. The “Run” button on the panel of system can be used when debugging (P9 in Other parameter to set
“Valid” or “Invalid”), must plus an external “Run” button when fitting system, otherwise may cause accident
because of the life of button!!!So the system prohibits using the “Run” button of panel for long times,
otherwise the consequences has nothing to do with my company.
4. Don’t plug & insert connector when system is on power.
5. P -- Parameter , P1 stands for the No.1 parameter .
VI
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
CONTENTS
SZGH-CNC1000MDb...................................................................................................................................................I
SAFETY PRECAUTIONS............................................................................................................................................I
1 Definition of Warning , Caution, and Note................................................................................................................ I
2 GENERAL WARNINGS AND CAUTIONS........................................................................................................... II
3 WARNINGS AND CAUTIONS RELATED TO PROGRAMMING.....................................................................III
4 WARNINGS AND CAUTIONS RELATED TO HANDLING..............................................................................IV
5 WARNINGS RELATED TO DAILY MAINTENANCE.........................................................................................V
CONTENTS.............................................................................................................................................................. VII
Chapter 1 Preface.....................................................................................................................................................1
1.1 Characteristics.................................................................................................................................................2
1.2 Technical Specifications................................................................................................................................. 2
1.3 System operation condition............................................................................................................................ 3
1.4 G Code List..................................................................................................................................................... 4
Chapter 2 Programming......................................................................................................................................... 6
2.1 Basic Concepts of Programming.................................................................................................................... 6
2.1.1 Tool Movement Along Workpiece Parts Figure Interpolation............................................................ 7
2.1.2 Feed Function...................................................................................................................................... 8
2.1.3 Part Drawing And Tool Movement..................................................................................................... 8
2.1.4 Coordinate System...............................................................................................................................9
2.1.5 Indicated Command Dimensions for Moving the Tool.....................................................................11
2.1.6 Cutting Speed-Spindle Speed Function.............................................................................................12
2.1.7 Tool Function..................................................................................................................................... 13
2.1.8 Command For Machine Operations.................................................................................................. 13
2.2 Configuration of Program.............................................................................................................................14
2.3 Main Program & Subprogram...................................................................................................................... 17
2.4 Program Run................................................................................................................................................. 17
2.5 Tool Figure And Tool Motion By Program.................................................................................................. 18
2.6 Tool Movement Range-Stroke......................................................................................................................19
Chapter 3 G INSTRCUTIONS.............................................................................................................................20
3.1 INTRODUCTION........................................................................................................................................ 20
3.2 G Code List................................................................................................................................................... 20
3.3 Positioning (Rapid Traverse) (G00)............................................................................................................. 24
3.4 Linear Interpolation (G01)............................................................................................................................25
3.5 Circular Interpolation (G02/G03).................................................................................................................27
3.6 Helical Interpolation (G02/G03).................................................................................................................. 30
3.7 3D Space Arc Interpolation G06.................................................................................................................. 31
3.8 Dwell (G04).................................................................................................................................................. 32
3.9 Skip Function(G31,G311)............................................................................................................................ 33
3.10 Reference Position...................................................................................................................................... 34
3.11 Return to Starting Point (G26,G261~G264)...............................................................................................35
VII
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
VIII
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
IX
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
X
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Chapter 1 Preface
CNC machine tool is an electro-mechanical integrated product, composed of Numerical
Control Systems of Machine Tools, machines, electric control components, hydraulic components,
pneumatic components, lubricant, coolant and other subsystems (components), and CNC systems of
machine tools are control cores of CNC machine tools. CNC systems of machine tools are made up
of computerized numerical control(CNC), servo (stepper) motor drive devices, servo (or stepper)
motor and etc.
SZGH-CNC1000MDb series CNC controller is the newest universal CNC system for milling
machine, drilling machine, boring machine , which is developed by our company. The control
circuit is using the latest industrial high-speed ARM 11 processor, large-scale field and
programmable FPGA technology, multilayer PCB, the machine adopts the high integrated chip and
surface mount components, the structure is more compact and reasonable so that make sure the
reliability and stability of the system.
SZGH-CNC1000MDb sereis CNC controller can control four feeding axes, two analog
spindles, 2ms interpolation in real-time control with high speed (5MHz Pulse Output Frequency)
and 0.1um precision,which obvisously improve the efficiency, precision and surface quality of
processing parts. Adopt 800x600 dot matrix TFT LCD adaptive brightness LCD displayer, LED
backlight brightness uniformity and long service life, and overcomes the display brightness by
environmental temperature changes the shortcoming. Full screen English menu display, operation is
simple and convenient.
This manual introduce the programming and using method of milling system detailly.
1
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
1.1 Characteristics
High performance,industrial grade ARM11+DSP+FPGA
128MB Memory , 100Mb user store room(Updated!)
800x600 8.4 inch high-resolution real color LCD display
High anti-jamming switch power(220VAC -> 24VDC & 5VDC)
Support USB-DNC & RS232-DNC
Basic I/Os : 56*32
5MHz Pulse Output Frequency, Max speed is 300m/min(Updated!)
Support ATC function , Macro function and PLC function(Updated!)
Support Linear Scale & Position Feedback function(Updated!)
Support macro variable dialog box & Running program by input point (Updated!)
PLC on-line monitor, edit, compiling and signals trace function(Updated!)
Analog voltage output of 0~10V in two channels, support double spindles
Easily study, use and debugging abundant helps, prompt messages
Support Manual pulse generator.
1.2 Technical Specifications
Max Number of control axes
• Number of control axes: 5 axes (X Y Z A B)
• Number of linkage axes: 5 axes
• Number of PLC control axes: 5 axes
Feeding axes function
• Minimum command unit: 0.001mm
• Position command range: +/- 99999.999
• Max speed: 300m/min ; Feeding speed:0.001-15m/min
• G00 rapid override: Total 8 levels: 0~150%,real-time adjusting
• Feeding override: Total 16 levels: 0~150%,real-time adjusting
• Spindle override: Total 16 levels: 5%~150%,real-time adjusting
• Interpolation mode: Interpolation of linear ,arc ,thread and rigid tapping
• Auto chamfering
Spindle function
• Analog voltage 0~10V output in two channels ,support two-spindle control
• Spindle encoder feedback in one channel,resolution of spindle encoder can be set
• Spindle speed: It is set by speed parameter,max spindle speed also coressponding to 10V
• Spindle override: Total 16 levels: 5%~150%,real-time adjusting
• Spindle constant surface speed control
Precision compensation
• Backlash compensation/Pitch error compensation in memory type
• Built-in Thread Compensation
PLC function
• Refresh cycle: 8ms
• PLC program can be altered on PC , download by USB interface
• I/Os : 56*32 I/Os
2
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
3
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
G15 Polar coordinate command cancel G302 Y-axis Return to zero point of coordinate
G16 Polar coordinate command G303 Z-axis Return to zero point of coordinate
G12 Programmable mirror image Cancel G263 Z-axis Return to starting point of program
G11 Programmable mirror image G264 A-axis Return to starting point of program
G60 Exact stop & position G265 B-axis Return to starting point of program
G66 Macro command mode calling G611 X-axis return to position of G25
G67 Macro program mode calling calling G612 Y-axis return to position of G25
G68 Constant surface speed control G613 Z-axis return to position of G25
G69 Constant surface speed control cancel G614 A-axis return to position of G25
G73 High Speed Peck Drilling Cycle G615 B-axis return to position of G25
G80 Canned cycle for drilling cancel G28 Return to home of machine
4
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
G82 Boring Stage hole cycle G282 Y-axis return to home of machine
G83 Deep hole drilling cycle G283 Z-axis return to home of machine
G112 Finishing in CCW full circle G40 Tool nose radius compensation cancel
G113 Finishing in CW full circle G41 Tool nose radius left compensation
G132 CCW rectangle outer roughing G45 Polar coordinate command cancel
G136 CCW rectangle groove finishing G120 Tool changing for linear tool magazine
G137 CW rectangle groove finishing G121 Tool changing for umbrella tool magazine
G138 CCW rectangle outer finishing G122 Tool changing for Servo tool magazine
5
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Chapter 2 Programming
CNC milling System is highly effective automatical equipment according to programmed
program to process workpiece. Programming is using the CNC system control language according
to the requirement and drawing of the workpiece to describe the processing trajectory and the
assistant action. Ideal system not only could promise process qualified workpiece, but also make the
functions of milling reasonable application and fully use, so it is very important to programming,
this chapter will introduce many kinds of instructions and usage of CNC program, please read
carefully.
+X +X
Local coordinate system: Set local coordinate system of workpiece coordinate system in order
to programme easily when programming in workpiece coordinate system.
Absolute Programming:coordinates data of programming mode based on established absolute
coordinate system.Absolute coordinate value is corespoinding to homing point of coordinate system.
It is settlements by “G90 X_Y_Z_A_”.
Relative Programming(increment programming):It is distance and direction of operation end
point ,compared with starting point.It is settlements by “G90”.
Mode Instruction:The instruction which can remain the function in the program.It works both
in this program and program in the future.
In the same operation, there may be several mode instruction, such as M03(spindle
clockwise),M04(spindle counter clockwise),M05(spindle stop).They are all mode used to control
spindle.The mode of same kind are categorized into one mode group.At any time it must be one of
them,and there is only one of them.The original chosen mode is called mode origin.In the above
mode group,M05 is such a mode origin .
Suspending Mode(destroying mode): It is instruction which can turn mode instruction into mode
origin or destroy the mode.Such as M20(program ending instruction),meaning the end of operation
and returning to original status.
Non-Mode instruction:It is the instruction which has no function to store,and only works in the
segment of program.
2.1.1 Tool Movement Along Workpiece Parts Figure Interpolation
The tool moves along straight lines and arcs constituting the workpiece pats figure(See
Fig2.1.1)
The function of moving the tool along straight lines and arcs is called the interpolation.
a)Tool movement along a straight line
7
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Symbols of the programmed commands G01, G02, ... are called the preparatory function and
specify the type of interpolation conducted in the control unit.
Fig2.1.3 Interpolation
Note: Some machine move tables instead of tools but this manual assumes that tools are moved against
workpieces.
8
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
9
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
10
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
(3) Mounting a workpiece on a pallet,then mounting the workpiece and pallet on the jig
11
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
(b)Incremental Command: Specify the distance from the previous tool position to the next
tool position.
12
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
13
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
14
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
15
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
the same block. The last G instruction is valid when there are more G instructions which are in the
same group in one block.
Word is the basic instruction unit to command CNC system to complete the control
function,composed of an English letter (called instruction address) and the following number
(operation instruction with/without sign). The instruction address describes the meaning of its
following operation instruction and there may be different meaning in the same instruction address
when the different words are combined together. Table 2-1 is Word List of SZGH-CNC1000MDb
system.
Address
Functions meaning Data range
symbol
Name of file Name of machining workpiece 0-9, A-Z
Program
N No. of program segment 0000-9999
segment No.
Preparation Content and mode of designated
G 00-99
function instruction operation
Auxiliary
M Auxiliary operation instruction 00-99
function
Tool chosen THD No. /compensation of Tool 01-99
16
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
17
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
18
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Fig2.6.1 Stroke
Besides strokes defined with limit switches, the operator can define an area which the tool
cannot enter using a program or data in memory. This function is called stroke check.
(See1.9.6_Book2)
19
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Chapter 3 G INSTRCUTIONS
3.1 INTRODUCTION
G instruction consists of instruction address G and its following 1 ~3 bits instruction value,
used for defining the motion mode of tool relative to the workpiece, defining the coordinates and so
on. Refer to G instructions as Table 3.
G
Instruction value(00~999,the leading zero can be omitted)
Instruction address G
A number of following address G determines the meaning of the comand for the concerned
block.
G codes are divided into the following two types
Type Meaning
One-shot G code The G code is effective only in the block in which it is specified
Modal G code The G code is effective unti another G code of the same group
is specified.
Eg.: G01 and G00 are modal G codes.
20
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
23
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
24
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
The feedrate of the rotary axis is command in the unit of deg/min (the unit is decimal point
positoin)
When the straight line axis α (such as X, Y, or Z) and the rotating axis β (such as A, B, or C)
are linearly interpolated, the feed rate is that in which the tangential feed rate in the α & β cartesian
coordiante system is commanded by F (mm/min).
β-axis feedrate is obtained; at first, the time required for distribution is calculated by using the
above fromula, then the β-axis feedrate unit is changed to deg/min.
A calculation example is as follow.
G91 G01 X20.0 A40.0 F300.0
This changes the unit of the A axis from 40.0 deg to 40mm with metric input. The time
required for distribution is calculated as follow:
20 2 40 2
0.14907 (min)
300
40
The feedrate for the C axis is 268.3 deg/ min
0.14907
25
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
In simultaneous 3 axes control, the feedrate is calculated the same way as in 2 axes control.
Example1: (G91) G01 X200.0 Y100.0 F200.0 ;
26
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Code Description
G17 Specification of arc on XpYp plane
G18 Specification of arc on ZpXp plane(Default)
G19 Specification of arc on YpZp plane
G02 Circular Interpolation Clockwise direction (CW)
G03 Circular Interpolation Counterclockwise direction (CCW)
X/Z/Y Position of end point in workpiece coordinate
U/W/V Distance from start point to end point
I X axis distance from start point to center of an arc with sign(radius value)
K Z axis distance from start point to center of an arc with sign(radius value)
J Y axis distance from start point to center of an arc with sign(radius value)
R Arc radius with sign (always with radius value)
F Feedrate along the arc
Direction of circular interpolation: “Clockwise”(G02) and “Counter clockwise”(G03) on the
XpYp plane(ZpXp plane or YpZp plane) are defined when the XpYp plane is viewed in the positive
to negative direction of the Zp axis (Yp axis or Xp axis respecitively) in the Cartesian coordinate
system, See the figure below.
Distance moved on an arc: The end point of an arc is specified by address Xp , Yp or Zp,
and is expressed as an absolute or incremental value according to G90 or G91. For the incremental
value, the distance of the end point which is viewed from the start point of the arc is specified.
Distance from the start point to the center of arc: The arc center is specified by addresses I,
J and K for the Xp, Yp and Zp axes, respectively. The numerical value following I, J or K, however,
is a vector component in which the arc center is seen from the start point, and is always specified
as an incremental value irrespective of G90 and G91, as shown below.
I, and K must be signed according to the direction.
28
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Feedrate: The feedrate in circular interpolation is equal to the feed rate specified by the F code,
and the feedrate along the arc(the tangential feedrate of the arc) is controlled to be the specified
feedrate.
The error between the specified feedrate and the actual tool feedrate is ±2% or less. However,
this feed rate is measured along the arc after the cutter compensation is applied.
Note: 1.When I = 0 , J = 0 or K = 0, they can be omitted; one of I, K or R must be input, otherwise the
system alarms.
2.If I,J,K, and R addresses are specified simultaneously, the arc specified by address R takes precedence
and the other are ignored.
3.Processing arc workpiece usually use ball tool(arc tool) in the actual process, it must use function of
tool radius compensation in programming, that's G41 G42 instruction.
4.Arc path can be more than and less than 180° when R is commanded, the arc is more than180° when R
is negative, and it is less than or equal to 180°when R is positive.
5.If an axis not comprising the specified plane is commanded, an alarm is displayed.
6.When an arc having a center angle approaching 180º is specified, the calculated center coordinates may
contain an error. In such a case,specify the center of the arc wih I,J,and K.
Example:
29
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
30
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Example:
G0 X10 Y28 Z10
G06 X30 Y98 Z10 I5 J-6 K-5 F100
X130 Y198 Z120 I55 J-86 K-65
G0 X0 Z0
M02
31
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
32
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
33
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
34
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
35
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
36
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
system is set so that the reference position is at the coordinate values of (α, β) set by P46,P47,P48 &
P49 in Axis parameter .
37
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Warning: When a coordinate system is set with G50 after an external workpiece zero point offset value is
set, the coordinate system is not affected by the external workpiece zero point offset value. When G50 X100Z80;
is specified, for example, the coordiante system having its current tool reference position at X=100 & Z=80 is
set.
Example:
Example1: Setting the coordinate system by the G92 X25.2 Z23.0; command
(The tool tip is the start point for the program)
38
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
39
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Once a local coordinate system is established, the coordinates in the local coordinate system
are used in an axis shift command. The local coordinate system can be changed by specifying the
G52 command with the zero point of a new local coordinate system in the workpiece coordinate
system.
To cancel the local coordinate system and specify the coordinate value in the workpiece
coordinate system, match the zero point of the local coordinate system with that of the workpiece
coordinate system.
40
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Example:
41
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Setting the current position as the origin of polar coordinate system: Spcify the radius (the
distance between the current positon and the point) to be programmed with an incremental
command. The current position is set as the origin of the polar coordiante system.
42
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
43
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
44
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Feed per minute (G94): After specifying G94(in the feed per minute mode), the amount of feed of
the tool per minute is to be directly specified by setting a number after F. G94 is a modal code.
Once a G94 is specified, it is valid until G95(feed per revolution) is specified. At power-on, the feed
per minute mode is set.
An override from 0% to 150% can be applied to feed per minute with the switch on the
machine operator’s panel. For detailed information, see the appropriate manual of the machine tool
builder.
45
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
46
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
47
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
48
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
49
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
N7 G01 Y-1000
N8 G69
N9 G90 X-500 Y-500
N10 M02;
N1 G01 X0 Y0 G69 ;
N2 G42 G90 X1000 Y1000 F1000 D01;
N3 G66 R-30000;
N4 G91 X2000 ;
N5 G03 Y1000 R1000 J500
N6 G01 X-2000;
N7 Y-1000 ;
N8 G69 ;
N9 G90 X0 Y0 ;
N10 G42 ;
N11 M30 ;
50
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
51
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
G43 and G44 are modal G codes.They are valid until another G code belonging to the same
group is used.
Warning: When the tool length offset value is changed due to a change of offset number, the offset value
changes to the new tool lenght offset value, the new tool length offset value is not added to the old tool length
offset value.
To cancel tool length offset, specify G49 or H0. After G49 or H0 is specified,the system
immediately cancels the offset mode.
Note: The tool length offset value corresponding to offset No.0, that is, H0 always means 0.It is impossible
to set any other tool length offset value to H0.
Example1: H1: tool length offset value is 20.0 (Tool Length Offset A)
H2: tool length offset value is 30.0
G90 G43 Z100.0 H1; Z will move to 120.0
G90 G43 Z100.0 H2; Z will move to 130.0
Example2: Offset in X and Y axes.(Tool Length Offset B)
G19 G43 H_ ; Offset in X-axis
G18 G43 H_; Offset in Y-axis
Example3: H1=-4.0(Tool length offset value)
N1 G91 G00 X120.0 Y80.0; N5 G0 Z21.0 ; N9 X50.0 Y30.0 ; N13 X-200.0 Y-60.0 ;
N2 G43 Z-32.0 H1; N6 X30.0 Y-50.0 ; N10 G01 Z-25.0 ; N14 M2 ;
N3 G01 Z-21.0 F1000 ; N7 G01 Z-41.0 ; N11 G04 P2000 ;
N4 G04 P2000 ; N8 G00 Z41.0 ; N12 G00 Z57.0 H0 ;
52
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
G46
G47
G48
53
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
2.Tool offset can be applied to circular interpolation(G02,G03) with the G45 to G48 commands only for
1/4 and 3/4 circles using addresses I, J and K by the parameter setting, providing that the coordinate rotation
be not specified at the same time. This function is provided for compatibility with the conventional CNC tape
54
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
without any cutter compensation. The function should not be used when a new CNC program is prepared.
Program
N1 G46 G00 X_ Y_
N2 G45 G01 Y_ F_
N3 G45 G03 X_ Y_ I_ ;
N4 G01 X_
Program
N1 G91 G46 G00 X80.0 Y50.0 D01 N2 G47 G01 X50.0 F120.0 N3 Y40.0
N4 G48 X40.0 N5 Y-40.0; N6 G45 X30.0
N7 G45 G03 X30.0 Y30.0 J30.0 N8 G45 G01 Y20.0 N9 G46 X0
N10 G46 G02 X-30.0 Y30.0 J30.0 N11 G45 G01 Y0 ; N12 G47 X-120.0
N13 G47 Y-80.0 N14 G46 G00 X-80.0 Y-50.0
N9: Decrease toward the positive direction for movement amount “0”. The tool moves in the -X
direction by the offset value. N11:Decrease toward the positive direction for movement amount “0”.
The tool moves in the +Y direction by the offset value
55
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Start
56
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
interpolation (G01), or circular interpolation (G02, G03). If two or more blocks that do not move
the tool (miscellaneous function, dwell, etc.) are processed in the offset mode, the tool will make
either an excessive or insufficient cut. If the offset plane is switched in the offset mode, cnc system
will alarm and the tool is stopped.
Offset mode cancel: In the offset mode, when a block which satisfies any one of the
following conditions is executed, the CNC enters the offset cancel mode, and the action of this
block is called the offset cancel.
1. G40 has been commanded.
2. 0 has been commanded as the offset number for tool compensation.
When performing offset cancel, circular arc commands (G02 and G03) are not avaiable. If a
circular arc is commanded, cnc system will alarm & stops tool.
In the offset cancel, the control executes the instructions in that block and the block in the
cutter compensation buffer. In the meantime, in the case of a single block mode, after reading one
block, the control executes it and stops. By pushing the cycle start button once more, one block is
executed without reading the next block. Then the control is in the cancel mode, and nomrally, the
block to be executed next will be stored in the buffer register and the next block is not read into the
buffer for tool compensation.
57
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
the tool center moves as in (2), and vice versa. Consequently, the same tape permits cutting both
male and female shapes, and any gap between them can be adjusted by the selection of the offset
amount. Applicable if start-up and cancel is A type.
Fig3.20.4 Tool center paths when positive and negative tool compensation values are specified.
Note: 1. The tool compensation value corresponding to offset No.0, that is, D0 always means 0. It is
impossible to set D0 to any other offset amount.
2. Tool compensation C can be specified by D code.
The offset vector is the two dimensional vector that is equal to the tool compensation value
assigned by D code. It is calculated inside the control unit, and its direction is updated in
accordance with the progress of the tool in each block. The offset vector is deleted by reset.
Specify a tool compensation value with a number assigned to it. The number consists of 01 to
99 after address D (D code). The D code is valid until another D code is specfied. The D code is
used to specify the tool offset value as well as the cutter compensation value.
Offset calculation is carried out in the plane determined by G17, G18 and G19, (G codes for
plane selection). This plane is called the offset plane. Compensation is not executed for the
coordiante of a position which is not in the specified plane. The programmed values are used as
they are. In simultaneous 3 axes control, the tool path projected on the offset plane is compensated.
The offset plane is changed during the offset cancel mode. If it is performaed during the offset
mode, CNC system will alarm and stop moving.
Example:
G54 X0 Y0 Z0 ; ........................................Specifies a workpiece coordiantes system.
The tool is positioned at the start position (X0, Y0, Z0).
N1 G90 G17 G00 G41 D03 X250.0 Y550.0; Starts tool compensation(start-up). Tool is shifted to the
left of the programmed path by the distance specified in D03.
In other words the tool path is shifted by the radius of the tool
(offset mode)Because D03 is set to 15 beforehand(the radius of
the tool is 15mm).
N2 G01 Y900.0 F150 ; ...................................Spcifies machining from P1 to P2.
N3 X450.0 ; ....................................................Spcifies machining from P2 to P3.
N4 G03 X500.0 Y1150.0 R650.0 ;..................Specifies machining from P3 to P4.
N5 G02 X900.0 R-250.0 ;...............................Specifies machining from P4 to P5.
N6 G03 X950.0 Y900.0 R650.0 ;...................Specifies machining from P5 to P6.
N7 G01 X1150.0 ;...........................................Specifies machining from P6 to P7.
58
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
59
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
(b) Tool movement around the outside of a corner at obtuse angle (90≤α<180)
Linear Linear (A type) Linear Linearr (B type)
60
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
d)Tool movement around outside linear to linear at an acute angle less than 1 degree ( α<1º)
d) A block without tool movement specified at start-up: If the command is specified at start-up,
the offset vector isn’t created. for the definition of blocks that donot move the tool, see 3.20.
G91 G40... ;
...
N6 X100.0 Y100.0 ;
N7 G41 X0 ;
N8 Y-100.0 ;
N9 Y-100.0 X100.0 ;
(b)Tool movement around the inside (α<1º) with an abnormally long vector, linear→linear.
62
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
63
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
64
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
(d) Tool movement around outside linear to linear at an acute angle less than 1 degree(α<1º)
65
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
66
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
The positioning plane is determined by plane selection code G17,G18 or G19.The positioning
axis is an axis other than the drilling axis.P47 in Speed parameter + 2 is set for this function.
Although canned cycles include tapping and boring cycles as well as drilling cycles, in this
chapter, only the term drilling will be used to refer to operations implemented with canned cycles.
The drilling axis is a basic axis(X,Y, or Z) not used to define the positioning plane, or any
axis parallel to that basic axis.The axis(basic axis or parallel axis) is used as the drilling axis is
determined according to the axis address for the drilling axis specified in the same block as G
codes G73 to G89.If no axis address is specified for the drilling axis, the basic axis is assumed to
be the drilling axis.
G code Positioning Plane Drilling axis
G17 Xp-Yp plane Zp
G18 Zp-Xp plane Yp
G19 Yp-Zp plane Xp
Xp: X axis or an axis parallel to the X axis
Yp: Y axis or an axis parallel to the Y axis
ZP: Z axis or an axis parallel to the Z axis
Travel distance along the drilling axis varies for G90 and G91 as follows:
G90(Absolute command) G91(Incremental Command)
Drilling Mode: G73, G74 and G81 to G89 are modal G codes and remain in effect until
canceled. When in effect, the current state is the drilling mode. Once drilling data is specified in
the drilling mode, the data is retained until modified or canceled.
Specify all necessary drilling data at the beginning of canned cycles; when canned cycles are
being performed, specify data modifications only.
Return point level G98/G99: When the tool reaches the bottom of a hole, the tool may be
returned to point R or to the initial level. These operations are specified with G98 and G99. The
following illustrates how he tool moves when G98 or G99 is specified. Generally, G99 is used for
the first drilling operation and G98 is used for the last drilling operation.
67
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
The initial level doesnot change even when drilling is performed in the G99 mode.
G98 (Return to initial level) G99(Return to point R level)
Repeat: To repeat drilling for equally-spaced holes, specify the number of repeats in L_.
K is effect only within the block where it is specified. The max value of L is 9999. Default=1.
To cancel a canned cycle, use G80 or a group 01 G code.
Group 01 G codes
G00: Positioning (Rapid traverse)
G01: Linear interpolation
G02: Circular interpolation or helical interpolation (CW)
G03: Counter-Circular interpolation or helical interpolation (CCW)
Symbos in figures: Subsequent sections explain the individual canned cycles. Figures in these
explanations use the following symbols:
68
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
69
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
The high-speed peck drilling cycle performs intermittent feeding along the Z-axis. When this
cycle is used,chips can be removed from the hole easily,and a smaller value can be set for retraction.
This allows drilling to be performed effectively.
P1 in User parameter sets the value of clearance(d).
The tool is retracted in rapid traverse.
Before specifying G73, rotate the spindle using a miscellaneous function (M code).When the
G73 code and an M code are specified in the same block, the M code is executed at the time of the
first positioning operation. The system then proceeds to the next drilling operation.
When a tool length offset(G43 G44 or G49) is specified in the canned cycle, the offset is
applied at the time of positioning to point R.
Note: 1. In a block that doesnot contain R,Q , drilling isnot performed.Specify R and Q in blocs that perform
drilling. If they are specified in a block that doesnot perform drilling, they cannot be stored as modal data.
2. Do not specify a G code of the 01 group(G00-G03) and G73 in a single block.Otherwise, G73 will be
canceled.
3. In the canned cycle mode, tool offsets are ignored.
4. Before the drilling axis can be changed, the canned cycle must be canceled.
Example:
M3 S2000 ; Cause the spindle to start rotating
G90 G99 G73 X300. Y-250. Z-150. R-100. Q15. F120. ;
Position, Drill 1st hole, then return to point R.
Y-550. ; Position, Drill 2nd hole, then return to point R.
Y-750. ; Position, Drill 3rd hole, then return to point R.
X1000. ; Position, Drill 4th hole, then return to point R.
Y-550. ; Position, Drill 5th hole, then return to point R.
G98 Y-750. ; Position, Drill 6th hole, then return to the intital level.
G80 G28 G91 X0 Y0 Z0; Erturn to the reference position.
M05 ; Cause the spindle to stop rotating
70
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Tapping is performed by turning the spindle counterclockwise. When the bottom of the hole
has been reached, the spindle is rotated clockwise for retraction. This creates a reverse thread.
71
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Feedrate overrides are ignored during left-handed tapping. A feed hold doesnot stop the
machine until the return operation is completed.
Before specifying G74, use a miscellaneous function(M code) to rotate the spindle
counterclockwise.
When the G74 command and an M code are specified in the same block, the M code is
executed at the time of the first position operation. The system then proceeds to the next drilling
operation.
When a tool length offset (G43, G44, or G49) is specified in the canned cycle, the offset is
applied at the time of positioning to point R.
Note: 1. Before the drilling axis can be changed, the canned cycle must be canceled.
2. In a block that does not contain R, K , drilling is not performed.
3. Specify P in blocs that perform drilling. If they are specified in a block that doesnot perform drilling,
they cannot be stored as modal data.
4. Do not specify a G code of the 01 group(G00-G03) and G73 in a single block.Otherwise, G73 will be
canceled.
5. In the canned cycle mode, tool offsets are ignored.
6. During rigid tapping, Spindle-feedrate override and Feed-feedrate override don’t work.
Parameters Sets for Rigid Tapping:
1, Standard tapping, following Spinlde_Encoder mode, P411=2 in Axis parameter, CNC
system must be configured with SP-encoder
Special Note: When the transmission ratio between Spindle and Encoder is not 1:1, it must be configured
with SZGH Transfer Board & modify P412 & P413 in Axis parameter;
412, Number of spindle teeth
413, Number of encoder teeth
2, Rigid tapping, interpolation between Spindle & Drilling axis, P405=5, P410=94, P411=3 in
Axis parameter..
M75: Shift control mode of spindle to Positon Control Mode(Pulse+Direction). After rigid
tapping, M74, cancel position control mode of spindle.
Rigid mode eliminates the need to use a floating tap required in the standard tapping mode,
thus allowing faster and more precise tapping.
Example:
N1 M4 S100 ; Cause the spindle to start rotating CCW.
N2 G90 G99 G74 X300. Y-250. Z-150. R-100. K5 ;
Position, tapping hole 1, then return to point R.
N3 Y-550. ; Position, tapping hole 2, then return to point R.
N4 Y-750. ; Position, tapping hole 3, then return to point R.
N5 X1000. ; Position, tapping hole 4, then return to point R.
N6 Y-750. ; Position, tapping hole 5, then return to point R.
N7 G98 Y-550. K5; Position, tapping hole 6, then return to the initial level
N8 G80 G28 G91 X0 Y0 Z0; Return to the reference position.
N9 M05; Cause the spindle to stop rotating.
72
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Warning: Q(shift at the bottom of a hole) is a modal value retained within canned cycles. It must be
specified carefully because it is also used as the depth of cut for G73 and G83.
Direction of shift after oriented spindle stop is set by P3 in User parameter.
73
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
When the bottom of the hole has been reached,the spindle is stopped at the fixed rotation
position, and the tool is moved in the direction opposite to the tool tip and retracted. This ensures
that the machined surface is not damaged and enable precise and efficient boring to be performed.
Before specifying G76, use a miscellaneous function (M code) to rotate the spindle. When The
G76 command and an M code are specified in the same block, the M code is executed at the time of
the first positioning operation. The system then proceeds to the next operation.
When a tool length offset (G43, G44, or G49) is specified in the canned cycle, the offset is
applied at the time of positioning to point R..
Note: 1. Before the drilling axis can be changed, the canned cycle must be canceled.
2. In a block that does not contain R, Q , boring is not performed.
3. Be sure to specify a positive value in Q. If Q is specified with a neative value, the sign is ignored. Set
the direction of shift is set by P3 of User parameter. Specify P & Q in a block that performas boring. If they
are specified in a block that doesnot perform boring, they cannot be stored as modal data.
4. Do not specify a G code of the 01 group(G00-G03) and G76 in a single block. Otherwise, G76 will be
canceled and alarm.
5. In the canned cycle mode, tool offsets are ignored.
Warning: The spindle system must support orientation function when use G76. SZGH cnc system output
M61(Pin19_CN10 plug) for orentation, M22(Pin5_CN10 plug) detects orientation end.
Example:
N10 M3 S500 ; Cause the spindle to start rotating.
N20 G90 G99 G75 X300 Y-250 Z-150 R-100 Q5 P1 F120;
Position, bore hole 1, then return to point R. Orient at the bottom of
the hole, then shift by 5mm.Stop at the bottom of the hole for 1s.
N30 Y-350 ; Position, drill hole 2, then return to point R.
N40 Y-550 ; Position, drill hole 2, then return to point R.
N50 X1000 ; Position, drill hole 2, then return to point R.
N60 Y-550 ; Position, drill hole 2, then return to point R.
N70 G98 Y-750 ; Position, drill hole 2, then return to the initial level.
N80 G80 G28 G91 X0 Y0 Z0 ; Return to the reference position
N90 M5 ; Cause the spindle to stop rotating.
74
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
After positioning along the X axis and Y axis, rapid traverse is performed to point R. Drilling
is performed from point R to point Z. Then the tool is retracted in rapid traverse.
Before specifying G81, use miscellaneous function (M code) to rotate the spindle. When the
G81 command and an M code are specified in the same block, the M code is executed at the time of
the first positioning operation. The system then proceeds to the next drilling operation.
When a tool length offset (G43, G44 or G49) is specified in the canned cycle, the offset is
applied at the time of position to point R.
Note: In the canned cycle mode, tool offsets are ignored.
Example:
M3 S2000 ; Cause the spindle to start rotating
G90 G99 G81 X300 Y-250 Z-150 R-100 F120 ;
Position, drill hole 1, then return to point R.
Y-550 ; Position, drill hole 2, then return to point R.
Y-750 ; Position, drill hole 3, then return to point R.
X1000 ; Position, drill hole 4, then return to point R.
G98 Y-750 ; Position, drill hole 5, then return to the initial level.
G80 G28 G91 X0 Y0 Z0 ; Return to the reference position
M5 ; Cause the spindle to stop rotating
75
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
After positioning along the X and Y axis, rapid traverse is performed to point R. Then drilling
is performed from point R to point Z, When the bottom of the hole has been reached, a dwell is
performed. Then the tool is retracted in rapid traverse.
Before specifying G82, use miscellaneous function (M code) to rotate the spindle. When the G82
command and an M code are specified in the same block, the M code is executed at the time of the
first positioning operation. The system then proceeds to the next drilling operation.
When a tool length offset (G43, G44 or G49) is specified in the canned cycle, the offset is
applied at the time of position to point R. In the canned cycle mode, tool offsets are ignored.
Example: M3 S2000 ; Cause the spindle to start rotating
G90 G99 G82 X300. Y-250. Z-150. R-100. P1 F120. ;
Position, drill hole 1, and dwell for 1s at the bottom of the hole, then return to point R.
Y-550. ; Position, drill hole 2, then return to point R.
G98 Y-750. ; Position, drilling hole 3, then return to initial level.
G0 X0 Y0 Z0 ; Return to the zero point.
M05 ; Cause the spindle to stop rotating.
76
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Q represents the depth of each cutting feed. It must be specified in an incremental value. In the
second and subsequent cutting feed, rapid traverse is performed up to a d point just before where the
last drilling ended, and cutting feed is performed again. d is set by P2 in User parameter.
Be sure to sepcify a positive value in Q. Negative values are ignored.
Before specifying G83, use miscellaneous function (M code) to rotate the spindle. When the
G83 command and an M code are specified in the same block, the M code is executed at the time of
the first positioning operation. The system then proceeds to the next drilling operation.
When a tool length offset (G43, G44 or G49) is specified in the canned cycle, the offset is
applied at the time of position to point R. In the canned cycle mode, tool offsets are ignored.
Example: M3 S2000 ; Cause the spindle to start rotating.
G90 G99 G83 X300. Y-250. Z-150. R-100. Q15. F120. ;
Position, drill hole 1, then return to point R.
Y-550.; Position, drill hole 1, then return to point R.
G98 Y-750.; Position, drill hole 1, then return to the initial level.
G80; Cancel canned cycle
M05; Cause the spindle to stop rotating.
77
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
After positioning anlog X and Y axis,rapid traverse is performed to point R. From point R,
cutting is performed with depth Q (depth of each cutting feed), then the tool is retracted by distance
78
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
d. When point Z has been reached, after dwell time P, the spindle is stopped, then rotated in the
counter-clockwise direction(CCW) for retraction.
Set the retraction distance, d, P7 in User parameter
Set the retraction mode, P6 in User parameter. 0: Retract with d in rapid traverse, 1: Retract to
point R level.
During rigid tapping,Speed of feeding axes is set by SP_Speed(S) & threading pitch .
Note: 1. Do not specify a G code of the 01 group(G00-G03) and G84 in a single block. Otherwise, G84 will be
canceled and alarm.
2. In a block that does not contain K , rigid tapping is not performed and cannot pass compile.
3. In the canned cycle mode, tool offsets are ignored.
4. Before the drilling axis can be changed, the canned cycle must be canceled. If the drilling axis is
changed in rigid mode, cnc system will alarm.
5. During rigid tapping, Spindle-feedrate override and Feed-feedrate override don’t work.
Parameters Sets for Rigid Tapping:
1, Standard tapping, following Spinlde_Encoder mode, P411=2 in Axis parameter, CNC
system must be configured with SP-encoder
Special Note: When the transmission ratio between Spindle and Encoder is not 1:1, it must be configured
with SZGH Transfer Board & modify P412 & P413 in Axis parameter;
412, Number of spindle teeth
413, Number of encoder teeth
2, Rigid tapping, interpolation between Spindle & Drilling axis, P405=5, P410=94, P411=3 in
Axis parameter..
M75: Shift control mode of spindle to Positon Control Mode(Pulse+Direction). After rigid
tapping, M74, cancel position control mode of spindle.
Rigid mode eliminates the need to use a floating tap required in the standard tapping mode,
thus allowing faster and more precise tapping.
Example:
M3 S100 ; Cause the spindle to start rotating
G90 G99 G84 X300 Y-250 Z-150 R-120 P300 K5 S100 ;
Position, tapping hole 1, then return to point R
Y-550. K5; Position, tapping hole 2, then return to point R
G98 Y-750. K5; Position, tapping hole 1, then return to the initial level
G80 ; Cancel rigid tapping cycle
M30; End of program
79
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
After positioning along the X and Y axis, rapid traverse is performed to point R. Drilling is
performed from point R to point Z. When point Z has been reached, cutting feed is performed to
return to point R.
Before specifying G85, use miscellaneous function (M code) to rotate the spindle. When the
G85 command and an M code are specified in the same block, the M code is executed at the time of
the first positioning operation. The system then proceeds to the next boring operation.
When a tool length offset (G43, G44 or G49) is specified in the canned cycle, the offset is
applied at the time of position to point R. In the canned cycle mode, tool offsets are ignored.
Note: 1. Before the drilling axis can be changed, the canned cycle must be canceled.
2. Do not specify a G code of the 01 group(G00-G03) and G85 in a single block.Otherwise, G85 will be
canceled and alarm.
Example: M3 S100 ; Cause the spindle to start rotating
G90 G99 G85 X300. Y-250. Z-150. R-120. F120.
Position, drill hole 1, then return to point R
Y-550 ; Position, drill hole 2, then return to point R
Y-750; Position, drill hole 3, then return to point R
X1000 ; Position, drill hole 4, then return to point R
G98 Y-750 ; Position, drill hole 5, then return to initial level
G80 ; Cancel canned cycle
M05 ; Cause the spindle to stop rotating.
80
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
After positioning along the X and Y axis, rapid traverse is performed to point R. Drilling is
performed from point R to point Z. When the spindle is stopped at the bottom of the hole, the tool is
retracted in rapid traverse.
Before specifying G86, use miscellaneous function (M code) to rotate the spindle. When the
G86 command and an M code are specified in the same block, the M code is executed at the time of
the first positioning operation. The system then proceeds to the next boring operation.
When a tool length offset (G43, G44 or G49) is specified in the canned cycle, the offset is
applied at the time of position to point R. In the canned cycle mode, tool offsets are ignored.
Note: 1. Before the drilling axis can be changed, the canned cycle must be canceled.
2. Do not specify a G code of the 01 group(G00-G03) and G86 in a single block.Otherwise, G86 will be
canceled and alarm.
Example: M3 S2000 ; Cause the spindle to start rotating
G90 G99 G85 X300. Y-250. Z-150. R-120. F120. Position, drill hole 1, then return to point R
Y-550 ; Position, drill hole 2, then return to point R
G98 Y-750 ; Position, drill hole 3, then return to initial level
G80 ; Cancel canned cycle
M05 ; Cause the spindle to stop rotating.
81
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Warning: Q(shift at the bottom of a hole) is a modal value retained within canned cycles. It must be
specified carefully because it is also used as the depth of cut for G73 and G83.
After positioning along the X and Y axis,the spindle is stopped at the fixed rotation position
(Spindle orientation). The tool is moved in the direction(this direction is set by P4 & P5 in User
parameter), opposite to the tool tip, positioning (rapid traverse) is performed to the bottom of the
hole (point R). Then the tool is shifted in the direction of the tool tip and the spindle is rotated
clockwise. Boring is performed in the positive direction along the Z-axis until point Z is reached. At
point Z, the spindle is stopped at the fixed rotation position again(Spindle orientation), the tool is
shifted in the direction opposite to the tool tip, then the tool is returned to the intial level. Then the
tool is shifted in the direction of the tool tip and the spindle is rotated clockwise to proceed to the
next block operation.
Before specifying G87, use miscellaneous function (M code) to rotate the spindle. When the
G87 command and an M code are specified in the same block, the M code is executed at the time of
the first positioning operation. The system then proceeds to the next boring operation.
When a tool length offset (G43, G44 or G49) is specified in the canned cycle, the offset is
applied at the time of position to point R.
82
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Note: 1. Before the drilling axis can be changed, the canned cycle must be canceled.
2. In a block that does not contain R, Q , boring is not performed.
3. Be sure to specify a positive value in Q. If Q is specified with a neative value, the sign is ignored. Set
the direction of shift is set by P4 & P5 of User parameter. Specify P & Q in a block that performas boring. If
they are specified in a block that doesnot perform boring, they cannot be stored as modal data.
4. Do not specify a G code of the 01 group(G00-G03) and G87 in a single block. Otherwise, G87 will be
canceled and alarm.
5. In the canned cycle mode, tool offsets are ignored.
Warning: The spindle system must support orientation function when use G87. SZGH cnc system output
M61(Pin19_CN10 plug) for orentation, M22(Pin5_CN10 plug) detects orientation end.
Example:
N10 M3 S500 ; Cause the spindle to start rotating.
N20 G90 G87 X300 Y-250 Z-150 R-100 Q5 P1 F120;
Position, bore hole 1. Orient at the initial level, then shift by 5mm.Stop at point Z for 1s.
N30 Y-350 ; Position, drill hole 2.
N40 Y-550 ; Position, drill hole 3.
N50 X1000 ; Position, drill hole 4.
N60 Y-550 ; Position, drill hole 5.
N70 G98 Y-750 ; Position, drill hole 6.
N80 G80 G28 G91 X0 Y0 Z0 ; Return to the reference position
N90 M5 ; Cause the spindle to stop rotating.
83
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
This cycle is almost same to G85. The difference is that this cycle performs a dwell at the
bottom of the hole.
Before specifying G89, use miscellaneous function (M code) to rotate the spindle. When the
G89 command and an M code are specified in the same block, the M code is executed at the time of
the first positioning operation. The system then proceeds to the next boring operation.
When a tool length offset (G43, G44 or G49) is specified in the canned cycle, the offset is
applied at the time of position to point R. In the canned cycle mode, tool offsets are ignored.
Note: 1. Before the drilling axis can be changed, the canned cycle must be canceled.
2. Do not specify a G code of the 01 group(G00-G03) and G86 in a single block.Otherwise, G86 will be
canceled and alarm.
Example: M3 S100 ; Cause the spindle to start rotating
G90 G99 G89 X300. Y-250. Z-150. R-120. P1 F120. ;
Position, drill hole 1, then return to point R
Then stop at the bottom of the hole for 1s.
Y-550 ; Position, drill hole 2, then return to point R
X1000 ; Position, drill hole 3, then return to point R.
G98 Y-750 ; Position, drill hole 5, then return to initial level.
G80 G28 G91 X0 Y0 Z0 ; Return to the reference position
M05 ; Cause the spindle to stop rotating.
84
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
85
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Prarameter Set: In Redeem, Length offset value: +200.0 is set in No.11 ; +190 is set in No.15 ;
and +150 is set in No.31.
Program Example:
N1 G54 X0 Y0 Z0 ; Coordinate setting at reference position
N2 G90 G00 Z250.0 T11; Tool change
N3 G43 Z0 H11 ; Initial level, tool length offset
N4 S30 M3 ; Start spindle CW
N5 G99 G81 X400.0 Y-350.0 Z-153.0 R-97.0 F120 ;
Positioning, then drilling hole #1
N6 Y-550.0 ; Positioning, then drilling hole #2, return to point R level
N7 G98 Y-750.0 ; Positioning, then drilling hole #3, return to intial level
N8 G99 X1200.0 ; Positioning, then drilling hole #4, return to point R level
N9 Y-550.0 ; Positioning, then drilling hole #5, return to point R level
N10 G98 Y-350.0 ; Positioning, then drilling hole #6, return to initial level
N11 G00 X0 Y0 M5 ; Positioning, then drilling hole #7, return to point R level
N12 G49 Z250.0 T15 ; Tool length offset cancel, tool change
N13 G43 Z0 H15 ; Initial level, tool length offset
N14 S20 M3 ; Start spindle CW
N15 G99 G82 X550.0 Y-450.0 Z-130.0 R-97.0 P1 F50 ;
Positioning, then drilling hole #7, return to point R level
N16 G98 Y-650.0 ; Positioning, then drilling hole #8, return to initial level
N17 G99 X1050.0 ; Positioning, then drilling hole #9, return to point R level
N18 G98 Y-450.0 ; Positioning, then drilling hole #10, return to initial level
N19 G00 X0 Y0 M5 ; Return to reference position & Stop spindle
N20 G49 Z250.0 T31 ; Tool length offset cancel, tool change
N21 G43 Z0 H31 ; Initial level, tool length offset
N22 S10 M3 ; Start spindle CW
N23 G85 G99 X800.0 Y-350.0 Z-153.0 R47.0 F150 ;
Positioning, then drilling hole #11, return to point R level
N24 G91 Y-200.0 ; Positioning, then drilling hole #12, return to point R level
N25 Y-200.0 ; Positioning, then drilling hole #13, return to point R level
N26 G90 G28 X0 Y0 M5 ; Return to reference position & Stop spindle
N27 G49 Z0 G80 ; Tool length offset cancel
N28 M02 ; Program Stop
86
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Program as follows:
N0000 G17 G90 X0 Y0 F250 M03 ;
N0001 G91 G01 Z-10
N0010 G22 L4 ;
N0020 G01 X20 ;
N0030 G03 X10 I5 J0 Y0 ;
N0040 G800 ;
N0050 G01 X20 ;D-E line
N0060 Y-30 ;E-F line
N0070 G11 X140 Y-30 ;set mirror
N0080 G22 L4 ;circulation begin
N0090 G01 X20 ;F-G line
N0100 G03 X10 I5 ;G-H arc
N0110 G800 ;circulation end
N0120 G01 X20 ;I-J line
N0130 G01 Y-30 ;cancel mirror
N0140 G12 ;J-A line
N0150 G26 ;go back to program begin point
N0160 M02 ;over
87
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
A8 B1
A9 B10
G67
M30
Macro Program: 6000
N1 #2=#0+#1
N2 IF (#2 EQ 10) GOTO 4
N3 G00 X#2
N4 G00 Z#1
N5 M99 ; Return
3.30.3 Macro Program Instruction
3.30.3.1 Input Instruction: WAT
Waiting for the input port X valid or invalid instruction
Format: WAT+ (-) X
Attention: "+" to means the input is effective;
"-" means the input is invalid;
"X" means the input port X00-X55; see the I/O diagnosis;
3.30.3.2 Output Instruction: OUT
Set the output port Y is valid or invalid instruction
Format: OUT +(-)Y
Attention: "+" means the output is effective;
"-" means the output is invalid;
"Y" means the output port Y00-Y31; see the I/O diagnosis;
3.30.3.3 Assignment Instruction: =
Explanation: used for assignment of a variable
Eg.: #251=890.34 #450=#123
And also it could be mathematical expression , eg.: #440=#234+#470
3.30.3.4 Unconditional Jump: GOTO n
“GOTO n” is the command that for jump to the program line that is specified by sequence
number (N**) unconditionally. n is the sequence number.
E.g.: GOTO 5 ; // Jump to N5 program line.
Note: when specified program line , n , is beyond sequence number of N1-N99999, cnc system will hint
error.
n , program line,could be macro variable (#**)
E.g.: GOTO #100
3.30.3.5 Conditional Jump
1) IF (Conditional express) GOTO n
If condition is met, execute GOTO n ,jump to N** program line; if the condition isnot met,
execute the next segment.
Example: N1 IF(#200 EQ 1) GOTO 20
N10 G00 X0
N20 G00 Z0
Explanation: If #200 is equal to 1, system will execute GOTO 20 , jump to N20 , and execute
“G00 Z0”, if #200 isn’t equal to 1, system don’t execute operation of “GOTO 20” ,and will
89
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Prolongation:
3) IF(conditional express)
<A operational command>
ELSE
<B operational command>
ENDIF
4) IF(conditional express)
<A operational command>
ELIF
<B operational command>
ENDIF
3.30.3.6 Loop Command
Format: (Conditions Initialization)
WHILE (conditional expression) DO n
<A operational segments>
[Alter condition of loop]
END n
<B operational segments>
When conditions are met during WHILE cycle command, execute the operational segments
between DO n and END n . Otherwise,when condition isnot met, jump to the program line after
END n ,also execute B operational segments.
We can nest for loops by placing one loop within another.
Note: 1.There must have operational codes that are for change condition at operational segments ,which is
between Do n & END n. Otherwise system will enter endless loop.
2.Nesting of macro program loop statements of SZGH CNC system is 3 pcs of loops at most . Also n
only could be 1 , 2 , 3 .
3.n of “DO n” & “END n” must keep same.
Example: #100=2 #150=5 #200=25
90
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
92
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
93
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
94
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
#99=#19
#100=#20
#30=#4003
#31=#4014
G90
IF[#30 EQ 90] GOTO 1
G53
#98=#5001+#98
#99=#5002+#99
N1 WHILE[#86 GT 0] DO 1
#35=#98+#87*COS[#80]
#36=#99+#87*SIN[#80]
G81X#35Y#36Z#100R#92F#85
#80=#80+#81
#86=#86-1
END 1
G#30 G#31 G80
M99
Example: Bolt hole circle drilling cycle G152 , to drill 5 holes at intervals of 45 degrees after a start
angle of 0 degrees. On the circumference of a circle with radius 40. The absolute center of the circle
is (100, 50)
Program:
G90 G92 X0 Y0 Z4
G152 X100 Y50 R10 Z-20.0 F20 I40.0 A0 B45.0 H5
M30
95
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Format: G110/G111 X_ Y_ Z_ R_ I_ W_ Q_ K_ V_ E_ D_ F_
X_Y_: The starting point in XY plane
Z_ : The distance from point R to the bottom of the hole
R_ : The distance from the initial level to point R level
I_ : Radius of Groove Round
W_ : Depth of 1st cutting feed, disance from point R level
Q_ : Deptch of each cutting feed
K_ : Incremental Width
V_ : Height between unprocessing surface and cutter
E_ : Allowance for fine groove
D_ : Tool radius offset number
F_ : Cutting Feedrate
Note: 1. Radius of groove round, I, should be greater than radius of current tool.
2. Depth of 1st cutting feed, W, should be greater than 0. If depth of 1st cutting feed exceeds the groove
bottom, then the machining is performed at the groove bottom;
3. Allowance for fine milling isnot less than 0, otherwise absolute value of negative number.
4. Range of Tool radius offset number , D, is 0~32. default is 0.
96
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Example: Rough milling an inner circle groove using the canned cycle code G110, as shown in the
figure below: (D1=5).
Note: 1. Radius of fine milling circle, I, Its absolute value is used if it is negative.
2. Distance from fine milling starting point to circle center, J, Its absolute value is used if it is negative.
3. Allowance for fine milling isnot less than 0, otherwise absolute value of negative number.
4. Range of Tool radius offset number , D, is 0~32. default is 0.
Process of Cycle:
1) Rapid positioning to the position in XY plane;
2) Rapid down to point R level ;
3) Feed to the machining start point at the bottom of hole ;
4) Arc Interpolation by the transition arc 1 from the starting point;
5) Circle Interpolation for the whole circle by inner arc path of finish-milling ;
6) Circle Interpolation by transition arc 4 and return to the starting point ;
7) Return to the initial level or point R level according to G98/G99.
97
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Command Path:
G112:CCW Inner Circle Groove Fine Cycle G113:CW Inner Circle Groove Fine Cycle
Note: Q, P, L is invalid when using G112/G113, but value of Q & P will be remained as canned cycle.
Example: Fine milling a circlar groove that has been rough milled as follows by canned cycle code
G112. (D1=5).
Note: 1. Q, P, L is invalid when using G112/G113, but value of Q & P will be remained as canned cycle.
2. When use G112/G113 is used, G codes in 01 group cannot be used, otherwise G114/G115 is repalced by
other codes in group 1.
3. Tool radius compensation: in the fixed cycle command, the tool radius compensation is ignored, the
system calls the tool radius compensation specified by the program during the tool infeed.
98
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Command Path:
(1) Rapid positioning to a location within XY plane ;
(2) Rapid down to R level ;
(3) Feed to the bottom of hole
(4) Circular interpolation by the transition arc 1 from the starting point ;
(5) Circular interpolation for the whole circle by the path of arc 2 and arc 3 ;
(6) Circular interpolation by transition arc 4 and return to the starting point ;
(7) Return to the initial level(G98) or point R level (G99) .
In outer circle fine milling cycle, the interpolation directions of the transition arc and fine
milling arc are different. The interpolation direction in the code means the one of the fine milling.
Note: 1. Q, P, L is invalid when using G114/G115, but value of Q & P will be remained as canned cycle.
2. When use G114/G115 is used, G codes in 01 group cannot be used, otherwise G114/G115 is repalced by
other codes in group 1.
3. Tool radius compensation: in the fixed cycle command, the tool radius compensation is ignored, the
system calls the tool radius compensation specified by the program during the tool infeed.
99
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Example: Fine milling a circular groove that has been rough milled as follows by the canned cycle
code G114.
100
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
7. Value of first cutting feed in X-axis direction, C, should not be less than radius of cutter+2.0, When
positive number,feed in positive direction of X-axis;when negative number, feed in negative direction of X-axis.
8. Range of Tool radius offset number , D, is 0~32. default is 0.
Command Path:
Command Process:
(1) Rapid positioning to a location within XY plane ;
(2) Rapid down to point R level , and then rapid down to point W level;
(3) First cutting feed(c) in X-axis direciton, Line 1 is feed with linear interpolation ;
(4) Whole Circle interpolation with arc 2 ;
(5) Cutting feed with increment width (K) from starting point to center until radius of round
workpeice is (I+E);
(6) Cutter rapid return to point R level in Z-axis and then rapid traverse to starting point ;
(7) Cutter rapid down to depth of unprocessing end surface & each cutting feed (W+nQ);
(8) Loop run (4)~(7) until finish outer circle rough milling surface with depth of Z point;
(9) Return to point R level ;
(10) Return to starting point in XY plane.
101
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
In outer circle fine milling cycle, the interpolation directions of the transition arc and fine
milling arc are different. The interpolation direction in the code means the one of the fine milling.
Note: 1. P, L is invalid when using G116/G117, but value of P will be remained as canned cycle.
2. When use G116/G117 is used, G codes in 01 group cannot be used, otherwise G116/G117 is repalced by
other codes in group 1.
3. Tool radius compensation: in the fixed cycle command, the tool radius compensation is ignored, the
system calls the tool radius compensation specified by the program during the tool infeed.
Example: Fine milling a circular pad that has been rough milled as follows by the canned cycle
code G117. (D1=5mm)
102
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
G132:CCW Outer Rectangle Roughing Cycle G133: CW Outer Rectangle Roughing Cycle
103
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Command Process:
(1) Rapid positioning to a location within XY plane ;
(2) Rapid down to point R level , and then rapid down to point W level at first time;
(3) First cutting feed(C) in X-axis direciton, Line 1 is feed with linear interpolation ;
(4) Whole linear interpolation with line 2 ;
(5) Cutting feed with increment width (K) from starting point to center until Length of
rectangle pad is (I+2E), Width of rectangle pad is (J+2E);
(6) Milling coner of rectangle
(7) Cutter rapid return to point R level in Z-axis and then rapid traverse to starting point ;
(8) Cutter rapid down to depth of unprocessing end surface & each cutting feed (W+nQ);
(9) Loop run (4)~(7) until finish outer circle rough milling surface with depth of Z point;
(10) Return to point R level ;
(11) Return to starting point in XY plane.
In outer circle fine milling cycle, the interpolation directions of the transition arc and fine
milling arc are different. The interpolation direction in the code means the one of the fine milling.
Note: 1. P, L is invalid when using G116/G117, but value of P will be remained as canned cycle.
2. When use G116/G117 is used, G codes in 01 group cannot be used, otherwise G116/G117 is repalced by
other codes in group 1.
3. Tool radius compensation: in the fixed cycle command, the tool radius compensation is ignored, the
system calls the tool radius compensation specified by the program during the tool infeed.
Example: Fine milling a rectangle pad(Length=50, Width=40, Height=50) that has been rough
milled as follows by the canned cycle code G133. (D1=5mm)
104
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
G134: CCW Inner Rectangle Groove Rough cycle G135: CW Inner Rectangle Groove Rough Cycle
105
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Process of Cycle:
(1) Rapid positioning to the position in XY plane
(2) Rapid down to point R level
(3) Cut a depth (W) downward at the cutting speed by helical mode,
(4) Mill the rectangle surface helically, outward from the center, with a incremental width (K)
each time;
(5) Cutter return to point R level along Z axis;
(6) Axis X and Y rapidly position to the center of rectangle;
(7) Rapid traverse to V , the distance to the unprocessing end surface;
(8) Cut a depth(Q+V) downward along Z axis;
(9) Repeats the operation (4)~(8) until the total depth of rectangle surface is finished;
(10) Return to point R level (G99);or return to initial level(G98).
Note: 1. P, L is invalid when using G134/G135, but value of P will be remained as canned cycle.
2. When use G134/G135 is used, G codes in 01 group cannot be used, otherwise G134/G135 is repalced by
other codes in group 1.
3. Tool radius compensation: in the fixed cycle command, the tool radius compensation is ignored, the
system calls the tool radius compensation specified by the program during the tool infeed.
Example: Rough milling an inner rectangle groove using the canned cycle code G134, as shown in
the figure below: (D1=5, Length of rectangle =70 , Width of rectangle =50mm).
106
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Process of Cycle:
1) Rapid positioning to the position in XY plane;
2) Rapid down to point R level ;
3) Cutting Feed to the machining start point at the bottom of hole ;
4) Perform arc interpolation by the transition arc 1 from the starting point;
5) Perform linear & circle interpolation by tha path 2-3-4-5-6 ;
6) Perform circle interpolation by transition arc 7 and return to the starting point ;
7) Return to the initial level or point R level according to G98/G99.
107
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Note: Q, P, L is invalid when using G112/G113, but value of Q & P will be remained as canned cycle.
Example: Fine milling a rectangle groove that has been rough milled as follows by canned cycle
code G136. (D1=5).
108
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Command Path:
G138:CCW Outer Rectangle Fine Milling Cycle G139: CW Outer Rectangle Fine Milling Cycle
Command Path:
(1) Rapid positioning to a location within XY plane ;
(2) Rapid down to R level ;
(3) Cutting Feed to the bottom of hole
(4) Performs circular interpolation by the transition arc 1 from the starting point ;
(5) Performs linear & circular interpolation by the path 2-3-4-5-6 ;
(6) Performs circular interpolation by transition arc 7 and return to the starting point ;
(7) Return to the initial level(G98) or point R level (G99) .
In outer rectangle fine milling cycle, the interpolation directions of the transition arc and fine
milling arc are different. The interpolation direction in the code means the one of the fine milling.
Note: 1. Q, P, L is invalid when using G114/G115, but value of Q & P will be remained as canned cycle.
2. When use G114/G115 is used, G codes in 01 group cannot be used, otherwise G114/G115 is repalced by
other codes in group 1.
3. Tool radius compensation: in the fixed cycle command, the tool radius compensation is ignored, the
system calls the tool radius compensation specified by the program during the tool infeed.
Example: Fine milling a outer rectangle pad that has been rough milled as follows by the canned
cycle code G138. (D1=5mm)
109
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Chapter 4 M INSTRCUTIONS
110
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
111
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Eg.:Execution sequence of subprograms called from a main program.A subprogram can call
another subprogram in the same way as a main program calls a subprogram.
P7 : Set the braking time of spindle, also the hold time of output M05, Unit:10ms. The time less ,
the braking faster.
P8 : Set the braking signal is long signal 1 or short signal 0.
P9: To set system whether checking spindle feedback signal of spindle position, also the
feedback signal is spindle encoder signal. To set the parameter value 1 means check; 0 means not to
check.
P10: To set feedback pulse numbers of spindle encoder turn a round, the value: Line number of
encoder * 4.
P11: Whether turn on the spindle or not when shifting [1 means on, 0 means off]
P51: The speed of motor when spindle shifting (unit: 1/100rpm)
P52: The direction when spindle shifting (0 means positive, 1means negative)
P53: The stopping time when spindle shifting (unit: 10ms)
P54: Turning time of low speed when spindle shifting (unit:10ms)
P55: Stopping delay time of spindle (Unit:10ms)
In Speed parameter:
P8: To set the speed of spindle at manual condition. Unit: rpm.
P36: To set the max speed of spindle, also the speed of corresponding 10V.
Attention: when spindle system is with gears,this is the speed of first gear.
P37: To set the max speed of spindle(second gear), that’s the turning speed of corresponding
10V instruction voltage.Unit: rpm.
P38: To set the max speed of spindle (Third gear), that’s the turning speed of corresponding 10V
instruction voltage. Unit: rpm.
P39: To set the max speed of spindle (Fourth gear), that’s the turning speed of corresponding
10V instruction voltage. Unit: rpm.
P40: To set the highest speed of second spindle, also the speed of corresponding 10V. In
Other parameter:
P13: To set whether spindle and chuck is interlocking or not: 0 means they are separately; 1
means the spindle only start turning when chuck on. The thumbstall can’t be use when the spindle is
turning.
Setting parameter is related with the configuration of lathe and user’s service condition, but
consider for safe, suggest setting 1,also interlocking.
4.3.1.2 Spindle Gear Shifting(M41/M42/M43/M44)
Remark PIN Function Command
S01 PIN10_CN3 Plug Output 1st gear of spindle M41
S02 PIN23_CN3 Plug Output 2nd gear of spindle M42
S03 PIN11_CN3 Plug Output 3rd gear of spindle M43
S04 PIN24_CN3 Plug Output 4th gear of spindle M44
M41/M42/M43/M44 output S01/S02/S03/S04 for shifting gear of spindle , and adjust analog
voltage to adjust speed of spindle.
P36 in Speed parameter is set for max speed of 1st class spindle;
P37 in Speed parameter is set for max speed of 2nd class spindle;
P38 in Speed parameter is set for max speed of 3rd class spindle;
P39 in Speed parameter is set for max speed of 4th class spindle;
Note:Functions interlocked and states reserved
114
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
4.3.1.3 Coolant(M08/M09)
M08:Turn on coolant
M09: Turn off coolant
Remark PIN Function
M08 PIN8_CN3 Plug Turn On/Off coolant
4.3.1.4 Lubricate(M32/M33)
M32: Turn on lubrication
M33: Turn off lubrication
Remark PIN Function
M32 PIN9_CN3 Plug Turn On/Off Lubrication
In Other parameter,
P4 controls the function of lubricate automatically.
P6 is set the interval time of lubrication (Unit: s);
P5 set the time of lubrication ,also holding time of output M32(Unit: 10ms).
4.3.1.5 Chuck(M10/M11)
M10/M11 are for control clamping/unclamping of chuck.
Remark PIN Function
M10 PIN21_CN3 Plug Control Chuck clamping
M71 PIN9_CN10 Plug Control chuck unclamping(Spare)
M12 PIN11_CN10 Plug Detect position of clamping_chuck(spare)
M14 PIN24_CN10 Plug Detect position of unclamping_chuck(Loose)(spare)
M16 PIN12_CN10 Plug Input point for switch to control chuck(spare)
Chuck of this system control is related with parameter as follows:
In Other parameter:
P2: Type of chuck, (Inner: Chuck to center when M10; Outer: Chuck opening outward when
M10). 1 means outer, 0 means inner.
P13: Interlock between Chuck & Rotation_Spindle.0: No interlock, 1: yes.
M12: input point for detecting position of clamping of chuck;
M14: input point for detecting position of unclamping of chuck.
P20: Type of controlling singal for chuck,0: one output controlling signal for chuck; 1: two
output controlling signals for chuck.
M10:output point for controlling clamping of chuck , controlling code is M10;
M71:output point for controlling unclamping of chuck,controlling code is M11.
P22: External Switch(Foot switch) for chuck, reciprocating mode, price one time clamping
chuck; press twice time, unclamping chuck. 0: without switch ; 1: with external switch for control
chuck; input signal is M16.
P24: Holding time of output M10/M71 of chuck, unit: s. 0: mode type*.
In Axis parameter:
P40_D1: Detect position of clamping/unclamping of chuck,0:No detect, 1: yes.
Note: 1. When user-defined signals M71/M70 , M73/M72 are used for output signal of spindle chuck and
Tailstock, it can’t be used for other functions.
2. M12,M14,M1,M18,M28 are multi-function codes, only one function when using.
3. *mode type means that once valid,always valid until cancelling/resetting code.
115
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
4.3.1.6 Huff(M59/M58)
M59: Turn on huff M58: Turn off huff
Remark PIN Function
M59 PIN6_CN10 Plug Turn on/off huff, also blower
4.3.1.7 Condition Output of Machine Tool(M65/M67/M69)
M65/M67/M69 be used for output condition of machine tool, set by parameters
Remark PIN Function
M65 PIN20_CN3 Plug Output Alarm condition of machine tool
M67 PIN8_CN3 Plug Output Running condition of machine tool
M69 PIN21_CN3 Plug Output Pausing condition of machine tool
Parameter sets for condition output ofmachine tool. In Other parameter:
P28: M65/M69 are as outputs for run/halt condition of machine tool,0:no,1:yes.
P29: M67 is as output for alarm condition of machine tool, 0: no, 1:yes.
Note:1.When M65,M67,M69 are used for output condition of machine tool, and then they can’t be used for
other functions.
2.Valid level of all output points is 0V. When fixed with inductance load, must connected with the reverse
diode to protect inner circuit of cnc system.
4.3.2 M Input Command List
No. Code Function Introduction Statement
M12 Check M12 is valid
1
M13 Check M12 is invalid
M14 Check M14 is valid
2
M15 Check M14 is invalid
M16 Check M16 is valid
3
M17 Check M16 is invalid
M18 Check M18 is valid These codes can be used for
4
M19 Check M18 is invalid conditional wait or conditional jump.
M28 Check M28 is valid
5
M29 Check M28 is invalid
M22 Check M22 is valid
6
M23 Check M22 is invalid
M24 Check M24 is valid
7
M25 Check M24 is invalid
Note: All M input commands, input effective level is 0V.
There are two kinds of special application about M input commands,as following,
a) Conditional Wait
Example: M12
When Input point M12 is valid, program goes on run following blocks, if M12 is invalid,
system will wait if M12 is valid.
b) Conditional Jump
Example: M14 P0120
When the program running to this block and the system detecting if M14 input signal is valid.
When M14 is valid, program will jump to 120th line of program (also N0120 block), otherwise ,
system will execute the next block.
116
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
B
E
40
From the center to begin, the center coordinate is G54 X0 Y0 Z50
The tool radius in the D01 of the T01 parameter
N0 G54 G00 X0 Y0 Z50 Starting point for processing
N1 M03 S1000 Turn on spindle
N2 G00 Y-40 X-40 G90 Move outside of square
N3 Z10
N4 G01 Z-10 F200 Start cutting from Z axis
N5 G01 G41 T01 D01 X-20 Y-20 F400 Move to B point
N6 Y20 Tool cuts BC line at the left of the workpiece
N7 X20 Closed angle transition in C point, cut CD line
N8 Y-20 Closed angle transition in D point, cut DE line
N9 X-25 Closed angle transition in E point,cut CB line is for
smooth,move 5mm more
N10 G00 X-40 Y-40 G40 Move outside of circle
117
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
N11 G01 G41 X-20 Y-20 F500 Lengthen T01 value along A-B
N12 Z-20 F100 Start cutting from Z axis
N13 G91 G02 I20 J20 Y0 X0 Circle of contact
N14 G00 Z50 End cutting
N15 G40 G00 X0 Y0 Cancel tool compensation
N16 M05 Turn off spindle
N17 M02 Program is over
118
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Fig5.1.2 1st Dialog Box of Parameter Set for Linear Tool Magazine
119
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Fig5.1.3 2nd Dialog Box of Parameter Set for Linear Tool Magazine
Note:This coordinate value is position at machine coordiante system(G53).
In Other parameter: P13=1 ; set interlock between chuck and rotation of spindle
P20= 0 or 1 ; set mode of chuck loose/tighten tool
In Axis parameter: P40_D1=1 ; set for detect position of chuck loose/tighten tool
b) IO ports
Signal PIN Function
M10 PIN21_CN3 Plug Output for tighten tool
M71 PIN9_CN10 plug Output for loose tool (when P20=1 in Other parameter)
M14 PIN24_CN10 plug Detect position of tighten tool
M12 PIN11_CN10 plug Detect position of loose tool
M61 PIN19_CN10 plug Output for Spindle orientation
M22 PIN5_CN10 plug Detect end of spindle orientation
M59 PIN6_CN10 plug Output for huff/blower, to clear dust of tools
c) Steps of tool change
1) Z-axis go home(zero point of G53) 2) Spindle Orientation(it can be omitted)
3) Z-axis go to safe position(prepare to put tool) 4) XY-axis move to position of put tool
5) Z-axis down to position of put tool 6) Chuck loose tool & Huff
7) Z-axis up to safe position (prepare to take tool) 8) XY-axis move to position of take tool
9) Z-axis down to position of take tool 10) Chuck tighten tool
10) Z-axis go to safe position Tool change is finished.
Note: 1. all coordinate value are absolute position at machine coordinate system
2. #301-#400 are taken up at control program for linear tool magazine, cannot be used to the other.
3. If your linear tool magazine is different to this process,please contact with us.
120
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Fig5.2.2 1st Dialog Box of Parameter Set for Umbrella/Hat type Tool Magazine
121
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
Fig5.2.3 2nd Dialog Box of Parameter Set for Umbrella/Hat type Tool Magazine
Note:This coordinate value is position at machine coordiante system(G53).
1.Current Tool No.: It sets current tool number in spindle, if without tool in spindle, set to 0.
2.Current Tool POT: It sets current tool seater in tool magazine.
3.Total Tools: It sets total numbers, Range: don’t over 20 tools.
Suggestion: When tools are over 20, please use our SZGH-CNC1000MDcb series CNC system.
4.If Z go to change position: It sets whether Z-axis go to tool change position, 1:Yes, 0:No.
5.Z_Change Position Coor: It sets Machine Coordinate value of tool change position in Z-axis.
6.If XY got to change position: It sets whether XY-axis go to tool change position, 1:Yes, 0:No.
7.X_Change Position Coor: It sets Machine Coordinate value of tool change position in X-axis.
8.Y_Change Position Coor: It sets Machine Coordinate value of tool change position in Y-axis.
9.If A go to change position: It sets whether A-axis go to tool change position, 1:Yes, 0:No.
10.A_Change Position Coor: It sets Machine Coordinate value of tool change position in A-axis.
11.Position Speed of XYZA: It sets the speed of XYZ that move to tool change position.
12.If Z go to safe position: It sets whether Z-axis go to safe position, 1:Yes, 0:No.
13.Z-axis Safe Position: It sets value of safe height in Z-axis(increment).
14.If A_Servo tool magazine: It sets if rotation magazine is controlled by A-axis, 1:Yes, 0:No
15.Distance between each tool: It sets distance between each tool.
16.If A go to zero point: It sets if A-axis go to zero point, 1: Yes, 0: No .
17.If Z go to zero point: It sets if Z-axis go to zero point , 1: Yes, 0: No .
18. If spindle Orientation: It sets if spindle do orientation, 1: Yes, 0: No .
19.Rotating Speed of A_Axis: It sets speed of rotating for magazine.
In Other parameter: P13=1 ; set interlock between chuck and rotation of spindle
P20= 0 or 1 ; set mode of chuck loose/tighten tool
In Axis parameter: P40_D1=1 ; set for detect position of chuck loose/tighten tool
122
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
b) IO ports
Signal PIN Function
X00 PIN1_CN4 plug Detection tool magazine at UP position
X01 PIN2_CN4 plug Detection tool magazine at Down position
X02 PIN3_CN4 plug Detection of Tool seat(POT) in position for tool change
X03 PIN4_CN4 plug Detection of SP-Orientation Finished
X04 PIN5_CN4 plug Detection of position of safe height in Z-axis
X05 PIN6_CN4 plug Detection of position of forwarder of tool magazine
X06 PIN7_CN4 plug Detection of position of backward of tool magazine
X07 PIN8_CN4 plug Counting of tools
M14 PIN24_CN10 plug Detect position of tighten tool
M12 PIN11_CN10 plug Detect position of loose tool
M22 PIN5_CN10 plug Detect end of spindle orientation
+T PIN12_CN4 plug CW Rotation of Tool Magazine
-T PIN13_CN4 plug CCW Rotation of Tool Magazine
M10 PIN21_CN3 plug Output for Tighten tool
M79 PIN22_CN3 plug Output for Forward tool magazine
M71 PIN9_CN10 plug Output for Loose tool (when P20=1 in Other parameter)
M73 PIN22_CN10 plug Output for Backward tool magazine
M61 PIN19_CN10 plug Output for Spindle orientation
M59 PIN6_CN10 plug Output for huff/blower, to clear dust of tools
c) Steps of tool change
1) If P17=1, Z-axis go home(zero point of G53)
2) If P4=1, Z-axis go to tool change position, also coordinate value of P5
3) If P18=1, Spindle Orientation(it can be omitted when P18=0), output M61, detect M22
4) If P6=1, XY-axis move to tool change position, also coordinate value of P7 & P8
5) If P9=1, A-axis move to tool change position, also coordinate value of P9
6) Detect position of tool POT(X02), Magazine Forward(M73), detect position of forward(X05)
7) Spindle Chuck Loose tool(M11), detect position of loose tool(M12)
8_1) If P12=1, Z-axis lift with safe height(value of P19), detect position of safe height(X04)
8_2) If P12=0, Magazine down to safe position(M79), detect position of down magazine(X01)
9) Magazine rotate & select tool(Y18/Y19), detect counts of tools(T08)
10) Detect position of tool POT after selecting tool(X02),
11_1) If P12=1, Z-axis down with safe height(value of P19), detect position of tool change (-X04)
11_2) If P12=0, Magazine up to safe position(M59), detect position of up magazine(X00)
12) Spindle Chuck Tighten tool(M10), detect position of tighten tool(M12)
13) Magazine back to original position(M63), detect position of magazine_home(X06)
14) If P17=1, Z-axis go home(zero point of G53) & Tool change is finished.
Warning: 1. all coordinate value are absolute position at machine coordinate system
2. #301-#400 are taken up at control program for linear tool magazine, cannot be used to the other.
3. Tool length compensation will be canceled after run exchanging codes G120/G121/G122.
4. System will enter Machine Coordinate System automatically after running G120/G121/G122
123
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
124
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC1000MDb Series[Book1]
125