Omron NY532-5400, NJ501-5300 Installation Manual

Page 1
Machine Automation Controller Industrial PC Platform
NJ/NY-series
G code Instructions Reference Manual
NJ501-5300 NY532-5400
O031-E1-02
Page 2
NOTE
No patent liability is assumed with respect to the use of the information contained herein. Moreover, because OMRON is constantly striving to improve its high-quality products, the information contained in this manual is subject to change without notice. Every precaution has been taken in the preparation of this manual. Neverthe­less, OMRON assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained in this publication.
Trademarks
• Sysmac and SYSMAC are trademarks or registered trademarks of OMRON Corporation in Japan and other countries for OMRON factory automation products.
• Microsoft, Windows, Excel, and Visual Basic are either registered trademarks or trademarks of Microsoft Corpora­tion in the United States and other countries.
• EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany.
• ODVA, CIP, CompoNet, DeviceNet, and EtherNet/IP are trademarks of ODVA.
• The SD and SDHC logos are trademarks of SD-3C, LLC.
• Intel and Intel Core are trademarks of Intel Corporation in the U.S. and / or other countries.
Other company names and product names in this document are the trademarks or registered trademarks of their respective companies.
Copyrights
Microsoft product screen shots reprinted with permission from Microsoft Corporation.
Page 3

Introduction

Thank you for purchasing an NJ/NY-series NC Integrated Controller. (“NJ/NY-series NC Integrated Controller” is sometimes abbreviated as “NC Integrated Controller”.)
This manual contains information that is necessary to use the NC Integrated Controller. Please read this manual and make sure you understand the functionality and performance of the NC Integrated Controller before you attempt to use it in a control system.
Keep this manual in a safe place where it will be available for reference during operation.
This manual only describes functions that are added to NJ501-5300 or NY532-5400.
When you use NJ501-5300, also consult manuals for the NJ-series listed in Related Manuals on page 21 for functions common to NJ501- Series including NJ501-1.
When you use NY532-5400, also consult manuals for the NY-series listed in Related Manuals on page 21 for functions common to NY532- Series including NY532-1.
Introduction

Intended Audience

This manual is intended for the following personnel, who must also have knowledge of electrical sys­tems (an electrical engineer or person with equivalent skills).
- Personnel in charge of introducing FA systems
- Personnel in charge of designing FA systems
- Personnel in charge of installing and maintaining FA systems
- Personnel in charge of managing FA systems and facilities
This manual is also intended for personnel who understand the following contents.
• For programming, this manual is intended for personnel who understand the programming language specifications in international standard IEC 61131-3 or Japanese standard JIS 3503.
• For NC programming, this manual is intended for personnel who understand the programming lan­guage specifications in international standard ISO 6983-1 or Japanese standard JIS 6315.

Applicable Products

This manual covers the following products.
• NJ-series NC Integrated Controller
NJ501-5300
• NY-series NC Integrated Controller
NY532-5400
NJ/NY-series G code Instructions Reference Manual (O031)
1
Page 4

Relevant Manuals

Relevant Manuals
The following table lists the relevant manuals for this product. Read all of the manuals that are relevant to your system configuration and application before you use this product.
Most operations are performed from the Sysmac Studio and CNC Operator Automation Software.
Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for information on the Sys- mac Studio, and CNC Operator Operation Manual (Cat. No. O032) for the CNC Operator.

Relevant Manuals for NJ Series

Basic information
NJ-series CPU Unit
Hardware User’s Manual
Manual
NJ/NX-series CPU Unit Built-in
NJ/NX-series CPU Unit
Software User’s Manual
NJ/NX-series Instructions
Reference Manual
NJ/NX-series CPU Unit Motion
Control User’s Manual
Instructions Reference Manual
NJ/NX-series Motion Control
EtherCAT
NJ/NX-series CPU Unit Built-in
EtherNet/IP™ Port User’s Manual
NJ/NY-series NC Integrated
Controller User’s Manual
NJ/NY-series G code
Instructions Reference Manual
NJ/NX-series
Troubleshooting Manual
®
Port User’s Manual
Purpose of use
Introduction to NJ-series Controllers
Setting devices and hardware
Using motion control
Using EtherCAT
Using EtherNet/IP
Software settings
Using motion control
Using EtherCAT
Using EtherNet/IP
Using numerical control
Writing the user program
Using motion control 
Using EtherCAT
Using EtherNet/IP
Using numerical control 
Programming error processing
Testing operation and debugging
Using motion control
Using EtherCAT
Using EtherNet/IP
Using numerical control

2
NJ/NY-series G code Instructions Reference Manual (O031)
Page 5
Purpose of use
Basic information
NJ-series CPU Unit
Hardware User’s Manual
NJ/NX-series CPU Unit
Software User’s Manual
Relevant Manuals
Manual
NJ/NX-series Instructions
Reference Manual
NJ/NX-series CPU Unit Motion
Control User’s Manual
NJ/NX-series Motion Control
Instructions Reference Manual
NJ/NX-series CPU Unit Built-in
EtherCAT
®
Port User’s Manual
EtherNet/IP™ Port User’s Manual
NJ/NX-series CPU Unit Built-in
NJ/NY-series NC Integrated
Controller User’s Manual
NJ/NY-series G code
Instructions Reference Manual
NJ/NX-series
Troubleshooting Manual
Learning about error management and
corrections
Maintenance
Using motion control
Using EtherCAT
Using EtherNet/IP
*1. Refer to the NJ/NX-series Troubleshooting Manual (Cat. No. W503) for the error management concepts and the error items. However,
refer to the manuals that are indicated with triangles () for details on errors corresponding to the products with the manuals that are indicated with triangles ().
*1
NJ/NY-series G code Instructions Reference Manual (O031)
3
Page 6
Relevant Manuals

Relevant Manuals for NY Series

Basic information
NY-series Industrial Panel PC
Hardware User’s Manual
Purpose of use
NY-series Industrial Box PC
Hardware User’s Manual
Manual
NY-series Industrial Panel PC / Industrial Box PC
Setup User’s Manual
Software User’s Manual
NY-series Industrial Panel PC / Industrial Box PC
NY-series
Instructions Reference Manual
Motion Control User’s Manual
NY-series Industrial Panel PC / Industrial Box PC
NY-series Motion Control
Instructions Reference Manual
NY-series Industrial Panel PC / Industrial Box PC
Built-in EtherCAT Port User’s Manual
Built-in EtherNet/IP Port User’s Manual
NY-series Industrial Panel PC / Industrial Box PC
NJ/NY-series
NC Integrated Controller User’s Manual
G code Instructions Reference Manual
NJ/NY-series
Troubleshooting Manual
NY-series
Introduction to NY-series Panel PCs
Introduction to NY-series Box PCs
Setting devices and hardware
Using motion control
Using EtherCAT
Using EtherNet/IP
Making setup
Making initial settings
Preparing to use Controllers
Software settings
Using motion control
Using EtherCAT
Using EtherNet/IP
Using numerical control
Writing the user program
Using motion control 
Using EtherCAT
Using EtherNet/IP
Using CNC functions 
Programming error processing
Testing operation and debugging
Using motion control
Using EtherCAT
Using EtherNet/IP
Using numerical control
Learning about error management and
corrections
Maintenance
Using motion control
Using EtherCAT
Using EtherNet/IP
*1
*2


*1. Refer to the NY-series Industrial Panel PC / Industrial Box PC Setup User’s Manual (Cat. No. W568) for how to set up
and how to use the utilities on Windows.
*2. Refer to the NY-series Troubleshooting Manual (Cat. No. W564) for the error management concepts and the error items.
However, refer to the manuals that are indicated with triangles () for details on errors corresponding to the products with the manuals that are indicated with triangles ().
4
NJ/NY-series G code Instructions Reference Manual (O031)
Page 7

Manual Structure

4-9
4 Installation and Wiring
NJ-series CPU Unit Hardware User’s Manual (W500)
stinUgnitnuoM3-4
4
stnenopmoCrellortnoCgnitcennoC1-3-4
4-3 Mounting Units
The Units that make up an NJ-series Controller can be connected simply by pressing the Units together and locking the sliders by moving them toward the back of the Units. The End Cover is connected in the same way to the Unit on the far right side of the Controller.
1 Join the Units so that the connectors fit exactly.
2 The yellow sliders at the top and bottom of each Unit lock the Units together. Move the sliders
toward the back of the Units as shown below until they click into place.
Precautions for Correct UsePrecautions for Correct Use
4-3-1 Connecting Controller Components
Connector
Hook
Hook holes
Slider
Lock
Release
Move the sliders toward the back until they lock into place.
Level 1 heading Level 2 heading Level 3 heading
Level 2 heading
A step in a procedure
Manual name
Special information
Level 3 heading
Page tab
Gives the current headings.
Indicates a procedure.
Icons indicate precautions, additional information, or reference information.
Gives the number of the main section.
The sliders on the tops and bottoms of the Power Supply Unit, CPU Unit, I/O Units, Special I/O Units, and CPU Bus Units must be completely locked (until they click into place) after connecting the adjacent Unit connectors.

Page Structure and Symbols

The following page structure and symbols are used in this manual.
Manual Structure
Note This illustration is only provided as a sample. It may not literally appear in this manual.
NJ/NY-series G code Instructions Reference Manual (O031)
5
Page 8
Manual Structure
Precautions for Safe Use
Precautions for Correct Use
Additional Information
Version Information

Special Information

Special information in this manual is classified as follows:
Precautions on what to do and what not to do to ensure safe usage of the product.
Precautions on what to do and what not to do to ensure proper operation and performance.
Additional information to read as required.
This information is provided to increase understanding and ease of operation.
Information on differences in specifications and functionality for NC Integrated Controller with different unit versions and for different versions of the Sysmac Studio and the CNC Operator are given.
Note References are provided to more detailed or related information.
6
NJ/NY-series G code Instructions Reference Manual (O031)
Page 9
1
2
3
4
A
1
2
3
4
A
Basic Information on NC Programming
G Code
M Code
PROGRAM CODES
Appendices

Sections in this Manual

Sections in this Manual
NJ/NY-series G code Instructions Reference Manual (O031)
7
Page 10

CONTENTS

