01programming of CNC
01programming of CNC
SZGH-CNC990TDb(series)
Lathe Control System
-PROGRAMMING-
V2.3
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.
I
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
SAFETY PRECAUTIONS
This section describes the safety precautions related to the use of CNC units. It is essential that
these precautions be observed by users to ensure the safe operation of machines equipped with a
CNC unit (all descriptions in this section assume this configuration). Note that some precautions
are related only to specific functions, and thus may not be applicable to certain CNC units.
Users must also observe the safety precautions related to the machine, as described in the
relevant manual supplied by the machine tool builder. Before attempting to operate the machine or
create a program to control the operation of the machine, the operator must become fully familiar
with the contents of this manual and relevant manual supplied by the machine tool builder.
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.
II
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.
III
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
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
IV
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
V
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
unexpectedly, possibly damaging the tool, the machine itself, the workpiece, or causing injury
to the user.
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.
VI
2. Absolute pulse coder 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 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.
VII
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
CONTENTS
SAFETY PRECAUTIONS.......................................................................................................................................II
1 Definition of Warning , Caution, and Note..........................................................................................................II
2 GENERAL WARNINGS AND CAUTIONS...................................................................................................... III
3 WARNINGS AND CAUTIONS RELATED TO PROGRAMMING..............................................................IV
4 WARNINGS AND CAUTIONS RELATED TO HANDLING..........................................................................V
5 WARNINGS RELATED TO DAILY MAINTENANCE..................................................................................VI
Chapter 1 Preface................................................................................................................................................... 1
1.1 Characteristics................................................................................................................................................2
1.2 Technical Specifications................................................................................................................................ 2
1.3 G Code List....................................................................................................................................................4
1.4 System operation condition........................................................................................................................... 5
Chapter 2 Programming........................................................................................................................................ 6
2.1 Basic Concept of Programming.....................................................................................................................7
2.1.1 Definition of Coordinate System........................................................................................................7
2.1.2 Machine Coordinate System and Machine Reference Point..............................................................8
2.1.3 Workpiece Coordinate System and Program Reference Point...........................................................8
2.1.4 Coordinate System..............................................................................................................................9
2.1.5 Interpolation......................................................................................................................................10
2.1.6 Absolute Programming & Incremental Programming..................................................................... 12
2.1.7 Diameter Programming & Radius Programming.............................................................................13
2.1.8 Cutting Speed & Spindle Speed....................................................................................................... 14
2.1.9 Tool Function....................................................................................................................................15
2.1.10 Command For Machine Operations............................................................................................... 15
2.2 Configuration of Program............................................................................................................................16
2.3 Main Program & Subprogram..................................................................................................................... 19
2.4 Program Run................................................................................................................................................ 19
Chapter 3 G INSTRCUTIONS........................................................................................................................... 20
3.1 INTRODUCTION....................................................................................................................................... 20
3.2 G Code List..................................................................................................................................................20
3.3 Positioning (Rapid Traverse) (G00)............................................................................................................ 22
3.4 Linear Interpolation (G01)...........................................................................................................................24
3.5 Circular Interpolation (G02/G03)................................................................................................................24
3.6 Thread Cutting (G32).................................................................................................................................. 28
3.6.1 Constant Lead Threading..................................................................................................................28
3.6.2 Continous Thread Cutting................................................................................................................ 29
3.6.3 Thread Cutting With Variable Lead..................................................................................................30
3.7 Circular Thread Cutting(G332/G333)......................................................................................................... 30
3.8 Canned Cycle(G90,G92,G93,G94)............................................................................................................. 30
3.8.1 Outer Diameter/Internal Diameter Cutting Cycle (G90)................................................................. 30
3.8.2 Thread Cutting Cycle (G92).............................................................................................................33
3.8.3 Canned Tapping Cycle (G93)........................................................................................................... 36
3.8.4 End Face Turning Cycle G94........................................................................................................... 38
VIII
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
IX
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
X
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb 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.
Operational principles of CNC machine tools: according to requirements of machining
technology, edit user programs and input them to CNC, then CNC outputs motion control
instructions to the servo (stepper) motor drive devices, and last the servo (or stepper) motor
completes the cutting feed of machine tool by mechanical driving device; logic control
instructions in user programs to control spindle start/stop, tool selections, coolant ON/OFF,
lubricant ON/OFF are output to electric control systems of machine tools from CNC, and then the
electric control systems control output components including buttons, switches, indicators, relays,
contactors and so on. Presently, the electric control systems are employed with Programmable
Logic Controller (PLC) with characteristics of compact,convenience and high reliance. Thereof,
the motion control systems and logic control systems are themain of CNC machine tools.
SZGH-CNC990TDb series CNC control system is economic type CNC control system for
lathe machine , which is developed by Shenzhen Guanhong Automation Co.,Ltd. And we have
already made updates basic original CNC990TDb CNC Controller.
Fig1.1 SZGH-CNC990TDb
1
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
1.1 Characteristics
1) 800*600 8.4 inch real color LCD Display
2) Support ATC function , Macro function and PLC function
3) Electric Turret & Binary code Turret & Special Turret, Max: 99 Pcs of tools
4) 128MB Memory , 100Mb user store room(Updated!)
5) 5MHz Pulse Output Frequency, Max speed is 300m/min(Updated!)
6) PLC On-line Display,Monitor & Design(Updated!)
7) High anti-jamming switch power(220VAC -> 24VDC & 5VDC)
8) Built-in plc programs, which can be edited freely.
9) With USB interface, for upgrade & copy programs
10) Display in English, which can be selected by parameter.
11) Analog voltage output of 0~10V in two channels, support double spindles
12) Adapted servo spindle can realize position,rigid tapping,threading of spindle
13) Basic I/Os : 40*24
14) Built-in screw compensation
15) English menu, program and interface, full screen edition
16) Support macro variable dialog box & Running program by input point (Updated!)
1.2 Technical Specifications
Max Number of control axes
• Number of control axes: 4 axes (X Z Y(C) A)
• Number of linkage axes: 4 axes
• Number of PLC control axes: 4 axes
Feeding axes function
• Minimum command unit: 0.001mm
• Position command range: +/- 99999.999
• Max speed: 30 m/minFeeding 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
Thread
• Acceleration and deceleration funciton
• Common thread(follow the spindle) / Rigid thread
• Single-headed/Multi thread of straight ,taper and therminal suface in metric system/inch
system,wqual and variable pitch thread
• Thread retractin length ,angle and speed characteristics can be set
• Thread pitch:0.1~1000.000mm or 0.1~99 tooth/inch
• Rapid traverse: linear type or S type
• The starting speed,finishing speed and time of acceleration and deceleration are set by parameter
Spindle function
• Analog voltage 0~10V output in two channels ,support two-spindle control
2
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
3
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
5
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
Chapter 2 Programming
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.
Software used for controlling SZGH-CNC990TDb Turning Machine CNC system is divided
into system software (NC for short) and PLC software (PLC for short). NC system is used for
controlling display, communication, edit, decoding, interpolation and acceleration/deceleration, and
PLC system for controlling explanations, executions, inputs and outputs of ladder diagrams.
Programming is a course of workpiece contours, machining technologies, technology
parameters and tool parameters being edit into part programs according to special CNC
programming instructions.CNC machining is a course of CNC controlling a machine tool to
complete machining of workpiece according requirements of part programs. Technology flow of
CNC machining is as following:
6
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
Fig2.3 Front toolpost coordinate system Fig2.4 Rear toolpost coordinate system
7
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
8
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
9
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
2.1.5 Interpolation
The tool moves along straight lines and arcs constituting the workpiece parts figure.
Interpolation is defined as a planar or three dimensional contour formed by path of 2 or
multiple axes moving at the same time, also called Contour control. The controlled moving axis is
called link axis when the interpolation is executed. The moving distance, direction and speed of it
are controlled synchronously in the course of running to form the required complex motion path.
Fixed point control is defined that the motion path in the course of running are not controlled but
end point of one axis or multiple axes moving.
Linear Interpolation: Tool movement alone a straight line
Fig2.12 Tool movement along the straight line which is parallel to Z–axis
10
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
11
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
12
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
2. Radius Programming
In radius programming, specify the distance from the center of the workpiece, i.e. the radius
value as the value of the X axis.
13
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
m/min. >
The spindle speed is approximately 478 min – 1, which is obtained from N=1000v/ π D.
Hence the following command is required:
S478 ;
Commands related to the spindle speed are called the spindle speed function.
The cutting speed v (m/min) can also be specified directly by the speed value. Even when the
workpiece diameter is changed, the CNC changes the spindle speed so that the cutting speed
remains constant.
This function is called the constant surface speed control function.
2.1.9 Tool Function
Selection of tool used for various machining.
When drilling, tapping, boring, milling or the like, is performed, it is necessary to select a
suitable tool. When a number is assigned to each tool and the number is specified in the program,
the corresponding tool is selected.
15
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
16
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
Program Name: consist of alphabet & number (Eg.: O0001). There are countless programs
stored in the system.To identify it, each program has only one program name(there is no the same
program name).
Note: It doesn’t allow exist blank on program name.
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-CNC990TDb
system.
Table 2-1 Word List
Address Data range Functions
N 00000~9999 Block number
G 00~99 Preparatory function
100~150 User-defined G macro function
M 00~99 Auxiliary function output
T 01-99 Tool function
S 0-99999(rpm) Specify Speed of 1st Spindle
SS 0-99999(rpm) Specify Speed of 2nd Spindle
0.01-15000mm/min Feedrate per minute
F 0.001-500mm/r Feedrate per rev
0.1~1000mm Thread Lead in Metric
X ±99999.999mm Coordinates in X directtion
0~9999.999(s) Dwell time
±99999.999mm Increment in X directtion
U Finish allowance in X direction in G71,G72,G73
Cutting depth in G71
Moving distance of tool retraction in X direction in G73
Z ±99999.999mm Coordinates in Z directtion
±99999.999mm Increment in Z directtion
W Finish allowance in Z direction in G71,G72,G73
Cutting depth in G72
Moving distance of tool retraction in Z direction in G73
I 00-99 teeth/inch Thread Lead in Inch
±99999.999mm Vector of arc center relative to starting point I in X direction
K ±99999.999mm Vector of arc center relative to starting point in Z direction
0.001-99999.999mm Arc radius
Moving distance of cycle tool retraction in G71,G72
Cycle times of roughing in G73
R Moving distance of tool retraction after Cutting in G74, G75
Moving distance of tool retraction after cutting to the end point in G74, G75
Finishing allowance in G76
Taper in G90, G92, G94, G96
0.001-65s Dwell time
0000-99999 Calling subprogram number
P Circular moving distance in X direction in G74, G75
17
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
18
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
19
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
Chapter 3 G INSTRCUTIONS
3.1 INTRODUCTION
G instruction consists of instruction address G and its following 1~2 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~99,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-CNC990TDb Series[Book1]
22
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
The tool is positioned with the rapid traverse rate for each axis separately. The tool path is
normally straight.
Linear interpolation positioning
The tool path is the same as in linear interpolation (G01). The tool is positioned within the
shortest possible time at a speed that is not more than the rapid traverse rate for each axis. However,
the tool path is not the same as in linear interpolation (G01).
Example:
<Diameter Programming>
G00 X40.0 Z56.0 ; (Absolute command)
G00 U-60.0 W-30.5 ; (Incremental command)
G00 U-60.0 Z56.0 ; (Compound programming)
G00 X40.0 W-30.5 ; (Compound programming)
23
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
24
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb 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 without sign (always with radius value)
F Feedrate along the arc
Note: G18 is default set , which can be omitted.
Direction of circular interpolation: When turret in different position of lathe machine, Front
toolpost system & Rear toolpost system , the direction of G02&G03 is opposite in these two
system.
25
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
<Diameter Programming>
G02 X50.0 Z30.0 I25.0 F0.3
G02 U20.0 W-20.0 I25.0 F0.3
G02 X50.0 Z30.0 R25.0 F0.3
G02 U20.0 W-20.0 R25.0 F0.3
26
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
<Program>
N20 G50 S2000 T0300
G96 S200 M03
G42 G00 X35.0 Z5.0 T0303 M08
G01 Z-20.0 F0.2
G02 X67.0 Z-36.0 R16.0
G01 X68.0
G03 X100.0 Z-52.0 R16.0
G01 Z-82.0
G40 G00 X200.0 Z200.0 M09 T03.00
M30
Fig3.5.5 Example 3
SZGH-CNC990TD CNC system support many kinds of thread cutting, which includes straight
thread,tapered thread,scroll thread,thread cutting with variable lead, Continous thread cutting,
multiple-thread cutting, metric/inch single.Length and angle of thread run-out can be
changed,multiple-thread is machined by single side to protect tool and improve smooth finish of its
surface.
When machine tool needs to do thread cutting, spindle must fix encoder.When transmission of
spindle and encoder is not 1:1, we need to set transmission ratio by set P412&P413 in Axis
parameter.
P10 in Axia parameter is set for pulses of per rev of spindle(Resolution*Poles).
P412 in Axis parameter is set for teeth of spindle motor.
P413 in Axis parameter is set for teeth of spindle encoder.
X or Z axis traverses to start machine after the system receives spindle signal per rev in thread
cutting, and so one thread is machined by multiple roughing, finishing without changing spindle
speed.
There is a big error in the thread pitch because there are the acceleration and the deceleration at
the starting and ending of thread cutting in X, Z direction, and so there is length of thread lead-in
and distance of tool retraction at the actual starting and ending of thread cutting.
The traverse speed of tool in X, Z direction is defined by spindle speed instead of cutting
feedrate override in thread cutting when the pitch is defined. The spindle override control is valid
in thread cutting. When the spindle speed is changed, there is error in pitch caused by
acceleration/deceleration in X, Z direction, and so the spindle speed cannot be changed.
Note:
1. When teeth of spindle motor is more than teeth of spindle encoder , it must match with keysets of our
company ;
2. In the process of thread cutting, Feeding speed and override is invalid.
3. In the process of thread cutting, spindle will not stop whatever you operate, if the user operate
suspend,the system will suspend after processd this segment.
4. The spindle speed must remain constant from rough cutting through finish cutting. If not, incorrect
thread lead will occur.
27
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
28
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
cut:1mm(cut twice)
G00 U-62.0 ;
G32 W-74.5 F4.0 ;
G00 U62.0 ;
W74.5 ;
U-64.0 ;
(For the second cut,cut 1mm)
G32 W-74.5 ;
G00 U64.0 ;
Fig3.6.6 Example of Straight Thread Cutting
W74.5 ;
Example2: Tapered Thread Cutting
Requirement: (Metric input, Diameter programming)
29
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
Since the system is controlled in such a manner that the synchronism with the spindle does not
deviate in the joint between blocks wherever possible, it is possible to performed special thread
cutting operation in which the lead and shape change midway.
G32 G32
G32
U: different value of absolute coordinates between end point and starting point of cutting in X
direction
Z: different value of absolute coordinates between end point and starting point of cutting in Z
direction
W: different value of absolute coordinates between end point and starting point of cutting in Z
direction
31
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
32
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
33
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
Program:
N10 M03 S1000;
N20 T0101;
N30 G00 X45 Z5;
N40 G92 X29.2 Z-45 F1.5;
N50 X28.6;
N60 X28.2;
N70 X28.04;
N80 G00 X100 Z50;
N90 T0100 M05;
N100 M30;
Fig3.8.6 Example of Straight Thread Cutting
(2)Taper Thread Cutting : G92 X(U)_ Z(W)_ R_ F/I_ ;
R: different value(R value) of absolute coordinate from end point to starting point of cutting
in X direction. unit:mm.
Program:
N10 M03 S1000;
Fig3.8.7 Taper Thread Cutting N20 T0101;
Exmaple: Process of taper screw of inner hole, N30 G00 X55 Z10;
pitch is 11 tooth/inch,(coning is 1:32) N40 G01 X60 Z5 F100;
N50 G90 X66.25 Z-60 R1.875;
N60 G92 X66.88 Z-50 R1.4 I11;
N70 X66.9 I11;
N80 X67 I11;
N90 X67.4 I11;
N100 X67.6 I11;
N110 X67.8 I11;
N120 G00 X100 Z50;
N130 T0100 M05;
Fig3.8.8 Example of Taper Thread Cutting N140 M30;
34
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
Note:
1.When processing inch thread, pitch I is non-mode,just be effective in one sentence, so every segments
should plus I in thread cycle.
2.Speed of processing thread ,which should be less than 3000mm/min, is Pitch (F) multi Speed of
spindle (S).
3.The retract speed of X axis ,which should be less than 5000mm/min, is F*S*P24 (Speed
parameter)*0.1 . Eg.:When processing F2, S1200,this value of P24 parameter should be less than 20.
(3) Deceleration or acceleration control in thread cutting cycle:
At the end of thread, because of the index of deceleration control,cause the distance of pitch is
inhomogeneous,the higher speed of spindle the longer of inhomogeneous pitch. To reduce the
error,should reduce the index of deceleration or acceleration time, but it will cause the motor stuck
if match the step motor. In order to solve this problem:
● could choose Z axis according to linear acceleration or deceleration speed constant;
● could choose the X axis with the rapid speed G00 to back tail.
The relevant parameter is as follows (see the chapter of parameter):
In Speed parameter
P22: the acceleration or deceleration constant of Z axis in thread processing
P23: the acceleration or deceleration constant of Y axis in thread processing
P24: The backing tail speed rate of servo motor in thread cycle
P25: The starting speed of servo motor in thread cycle
P26: The maximum backing tail speed of servo motor in thread cycle
(4) Multi Thread Cutting : G92 X_ Z_ F_ L_ [or SP];
L_: Multi threads: 1~100 and it is modal parameter. ( the system defaults it is single thread
when L is omitted); repeat times of G92 is L.
SP_: Initial angle(offset angle)between spindle rotation one rev and starting point of thread
cutting: 0~360000(unit: 0.001 degree). SP is non-modal parameter, must be defined every time,
otherwise it is 0°.
Note: Cannot use SP to specify when processing multi threads.
Such as: L03, 3 threads, continuous executing 3 times G92. First time,processing at once when
spindle rotate one rev; Second time,after offset of 120 degrees ,begin cutting thread; Third time,
after 240º offset, begin cutting thread,
Example:
G92 X50.Z-100 F5 L5 ; at X50, process 5 threads.
X48.5 ; at X48.5, processing 5 threads.
X45 ; at X45, processing 5 threads.
G00 X100 Z100 ;
......
(5) Back Tail of Thread : G92 X_ Z_ F/I_ P_;
P: volume of backing tail: the default value of P could be set by P20 in User parameter (Default
when powering on).
Set unit: P1 means 0.1 pitch ; P10 means 1 pitch .
Scope: 1--225, when the set value beyond to the range is invalid.
(6) Back tail at any angle
When cutting thread without backing fuller, the system must have the function of automatical
35
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
backing tail in thread processing to produce a qualified section of thread. Including the program
format of backing tail in thread:
G92 X_ Z_ F_ J_ K_P_;
● J, K set the ratio of back tail X, Z. When J2 K1, X is twice faster than Z.
● P: back tail volume. Setting: 0.1 pitch. Set range: 1~255 (beyond to this range is invalid). The
default value can be set by No.20 parameter in process parameter (Default when powering on).
● J, K, P are mode value.
● When executing J0 or K0 in G92, cancel any angle specify, fixed 45 degrees.The default value is
45 degrees when powering on.
● When J K are set to be negative number, or beyond to 65535,it's invalid setting. The range:
1~65535.
(7) Path of G92 Instruction
Relative position between thread cutting end point and starting point with U, W, R and tool path
and thread run-out direction with different U, W, R signs.
1) U>0 , W>0 , R>0 2) U<0 , W<0 , R<0
3) U>0 , W>0 , R<0 & |R| ≤ |U/2| 4) U<0 , W>0 , R>0 & |R| ≤ |U/2|
36
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
37
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
Example:
G93 G19 X-100 F2 ; Canned Tapping Cycle in X direction
G93 G17 Z-100 F2 ; Canned Tapping Cycle in Z direction
G18 G0 X30 ; Cancel Canned Tapping Cycle
Note:
1. If execute G93 after Z moving in positive direction,due to opposite direction, system will make reverse
backlahs compensation firstly. We should set P13, reverse backlash parameter in Axis parameter . If
configured with stepper motor & stuck , we could set the smaller speed value of reverse backlash
compensation , also P41-1 & P41-2. Or input the instruction that let Z axis moves with negative direction
before executing G93.
2. The parameters of spindle breaking time will affect the start rotating time after stop. Please pay attention
to setting these parameters
3. Z-axis must move in negative direction when tapping.
4. Must start spindle rotating before executing G93.
5. The breaking time of spindle should be short.
6. The rotating speed of spindle should be not too high.
7. For specifying inch thread when specifying I is the same as G32 & G92.
8. When choosing the acceleration and deceleration control mode, if the spindle speed change, there is some
delay when making the thread change. So choose the non-speed up or down if require the accuracy.
However, configured with stepper motor, the speed of spindle cannot be too high, otherwise it will cause
the stuck.
38
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
direction of paths 1 and 2. That is, if the direction of the path is in the negative direction of the Z
axis, the value of W is negative.
In single block mode, operations 1, 2, 3, and 4 are performed by pressing the cycle start button
once.
Example: Program:
N10 M03 S1000;
N20 T0101;
N30 G00 X85 Z10 M08;
N40 G01 Z5 F200;
N50 G94 X30 Z-5 F100;
N60 Z-10;
N70 Z-15;
N80 G00 X100 Z60 M09;
N90 T0100 M05;
Fig3.8.11 Usage of G94 N100 M30;
b)Taper Face Cutting Cycle : G94 X(U)_ Z(W)_ R_ F_;
R_: different value(R value) of absolute coordinates from end point to starting point of cutting
in X direction. When the sign of R is not the same that of U, R.
3. U<0 , W<0 , R>0 at |R| ≤ |W| 4. U>0 , W<0 , R<0 at |R| ≤ |W|
39
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
d) Process of Cycle
1) The tool rapidly traverses from starting point to cutting starting point in Z direction;
2) Cutting feed (linear interpolation) from the cutting starting point to cutting end point;
3) Retract the tool at the cutting feedrate in Z direction (opposite direction to the
above-mentioned 1), and return to the position which the absolute coordinates and the starting
point are the same;
4) The tool rapidly traverses to return to the starting point and the cycle is completed.
e) Example of Taper Face Cutting Cycle
Program
……
N40 G01 X55 Z2 F200;
N50 G94 X20 Z0 R-5 F100;
N60 Z-5;
N70 Z-10;
N80 G00 X Z;
……
(R in N50 program:
R-5=-15-(-10)=-5mm)
41
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
42
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
43
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
rapid traverse speed with G0, is for tool infeed at feedrate F with G71, and its direction of tool
infeed is that of A→ C point;
3 Cutting feeds to the roughing path in Z direction, and its direction is the same that of
coordinates in Z direction C→B point;
4 The travel of tool retraction is e (45°straight line)at feedrate in X, Z direction, the
directions of tool retraction is opposite to that of too infeed;
5 Rapid retract at rapid traverse speed in Z direction to the position which is the same that
of the coordinates in Z direction of A’-C’ point;
6 After executing the tool infeed (Δd+e)again in X direction, the end point of traversing
tool is still on the middle point of straight line between A’ and C’(the tool does not reach or exceed
C’), and after executing the tool infeed (Δd+e)again, execute ③;after executing the tool infeed
(Δd+e)again, the end point of tool traversing reaches C’point or exceeds the straight line between
A’ →C’point and execute the tool infeed to C’point in X direction and the execute the next step;
7 Cutting feed from C’to B’ point along the roughing path;
8 Rapid traverse to B’ from A point and the program jumps to the next clock following nf
block after G71 cycle is ended.
Note:
1. G71 in the use of rough machining cycle,The cycle machining is performed by G71 command with P
and Q specification. F, S, and T functions which are specified in the move command between points A and B
are ineffective and those specified in G71 block or the previous block are effective. But F S T in program of
ns→nf is effectively to fine machining , invalid in rough machining cycle.
2. The tool path between A’ and B must be steadily increasing or decreasing pattern in both X and Z axis.
When the tool path between A and A’ is programmed by G00/G01, cutting along AA’ is performed in G00/G01
mode respectively.
3. When the constant surface speed control funtion is enabled, G96 or G97 command specified in the
move command between points A and B are ineffective, and that specified in G71 block or the previous block
is effective.
4. The tool path between A and A’ is specified in the block with sequence number “ns” including G00 or
G01, and in this block, a move command in the Z axis cannot be specified.
5. The subprogram cannot be called from the block between sequence number “ns” and “nf”.
6. The following four cutting patterns are considered in G71 instruction. All of these cutting cycles are
made paralleled to Z axis and the sign of Δu and Δw are as follows:
44
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
45
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
5 Rapidly retract at rapid traverse speed in X direction to the position which is the same
that of the coordinates in Z direction ;
6 After executing the tool infeed (Δd+e)again in Z direction, the end point of traversing
tool is still on the middle point of straight line between A’ and C’(the tool does not reach or exceed
C’), and after executing the tool infeed ( Δd+e)again, execute ③; after executing the tool infeed
(Δd+e)again, the end point of tool traversing reaches C’ point or exceeds the straight line between
A’→C’ point and
execute the tool infeed to C’ point in Z direction and the execute the next step;
7 Cutting feed from C’to B’ point along the roughing path;
8 Rapidly traverse from B’ to A point and the program jumps to the next clock following nf
block after G71 cycle is completed.
Use G72 to cut the shape, there are four situation. No matter what kind of is the tool parallel
the X axis to cut again. △ u, △ w symbols are as follow
46
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
47
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
48
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
N150 M30;
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
(b)
50
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
51
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
③ Cutting feed(Δk+e) again in Z direction, the end point of cutting feed is still in it between
startingpoint An of axial cutting cycle and end point of axial tool infeed, cutting feed (Δk+e)again
in Z direction and execute ②; after cutting feed (Δk+e)again in Z direction, the end point of cutting
feed is on Bn or is not on it between An and Bn cutting feed to Bn in Z direction and then execute
④;
④ Radial(X axis) rapid tool retraction △d(radius value)to Cn , when the coordinates of Bf
(cutting end point) is less than that of A (starting point) in X direction, retract tool in X positive,
otherwise, retract tool in X negative direction;
⑤ Axial(Z axial) rapid retract tool to Dn, No. n axial cutting cycle is completed. If the current
axial cutting cycle is not the last one, execute ⑥ ; if it is the previous one before the last axial
cutting cycle, execute ⑦;
⑥ Radial(X axial)rapid tool infeed, and it direction is opposite to ④ retract tool. If the end point
of tool infeed is still on it between A and Af (starting point of last axial cutting cycle) after tool
infeed(△d+△i) (radius value) in X direction, i.e. n→An+1 and then execute ① (start the next
axial cutting cycle); if the end point of tool infeed is not on it between Dn and Af after tool infeed
(△d+△i) (radius value) in X direction, rapidly traverse to Af and execute ① to start the first axial
cutting cycle;
⑦ Rapidly traverse to return to A in X direction, and G74 is completed.
Example:
N10 G00 X0 Z10;
N20 G74 R2;
N30 G74 Z-80 Q10000
F800;
N40 G00 X50 Z50;
N50 M30;
Fig3.9.12 Example of G74
X : X component of point B
U : Incremental amount from A to B
Z : Z component of point C
W : Increment amount from A to C
52
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
53
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
When the cutting depth of one cycle operation (Δd* n – Δd* n 1 ) becomes smaller than
54
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
this limit, the cutting depth is clamped at this value. This designation is modal and is not changed
until the other value is designated. Also this value can be specified by P14 in User Parameter, and
the parameter is changed by the program command. Unit: um.
R(d): Finishing allowance.
This designation is modal and is not changed until the other value is designated. Also this value
can be specified by P15 in User parameter, and the parameter is changed by the program command.
X: Absolute coordinates (unit: mm) of thread end point in X direction;
U: Different value (unit: mm) of absolute coordinates between thread end point and starting point
in X direction;
Z: Absolute coordinates (unit: mm) of thread end point in Z direction;
W: Different value (unit: mm) of absolute coordinates between thread end point and starting point
in Z direction;
R(i): Difference of thread radius.
If i = 0, ordinary straight thread cutting can be made.
P(k): Height of thread. This value is specified by the radius value.
F: metric thread pitch. (same as G32).0.1~500.000mm.
I: Thread teeth per inch for inch thread. 0.1~99 teeth.
L: multiple thread head numbers.
SP: starting angle: 0-360°, unit is 0.001 degree. No specify means 0 degree.
Δd: Depth of cut in 1st cut (radius value) .Or infeed times.
First cut amount (with G32 threading) in microns; or feed times.
P24 in User parameter is set for meaning of Q (Δd) of G76. [P24 = 8 ,times of roughing infeed ].
When P24 = 8, Q (Δd) means times that needed to complete the roughing cycle, the default is 1;
otherwise Q (Δd) means that depth of cut in 1st cut. Q (Δd) , times of infeed, also there are modes
of equidistant infeed and decremently infeed.
The infeed amount and infeed times of roughing in all case are as follows:
Execution process:
① The tool rapidly traverses to B(1st),and the thread cutting depth is △d. The tool only
traverses in X direction when a=0; the tool traverses in X and Z direction and its direction is the
same that of A→D when a≠0;
② The tool cuts threads paralleling with C→D to the intersection of D→E (r≠0: thread
run-out);
③ The tool rapidly traverses to E point in X direction;
④ The tool rapidly traverses to A point in Z direction and the single roughing cycle is
completed;
⑤ The tool rapidly traverses again to tool infeed to B(nth) ( is the roughing times), the cutting
depth is the bigger value of ( n △d),( n 1 △d+△dmin) and execute ② if the cutting depth
is less than(k-d); if the cutting depth is more than or equal to(k-d), the tool infeeds(k-d)to
B((n+1)th) ,and then,execute ⑥ to complete the last thread roughing;
⑥ The tool cuts threads paralleling with C→D to the intersection of D→E (r≠0: thread
run-out);
⑦ The tool rapidly traverses to E point in X direction;
⑧ The tool rapidly traverses to A point in Z direction and the thread roughing cycle is
completed to execute the finishing;
⑨ After the tool rapidly traverses to B(the cutting depth is k and the cutting travel is d), execute
the thread finishing, at last the tool returns to A point and so the thread finishing cycle is
completed;
⑩ If the finishing cycle times is less than m, execute ⑨ to perform the finishing cycle, the
thread cutting depth is k and the cutting travel is 0; if the finishing cycle times is equal to m, G76
compound thread machining cycle is completed.
Thread Cutting Cycle Retract:
When feed hold is applied during threading in the multiple thread cutting cycle (G76), the tool
quickly retracts in the same way as in chamfering performed at the end of the thread cutting cycle.
The tool goes back to the start point of the cycle. When cycle start is triggered, the multiple thread
cutting cycle resumes.
Note: 1. The meanings of data specified by address P, Q, and R determined by the presence of X(U) and X (W).
2. The cycle machining is performed by G76 command with X (U) and Z (W) specification. By using this
cycle , one edge cutting is performed and the load on the tool tip is reduced.Making the cutting depth d for the
first path, and dn for the nth path, cutting amount per one cycle is held constant.Four symmetrical patterns
are considered corresponding to the sign of each address. The internal thread cutting is available. In the above
figure, the feed rate between C and D is specified by address F, and in the other path, at rapid traverse. The
sign of incrementaldimensions for the above figure is as follows:
U, W : minus (determined by the direction of the tool path AC and CD.)
R(i) : minus (determined by the direction of the tool path AC.)
P(k) : plus (always)
Q(△d) : plus (always)
3. Notes on thread cutting are the same as those on G32 thread cutting and G92 thread cutting cycle.
4. The designation of chamfering is also effective for G92 thread cutting cycle.
5. The tool returns to the cycle start point (cutting depth dn) as soon as the feed hold status isentered
56
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
6. If start point of thread cutting cycle is close to a workpiece, tool may interfere with the workpiece
during retract cycle because of passing along the retract cycle route described at Note 5. Therefore start point
of thread cutting cycle must be at least k(height of thread) away from the top of thread.
7. pay attention to cut thread, use G32 to cut is the same as using G92.
8. specify the chamfering amount of thread, it's also effective to the G92 thread cutting circle.
9. when matching step motor, because of the acceleration or deceleration the thread in tail will be
inhomogeneous. So should choose the linear acceleration or deceleration to control X axis with G00 to back
tail fast.
Example: Multiple Repetitive Cycle G76
57
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
58
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
59
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
N0005 W-11 U6
N0006 W-30
N0007 W-10 U5
N0008 G0 U10
N0009 W51
N0010 G800 ;loop end
N0011 G26
N0012 M30
60
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
61
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
4. When use G28 instruction to return to reference position, if just specify intermediate position of some
axes, which can return to reference position, the others axes that don’t be specified cannot return to reference
position.
5. Before run these codes, reference position must be set well.
6. After return to reference positoin, system will cancel tool compensation automatically.
62
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
one–shot G code. Any commands based on the selected machine coordinate system are thus
effective only in the block containing G53. The G53 command must be specified using absolute
values. If incremental values are specified, the G53 command is ignored. When the tool is to be
moved to a machine–specific position such as a tool change position, program the movement in a
machine coordinate system based on G53.
Note: 1. When the G53 command is specified, cancel the tool nose radius compensation and tool offset.
2. Since the machine coordinate system must be set before the G53 command is specified, at least one
manual reference position return or automatic reference position return by the G28 command must be
performed after the power is turned on. This is not necessary when an absolute–position detector is attached.
When manual reference position return is performed after power–on, a machine coordinate
system is set so that the reference position is at the coordinate values of (α, β) set by P32 & P33 in
Axis parameter .
63
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
64
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
65
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
Examples:
66
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
67
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
68
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
the G96 mode are assumed as S = 0 (the surface speed is 0) until M03 (rotating the spindle in the
positive direction) or M04 (rotating the spindle in the negative direction) appears in the program.
Spindle Speed(min-1)
The spindle speed (min-1) almost
coincides with the surface speed
(m/min) at approx. 160 mm (radius).
Fig3.17.1 Relation between workpiece radius, spindle speed and surface speed
To execute the constant surface speed control, it is necessary to set a workpiece coordinate
system , Z axis, (axis to which the constant surface speed control applies) becomes zero.
Fig3.17.2 Example of the workpiece coordinate system for constant surface speed control
The constant surface speed control is also effective during threading. Accordingly, it is
recommended that the constant surface speed control be invalidated with G97 command before
starting the scroll threading and taper threading, because the response problem in the servo system
may not be considered when the spindle speed changes.
In a rapid traverse block specified by G00, the constant surface speed control is not made by
calculating the surface speed to a transient change of the tool position, but is made by calculating
the surface speed based on the position at the end point of the rapid traverse block, on the condition
that cutting is not executed at rapid traverse.
Example1:
N8 G00 X1000.0Z1400.0 ;
N9 T33;
N11 X400.0Z1050.0;
N12 G50S3000 ; (Designation
of max. spindle speed)
N13 G96S200 ; (Surface speed
200m/min)
N14 G01 Z 700.0F1000 ;
N15 X600.0Z 400.0;
N16 Z … ;
69
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
The CNC calculates the spindle speed which is proportional to the specified surface speed at
the position of the programmed coordinate value on the X axis. This is not the value calculated
according to the X axis coordinate after offset when offset is valid. At the end point N15 in the
example above, the speed at 600 dia. (Which is not the turret center but the tool nose) is 200 m/min.
If X axis coordinate value is negative, the CNC uses the absolute value.
Press "absolute coordinate" to change the spindle speed in the status of constant linear speed G96.
Note: 1. use constant linear speed, the spindle must be able to change speed automatically. (such as: Servo
Spindle,Inverter Spindle).Max SP-speed is set by parameter.
2. Min SP-speed in condition of G96 can be set by P35 in Speed parameter.
3. Spindle override don't work when processing with constant surface speed.
N1 T0102 X40 Z5
Example2:
N2 M03 S400
N3 G96 S80
N4 G00 X0
N5 G01 Z0 F60
N6 G03 U24 W-24 R15
N7 G02 X26 Z-31 R5
N8 G01 Z-40
N9 X40 Z5
N10 G97 S300
N11 M30
Fig3.17.4 Example2
After specifying G98 (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. G98 is a modal code. Once a G98 is specified,
it is valid until G99 (feed per revolution) is specified. At power–on, the feed per revolution mode
is set.
71
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
1. Z specify zero as the origin of the polar coordinate system from the point of measuring the
radius of the workpiece coordinate system.
2. IP_: Plane selection & home of polar coordinate system
Z_ : Radius of polar coordinate system
X_ : Angle of polar coordinate system
3. Z set to zero as the origin of the polar coordinate system workpiece coordinate system:
By absolute programming instructions a specified radius (distance between the zero point and
programming). Zero set workpiece coordinate system for the origin of the polar coordinate system
G16 starts the polar coordinate interpolation mode and selects a polar coordinate interpolation
plane(Fig3.19.1).Polar coordinate interpolation is performed on this plane.
72
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
G code System A B or C
Command method Address word G990,G991
G code system A
Absolute command Increment command
X axis move command X U
Z axis move command Z W
C axis move command C V
G code system B or C
Absolute command G990 IP_ ;
Incremental command G991 IP_ ;
Example: Tool movement from point P to point Q (diameter programming is used for the
X-axis)
When the power is turned on, the G code is the same as that held before the power was turned off.
Note:
1. G20 and G21 must not be switched during a program.
2. Movement from the intermediate point is the same as that for manual reference position return. The
direction in which the tool moves from the intermediate point is the same as the reference position return
direction.
3. When the least input increment and the least command increment systems are different, the maximum
error is half of the least command increment. This error is not accumulated.
4. The inch and metric input can also be switched using setting of data setting.
74
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
Fig3.24.3 Tool movement when the workpiece position does not change
75
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
The workpiece position against the toll changes at the corner of the programmed path as shown
in the following figure.
Fig3.24.5 Start-Up
The block in which the mode changes to G40 from G41 or G42 is called the offset cancel
block.
G41 _ ;
G40 _ ; (Offset cancel block)
The tool nose center moves to a position vertical to the programmed path in the block before
the cancel block. The tool is positioned at the end position in the offset cancel block (G40) as
shown below.
76
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
When is specified again in G41/G42 mode , the tool nose center is positioned vertical to the
programmed path of the preceding block at the end position of the preceding block.
Fig3.24.8 Tool movement when the moving direction of the tool in a block
The workpiece position specified by addresses I and K is the same as that in the preceding
block. If I and/or K is specified with G40 in the cancel mode, the I and/or K is ignored.
G40 X_ Z_ I_ K_; Tool nose radius compensation
G40 G02 X_ Z_ I_ K_; Circular interpolation
G40 G01 X_ Z_ ;
G40 G01 X_ Z_ I_ K_ ; Offset cancel mode (I and k are ineffective.)
The numeral s followed I and K should always be specified as radius values.
Example
(G40 mode)
1.G42 G00 X60.0 ;
2.G01 X120.0 W–150.0 F10 ;
3.G40 G00 X300.0 W150.0
I40.0 K–30.0 ;
77
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
Tool nose radius compensation with G90 (outer diameter/internal diameter cutting cycle) or
G94 (end face turning cycle) is as follows, :
1. Motion for imaginary tool nose numbers
For each path in the cycle, the tool nose center path is generally parallel to the programmed
path.
79
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
(b) Tool movement around the outside of a corner at obtuse angle (90≤α<180)
Linear Linear (B type) Linear Circular (B type)
d)Tool movement around the outside linear→linear at an acute angle less than 1 degree ( α
<1º)
(b)Tool movement around the inside (α<1º) with an abnormally long vector, linear →
linear
81
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
82
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
(d) Tool movement around the outside linear→linear at an acute angle less
than 1 degree(α<1º)
P41 in Speed is set for A type , B type and other type for Tool Nose Radius Compensation of
Offset C.
83
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
Automatical Smoothing
G01(G00) X(U)_ R_ ;
G01(G00) Z(W)_ Automatical Smoothing
G01(G00) Z(W)_ R_;
G01(G00) X(U)_ Automatical Smoothing
Note:
1.The address of I and R are specified with radius model. The running distance of this line and the next
line must be greater than the length of beveling or radius of smoothing, otherwise the system will decrease the
length of beveling or radius of smoothing to minimal running distance of this line and the next line
automatically.
2. The two adjacent lines must be 90 degrees.
For example:
0 G54 G0 X-50 Y-50 Z20
N1 M03 S500
N2 G01 G42 D01 X0 Y0 F200
N3 G01 Z-5
N4 X100 I4 ;Beveling4x4
N5 Y40 R6 ;SmoothingR6
N6 X47 R5 ;SmoothingR5
N7 Y70 I3 ;Beveling3x3
N8 X15
N9 X0 Y40
N10 Y0
N11 G0 X-50 Y-50 G40
N12 Z50
N13 M30
84
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb 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
85
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
86
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
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.29.3 Macro Program Instruction
3.29.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.29.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.29.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.29.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.29.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
execute next segments , “G00 X0”,and then execute “G00 Z0”.
87
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb 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.29.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
WHILE (#100 LT 3)DO 1
88
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
G00 X100
WHILE (#150 EQ 5)DO 2
G00 Y100
WHILE (#200 GE 20)DO 3
G00 Z100
#200=#200-2
END 3
#150=#150-1
END 2
#100=#100-1
END 1
3.29.4 Operators’ meaning
Operator Sign Ex. Operator Sign Ex. Operator Sign Ex.
EQ = equal GT > greater LT < Less
NE ≠ unequal GE ≥ G&E LE ≤ L&E
3.29.5 Arithmetic & Logic Operation
Table:
Function Format Attention
Definition #i = #j
Addition #i = #j + #k ;
Subtraction #i = #j - #k ;
Multiplication #i = #j * #k ;
Division #i = #j / #k ;
Sin #i = SIN(#j) ;
Asin #i = ASIN(#j);
Cos #i = COS(#j) ; 90.5 degrees means 90
Acos #i = ACOS(#j); degrees & 30 points
Tan #i = TAN(#j);
Atan #i = ATAN(#j);
Square root #i = SQRT(#j);
Absolute value #i = ABS(#j) ;
Rounding off #i= ROUND(#j);
Round down #i = FIX(#j);
Round up #i = FUP(#j);
Natural logarithm #i = LN(#j);
Exponential function #i = EXP(#j);
Or #i = #j OR #k ;
Executing with binary
Exclusive or #i = #j XOR #k ;
system
And #i = #j AND #k ;
3.29.6 Local Variable
#0--#20 : local variables only can be used to store data in macro program, such as a result of
operation, when power is off, the local variables are initialized to the empty. The argument
assignment to the local variable when calling the macro program.
3.29.7 Global Variable
#21--#600 : Their meanings are the same in different macro program.
When power is off, the variable #21--#100 is initialized to zero, the variable #101--#600 data is
saved not to loss even if the power is off.
89
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
90
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
91
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
Note: 1.When the power is turned on or the system is reset, polar coordinate interpolation is canceled (G13.1).
G12.1 & G13.1 are mode codes.
2.G codes which can be specified in the polar coordinate interpolation mode
G01: linear interpolation
G02,G03 : Circular interpolation
G04: Dwell
92
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
93
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
Example: Polar Coordinate Interpolation Program Based on X Axis (Linear Axis) and C Axis
(Rotary Axis)
N10 T0202
...
N100 G00 X150 C0 Z0 ; Positioning to start position
N200 G12.1 ; Start of polar coordiante interpolation
N201 G42 G01 X40.0 F20 ;
N202 C10 ;
N203 G03 X-20.0 C20.0 R10.0;
N204 G01 X-40.0;
Geometry program
N205 C-10.0;
(Program based on cartesian
N206 G03 X-40 C-20 R20 ;
coordiantes on X-C’ plane)
N207 G01 X40 ;
N208 G03 X80 C-20 R20 ;
N209 G01 C0 ;
N210 X150.0 ;
N300 G13.1; Cancellation of polar coordinate interpolation
N400 Z100.0 C0 ;
...
N500 M30 ;
94
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
Chapter 4 M INSTRCUTIONS
according to the main program. However, when a command calling a subprogram is encountered in
the main program, control is passed to the subprogram. When a command specifying a return to the
main program is encountered in a subprogram, control is returned to the main program.
96
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb 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.
97
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
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. Unit:
r/min
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
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
99
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
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.
P15: Detect position of clamping/unclamping of chuck,0:No detect, 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*.
4.3.1.6 Tailstock(M79/M78)
M79: Tailstock forward
M78: Tailstock backward
Remark PIN Function
M79 PIN22_CN3 Plug Tailstock Forward/Backward
M73 PIN22_CN10 Plug Control chuck unclamping(Spare)
M18 PIN11_CN10 Plug Detect position of forward_Tailstock(spare)
M28 PIN24_CN10 Plug Detect position of backward_Tailstock(spare)
M14 PIN24_CN10 Plug Input point for switch to control Tailstock(spare)
Parameters set for tailstock,in Other parameter:
P16: Detect Position of Forward/Backward of Tailstock; 0: no detect,1:Yes;
M18: input point for detecting position of forward of tailstock;
100
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
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.
4.4 Analog Speed of Spindle(S , SS)
SZGH CNC system support dual analog outputs for SP_speed.
Speed of 1st spindle is set by “S**”; Speed of 2nd spindle is set by “SS**”.
P36 in Speed parameter is set for max speed of 1st spindle; P40 in Speed parameter is set for
max speed of 2nd spindle.
Note: D11_P9=1 in Other parameter is set for output 1st analog voltage to dual analog output(+10V of
CN3&CN10) at same time, without function of “SS**”.
There are two gears control ways for 1st spindle as following,
(1) Four gears spindle speed electrical control, output four bits code of step speed change,
M41-M44 control instructions correspondly output S01-S04 code, with fixed speed.
P50/P51/P52/P53/P54 in Axis parameter are set for mode of shifting.
(2) Four gears+Variable speed, M41-M44 instruction control, correspond the output S01-S04
code. P42/P43/P44/P45 in Speed parameter are set for maximum speed of corresponding gear,
P50/P51/P52/P53/P54 in Axis parameter are set for mode of shifting.
Variable speed,range is 0-99999, output 0-10V variable-frequency voltage.
Note: Output 10V is corresponding to max speed of spindle.
102
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
103
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series [Book1]
#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
Program as follows:
N10 M03 S1000; Start spindle
N20 T0101; Choose the first tool and execute the first redeem
N30 G00 X41.8 Z2 M08; Move fast to the cutting point,cutting fluid is on
N40 G01 X48 Z-1 F100; Chamber
N50 Z-60; Fine machining for thread
N60 X50; Tool is backing
N70 X62 W-60; Fine machining in cone
N80 W-15; Fine machining in Φ62mm ex-circle
N90 X78; Tool is backing
N100 X80 W-1; Chamber
N110 W-19; Fine machining in Φ80mm ex-circle
N120 G02 X80 W-60 R70; Fine machining in arc(I63.25 K-30)
N130 G01 Z-225; Fine machining in Φ80mm ex-circle
104
-Shenzhen Guanhong Automation Co.,Ltd.- SZGH-CNC990TDb Series[Book1]
105