CONTENTS
Introduction ..............................................................................................................1
Intended Audience....................................................................................................................................... 1
Applicable Products..................................................................................................................................... 1
Relevant Manuals .....................................................................................................2
Relevant Manuals for NJ Series .................................................................................................................. 2
Relevant Manuals for NY Series.................................................................................................................. 4
Manual Structure ......................................................................................................5
Page Structure and Symbols....................................................................................................................... 5
Special Information...................................................................................................................................... 6
Sections in this Manual ...........................................................................................7
Terms and Conditions Agreement ........................................................................12
Warranty, Limitations of Liability ................................................................................................................ 12
Application Considerations ........................................................................................................................ 13
Disclaimers ................................................................................................................................................ 13
Safety Precautions .................................................................................................14
Precautions for Safe Use....................................................................................... 15
Precaution for Correct Use....................................................................................16
Regulations and Standards...................................................................................17
Versions ..................................................................................................................18
Checking Versions..................................................................................................................................... 18
Related Manuals .....................................................................................................21
Terminology ............................................................................................................ 24
Revision History .....................................................................................................25
Section 1 Basic Information on NC Programming
Instructions ............................................................................................................................................... 1-2
Instruction Parameters.............................................................................................................................. 1-5
G Code Descriptions.................................................................................................................................1-7
What is Modal?......................................................................................................................................... 1-9
Section 2 G Code
Interpolation Functions.................................................................................................................. 2-3
G00 Rapid Positioning.............................................................................................................................. 2-4
G01 Linear Interpolation ...........................................................................................................................2-6
G02, G03 Circular Interpolation................................................................................................................2-8
G31 Skip Function ..................................................................................................................................2-13
Dwell .............................................................................................................................................. 2-15
G04 Dwell ...............................................................................................................................................2-16
Feed Functions ............................................................................................................................. 2-17
Feedrate Function (F function) ............................................................................................................... 2-18
8
NJ/NY-series G code Instructions Reference Manual (O031)
Page 11
CONTENTS
Acceleration Time, Deceleration Time, Jerk Time .................................................................................. 2-19
G09 Exact Stop ...................................................................................................................................... 2-20
G61 Exact Stop Mode ............................................................................................................................ 2-21
G64 Continuous-path Mode ................................................................................................................... 2-22
G500, G501 Multi-block Acceleration/Deceleration Rate ....................................................................... 2-24
Coordinate System ....................................................................................................................... 2-27
G52 Local Coordinate System Set......................................................................................................... 2-28
G53 Dimension Shift Cancel .................................................................................................................. 2-29
G54 to G59 Select Work Coordinate System......................................................................................... 2-30
G17, G18, G19 Plane Selection............................................................................................................. 2-31
G20 Inch Input, G21 Metric Input ........................................................................................................... 2-32
G90 Absolute Dimension, G91 Incremental Dimension ......................................................................... 2-33
Reference Point ............................................................................................................................ 2-35
G28 Return to Reference Point.............................................................................................................. 2-36
G30 Return to 2nd, 3rd and 4th Reference Point................................................................................... 2-38
Compensation Functions............................................................................................................. 2-39
G40, G41, G42 Cutter Compensation.................................................................................................... 2-40
G43, G44, G49 Tool Offset..................................................................................................................... 2-51
G50, G51 Scaling................................................................................................................................... 2-53
G50.1, G51.1 Mirroring........................................................................................................................... 2-55
G68, G69 Coordinate System Rotation.................................................................................................. 2-57
Utilities........................................................................................................................................... 2-59
G74 Left-handed Tapping Cycle ............................................................................................................. 2-60
G80 Fixed Cycle Cancel......................................................................................................................... 2-62
G84 Tapping Cycle ................................................................................................................................. 2-63
G98 Fixed Cycle Return to Initial Level .................................................................................................. 2-66
G99 Fixed Cycle Return to R Point Level............................................................................................... 2-67
Chamfer and Fillet Functions ................................................................................................................. 2-68
Section 3 M Code
Auxiliary Function Output.............................................................................................................. 3-3
M Code Descriptions................................................................................................................................ 3-5
Reservation Auxiliary Functions ................................................................................................... 3-7
M00 Program Stop ................................................................................................................................... 3-8
M01 Optional Stop.................................................................................................................................... 3-9
M02, M30 End of Program ..................................................................................................................... 3-10
Spindle Axis .................................................................................................................................. 3-11
Spindle Axis Rotation Function (S function)........................................................................................... 3-12
M03 Spindle CW .................................................................................................................................... 3-13
M04 Spindle CCW.................................................................................................................................. 3-14
M05 Spindle OFF ................................................................................................................................... 3-15
M19 Spindle Orientation......................................................................................................................... 3-16
Programming ................................................................................................................................ 3-19
M98 Subprogram Call ............................................................................................................................ 3-20
M99 Subprogram End ............................................................................................................................ 3-21
Section 4 PROGRAM CODES
4-1 Calculation and Logic Operation ......................................................................................... 4-2
4-1-1 Operator priority.......................................................................................................................... 4-2
4-1-2 Arithmetic operators.................................................................................................................... 4-2
4-1-3 Functions .................................................................................................................................... 4-3
4-1-4 Condition comparators................................................................................................................ 4-5
4-1-5 Conditional join operators........................................................................................................... 4-5
4-2 Branch and Repetition .......................................................................................................... 4-6
4-2-1 if/else .......................................................................................................................................... 4-6
4-2-2 switch/case ................................................................................................................................. 4-6
NJ/NY-series G code Instructions Reference Manual (O031)
9
Page 12
CONTENTS
4-2-3 while............................................................................................................................................4-6
4-2-4 do/while....................................................................................................................................... 4-6
4-3 User Variables........................................................................................................................ 4-7
4-3-1 Local Variables (“L”) ....................................................................................................................4-7
4-3-2 Coordinate System Global Variables (“Q”).................................................................................. 4-7
4-3-3 Global Variables (“P”) ..................................................................................................................4-7
4-3-4 Variable Indirection......................................................................................................................4-7
Appendices
A-1 Program Parsing by CNC Operator .....................................................................................A-2
A-1-1 Intermediate code format ............................................................................................................A-2
A-1-2 Program Parsing Example ..........................................................................................................A-4
10
NJ/NY-series G code Instructions Reference Manual (O031)
Page 13
CONTENTS
NJ/NY-series G code Instructions Reference Manual (O031)
11
Page 14

Terms and Conditions Agreement

Terms and Conditions Agreement

Warranty, Limitations of Liability

Warranties
Exclusive Warranty
Omron’s exclusive warranty is that the Products will be free from defects in materials and workman­ship for a period of twelve months from the date of sale by Omron (or such other period expressed in writing by Omron). Omron disclaims all other warranties, express or implied.
Limitations
OMRON MAKES NO WARRANTY OR REPRESENTATION, EXPRESS OR IMPLIED, ABOUT NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OF THE PRODUCTS. BUYER ACKNOWLEDGES THAT IT ALONE HAS DETERMINED THAT THE PRODUCTS WILL SUITABLY MEET THE REQUIREMENTS OF THEIR INTENDED USE.
Omron further disclaims all warranties and responsibility of any type for claims or expenses based on infringement by the Products or otherwise of any intellectual property right.
Buyer Remedy
Omron’s sole obligation hereunder shall be, at Omron’s election, to (i) replace (in the form originally shipped with Buyer responsible for labor charges for removal or replacement thereof) the non-com­plying Product, (ii) repair the non-complying Product, or (iii) repay or credit Buyer an amount equal to the purchase price of the non-complying Product; provided that in no event shall Omron be responsible for warranty, repair, indemnity or any other claims or expenses regarding the Products unless Omron’s analysis confirms that the Products were properly handled, stored, installed and maintained and not subject to contamination, abuse, misuse or inappropriate modification. Return of any Products by Buyer must be approved in writing by Omron before shipment. Omron Companies shall not be liable for the suitability or unsuitability or the results from the use of Products in combi­nation with any electrical or electronic components, circuits, system assemblies or any other materi­als or substances or environments. Any advice, recommendations or information given orally or in writing, are not to be construed as an amendment or addition to the above warranty.
See http://www.omron.com/global/ or contact your Omron representative for published information.
Limitation on Liability; Etc
OMRON COMPANIES SHALL NOT BE LIABLE FOR SPECIAL, INDIRECT, INCIDENTAL, OR CON­SEQUENTIAL DAMAGES, LOSS OF PROFITS OR PRODUCTION OR COMMERCIAL LOSS IN ANY WAY CONNECTED WITH THE PRODUCTS, WHETHER SUCH CLAIM IS BASED IN CONTRACT, WARRANTY, NEGLIGENCE OR STRICT LIABILITY.
Further, in no event shall liability of Omron Companies exceed the individual price of the Product on which liability is asserted.
12
NJ/NY-series G code Instructions Reference Manual (O031)
Page 15

Application Considerations

Suitability of Use
Omron Companies shall not be responsible for conformity with any standards, codes or regulations which apply to the combination of the Product in the Buyer’s application or use of the Product. At Buyer’s request, Omron will provide applicable third party certification documents identifying ratings and limitations of use which apply to the Product. This information by itself is not sufficient for a com­plete determination of the suitability of the Product in combination with the end product, machine, sys­tem, or other application or use. Buyer shall be solely responsible for determining appropriateness of the particular Product with respect to Buyer’s application, product or system. Buyer shall take applica­tion responsibility in all cases.
NEVER USE THE PRODUCT FOR AN APPLICATION INVOLVING SERIOUS RISK TO LIFE OR PROPERTY OR IN LARGE QUANTITIES WITHOUT ENSURING THAT THE SYSTEM AS A WHOLE HAS BEEN DESIGNED TO ADDRESS THE RISKS, AND THAT THE OMRON PRODUCT(S) IS PROPERLY RATED AND INSTALLED FOR THE INTENDED USE WITHIN THE OVERALL EQUIP­MENT OR SYSTEM.
Terms and Conditions Agreement
Programmable Products
Omron Companies shall not be responsible for the user’s programming of a programmable Product, or any consequence thereof.

Disclaimers

Performance Data
Data presented in Omron Company websites, catalogs and other materials is provided as a guide for the user in determining suitability and does not constitute a warranty. It may represent the result of Omron’s test conditions, and the user must correlate it to actual application requirements. Actual perfor­mance is subject to the Omron’s Warranty and Limitations of Liability.
Change in Specifications
Product specifications and accessories may be changed at any time based on improvements and other reasons. It is our practice to change part numbers when published ratings or features are changed, or when significant construction changes are made. However, some specifications of the Product may be changed without any notice. When in doubt, special part numbers may be assigned to fix or establish key specifications for your application. Please consult with your Omron’s representative at any time to confirm actual specifications of purchased Product.
Errors and Omissions
Information presented by Omron Companies has been checked and is believed to be accurate; how­ever, no responsibility is assumed for clerical, typographical or proofreading errors or omissions.
NJ/NY-series G code Instructions Reference Manual (O031)
13
Page 16

Safety Precautions

Safety Precautions
Refer to the following manuals for safety precautions.
NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500)
NY-series Industrial Panel PC Hardware User’s Manual (Cat. No. W557)
NJ/NY-series NC Integrated Controller User’s Manual (Cat. No. O030)
CNC Operator Operation Manual (Cat. No. O032)
14
NJ/NY-series G code Instructions Reference Manual (O031)
Page 17

Precautions for Safe Use

Refer to the following manuals for precautions for safe use.
NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500)
NY-series Industrial Panel PC Hardware User’s Manual (Cat. No. W557)
NJ/NY-series NC Integrated Controller User’s Manual (Cat. No. O030)
CNC Operator Operation Manual (Cat. No. O032)
Precautions for Safe Use
NJ/NY-series G code Instructions Reference Manual (O031)
15
Page 18

Precaution for Correct Use

Precaution for Correct Use
Refer to the following manuals for precautions for correct use.
NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500)
NY-series Industrial Panel PC Hardware User’s Manual (Cat. No. W557)
NJ/NY-series NC Integrated Controller User’s Manual (Cat. No. O030)
CNC Operator Operation Manual (Cat. No. O032)
16
NJ/NY-series G code Instructions Reference Manual (O031)
Page 19

Regulations and Standards

Refer to the following manuals for regulations and standards.
NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500)
NY-series Industrial Panel PC Hardware User’s Manual (Cat. No. W557)
Regulations and Standards
NJ/NY-series G code Instructions Reference Manual (O031)
17
Page 20

Versions

Versions
Hardware revisions and unit versions are used to manage the hardware and software in NJ/NY-series Units and EtherCAT slaves. The hardware revision or unit version is updated each time there is a change in hardware or software specifications. Even when two Units or EtherCAT slaves have the same model number, they will have functional or performance differences if they have different hard­ware revisions or unit versions.

Checking Versions

You can check versions on the ID information indications or with the Sysmac Studio.
Checking Unit Versions on ID Information Indications
The unit version is given on the ID information indication on the side of the product.
Checking the Unit Version of an NJ-series CPU Unit
The ID information on the NJ501-5300 is shown below.
ID information indication
CNC version
Unit model Unit version
NJ501 - 5300
CNC Ver.1.00
PORT1 MAC ADDRESS: PORT2 MAC ADDRESS:
Lot No. DDMYY xxxx
Ver.1.

 
Hardware revision
HW Rev.
MAC addressLot number and serial number
Checking the Unit Version of an NY-series Controller
The ID information on an NY-series NY52-1 Controller is shown below.
18
ID information indication
Unit version
CNC version

Ver.1. CNC Ver.1.00
NJ/NY-series G code Instructions Reference Manual (O031)
Page 21
Versions
Checking Unit Versions with the Sysmac Studio
You can use the Sysmac Studio to check unit versions. The procedure is different for Units and for Eth­erCAT slaves.
Checking the Unit Version of an NJ-series CPU Unit
You can use the Production Information while the Sysmac Studio is online to check the unit version of a Unit. You can do this for the CPU Unit, CJ-series Special I/O Units, and CJ-series CPU Bus Units. You cannot check the unit versions of CJ-series Basic I/O Units with the Sysmac Studio.
Use the following procedure to check the unit version.
1 Double-click CPU/Expansion Racks under Configurations and Setup in the Multiview
Explorer. Or, right-click CPU/Expansion Racks under Configurations and Setup and select Edit from the menu.
The Unit Editor is displayed.
2 Right-click any open space in the Unit Editor and select Production Information.
The Production Information Dialog Box is displayed.
Checking the Unit Version of an NY-series Controller
You can use the Production Information while the Sysmac Studio is online to check the unit version of a Unit. You can only do this for the Controller.
1 Right-click CPU Rack under Configurations and Setup - CPU/Expansion Racks in the Multi-
view Explorer and select Production Information.
The Production Information Dialog Box is displayed.
Changing Information Displayed in Production Information Dialog Box
1 Click the Show Detail or Show Outline Button at the lower right of the Production Informa-
tion Dialog Box.
The view will change between the production information details and outline.
Outline View Detail View
The information that is displayed is different for the Outline View and Detail View. The Detail View displays the unit version, hardware version, and software versions. The Outline View displays only the unit version.
Note The hardware revision is separated by “/” and displayed on the right of the hardware version.
NJ/NY-series G code Instructions Reference Manual (O031)
19
Page 22
Versions
Checking the Unit Version of an EtherCAT Slave
You can use the Production Information while the Sysmac Studio is online to check the unit version of an EtherCAT slave. Use the following procedure to check the unit version.
1 Double-click EtherCAT under Configurations and Setup in the Multiview Explorer. Or,
right-click EtherCAT under Configurations and Setup and select Edit from the menu.
The EtherCAT Tab Page is displayed.
2 Right-click the master on the EtherCAT Tab Page and select Display Production Information.
The Production Information Dialog Box is displayed.
The unit version is displayed after “Rev.”
Changing Information Displayed in Production Information Dialog Box
1 Click the Show Detail or Show Outline Button at the lower right of the Production Informa-
tion Dialog Box.
The view will change between the production information details and outline.
Outline View Detail View
20
NJ/NY-series G code Instructions Reference Manual (O031)
Page 23

Related Manuals

Related Manuals
The following manuals are related. Use these manuals for reference.
Manual name Cat. No. Model numbers Application Description
NJ-series CPU Unit Hardware User’s Manual
NJ/NX-series CPU Unit Software User’s Manual
NJ/NX-series Instructions Ref­erence Manual
NJ/NX-series CPU Unit Motion Control User’s Manual
NJ/NX-series Motion Control Instructions Reference Manual
NJ/NX-series CPU Unit Built-in EtherCAT Port User’s Manual
NJ/NX-series CPU Unit
Built-in EtherNet/IP User’s Manual
NJ/NY-series NC Integrated Controller User’s Manual
NJ/NY-series G code Instructions Reference Manual
Port
W500
W501
W502
W507
W508
W505
W506
O030
O031
NJ501-

NJ301-

NJ101-

NX701-

NX102-

NX1P2-

NJ501-

NJ301-

NJ101-

NX701-

NX102-

NX1P2-

NJ501-

NJ301-

NJ101-

NX701-

NX102-

NX1P2-

NJ501-

NJ301-

NJ101-

NX701-

NX102-

NX1P2-

NJ501-

NJ301-

NJ101-

NX701-

NX102-

NX1P2-

NJ501-

NJ301-

NJ101-

NX701-

NX102-

NX1P2-

NJ501-

NJ301-

NJ101-

NJ501-5300 NY532-5400
NJ501-5300 NY532-5400
Learning the basic specifications of the NJ-series CPU Units, including introductory information, designing, installation, and main­tenance. Mainly hardware infor­mation is provided.
Learning how to pro­gram and set up an NJ/NX-series CPU Unit. Mainly software infor­mation is provided.
Learning detailed specifications on the basic instructions of an NJ/NX-series CPU Unit.
Learning about motion control set­tings and program­ming concepts.
Learning about the specifications of the motion control instructions.
Using the built-in Eth­erCAT port on an NJ/NX-series CPU Unit.
Using the built-in Eth­erNet/IP port on an NJ/NX-series CPU Unit.
Performing numeri­cal control with NJ/NY-series Control­lers.
Learning about the specifications of the G code/M code instructions.
An introduction to the entire NJ-series system is provided along with the following informa­tion on the CPU Unit.
• Features and system configuration
• Introduction
• Part names and functions
• General specifications
• Installation and wiring
• Maintenance and inspection
The following information is provided on a Controller built with an NJ/NX-series CPU Unit.
• CPU Unit operation
• CPU Unit features
• Initial settings
• Programming based on IEC 61131-3 lan­guage specifications
The instructions in the instruction set (IEC 61131-3 specifications) are described.
The settings and operation of the CPU Unit and programming concepts for motion control are described.
The motion control instructions are described.
Information on the built-in EtherCAT port is provided. This manual provides an introduction and pro­vides information on the configuration, fea­tures, and setup.
Information on the built-in EtherNet/IP port is provided. Information is provided on the basic setup, tag data links, and other features.
Describes the functionality to perform the numerical control. Use this manual together with the NJ/NY-series G code Instructions Reference Manual (Cat. No. O031) when pro­gramming.
The G code/M code instructions are described. Use this manual together with the
NJ/NY-series NC Integrated Controller User’s Manual (Cat. No. O030) when programming.
NJ/NY-series G code Instructions Reference Manual (O031)
21
Page 24
Related Manuals
Manual name Cat. No. Model numbers Application Description
NJ/NX-series Troubleshooting Manual
Sysmac Studio Version 1 Operation Manual
CNC Operator Operation Manual
NY-series IPC Machine Con­troller Industrial Panel PC Hardware User’s Manual
NY-series IPC Machine Con­troller Industrial Box PC Hard­ware User’s Manual
NY-series IPC Machine Con­troller Industrial Panel PC / Industrial Box PC Setup User’s Manual
NY-series IPC Machine Con­troller Industrial Panel PC / Industrial Box PC Software User’s Manual
NY-series Instructions Refer­ence Manual
NY-series IPC Machine Con­troller Industrial Panel PC / Industrial Box PC Motion Con­trol User’s Manual
NX701-
W503
W504 SYSMAC-
O032 SYSMAC-
W557
W556
W568
W558
W560
W559

NX102-

NX1P2-

NJ501-

NJ301-

NJ101-

SE2
RTNC0D
NY532-1

NY512-1

NY532-1

NY512-1

NY532-1

NY512-1

NY532-1

NY512-1

NY532-1

NY512-1

Learning about the errors that may be detected in an NJ/NX-series Con­troller.
Learning about the operating proce­dures and functions of the Sysmac Studio.
Learning an introduc­tion of the CNC Oper­ator and how to use it.
Learning the basic specifications of the NY-series Industrial Panel PCs, including introductory informa­tion, designing, instal­lation, and maintenance. Mainly hardware infor­mation is provided.
Learning the basic specifications of the NY-series Industrial Box PC, including introductory informa­tion, designing, instal­lation, and maintenance. Mainly hardware infor­mation is provided.
Learning the initial set­tings of the NY-series Industrial PCs and preparations to use Controllers.
Learning how to pro­gram and set up the Controller functions of an NY-series Industrial PC.
Learning detailed specifications on the basic instructions of an NY-series Indus­trial PC.
Learning about motion control settings and programming con­cepts of an NY-series Industrial PC.
Concepts on managing errors that may be detected in an NJ/NX-series Controller and information on individual errors are described.
Describes the operating procedures of the Sysmac Studio.
An introduction of the CNC Operator, installa­tion procedures, basic operations, connection operations, and operating procedures for main functions are described.
An introduction to the entire NY-series system is provided along with the following informa­tion on the Industrial Panel PC.
• Features and system configuration
• Introduction
• Part names and functions
• General specifications
• Installation and wiring
• Maintenance and inspection
An introduction to the entire NY-series system is provided along with the following informa­tion on the Industrial Box PC.
• Features and system configuration
• Introduction
• Part names and functions
• General specifications
• Installation and wiring
• Maintenance and inspection
The following information is provided on an introduction to the entire NY-series system.
• Two OS systems
• Initial settings
• Industrial PC Support Utility
• NYCompolet
• Industrial PC API
• Backup & recovery
The following information is provided on the NY-series Controller functions.
• Controller operations
• Controller functions
• Controller settings
• Programming based on IEC 61131-3 lan­guage specifications
The instructions in the instruction set (IEC 61131-3 specifications) are described.
The settings and operation of the Controller and programming concepts for motion control are described.
22
NJ/NY-series G code Instructions Reference Manual (O031)
Page 25
Manual name Cat. No. Model numbers Application Description
NY-series Motion Control Instructions Reference Manual
W561
NY532-1
NY512-1


Learning about the specifications of the motion control
The motion control instructions are described.
instructions of an NY-series Industrial PC.
NY-series IPC Machine Con­troller Industrial Panel PC / Industrial Box PC Built-in Eth­erCAT Port User’s Manual
W562
NY512-1


Using the built-in Eth­erCAT port in an NY-series Industrial PC.
Information on the built-in EtherCAT port is provided. This manual provides an introduction and pro­vides information on the configuration, fea-
NY532-1
tures, and setup.
NY-series IPC Machine Con­troller Industrial Panel PC / Industrial Box PC Built-in Eth-
erNet / IP
Port User’s Manual
W563
NY532-1
NY512-1


Using the built-in Eth­erNet/IP port in an NY-series Industrial PC.
Information on the built-in EtherNet/IP port is provided. Information is provided on the basic setup, tag data links, and other features.
Related Manuals
NY-series Troubleshooting Manual
W564
NY532-1
NY512-1


Learning about the errors that may be detected in an NY-series Industrial PC.
Concepts on managing errors that may be detected in an NY-series Controller and infor­mation on individual errors are described.
NJ/NY-series G code Instructions Reference Manual (O031)
23
Page 26

Terminology

Terminology
Term Description
NJ501-1 Represents NJ501-1300/-1400/-1500.
24
NJ/NY-series G code Instructions Reference Manual (O031)
Page 27

Revision History

O031-E1-02
Revision code
Cat. No.
A manual revision code appears as a suffix to the catalog number on the front and back covers of the manual.
Revision code Date Revised content
01 October 2017 Original production 02 July 2018 • Added information on the
• Corrected mistakes.
NX102-
Revision History
.
NJ/NY-series G code Instructions Reference Manual (O031)
25
Page 28
Revision History
26
NJ/NY-series G code Instructions Reference Manual (O031)
Page 29
Basic Information on NC Pro­gramming
This section provides the list of available instructions, and the descriptions of parame­ters and modal.
Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
G Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
M Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Instruction Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
G Code Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
What is Modal? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
1
NJ/NY-series G code Instructions Reference Manual (O031)
1 - 1
Page 30
1 Basic Information on NC Programming

Instructions

The following table lists the G codes and M codes supported by NJ501-5300 and NJ532-5400.
G Codes
Modal group Initial modal
00 Non-modal --- G04 Dwell Stops the CNC coordinate system for a predefined
00 Non-modal --- G09 Exact Stop Executes a forcible control deceleration stop
00 Non-modal --- G28 Return to Reference
00 Non-modal --- G30 Return to 2nd, 3rd or
00 Non-modal --- G31 Skip Function Provides Rapid Positioning (G00) and input stop. 00 Non-modal --- G52 Local Coordinate Sys-
00 Non-modal --- G53 Dimension Shift Cancel Runs commands in the machine coordinate sys-
01 Rapid Position­ing
02 Plane G17 G17 X-Y Plane Selection Changes a plane, the reference of Circular Interpo-
03 Distance G90 G90 Absolute command Enables absolute position mode for all axes in the
06 Unit Operation
G01 G00 Rapid Positioning Performs a point-to-point operation in the minimum
depends on the Orthogo­nal Axis Command Unit setting
Instruc
tion
Point
4th Reference Point
tem Set
G01 Linear Interpolation Moves a CNC motor from the current position to a
G02 Circular Interpolation in
CW direction
G03 Circular Interpolation in
CCW direction
G18 Z-X Plane Selection G19 Y-Z Plane Selection
G91 Incremental command Enables relative Incremental position mode for all
G20 Inch input Switches all the settings of the CNC coordinate
G21 Metric input
Name Outline of function
period of time.
together with the registration of in-position at the termination of a block.
Moves the tool to the reference point (position 0) via the middle point specified by an argument of the instruction.
Moves the tool to the 2nd, 3rd and 4th reference point.
Creates coordinates in the Work Coordinate Sys­tem.
tem.
time by following the restrictions of CNC motor set­tings.
specified position. Moves the tool on an arc path on the XY, YZ, or ZX
plane.
lation (G02/G03), Cutter Compensation (G40/G41/G42), and Coordinate System Rotation (G68/G69).
CNC coordinate system, and moves the axes to a specified position in the current coordinate system.
axes in the CNC coordinate system, and moves the axes a certain distance from the last command position.
system, command values, and the unit of current values.
1 - 2
NJ/NY-series G code Instructions Reference Manual (O031)
Page 31
1 Basic Information on NC Programming
Modal group Initial modal
07 Tool radius G40 G40 Cancels tool compen-
08 Tool length off­set
09 Fixed cycle G80 G74 Left-handed Tapping
10 Return level G98 G98 Fixed Cycle Return to
11 Scaling G50 G50 Cancel scaling Scales the current coordinate system.
14 Coordinate System Selection
15 Path Control G64 G61 Exact Stop Mode Stops operation between blocks to prevent corner
16 Rotation G69 G68 Enables rotation Rotates the current coordinates.
22 Mirroring G50.1 G50.1 Cancel Mirroring Mirrors the current coordinates.
23 Multi-block Accelera­tion/Deceleration Rate
G49 G43 Tool Offset, positive Corrects the position in the Z-axis direction.
No Work Coordinate System is selected (all coordinate axis have zero offset).
G501 G500 Enables multi-block
Instruc
tion
sation G41 Tool Compensation, left G42 Tool Compensation,
right
G44 Tool Offset, negative G49 Cancels tool offset
Cycle G80 Fixed Cycle Cancel Cancels a fixed cycle. G84 Tapping Cycle Performs tapping machining.
Initial Level G99 Fixed Cycle Return to
R Point Level
G51 Scaling G54 1st Work Coordinate
System selection G55 2nd Work Coordinate
System selection G56 3rd Work Coordinate
System selection G57 4th Work Coordinate
System selection G58 5th Work Coordinate
System selection G59 6th Work Coordinate
System selection
G64 Continuous-path Mode When two or more sequential operations are
G69 Disables rotation
G51.1 Mirroring
acceleration/decelera-
tion rate G501 Disables multi-block
acceleration/decelera-
tion rate
Name Outline of function
Enables selection of a tool for control, automati­cally moves the tool to the left side or right side of the programmed path, and correct the radius of the tool.
Performs reverse tapping machining.
Sets the return position of a fixed cycle to the initial level.
Sets the return position of a fixed cycle to the R point level.
Changes the current coordinate system to a speci­fied one defined by the user by using the offsets of X-, Y-, Z-, A-, B-, and C-axis.
rounding and blending from being executed.
aligned, the former can be blended with the latter and accelerated/decelerated.
Reads the path ahead, and adjusts the accelera­tion or deceleration rate.
Instructions
1
G Codes
NJ/NY-series G code Instructions Reference Manual (O031)
1 - 3
Page 32
1 Basic Information on NC Programming
M Codes
Type Instruction Name Outline of function
Reservation auxiliary func­tion output
Spindle Axis M03 Spindle CW Operates the Spindle axis in the positive direction at the speci-
Programming M98 Subprogram Call Calls a subprogram from the program currently running.
M00 Program Stop Stops the execution of the NC program at the block where M00
is commanded.
M01 Optional Stop As is the case with M00, stops the execution of the NC program
at the block where M01 is commanded.
M02/M30 End of Program Stops the NC program to enable reset mode.
fied speed.
M04 Spindle CCW Operates the Spindle axis in the negative direction at the speci-
fied speed. M05 Spindle OFF Stops the Spindle axis. M19 Spindle Orienta-
tion
M99 Subprogram End Terminates the subprogram currently running and returns to the
Uses this command to adjust orientation of the spindle axis
when you replace tools and carry out other tasks.
main program from which the subprogram was invoked.
1 - 4
NJ/NY-series G code Instructions Reference Manual (O031)
Page 33
1 Basic Information on NC Programming

Instruction Parameters

Instruction Parameters
The following describes the parameters used in each instruction.
Parameter Description Relevant codes Recommended range
Target A-axis Position [com­mand units]
A
B
C
F
G G code --- Valid G code
I
J
K
L
M M Code --- Valid M code (M0 to M191)
P
Q Q-variable address --- Valid address (Q0 to Q4095)
R
S Spindle rotation speed [r/min] M03/M04/M19 0 S MAX speed (CNC motor setting)
A-axis middle point [command units]
A-axis offset [command units] G52 -1,000,000 A 1,000,000 Target B-axis Position [com­mand units] B-axis middle point [command units] B-axis offset [command units] G52 -1,000,000 ≤ B ≤ 1,000,000 Target C-axis Position [com­mand units] C-axis middle point [command units] C-axis offset [command units] G52 -1,000,000 C 1,000,000 Feedrate [command units] G00/G01/G02/G03 0.000000001 F MAX feedrate (CNC coordinate
Dwell time [s] G04 0≤F≤100,000
X-axis arc center [command units] X-axis scaling magnification G51 0.00001 ≤ I ≤ 10,000
Y-axis arc center [command units]
-axis scaling magnification G51 0.00001 J 10,000
Y
Z-axis arc center [command units]
Z-axis scaling magnification G51 0.00001 K 10,000
Number of repetitions G74/G84 0 K 10,000 L-variable address --- Valid address (L0 to L255) Number of loops M98 0 L 10,000
P-variable address --- Valid address (P0 to P32767) Dwell time [ms] G04/G74/G84 0≤P≤100,000,000 Reference point specification G30 Valid reference point number (P2 to P4) All axes scaling magnification G51 0.00001 P 10,000 Program number M98 Programmed by Sysmac Studio
Arc radius [command units] G02/G03 -1,000,000 R 1,000,000 Rotation angle [deg] G68 -360 R 360 R Point Level [command units] G74/G84 -1,000,000 R 1,000,000
G00/G01/G02/G03 -1,000,000 A 1,000,000
G28/G30 -1,000,000 A 1,000,000
G00/G01/G02/G03 -1,000,000 B 1,000,000
G28/G30 -1,000,000 B 1,000,000
G00/G01/G02/G03 -1,000,000 C 1,000,000
G28/G30 -1,000,000 C 1,000,000
system setting)
G02/G03 -1,000,000 I 1,000,000
-10,000 I -0.00001
G02/G03 -1,000,000 J 1
-10,000 J -0.00001
G02/G03 -1,000,000 K 1,000,000
-10,000 K -0.00001
1000 to 2999
Programmed by HMI
3000 to 9999
,000,000
1
NJ/NY-series G code Instructions Reference Manual (O031)
1 - 5
Page 34
1 Basic Information on NC Programming
Parameter Description Relevant codes Recommended range
Target X-axis Position [com­mand units]
Dwell time [s] G04 0≤X≤100,000
X
Y
Z
ta Acceleration time [ms] G01/G02/G03 0 ta 250,000 td Deceleration time [ms] G01/G02/G03 0 td 250,000 ts Jerk Time [ms] G01/G02/G03 0 ts 1
X-axis middle point [command units]
X-axis center [command units] G50/G50.1/G68 -1,000,000 X 1,000,000 X-axis offset [command units] G52 -1,000,000 X 1,000,000 Target Y-axis position [com-
mand units] Y-axis middle point [command
units] X-axis center [command units] G50/G50.1/G68 -1,000,000 Y 1,000,000 Y-axis offset [command units] G52 -1,000,000 Y 1,000,000 Target Z-axis position [com-
mand units] Z-axis middle point [command
units] Z-axis center [command units] G50/G50.1/G68 -1,000,000 ≤ Z ≤ 1,000,000 Z-axis offset [command units] G52 -1,000,000 Z 1,000,000 Z-point position [command
units]
There is no modal group for feedrate F, spindle rotation speed S, acceleration time ta, deceleration time td, and Jerk time ts, but it operates as the modal to maintain the commanded state.
G00/G01/G02/G03 -1,000,000 X 1,000,000
G28/G30 -1,000,000 X 1,000,000
G00/G01/G02/G03 -1,000,000 Y 1,000,000
G28/G30 -1,000,000 Y 1,000,000
G00/G01/G02/G03 -1,000,000 Z 1,000,000
G28/G30 -1,000,000 Z 1,000,000
G74/G84 -1,000,000 Z 1,000,000
25,000
1 - 6
NJ/NY-series G code Instructions Reference Manual (O031)
Page 35
1 Basic Information on NC Programming
Effect range of G64
Effect range of G61
Word
Block
N02 M03 S 1000 N03 G64 N04 X20 N05 Y10
N06 G61 N07 X-20 N08 Y-10 N09 M30 // End of Program
N01 G17 G91 G01 ta1000 td1000 F1000
Writing comments (Multiple line comments can be written.) /*There are two ways of commenting multiple lines.*/

G Code Descriptions

The program format generally called the G code is defined by ISO 6983 (JIS B 6315).
A combination of characters such as G, M and X, and digits is called a word, and a line consisting of two or more words are called a block. G codes are executed sequentially in units of a block. When execu­tion of the current block is completed, the next block is executed in principle. A line feed code indicates the end of block. The length of one block must be 1020 bytes or less. These restrictions apply to blocks after program parsing. Refer to Program Parsing by CNC Operator on page A-2 for program parsing.
The influential range varies depending on the word. A word that only has an effect in the block where it is written is called non-modal, and one that continues to have an effect when omitted in subsequent blocks is called modal. In the modal, a few words produce their effects exclusively. This is called a modal group.
Comments can be entered by using “//” before the comment, which is valid to the end of the block. This specification is not defined by ISO 6983.
The spindle operations, F, and M30 need to be described. M30 can be written as M02.
G Code Descriptions
1
NJ/NY-series G code Instructions Reference Manual (O031)
* G61 and G64 are in the same modal group and if another one is written, the subsequent modal changes.
1 - 7
Page 36
1 Basic Information on NC Programming
Optional Skip Block
If an optional signal is entered, the block where the related command is written is skipped.
*1
Enter the command as /N
*1. N is a constant from 1 to 31.
G17 G91 G01 ta1000 td1000 F1000 S1000 M03 G64
/1 X20 // The optional block skip can be written at the
/ Y10 // If N is omitted, /1 is assumed.
G61
/1/2 X-20 // Multiple numbers can be specified.
Y-10 M30
Note that the optional block skip can be used for G codes only.
It cannot be used for program codes.
.
beginning of line only.
1 - 8
NJ/NY-series G code Instructions Reference Manual (O031)
Page 37
1 Basic Information on NC Programming

What is Modal?

There are two types of G codes: One that is valid only in its block, and the other that continues to be valid until another G code of the same group is specified. The former is called non-modal G code, and the latter modal G code.
Modal G codes are summarized into some G code groups. The group is called a modal group.
In the same modal group, G codes that cannot hold simultaneously are summarized. One of the G-code states is always preserved. For example, G90 (Absolute Dimension) and G91 (Incremental Dimension) are summarized into modal group 03.
Refer to Instructions on page 1-2 for information about which G code is summarized in which modal group.
What is Modal?
1
NJ/NY-series G code Instructions Reference Manual (O031)
1 - 9
Page 38
1 Basic Information on NC Programming
1 - 10
NJ/NY-series G code Instructions Reference Manual (O031)
Page 39
G Code
2
This section describes the specifications of the G code.
Interpolation Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Dwell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15
Feed Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Coordinate System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27
Reference Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-35
Compensation Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-39
Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-59
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 1
Page 40
2 G Code
2 - 2
NJ/NY-series G code Instructions Reference Manual (O031)
Page 41
2

Interpolation Functions

Instruction Name Page
G00 Rapid Positioning P. 2-4 G01 Linear Interpolation P. 2-6 G02/G03 Circular Interpolation P. 2-8 G31 Skip Function P. 2-13
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 3
Page 42
2 G Code

G00 Rapid Positioning

This instruction positions a tool.
Modal/Non-modal Modal Modal group 01 Rapid Positioning Instruction format G00 X- Y- Z- A- B- C- Relevant G codes G90, G91
Parameters
X Target X-axis Position Specifies the destination position [command units] on the
Y Target Y-axis Position Specifies the destination position [command units] on the
Z Target Z-axis Position Specifies the destination position [command units] on the
A Target A-axis Position Specifies the destination position [command units] on the
B Target B-axis Position Specifies the destination position [command units] on the
C Target C-axis Position Specifies the destination position [command units] on the
Parameter Name Description
X-axis.
Y-a xi s.
Z-axis.
A-axis.
B-axis.
C-axis.
Function
Use this command to position a tool.
It moves the tool from the current position to a specified position in the minimum period of time with the CNC motor parameters and CNC coordinate system parameters. Write the command according to the instruction format. The description of each coordinate can be omitted.
This function does not guarantee the trace. If the linear trace is required, use the linear interpolation (G01).
The command position follows the specifications for the Absolute Dimension (G90) and Incremental Dimension (G91).
2 - 4
NJ/NY-series G code Instructions Reference Manual (O031)
Page 43
Programming Example
Y
X
50
100
2 G Code
The following program performs positioning with the absolute dimensions.
: N010 G90 // Absolute dimension N011 G00 X100 Y50
G00 Rapid Positioning
2
Programming Example
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 5
Page 44
2 G Code

G01 Linear Interpolation

This instruction performs linear interpolation.
Modal/Non-modal Modal Modal group 01 Rapid Positioning Instruction format G01 F- ta- td- ts- X- Y- Z- A- B- C- Relevant G codes G90, G91, F, ta, td, ts
Parameters
F Target Velocity Specifies the target velocity [command units/min]. ta Acceleration Time Specifies the acceleration time [ms]. td Deceleration Time Specifies the deceleration time [ms]. ts Jerk Time Specifies the jerk time [ms]. X Target X-axis Position Specifies the destination position [command units] on the
Y Target Y-axis Position Specifies the destination position [command units] on the
Z Target Z-axis Position Specifies the destination position [command units] on the
A Target A-axis Position Specifies the destination position [command units] on the
B Target B-axis Position Specifies the destination position [command units] on the
C Target C-axis Position Specifies the destination position [command units] on the
Parameter Name Description
X-axis.
Y-a xi s.
Z-axis.
A-axis.
B-axis.
C-axis.
2 - 6
NJ/NY-series G code Instructions Reference Manual (O031)
Page 45
Function
Y
X
50
100
Current position
This command moves the CNC motor with the specified velocity, acceleration time, deceleration time, and jerk time to operate a tool linearly from the current position to a target position.
Unlike G00, if two or more continuous operating functions are aligned, the commands are blended to accelerate or decelerate.
The command position follows the specifications for the Absolute Dimension (G90) and Incremental Dimension (G91).
2 G Code
G01 Linear Interpolation
G01 uses the following settings for its operation.
Command Description Unit
F Target Velocity command unit/min ta Acceleration Time ms td Deceleration Time ms ts Jerk Time ms
The F command calculates velocity by using X-, Y-, and Z-axis. If the user selects A-, B-, or C-axis, the axis is operated at the rotational axis speed.
For relationship between acceleration time, deceleration time, and jerk time and the speed waveforms, refer to the programming example of G64 Continuous-path Mode on page 2-22.
Programming Example
The following program performs linear interpolation with the absolute dimension.
: N010 G90 // Absolute dimension N011 G01 X100 Y50 F300
:
2
Function
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 7
Page 46
2 G Code

G02, G03 Circular Interpolation

These instructions perform circular interpolation.
Modal/Non-modal Modal Modal group 01 Rapid Positioning
Instruction format
Relevant G codes G90, G91, G17, G18, G19
Parameters
F Target Velocity Specifies the target velocity [command units/min]. ta Acceleration Time Specifies the acceleration time [ms]. td Deceleration Time Specifies the deceleration time [ms]. ts Jerk Time Specifies the jerk time [ms]. X Target X-axis Position Specifies the destination position [command units] on the
Y Target Y-axis Position Specifies the destination position [command units] on the
Z Target Z-axis Position Specifies the destination position [command units] on the
A Target A-axis Position Specifies the destination position [command units] on the
B Target B-axis Position Specifies the destination position [command units] on the
C Target C-axis Position Specifies the destination position [command units] on the
I X-axis arc center Specifies the arc center [command units] on the X-axis. J Y-axis arc center Specifies the arc center [command units] on the Y-axis. K Z-axis arc center Specifies the arc center [command units] on the Z-axis. R Arc radius Specifies the arc radius [command units].
Circular Interpola­tion in CW direction
Circular Interpola­tion in CCW direction
Parameter Name Description
When specifying the arc center
When specifying the arc G02 F- ta- td- ts- X- Y- Z- R- A- B- C-
When specifying the arc center When specifying the arc G03 F- ta- td- ts- X- Y- Z- R- A- B- C-
X-axis.
Y-a xi s.
Z-axis.
A-axis.
B-axis.
C-axis.
G02 F- ta- td- ts- X- Y- Z- I- J- K- A- B- C-
G03 F- ta- td- ts- X- Y- Z- I- J- K- A- B- C-
2 - 8
NJ/NY-series G code Instructions Reference Manual (O031)
Page 47
Function
Y
X
50
90
10
10050
Current position
Center
Target Position
This command moves CNC motors with the specified velocity, acceleration time, deceleration time, and jerk time to operate a tool in an arc motion from the current position to a target position.
For relationship between acceleration time, deceleration time, and jerk time and the speed waveforms, refer to the programming example of G64 Continuous-path Mode on page 2-22.
When this command is executed, the arc path is calculated on the XY, YZ, or ZX plane. If you select an axis other than those composing the plane to specify a position, the path is linear.
If both IJK and R are omitted, an error occurs. Also, if R0 is specified, the linear path is set.
Programming Example
The following shows circular interpolation with Arc center specification
:
N010 G90 ..................Absolute dimension
N011 G17 ..................XY Plane selection
N010 G02 X100 Y90 I0 J40 F300
:
2 G Code
G02, G03 Circular Interpolation
2
Function
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 9
Page 48
2 G Code
The following shows circular interpolation with Arc radius specification
N010 G90 .................. Absolute dimension
N011 G17 .................. XY Plane selection
N012 G02 X140 Y50 R-40 F300
When radius < 0, a circle larger than a semicircle is drawn.
(radius < 0)
:
:
Y
90
50
10
Center
Current position
10050
Target Position
The following shows circular interpolation with Arc radius specification
(radius > 0)
:
N010 G91 .................. Incremental dimension
N011 G17 .................. XY Plane selection
N012 G02 X40 Y40 R40 F300
:
When radius > 0, a circle smaller than a semicircle is drawn.
Y
X
2 - 10
90
50
10
Target Position
Current position
10050
NJ/NY-series G code Instructions Reference Manual (O031)
Center
X
Page 49
2 G Code
-90
100
90
80
70
60
50
40
30
20
10
0
-40 -30 -20 -10 -90 10 20 30 40 50
X
Y
30
-50
-40
-30
-20
-10 0
10
20
30
40
50
0
10
20
30
40
50
60
70
80
90
100
25 20 15 10
5 0
Y
X
Z
Spiral interpolation
N01 G17 G64 G91 F1000 N02 M03 S300 N03 G02 Y10 J50 // First rotation of spiral interpolation N04 Y10 J40 // Second rotation of spiral interpolation N05 Y10 J30 // Third rotation of spiral interpolation N06 M05 N07 M30 // End of program
G02, G03 Circular Interpolation
2
Programming Example
Helical interpolation
N01 G17 G64 G91 F1000 N02 M03 S300 N03 G02 J50 Z10 // First rotation of helical interpolation N04 J50 Z10 // Second rotation of helical interpolation N05 J50 Z10 // Third rotation of helical interpolation N06 M05 N07 M30 // End of program
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 11
Page 50
2 G Code
Conical interpolation
N01 G17 G64 G91 F1000 N02 M03 S300 N03 G02 Y10 J50 Z10 // First rotation of conical interpolation N04 Y10 J40 Z10 // Second rotation of conical interpolation N05 Y10 J30 Z10 // Third rotation of conical interpolation N06 M05 N07 M30 // End of program
30 25 20 15
Z
10
5 0
100
-50
-40
-30
-20
70
60
-10 0
10
X
20
30
40
50
10
0
30
20
50
40
90
80
Y
2 - 12
NJ/NY-series G code Instructions Reference Manual (O031)
Page 51

G31 Skip Function

If a skip signal is input externally during execution of a movement command, the commanded move­ment is interrupted to execute commands in the next block.
Modal/Non-modal Non-modal Modal group 00 Non-modal Instruction format G31 X- Y- Z- A- B- C- Relevant G codes G90, G91
2 G Code
G31 Skip Function
2
Parameters
X Target X-axis Position Specifies the destination position [command units] on the
Y Target Y-axis Position Specifies the destination position [command units] on the
Z Target Z-axis Position Specifies the destination position [command units] on the
A Target A-axis Position Specifies the destination position [command units] on the
B Target B-axis Position Specifies the destination position [command units] on the
C Target C-axis Position Specifies the destination position [command units] on the
Function
This command interrupts movement with Rapid Positioning (G00) and external input. Each CNC motor assigned to a command axis operates independently to the command position.
All the CNC motors start moving simultaneously and operate according to respective parameters. If you want to unify external inputs, set the same signal for all the inputs.
Each CNC motor also stops independently. Until all of the CNC motors stop, the process does not pro­ceed to the next block. This command is not blended with other operations.
If there is an input externally to a CNC motor, the motor is moved to the captured position. Otherwise, it stops at the command position. The basic operation is the same as that of Rapid Positioning (G00). The command position follows the specifications for the Absolute Dimension (G90) and Incremental Dimen­sion (G91). The velocity must be specified as the Skip Velocity (CNC motor setting). For details, refer to the NJ/NY-series NC Integrated Controller User’s Manual (Cat. No. O030). The user can read the posi- tions captured by _CNC_CapturedPosition(), which are sorted in ascending order of CNC motor num­bers. For example, if the CNC coordinate system has CNC motors 1/3/4, _CNC_CapturedPosition(0) indicates CNC motor 1, _CNC_CapturedPosition(1) indicates CNC motor 3, and _CNC_CapturedPosi­tion(2) indicates CNC motor 4.
For inputting skip signal, consult the instruction manual provided by the machine tool manufacturer.
Parameters
Parameter Name Description
X-axis.
Y-a xi s.
Z-axis.
A-axis.
B-axis.
C-axis.
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 13
Page 52
2 G Code
_
Drop
Trigger position
1S-series Servo Drive EtherCAT communications built-in type
Sensor
Programming Example
Use the skip function and measure the wear volume of tool length. In this example, the tool touches the sensor and skip signal is input while it moves toward the cutting surface. The stop position is captured using the skip signal, and notified to the sequence control program as an argument of M code output. Based on the captured position, calculate the wear volume of tool length in the sequence control pro­gram. For the procedure for setting the wear volume of tool length that was calculated, refer to the How to Enable Tool Replacement in the NJ/NY-series NC Integrated Controller User’s Manual (Cat. No. O030).
N01 G17 G91 G64 F1000 N02 G28 X5 Y5 // Moves to the position to start measuring the
N03 G31 Z-10 // Moves to the cutting surface. N04 M101 VA[_CNC_CapturedPosi-
tion2] N05 M30
wear volume of tool length.
// Notification to the sequence control program
Use of M101 for transferring the captured data to the sequence control program is an example. When using this command, refer to the instruction manual provided by the machine tool manufacturer.
Z
N03
CNC_CapturedPosition(2)
Stop
0
Sensor input
Time
2 - 14
NJ/NY-series G code Instructions Reference Manual (O031)
Page 53
2

Dwell

Instruction Name Page
G04 Dwell P. 2-16
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 15
Page 54
2 G Code
N010 N011 N012
Velocity
10 seconds
Time

G04 Dwell

This instruction stops the NC program only for a specified period of time.
Modal/Non-modal Non-modal Modal group 00 Non-modal
Instruction format
Relevant G codes
Parameters
F Specification in seconds Specifies a stop time [s] of the NC program. X Specification in seconds Specifies a stop time [s] of the NC program. P Specification in millisec-
Function
The CNC coordinate system for which G04 is executed stops for the period of time specified by F, P, or X parameter indicating the number of seconds. The unit of time period specified by F or X parameter is second, and for P parameter is millisecond.
G04 F-
G04 P-
G04 X-
Parameter Name Description
Specifies a stop time [ms] of the NC program.
onds
The G04 command only stops axis motions. It does not affect the spindle axis and device functions controlled by sequence control programs. If no parameter is specified, Dwell of 0 second, the default value will be executed.
Programming Example
The following program waits for 10 seconds between linear interpolations.
: N010 G01 X100 Y100 F50 N011 G04 X10 N012 G01 X200 Y200
:
2 - 16
NJ/NY-series G code Instructions Reference Manual (O031)
Page 55
2

Feed Functions

Instruction Name Page
F Function Feedrate Function (F function) P. 2-18 ta/td/ts Acceleration Time, Deceleration
Time, Jerk Time G09 Exact Stop P. 2-20 G61 Exact Stop Mode P. 2-21 G64 Continuous-path Mode P. 2-22 G500/G501 Multi-block Acceleration/Deceler-
ation Rate
P. 2-19
P. 2-24
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 17
Page 56
2 G Code

Feedrate Function (F function)

This instruction specifies the feedrate.
Modal/Non-modal Modal Instruction format F{data} Relevant G codes G01, G02, G03
This instruction specifies the feedrate using a numeric value after the F code.
Zero (0) and a negative value cannot be specified.
The velocity is specified in command units/min. (the feedrate per minute).
The positioning axis is not operated simply by specifying the feedrate.
Use a feed command to move the positioning axis.
For relationship between the feedrate and speed waveforms, refer to the programming example of G64 Continuous-path Mode on page 2-22.
2 - 18
NJ/NY-series G code Instructions Reference Manual (O031)
Page 57
2 G Code

Acceleration Time, Deceleration Time, Jerk Time

Acceleration Time, Deceleration Time, Jerk
These instructions specify an acceleration time, deceleration time, and jerk time.
Modal/Non-modal Modal
Acceleration Time ta{data}
Instruction format
Relevant G codes G01, G02, G03
Specify the acceleration time with a numeric value after the ta code. Specify the deceleration time with a numeric value after the td code. Specify the jerk time with a numeric value after the ts code.
The unit of time is in milliseconds.
For relationship between acceleration time, deceleration time, and jerk time and the speed waveforms, refer to the programming example of G64 Continuous-path Mode on page 2-22.
Deceleration Time td{data} Jerk Time ts{data}
Time
2
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 19
Page 58
2 G Code
0
Feedrate
Time
N02 N03 N04 N05

G09 Exact Stop

This instruction stops deceleration upon termination of the block that is currently running.
Modal/Non-modal Non-modal Modal group 00 Non-modal Instruction format G09 Relevant G codes G01, G02, G03
Parameters
This command does not have any parameters to set.
Function
Executing G09 decelerates to a stop simultaneously with in-position check upon the termination of a block. It is used to prevent blending operations with the next block, such as cutting corners with an acute angle. This code is only valid for the current block.
Programming Example
Among movement commands between multiple blocks, the following program prevents blending opera­tions between certain blocks, and decelerates to a stop.
N01 G01 G91 G64 F500 // Continuous-path mode N02 X10 N03 G09 X10 // N02 and N03 are not blended N04 X10 G09 // N04 and N05 are not blended N05 X10 N06 M30
2 - 20
NJ/NY-series G code Instructions Reference Manual (O031)
Page 59

G61 Exact Stop Mode

2 G Code
G61 Exact Stop Mode
This instruction stops operation between blocks to prevent corner blending from being executed.
Modal/Non-modal Modal Modal group 15 Path Control Instruction format G61 Relevant G codes G01, G02, G03
Parameters
This command does not have any parameters to set.
Function
The G61 stops an operation between blocks to prevent the execution of blending of the corner and cut­ting corners with an acute angle during operation. When G61 is commanded, deceleration is applied to the end point of the cutting block, then an in-position check of each block is executed. G61 maintains the valid state until G64 (Continuous-path Mode) is commanded. Continuous-path Mode (G64) is the default value at startup.
Programming Example
2
Parameters
Refer to the programming example of G64 Continuous-path Mode on page 2-22.
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 21
Page 60
2 G Code

G64 Continuous-path Mode

When two or more sequential operations are aligned, the former can be blended with the latter and
Parameters
accelerated/decelerated.
Modal/Non-modal Modal Modal group 15 Path Control Instruction format G64 Relevant G codes G01, G02, G03, G500, G501
This command does not have any parameters to set.
Function
When G64 is commanded, it is not decelerated to the end point of each block after the command, and cutting is blended with the next block. This command maintains the valid state until G61 is commanded. However, G64 causes the feedrate to be decelerated to 0, and an in-position check is executed in the following cases:
• G00 Rapid Positioning
• G09 Exact Stop
• Block with no movement command in the next block
This does not apply to Multi-block Acceleration/Deceleration Rate Enable (G500).
Refer to G500, G501 Multi-block Acceleration/Deceleration Rate on page 2-24 for details.
Programming Example
In the process of a movement command drawing a rectangle, Continuous-path Mode is switched to Exact Stop Mode.
N01 G17 G91 G01 ta1000 td1000 ts500 F1000 N02 M03 S1000 N03 G64 // Continuous-path mode N04 X80 N05 Y40 N06 G61 // Exact stop mode N07 X-80 N08 Y-40 N09 M30
2 - 22
NJ/NY-series G code Instructions Reference Manual (O031)
Page 61
2 G Code
0
40
X
Y
N07
80
N05
N04
N08
N06
td + ts
N04 N05
N07 N08
X Y
ta + ts
1500
1000
500
0
-500
-1000
-1500
ts ts ts ts
Feedrate
Time
This shows the path of X-Y plane.
Shows the speed waveforms. The parameters shown in the figure are values ta=1000, td=1000, and ts=500 that have been specified in the NC program.
G64 Continuous-path Mode
2
Programming Example
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 23
Page 62
2 G Code
G500, G501 Multi-block Accelera­tion/Deceleration Rate
Modal/Non-modal Modal Modal group 23 Multi-block Acceleration/Deceleration Rate Instruction format G500, G501 Relevant G codes G01, G02, G03, G64
Parameters
This command does not have any parameters to set.
Function
When this command is enabled in Continuous-path Mode, the Controller reads the path ahead and searches for a location where the limitation of position, velocity or acceleration may be exceeded. When the location is found, it decelerates the path to control within the limit range. This change applies retroactively to the path previously calculated, and is completed prior to actual execution.
G500 enables, and G501 disables. G500 must be used simultaneously with Continuous-path Mode (G64). If G500 is used together with the Exact Stop Mode (G61), it operates in the Exact Stop Mode.
If the multi-block acceleration/deceleration rate is disabled, accelerate to the feedrate in the first block, and decelerate in the last block. For this reason, if the specified travel distance is small in accelera­tion/deceleration operation, the operation is such that the maximum acceleration rate is exceeded.
When the multi-block acceleration/deceleration rate is enabled, accelerate or decelerate to the feedrate across multiple blocks so that the maximum acceleration rate of each motor is not exceeded.
If the multi-block acceleration/deceleration rate is disabled (G501), the following restrictions apply.
• The maximum acceleration or deceleration (CNC motor setting) is made invalid.
• The Back Trace cannot be used.
2 - 24
NJ/NY-series G code Instructions Reference Manual (O031)
Page 63
Programming Example
The following program shows a movement command which draws a line with a series of infinitesimal movements when the multi-block acceleration/deceleration rate is enabled or disabled.
N01 G17 G64 G91 G01 F100 N02 M03 S300 N03 G500 // Enables multi-block acceleration/deceleration rate N04 X1 N05 X1 N06 X1 N07 X1 N08 X1 N09 X1 N10 X1 N11 X1 N12 X1 N13 X1 N14 M05 N15 M30
2 G Code
G500, G501 Multi-block Acceleration/Decel-
eration Rate
2
Programming Example
V
F
0
Feedrate
N04
N05
N06
N07
VF: Velocity specified by F code
N08 N09
N10
N11
N12
N13
Time
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 25
Page 64
2 G Code
0
Feedrate
Time
N04
N05 N06 N07 N08 N09 N10 N11 N12
N13
V
F
VF: Velocity specified by F code
N01 G17 G64 G91 G01 F100 N02 M03 S300 N03 G501 // Disables multi-block acceleration/deceleration rate N04 X1 N05 X1 N06 X1 N07 X1 N08 X1 N09 X1 N10 X1 N11 X1 N12 X1 N13 X1 N14 M05 N15 M30
2 - 26
NJ/NY-series G code Instructions Reference Manual (O031)
Page 65
2

Coordinate System

Instruction Name Page
G52 Local Coordinate System Set P. 2-28 G53 Dimension Shift Cancel P. 2-29 G54 to G59 Select Work Coordinate System P. 2-30 G17/G18/G19 Plane Selection P. 2-31 G20/G21 Inch Input/Metric Input P. 2-32 G90/G91 Absolute Dimension/Incremental
Dimension
P. 2-33
For coordinate system types, refer to the NJ/NY-series NC Integrated Controller User’s Manual (Cat. No. O030).
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 27
Page 66
2 G Code

G52 Local Coordinate System Set

This instruction creates coordinate system in the Work Coordinate System.
Modal/Non-modal Non-modal Modal group 00 Non-modal
Instruction format
Relevant G codes G50, G51, G50.1, G51.1, G68, G69, G54 to G59
Parameters
Parameter Name Description
X X-axis offset Specifies an X-axis offset [command units] of the coordinate
Y Y-axis offset Specifies a Y-axis offset [command units] of the coordinate
Z Z-axis offset Specifies a Z-axis offset [command units] of the coordinate
A A-axis offset Specifies an A-axis offset [command units] of the coordinate
B B-axis offset Specifies a B-axis offset [command units] of the coordinate
C C-axis offset Specifies a C-axis offset [command units] of the coordinate
Local Coordinate System Setting
Set a Local Coordinate Sys­tem.
Release a Local Coordinate System.
system.
system.
system.
system.
system.
system.
G52 X- Y- Z- A- B- C-
G52 X0 Y0 Z0 A0 B0 C0
Function
This command adds an offset specified by the parameter to the current coordinate system.
To release the offset, either set it to zero (0) or omit the all axis parameters.
This command releases Scaling (G50/G51), Mirroring (G50.1/G51.1), and Coordinate System Rotation (G68/G69).
2 - 28
NJ/NY-series G code Instructions Reference Manual (O031)
Page 67
2 G Code

G53 Dimension Shift Cancel

Parameters
This instruction runs commands in the machine coordinate system.
Modal/Non-modal Non-modal Modal group 00 Non-modal Instruction format G53 X- Y- Z- A- B- C-
Relevant G codes
Parameter Name Description
X Target X-axis Position Specifies the destination position [command units] on the
Y Target Y-axis Position Specifies the destination position [command units] on the
Z Target Z-axis Position Specifies the destination position [command units] on the
A Target A-axis Position Specifies the destination position [command units] on the
B Target B-axis Position Specifies the destination position [command units] on the
C Target C-axis Position Specifies the destination position [command units] on the
G50, G51, G50.1, G51.1, G68, G69, G52, G54 to G59, G40, G41, G42, G43, G44, G49
X-axis.
Y-a xi s.
Z-axis.
A-axis.
B-axis.
C-axis.
G53 Dimension Shift Cancel
2
Parameters
Function
This command runs rapid positioning commands in the machine coordinates, i.e., coordinates without compensation. The command values are always handled as absolute values, and other movement behaviors follow G00 Rapid Positioning.
This command releases Scaling (G50/G51), Mirroring (G50.1/G51.1), Coordinate System Rotation (G68/G69), and the Local Coordinate System Set (G52). It temporarily releases Zero Shift (G54 to G59) during operation, and maintains the current status of Inch Input/Metric Input (G20/G21). Tool Offset (G43/G44/G49) and Cutter Compensation (G40/G41/G42) must be released prior to execution of this command.
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 29
Page 68
2 G Code
G54 to G59 Select Work Coordi­nate System
These instructions change the current Work Coordinate System.
Modal/Non-modal Modal Modal group 14 Coordinate System Selection
Instruction format
Relevant G codes G50, G51, G50.1, G51.1, G53, G68, G69
Parameters
This command does not have any parameters to set.
Function
Changes the current coordinate system to a specified one defined by the user by using the offsets of X-, Y-, Z-, A-, B-, and C-axis.
This command releases Scaling (G50/G51), Mirroring (G50.1/G51.1), and Coordinate System Rotation (G68/G69).
For offset settings of work coordinate system, refer to the Work Coordinate System Offset Parameters of NJ/NY-series NC Controller User’s Manual (Cat. No. O030).
1st work coordinate system G54 2nd work coordinate system G55 3rd work coordinate system G56 4th work coordinate system G57 5th work coordinate system G58 6th work coordinate system G59
2 - 30
NJ/NY-series G code Instructions Reference Manual (O031)
Page 69
2 G Code

G17, G18, G19 Plane Selection

Parameters
Function
These instructions select a plane to be the basis of instructions.
Modal/Non-modal Modal Modal group 02 Plane
X-Y Plane G17
Instruction format
Relevant G codes G02, G03, G41, G42, G68, G69
Z-X Plane G18 Y-Z Plane G19
This command does not have any parameters to set.
This command selects a plane, the reference of Circular Interpolation (G02/G03), Cutter Compensation (G40/G41/G42), and Coordinate System Rotation (G68/G69). You can specify XY (G17), ZX (G18), and YZ (G19). XY is specified at startup. Refer to G02, G03 Circular Interpolation on page 2-8, G40, G41, G42 Cutter Compensation on page 2-40, G68, G69 Coordinate System Rotation on page 2-57 for details.
G17, G18, G19 Plane Selection
2
Parameters
Precaution for Usage
Depending on plane selection of G17/G18/G19, some G codes change operation while others do not change operation. The following shows operations changed according to plane selection.
• G41/G42 (Cutter Compen­sation):
• G43/G44 (Tool Offset): The tool length is compensated for Z-axis regardless of the selected plane. No
• G74/84 (Fixed Cycle): During a fixed cycle, the cutting is executed in the Z-axis direction regardless of
Refer to the following table for the relationship between plane selection and each G code.
G Code
G17 (XY Plane Selec­tion)
G18 (ZX Plane Selection)
G19 (YZ Plane Selection)
The cutter radius is compensated for the selected plane. An error will occur if planes are switched during cutter compensation.
error will occur even if planes are switched during tool offset.
the selected plane.
G41/G42 (Cutter Com-
pensation)
The cutter radius is com­pensated for the XY plane. The cutter radius is com­pensated for the ZX plane. The cutter radius is com­pensated for the YZ plane.
G43/G44 (Tool Offset) G74/84 (Fixed Cycle)
The tool length is compen­sated in the Z-axis direc­tion.
Fixed cycle operation is fixed to the Z-axis direc­tion.
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 31
Page 70
2 G Code

G20 Inch Input, G21 Metric Input

These instructions toggle the units.
Modal/Non-modal Modal Modal group 06 Unit
Instruction format
Relevant G codes ---
Parameters
This command does not have any parameters to set.
Function
Switches all the settings of the CNC coordinate system, command values, and the unit of current val­ues. You can select “inch” or “mm” for the unit. For example, for the maximum velocity of a CNC coordi­nate system, only the interpretation of the unit system can be changed without changing values.
Inch input G20 Metric input G21
2 - 32
NJ/NY-series G code Instructions Reference Manual (O031)
Page 71
G90 Absolute Dimension,
Y
X
G90 G91
N03
N03
N02
N04
N04
N05
N01 G01 N02 X4 Y-2 N03 X-2 Y3 N04 X-2 Y-1 N05 X0 Y0
G91 Incremental Dimension
These instructions set a feed command to the Absolute Dimension or Incremental Dimension com-
Parameters
mand.
Modal/Non-modal Modal Modal group 03 Distance
Instruction format
Relevant G codes
Absolute command G90 Incremental command G91
G00, G01, G02, G03, G28, G30, G31, G74, G84, G50, G51, G50.1, G51.1, G68, G69
2 G Code
G90 Absolute Dimension, G91 Incremental
Dimension
2
Parameters
This command does not have any parameters to set.
Function
Absolute position mode and Incremental position mode is provided for operating functions. Executing G90 enables absolute position mode for all axes in the CNC coordinate system, and moves the axes to a specified position in the current coordinate system. Executing G91 enables Incremental position mode for all axes in the CNC coordinate system, and moves the axes a certain distance from the last command position. By default, absolute position mode is enabled for all axes.
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 33
Page 72
2 G Code
2 - 34
NJ/NY-series G code Instructions Reference Manual (O031)
Page 73
2

Reference Point

Instruction Name Page
G28 Return to Reference Point P. 2-36 G30 Return to 2nd, 3rd and 4th Refer-
ence Point
P. 2-38
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 35
Page 74
2 G Code

G28 Return to Reference Point

Modal/Non-modal Non-modal Modal group 00 Non-modal Instruction format G28 X- Y- Z- A- B- C-
Relevant G codes
Parameters
This instruction returns the tool automatically to the reference point via the specified middle point.
X X-axis middle point Specifies a middle point [command units] on the X-axis. Y Y-axis middle point Specifies a middle point [command units] on the Y-axis. Z Z-axis middle point Specifies a middle point [command units] on the Z-axis. A A-axis middle point Specifies a middle point [command units] on the A-axis. B B-axis middle point Specifies a middle point [command units] on the B-axis. C C-axis middle point Specifies a middle point [command units] on the C-axis.
Function
The G28 command moves the tool to the optional middle point at rapid feed, then returns it to the refer­ence point. If the middle point is not specified, the tool returns directly to the reference point.
• The tool is moved to the reference point (position 0) via the middle point.
• The middle point follows the specifications for the Absolute Dimension (G90) and Incremental Dimen­sion (G91).
• The only axis that operates is the one for which the middle point is specified.
• Motion to each point follows the Rapid Positioning (G00) specifications.
• After the middle point is reached, this command releases Scaling (G50/G51), Mirroring (G50.1/G51.1), and Coordinate System Rotation (G68/G69). During motion between the middle point and reference point, this command also releases Zero Shift (G54 to G59) temporarily. It maintains the current status of Inch Input (G20) and Metric Input (G21). Tool Offset (G43/G44/G49) and Cutter Compensation (G40/G41/G42) must be released prior to execution of this command.
G90, G91, G50, G51, G50.1, G51.1, G68, G69, G54 to G59, G40, G41, G42, G43, G44, G49
Parameter Name Description
2 - 36
NJ/NY-series G code Instructions Reference Manual (O031)
Page 75
Programming Example
0
N03
N08
N07
(10, 10)
N08
N04
N05
N06
Y
X
30
20
10
5010
Middle position
Reference point
(0, 0)
After cutting operation, the tool moves to the middle position (10, 10) and returns to the reference point (0, 0).
N01 G17 G91 G64 F1000 N02 M03 S500 N03 G00 X10 Y20 N04 G01 X40 N05 Y10 N06 X-40 N07 Y-10 N08 G28 X0 Y-10 // Return to reference point N09 M30
2 G Code
G28 Return to Reference Point
2
Programming Example
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 37
Page 76
2 G Code

G30 Return to 2nd, 3rd and 4th Reference Point

This instruction returns the tool to the 2nd, 3rd, or 4th reference point.
Modal/Non-modal Non-modal Modal group 00 Non-modal
Instruction format
Relevant G codes
Parameters
X X-axis middle point Specifies a middle point [command units] on the X-axis. Y Y-axis middle point Specifies a middle point [command units] on the Y-axis. Z Z-axis middle point Specifies a middle point [command units] on the Z-axis. A A-axis middle point Specifies a middle point [command units] on the A-axis. B B-axis middle point Specifies a middle point [command units] on the B-axis. C C-axis middle point Specifies a middle point [command units] on the C-axis. P Reference point setting Reference point
Return to 2nd, 3rd or 4th Ref­erence Point
Parameter Name Description
Return to 2nd Reference Point G30 X- Y- Z- A- B- C­Return to 2nd Reference Point G30 P2 X- Y- Z- A- B- C­Return to 3rd Reference Point G30 P3 X- Y- Z- A- B- C­Return to 4th Reference Point G30 P4 X- Y- Z- A- B- C­G90, G91, G50, G51, G50.1, G51.1, G68, G69, G54 to G59, G40, G41, G42, G43, G44, G49
Function
This command moves the tool to the 2nd, 3rd, or 4th reference point. The reference points follows the settings. The reference points are identified by the P word. The operation for this command is the same as that for the Return to Reference Point (G28).
2 - 38
NJ/NY-series G code Instructions Reference Manual (O031)
Page 77
2

Compensation Functions

Instruction Name Page
G40/G41/G42 Cutter Compensation P. 2-40 G43/G44/G49 Tool Offset P. 2-51 G50/G51 Scaling P. 2-53 G50.1/G51.1 Mirroring P. 2-55 G68/G69 Coordinate System Rotation P. 2-57
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 39
Page 78
2 G Code
G40, G41, G42 Cutter Compensa­tion
These instructions compensate the path by considering the tool diameter.
Modal/Non-modal Modal Modal group 07 Tool radius
Instruction format
Relevant G codes G01, G02, G03, G17, G18, G19
Parameters
This command does not have any parameters to set.
Cancels tool compensation G40 Tool Compensation, left G41 Tool Compensation, right G42
2 - 40
NJ/NY-series G code Instructions Reference Manual (O031)
Page 79
Function
Y
X
: Path after correction : Specified path
N01 G17 // XY plane N02 G01 G90 N03 G41 // or G42 N04 X15 Y10 N05 Y20 N06 X40 N07 Y10 N08 G40 N09 Y0
G41 (Left)
G42 (Right)
X
Z
: Path after correction : Specified path
G41 (Left)
G42 (Right)
N09 X0
N08 G40
N07 X10
N06 Z40
N05 X20
N04 Z15 X10
N03 G41 // or G42
N02 G01 G90
N01 G18 // ZX plane
This command assumes the correction of cylindrical tool radius orthogonal to a plane. The correction offset adapts automatically to two axes vertical to the plane, and the corrected path shifts from the com­manded path by the tool radius.
This command acts on G01, G02, and G03. The user can select XY, YZ, or ZX plane with Plane Selec­tion (G17/G18/G19).
G40 is Cutter Compensation Cancel, G41 is Cutter Compensation Left, and G42 is Cutter Compensa­tion Right.
The compensation cannot be started with Circular Interpolation (G02/G03).
The travel distance at startup must be greater than the cutter radius. However, when the tool moves inside the arc, the cutter radius must be smaller than the circular command.
The extent of correction depends on the selected tool.
2 G Code
G40, G41, G42 Cutter Compensation
2
Function
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 41
Page 80
2 G Code
Y
Z
: Path after correction : Specified path
G41 (Left)
G42 (Right)
N09 Z0
N08 G40
N07 Z10
N06 Y40
N05 Z20
N04 Y15 Z10
N03 G41 // or G42
N02 G01 G90
N01 G19 // YZ plane
Compensated circular speed
When Circular Interpolation (G02/G03) is used simultaneously with G40, G41, or G42, the path of the tool center differs from the commanded path that applies to the tool edge. This makes the velocity dif­ferent between the tool center and the commanded path.
The user can select the tool center path after correction or the tool edge path contacting with the com­mand to move the tool at the specified velocity.
2 - 42
NJ/NY-series G code Instructions Reference Manual (O031)
Page 81
2 G Code
X
Y
: Path after correction : Specified path
Arc added
Tool diameter compensation: Corner circular interpolation (Added Arc)
When the angle of a corner exceeds 270 degrees, this command automatically adds an arc with the same radius as the cutter radius.
G40, G41, G42 Cutter Compensation
2
Tool diameter compensation: Corner circular interpolation (Added Arc)
Start of Correction at Inside the Corner
Programmed path Programmed path
Startup move Startup move
Tool center path Tool center path
Linear interpolation operation
Cutter Compensation Cutter
Compensation
Circular interpolation operation
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 43
Page 82
2 G Code
Programmed path
Programmed path
Corrected linear interpolation operation
Corrected circular interpolation operation
Tool center path Tool center path
Startup move
Startup move
Cutter Compensation Cutter Compensation
Cutter Compensation
Programmed path
Programmed path
Arc added
Arc added
Corrected linear interpolation operation
Tool center path
Corrected circular interpolation operation
Tool center path
Startup operation
Startup operation
Cutter Compensation
Cutter
Compensation
Cutter Compensation
Start of Correction at Outside the Corner
No arc is added
An arc is added
2 - 44
NJ/NY-series G code Instructions Reference Manual (O031)
Page 83
Correction processing at Inside the Corner
Programmed path Programmed path
Linear interpolation operation
Linear interpolation operation
Linear interpolation operation
Circular interpolation operation
Tool center path
Tool center path
Cutter Compensation
Cutter Compensation
Cutter Compensation
Cutter Compensation
Programmed path Programmed path
Circular interpolation operation
Circular interpolation operation
Linear interpolation operation
Circular interpolation operation
Tool center path
Tool center path
Cutter Compensation
Cutter Compensation
Cutter Compensation
Cutter Compensation
2 G Code
G40, G41, G42 Cutter Compensation
2
Tool diameter compensation: Corner circular interpolation (Added Arc)
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 45
Page 84
2 G Code
Programmed path Programmed path
Linear interpolation operation
Linear interpolation operation
Arc added
Circular interpolation operation
Tool center path Linear interpolation
operation
Arc added
Tool center path
Cutter Compensation
Cutter Compensation
Cutter Compensation
Cutter Compensation
Programmed path
Programmed path
Linear interpolation operation
Arc added
Circular interpolation operation
Circular interpolation operation
Circular interpolation operation
Tool center path Tool center path
Arc added
Cutter Compensation
Cutter Compensation
Cutter
Compensation
Cutter Compensation
Programmed path Programmed path
Linear interpolation operation
Linear interpolation operation
Circular interpolation operation
Tool center path Linear interpolation
operation
Tool center path
Cutter Compensation Cutter Compensation
Cutter Compensation
Cutter Compensation
Correction processing at Outside the Corner
Cutter radius correction of outside corner with a deep angle
2 - 46
NJ/NY-series G code Instructions Reference Manual (O031)
Page 85
Cutter radius correction of outside corner with a shallow angle
Programmed path Programmed path
Linear interpolation operation
Circular interpolation operation
Circular interpolation operation
Tool center path Tool center path
Cutter Compensation
Cutter Compensation
Cutter Compensation
Cutter Compensation
Programmed path Programmed path
Move of cancel
Move of cancel
Linear interpolation operation
Circular interpolation operation
Tool center path Tool center path
Cutter Compensation Cutter
Compensation
Programmed path
Programmed path
Move of cancel
Move of cancel
Corrected linear interpolation operation
Corrected circular interpolation operation
Tool center path Tool center path
Cutter Compensation
Cutter Compensation
Cutter Compensation
Termination of Correction at Inside the Corner
2 G Code
G40, G41, G42 Cutter Compensation
2
Tool diameter compensation: Corner circular interpolation (Added Arc)
Cancellation of cutter radius correction at inside the corner
Termination of Correction at Outside the Corner
No arc is added
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 47
Page 86
2 G Code
X
Y
: Path after correction
: Specified path
An arc is added
Corrected linear
Tool center path Tool center path
Arc added Arc added
Cutter Compensation
interpolation operation
Programmed path
Cutter Compensation
Cutter Compensation
Corrected circular interpolation operation
Move of cancel
Detection of Overcut
Move of cancel
Programmed path
2 - 48
When an overcut is detected, the operation stops and an error occurs.
To detect an overcut, set the Overcut operation mode to Overcut detection. For details, refer to the NJ/NY-series NC Integrated Controller User’s Manual (Cat. No. O030).
NJ/NY-series G code Instructions Reference Manual (O031)
Page 87
Prevention of Overcut
X
Y
: Path after correction
: Specified path
2 G Code
G40, G41, G42 Cutter Compensation
2
Prevention of Overcut
Programming Example
When an overcut is detected, some operations are skipped to prevent the overcut. If the tool passes the inside of an arc that is smaller than the tool, the error cannot be prevented. The user needs to use a tool smaller than the arc, or change the arc that causes the error to a straight line.
To prevent an over-cut, set the Over-cut operation mode to Prevention of over-cuts. For details, refer to the NJ/NY-series NC Integrated Controller User’s Manual (Cat. No. O030).
The following program executes a series of operations from the start to the end of cutter compensation. The operations consist of the following three steps.
1. Startup operation: Movement to the cutting surface with the first operation command that enabled the cutter compensation by G41/42.
2. Correction operation: Cutting with operation commands between the startup operation and cancel opera­tion.
3. Cancel operation: Leaving from the cutting surface with the first operation command that disabled the cutter compensation by G40.
N01 G500 G17 G64 G91 G01 F100 N02 M100 VA1 // Tool change Tool ID #1 (Cutter radius: 5) N03 S300 M03 N04 G41 // Enables cutter compensation N05 X10 // Startup operation N06 X10 // Correction operation N07 G40 // Disables cutter compensation N08 X10 Y0 Z0 // Cancel operation N09 M30
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 49
Page 88
2 G Code
Use of M100 for transferring the tool change request to the sequence control program is an example. When using this command, refer to the instruction manual provided by the machine tool manufacturer.
Y
N06
N08N05
0
X
Cutter Compensation of G41/G42 has the following restrictions for operation during correction.
• A series of operations such as the startup operation, correction operation, and cancel operation must be provided.
• The modal that can be used during the correction operation is G01/02/03.
• G02/03 cannot be used for the startup operation and cancel operation.
• G00 cannot be used for the startup operation.
• The travel distance of the startup operation and the cancel operation must be equal to or greater than the cutter radius.
• Edge surfaces cannot be switched (between G41 and G42) during the correction operation. For the operation that the tool intersects the edge surface, cancel it once with G40 before switching edge surfaces.
• During tool compensation, M code for which the M code output timing (M code setting) is Synchro­nous, or M code for which parameters are specified cannot be used. For the M code output timing, refer to the NJ/NY-series NC Integrated Controller User’s Manual (Cat. No. O030).
• During correction operation, a single block execution or the program stop by M00/M01 is not allowed.
2 - 50
NJ/NY-series G code Instructions Reference Manual (O031)
Page 89
2 G Code
Z
G43 (+)
G44 (-)
N01 G01 G91 N02 G43 N03 X10 Z15 N04 X10 N05 X10 Z-15 N06 X10 N07 G49
X
: Coordinates after correction : Original coordinates

G43, G44, G49 Tool Offset

Parameters
Function
These instructions compensate the path by considering the tool length.
Modal/Non-modal Modal Modal group 08 Tool length offset
Tool length correction, in positive direction
Instruction format
Relevant G codes G01, G02, G03, G17, G18, G19
Tool length correction, in negative direction Cancels tool offset G49
G43
G44
This command does not have any parameters to set.
This command immediately corrects the position in the Z-axis direction. G43 corrects the position in the positive direction, G44 in the negative direction, and G49 terminates the correction. The extent of cor­rection depends on the selected tool.
G43, G44, G49 Tool Offset
2
Parameters
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 51
Page 90
2 G Code
Programming Example
The following program executes a series of operations from the start to the end of tool offsetting. This sample programming shows the change of tool length during the cutting operation.
N01 G17 G64 G90 G01 F100 N02 M100 VA1 // Tool change Tool ID #1 (Tool length: 8) N03 G43 // Enables tool offset N04 X10 Z-10 N05 X20 N06 M100 VA2 // Tool change Tool ID #2 (Tool length: 6) N07 G43 // Enables tool offset N08 X30 Z-10 N09 X40 N10 G49 // Disables tool offset N11 X50 Z0 // Cancels tool offset N12 M30
Use of M100 for transferring the tool change request to the sequence control program is an example. When using this command, refer to the instruction manual provided by the machine tool manufacturer.
Z
0
-2
-4
-8
-10
10
N04
N05
20 30 40 50
X
N11
Path when tool offset is enabled
Path when tool offset is disabled
N08
N09
2 - 52
NJ/NY-series G code Instructions Reference Manual (O031)
Page 91

G50, G51 Scaling

2 G Code
These instructions magnifies or compresses a commanded shape.
Modal/Non-modal Modal Modal group 11 Scaling
Instruction format
Relevant G codes G00, G01, G02, G03, G90, G91
Parameters
X X-axis center point Specifies a center point [command units] on the X-axis. Y Y-axis center point Specifies a center point [command units] on the Y-axis. Z Z-axis center point Specifies a center point [command units] on the Z-axis. I X-axis scaling magnifica-
J Y-axis scaling magnifica-
K Z-axis scaling magnifica-
P Scaling ratio of all axes Specifies a magnification ratio of all axes.
Disables scaling G50
When specifying the X, Y and
Enables scaling
Parameter Name Description
tion
tion
tion
Z-axis scales simultaneously When specifying the X, Y and Z-axis scales separately
Specifies an X-axis magnification ratio.
Specifies a Y-axis magnification ratio.
Specifies a Z-axis magnification ratio.
G51 X- Y- Z- P-
G51 X- Y- Z- I- J- K-
G50, G51 Scaling
2
Parameters
Function
The G50 and G51 scale the current coordinate system. G50 disables the scaling and G51 enables it. X, Y, and Z parameters indicate the center point. If any of them is omitted, the omitted value is handled as the current position. The values of X, Y, and Z parameters are handled as absolute position. The P parameter indicates the magnification ratio of all of the X-, Y-, and Z-axis, whereas I, J, or K parameter is the magnification ratio of each axis. The I, J, and K parameters are the magnification ratio of X-, Y-, and Z-axis respectively. If any of I, J, and K parameters is omitted, the omitted value is handled as the same size. P parameter is prioritized over I, J, and K parameters.
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 53
Page 92
2 G Code
N14
N17
(20, 15)
Y
X
25
20
20
15
5
0
10
Center point
Programming Example
The following program enlarges the circle defined in the subprogram to double size.
N11 G64 G90 G01 F100 N12 M03 S300 N13 G51 X20 Y15 P2 // Sets scaling to double. N14 M98 P1000 // Cuts the figure of double size (indicated by the solid
line in the following figure). N15 G50 // Disables scaling N16 G01 X0 Y0 N17 M98 P1000 // Cuts the figure of original size (indicated by the
broken line in the following figure). N18 M05 N19 M30
// Subprogram drawing a circle // NC Program No.1000 N01 G17 G01 X20 Y10 N02 G02 X20 Y20 R5 N03 G02 X20 Y10 R5 N04 M99 // End of the subprogram
2 - 54
NJ/NY-series G code Instructions Reference Manual (O031)
Page 93

G50.1, G51.1 Mirroring

2 G Code
G50.1, G51.1 Mirroring
These instructions invert the path on the specified coordinate system.
Modal/Non-modal Modal Modal group 22 Mirroring
Instruction format
Relevant G codes G00, G01, G02, G03, G17, G18, G19
Parameters
X X-axis center point Specifies a center point [command units] on the X-axis. Y Y-axis center point Specifies a center point [command units] on the Y-axis. Z Z-axis center point Specifies a center point [command units] on the Z-axis.
Function
The G50.1 and G51.1 mirror the current coordinates. G50.1 disables mirroring, and releases the mirror­ing of symmetric axes specified by X, Y, and Z parameters in the instruction format. G51.1 enables mir­roring. In the instruction format, X, Y, and Z parameters indicate the symmetric axes. If any of them is omitted, the axis is not mirrored. The values of X, Y, and Z parameters are handled as absolute posi­tions.
Disables mirroring G50.1 Enables mirroring G51.1 X- Y- Z-
2
Parameters
Parameter Name Description
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 55
Page 94
2 G Code
0
N14N17
Y
X
30
30 4020
10
5010
Programming Example
The following program reverses a figure defined in the subprogram across the symmetric axes.
N11 G64 G90 G01 F100 N12 M03 S300 N13 G51.1 X30 // Line symmetry to X=30 N14 M98 P1000 // Cuts the mirrored figure by calling the subprogram
(indicated by the solid line in the following figure). N15 G50.1 N16 G01 X0 Y0 N17 M98 P1000 // Cuts the original figure by calling the subprogram
(indicated by the broken line in the following figure). N18 M05 N19 M30
// Subprogram drawing a figure // NC Program No.1000 N01 G17 G01 X10 Y10 N02 G01 X20 Y10 N03 G01 X20 Y30 N04 G01 X15 Y30 N05 G03 X10 Y25 R5 N06 G01 X10 Y10 N07 M99 // End of the subprogram
As shown in the above figure, the rotation direction of the spindle axis does not change in mirroring. As Up cut/Down cut are not maintained, adjust the rotation direction of the spindle axis according to your purpose.
2 - 56
NJ/NY-series G code Instructions Reference Manual (O031)
Page 95

G68, G69 Coordinate System Rotation

2 G Code
G68, G69 Coordinate System Rotation
These instructions rotate a specified figure.
Modal/Non-modal Modal Modal group 16 rotation
Instruction format
Relevant G codes G00, G01, G02, G03, G17, G18, G19
Parameters
X X-axis center point Specifies a center point [command units] on the X-axis. Y Y-axis center point Specifies a center point [command units] on the Y-axis. Z Z-axis center point Specifies a center point [command units] on the Z-axis. R Rotation angle Specifies a rotation angle [deg].
Function
The G68 and G69 rotate the current coordinates. G69 disables rotations, and G68 enables rotation. In the instruction format, X, Y, and Z indicate the center point. If any of them is omitted, the omitted value is handled as the current position. The X, Y, and Z values are handled as absolute positions. R indi­cates a rotation angle, and if it is omitted, an error occurs. The user can select XY, ZX, or YZ plane by using the G17, G18, or G19.
Enables rotation G68 X- Y- Z- R- Disables rotation G69
Parameter Name Description
2
Parameters
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 57
Page 96
2 G Code
N15
N17
R90
N13
0
Y
X
10
Programming Example
The following program rotates a figure defined in the subprogram.
N11 G17 G64 G91 G01 F1000 N12 M03 S500 N13 X10 N14 G68 X10 Y0 R90 // Sets the rotation angle to 90° N15 M98 P1000 // Cuts the rotated figure (indicated by the solid
line in the following figure) N16 G69 // Disables rotation N17 M98 P1000 // Cuts the unrotated figure (indicated by the
broken line in the following figure) N18 M05 N19 M30
// Subprogram drawing a triangle // NC Program No.1000 N01 G17 G01 X10 Y3 N02 Y-6 N03 X-10 Y3 N04 M99 // End of the subprogram
2 - 58
NJ/NY-series G code Instructions Reference Manual (O031)
Page 97
2

Utilities

Instruction Name Page
G74 Left-handed Tapping Cycle P. 2-60 G80 Fixed Cycle Cancel P. 2-62 G84 Tapping Cycle P. 2-63 G98 Fixed Cycle Return to Initial Level P. 2-66 G99 Fixed Cycle Return to R Point
Level
P. 2-67
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 59
Page 98
2 G Code

G74 Left-handed Tapping Cycle

This instruction performs reverse tapping machining.
Modal/Non-modal Modal Modal group 09 Fixed cycle Instruction format G74 X- Y- Z- R- P- K- Relevant G codes G80, G98, G99, G90, G91
Parameters
X Target X-axis Position Specifies the destination position [command units] on the
Y Target Y-axis Position Specifies the destination position [command units] on the
Z Z point Specifies the position of Z point [command units]. R R point Specifies the position of R point [command units]. P Dwell time Specifies a stop time [ms] at the Z point. K Number of repetitions Specifies a number of repetitions of the fixed cycle.
Function
Parameter Name Description
X-axis.
Y-a xi s.
This command is convenient for tapping. Internally, it is substituted by the code corresponding to the following. This command uses an M code. Therefore, in order to execute the Left-handed Tapping Cycle (G74) or Tapping Cycle (G84) correctly, the M-code reset queue needs to be processed by the sequence control program correctly.
The X and Y words indicate the initial level, Z word indicates the Z point, R word the R point level, P word the dwell time, and K word the number of repetitions. If the K word is omitted, it is assumed to be K=1.
When the CNC coordinate system has the spindle axis
G74 Xx Yy Zz Rr Pp Kk
//if G91 and G98 are activated M19 //Execute below code k times G00 Xx Yy //Initial level G00 Zr //R point level G01 Zz //Z point G04 Pp //dwell G01 Z-z //R point level G00 Z-r //Initial level //End of repetition M5
//if G91 and G99 are activated M19 //Execute below code k times G00 Xx Yy //Initial level (first time) -> R point level (from the second) (G00 Zr //R point level (first time only)) G01 Zz //Z point G04 Pp //dwell G01 Z-z //R point level
//End of repetition M5
2 - 60
The spindle axis internally functions as the C-axis. In this case, positions of Z-axis and spindle axis syn­chronize.
NJ/NY-series G code Instructions Reference Manual (O031)
Page 99
2 G Code
F
S
Spindle speed = Z-axis movement amount ×
G98
G99
X
Z
X
Z
Initial level
R point level
Z point
Initial level
R point level
Z point
If the spindle axis is assigned to the coordinate system, the number of rotations of spindle axis from the
G74 Left-handed Tapping Cycle
R point level to the Z point is as follows.
When the CNC coordinate system does not have the spindle axis
G74 Xx Yy Zz Rr Pp Kk
//if G91 and G98 are activated
//Execute below code k times G00 Xx Yy //Initial level G00 Zr //R point level M19 M04 G01 Zz //Z point G04 Pp //dwell M03 G01 Z-z //R point level M04 G01 Z-r //Initial level
//if G91 and G99 are activated
//Execute below code k times G00 Xx Yy //Initial level (first time) -> R point level (from the second) (G00 Zr //R point level (first time only)) M19 M04 G01 Zz //Z point G04 Pp //dwell M03 G01 Z-z //R point level M04
2
Programming Example
In this case, the Z-axis and spindle axis positions can be synchronized by using the sequence control program.
When the spindle axis is not assigned to the coordinate system and to determine the number of rota­tions of spindle axis, consult the instruction manual provided by the machine tool manufacturer.
Programming Example
Refer to the programming example of G84 Tapping Cycle on page 2-63.
NJ/NY-series G code Instructions Reference Manual (O031)
2 - 61
Page 100
2 G Code

G80 Fixed Cycle Cancel

This instruction cancels a fixed cycle.
Modal/Non-modal Modal Modal group 09 Fixed cycle Instruction format G80 Relevant G codes G74, G84
Parameters
This command does not have any parameters to set.
Function
This command must be inserted into the end of a fixed cycle.
2 - 62
NJ/NY-series G code Instructions Reference Manual (O031)
Loading...