Indicates that incorrect handling may cause hazardous conditions, resulting in
death or severe injury.
CAUTION
Indicates that incorrect handling may cause hazardous conditions, resulting in
minor or moderate injury or property damage.
(Read these precautions before using this product.)
Before using this product, please read this manual and the relevant manuals carefully and pay full attention to safety to handle
the product correctly.
The precautions given in this manual are concerned with this product only. Refer to MELSEC iQ-R Module Configuration
Manual for a description of the PLC system safety precautions.
In this manual, the safety precautions are classified into two levels: " WARNING" and " CAUTION".
Under some circumstances, failure to observe the precautions given under "CAUTION" may lead to serious
consequences.
Observe the precautions of both levels because they are important for personal and system safety.
Make sure that the end users read this manual and then keep the manual in a safe place for future reference.
[Design Precautions]
WARNING
● Configure safety circuits external to the programmable controller to ensure that the entire system
operates safely even when a fault occurs in the external power supply or the programmable controller.
Failure to do so may result in an accident due to an incorrect output or malfunction.
(1) Emergency stop circuits, protection circuits, and protective interlock circuits for conflicting
operations (such as forward/reverse rotations or upper/lower limit positioning) must be configured
external to the programmable controller.
(2) When the programmable controller detects an abnormal condition, it stops the operation and all
outputs are:
• Turned off if the overcurrent or overvoltage protection of the power supply module is activated.
• Held or turned off according to the parameter setting if the self-diagnostic function of the CPU
module detects an error such as a watchdog timer error.
(3) All outputs may be turned on if an error occurs in a part, such as an I/O control part, where the
CPU module cannot detect any error. To ensure safety operation in such a case, provide a safety
mechanism or a fail-safe circuit external to the programmable controller. For a fail-safe circuit
example, refer to "General Safety Requirements" in the MELSEC iQ-R Module Configuration
Manual.
(4) Outputs may remain on or off due to a failure of a component such as a relay and transistor in an
output circuit. Configure an external circuit for monitoring output signals that could cause a
serious accident.
● In an output circuit, when a load current exceeding the rated current or an overcurrent caused by a
load short-circuit flows for a long time, it may cause smoke and fire. To prevent this, configure an
external safety circuit, such as a fuse.
● Configure a circuit so that the programmable controller is turned on first and then the external power
supply. If the external power supply is turned on first, an accident may occur due to an incorrect output
or malfunction.
1
[Design Precautions]
WARNING
● For the operating status of each station after a communication failure, refer to manuals relevant to the
network. Incorrect output or malfunction due to a communication failure may result in an accident.
● When connecting an external device with a CPU module or intelligent function module to modify data
of a running programmable controller, configure an interlock circuit in the program to ensure that the
entire system will always operate safely. For other forms of control (such as program modification,
parameter change, forced output, or operating status change) of a running programmable controller,
read the relevant manuals carefully and ensure that the operation is safe before proceeding. Improper
operation may damage machines or cause accidents.
● Especially, when a remote programmable controller is controlled by an external device, immediate
action cannot be taken if a problem occurs in the programmable controller due to a communication
failure. To prevent this, configure an interlock circuit in the program, and determine corrective actions
to be taken between the external device and CPU module in case of a communication failure.
● Do not write any data to the "system area" and "write-protect area" of the buffer memory in the
module. Also, do not use any "use prohibited" signals as an output signal from the CPU module to
each module. Doing so may cause malfunction of the programmable controller system. For the
"system area", "write-protect area", and the "use prohibited" signals, refer to the user's manual for the
module used.
● If a communication cable is disconnected, the network may be unstable, resulting in a communication
failure of multiple stations. Configure an interlock circuit in the program to ensure that the entire
system will always operate safely even if communications fail. Failure to do so may result in an
accident due to an incorrect output or malfunction.
● To maintain the safety of the programmable controller system against unauthorized access from
external devices via the network, take appropriate measures. To maintain the safety against
unauthorized access via the Internet, take measures such as installing a firewall.
● Configure safety circuits external to the programmable controller to ensure that the entire system
operates safely even when a fault occurs in the external power supply or the programmable controller.
Failure to do so may result in an accident due to an incorrect output or malfunction.
● If safety standards (ex., robot safety rules, etc.,) apply to the system using the module, servo amplifier
and servo motor, make sure that the safety standards are satisfied.
● Construct a safety circuit externally of the module or servo amplifier if the abnormal operation of the
module or servo amplifier differs from the safety directive operation in the system.
● Do not remove the SSCNET cable while turning on the control circuit power supply of modules and
servo amplifier. Do not see directly the light generated from SSCNET connector of the module or
servo amplifier and the end of SSCNET cable. When the light gets into eyes, you may feel
something wrong with eyes. (The light source of SSCNET complies with class1 defined in JISC6802
or IEC60825-1.)
2
[Design Precautions]
CAUTION
● Do not install the control lines or communication cables together with the main circuit lines or power
cables. Keep a distance of 100mm or more between them. Failure to do so may result in malfunction
due to noise.
● During control of an inductive load such as a lamp, heater, or solenoid valve, a large current
(approximately ten times greater than normal) may flow when the output is turned from off to on.
Therefore, use a module that has a sufficient current rating.
● After the CPU module is powered on or is reset, the time taken to enter the RUN status varies
depending on the system configuration, parameter settings, and/or program size. Design circuits so
that the entire system will always operate safely, regardless of the time.
● Do not power off the programmable controller or reset the CPU module while the settings are being
written. Doing so will make the data in the flash ROM and SD memory card undefined. The values
need to be set in the buffer memory and written to the flash ROM and SD memory card again. Doing
so also may cause malfunction or failure of the module.
● When changing the operating status of the CPU module from external devices (such as the remote
RUN/STOP functions), select "Do Not OPEN in Program" for "Open Method Setting" of "Module
Parameter". If "OPEN in Program" is selected, an execution of the remote STOP function causes the
communication line to close. Consequently, the CPU module cannot reopen the line, and external
devices cannot execute the remote RUN function.
[Installation Precautions]
WARNING
● Shut off the external power supply (all phases) used in the system before mounting or removing the
module. Failure to do so may result in electric shock or cause the module to fail or malfunction.
3
[Installation Precautions]
CAUTION
● Use the programmable controller in an environment that meets the general specifications in the Safety
Guidelines included with the base unit. Failure to do so may result in electric shock, fire, malfunction,
or damage to or deterioration of the product.
● To mount a module, place the concave part(s) located at the bottom onto the guide(s) of the base unit,
and push in the module until the hook(s) located at the top snaps into place. Incorrect mounting may
cause malfunction, failure, or drop of the module.
● To mount a module with no module fixing hook, place the concave part(s) located at the bottom onto
the guide(s) of the base unit, push in the module, and fix it with screw(s). Incorrect mounting may
cause malfunction, failure, or drop of the module.
● When using the programmable controller in an environment of frequent vibrations, fix the module with
a screw.
● Tighten the screws within the specified torque range. Undertightening can cause drop of the screw,
short circuit, or malfunction. Overtightening can damage the screw and/or module, resulting in drop,
short circuit, or malfunction.
● When using an extension cable, connect it to the extension cable connector of the base unit securely.
Check the connection for looseness. Poor contact may cause malfunction.
● When using an SD memory card, fully insert it into the SD memory card slot. Check that it is inserted
completely. Poor contact may cause malfunction.
● Securely insert an extended SRAM cassette into the cassette connector of the CPU module. After
insertion, close the cassette cover and check that the cassette is inserted completely. Poor contact
may cause malfunction.
● Do not directly touch any conductive parts and electronic components of the module, SD memory
card, extended SRAM cassette, or connector. Doing so may cause malfunction or failure of the
module.
[Wiring Precautions]
WARNING
● Shut off the external power supply (all phases) used in the system before installation and wiring.
Failure to do so may result in electric shock or cause the module to fail or malfunction.
● After installation and wiring, attach the included terminal cover to the module before turning it on for
operation. Failure to do so may result in electric shock.
4
[Wiring Precautions]
CAUTION
● Individually ground the FG and LG terminals of the programmable controller with a ground resistance
of 100 ohms or less. Failure to do so may result in electric shock or malfunction.
● Use applicable solderless terminals and tighten them within the specified torque range. If any spade
solderless terminal is used, it may be disconnected when the terminal screw comes loose, resulting in
failure.
● Check the rated voltage and signal layout before wiring to the module, and connect the cables
correctly. Connecting a power supply with a different voltage rating or incorrect wiring may cause fire
or failure.
● Connectors for external devices must be crimped or pressed with the tool specified by the
manufacturer, or must be correctly soldered. Incomplete connections may cause short circuit, fire, or
malfunction.
● Securely connect the connector to the module. Poor contact may cause malfunction.
● Do not install the control lines or communication cables together with the main circuit lines or power
cables. Keep a distance of 100mm or more between them. Failure to do so may result in malfunction
due to noise.
● Place the cables in a duct or clamp them. If not, dangling cable may swing or inadvertently be pulled,
resulting in damage to the module or cables or malfunction due to poor contact. Do not clamp the
extension cables with the jacket stripped. Doing so may change the characteristics of the cables,
resulting in malfunction.
● Check the interface type and correctly connect the cable. Incorrect wiring (connecting the cable to an
incorrect interface) may cause failure of the module and external device.
● Tighten the terminal screws or connector screws within the specified torque range. Undertightening
can cause drop of the screw, short circuit, fire, or malfunction. Overtightening can damage the screw
and/or module, resulting in drop, short circuit, fire, or malfunction.
● When disconnecting the cable from the module, do not pull the cable by the cable part. For the cable
with connector, hold the connector part of the cable. For the cable connected to the terminal block,
loosen the terminal screw. Pulling the cable connected to the module may result in malfunction or
damage to the module or cable.
● Prevent foreign matter such as dust or wire chips from entering the module. Such foreign matter can
cause a fire, failure, or malfunction.
● A protective film is attached to the top of the module to prevent foreign matter, such as wire chips,
from entering the module during wiring. Do not remove the film during wiring. Remove it for heat
dissipation before system operation.
● Programmable controllers must be installed in control panels. Connect the main power supply to the
power supply module in the control panel through a relay terminal block. Wiring and replacement of a
power supply module must be performed by qualified maintenance personnel with knowledge of
protection against electric shock. For wiring, refer to the MELSEC iQ-R Module Configuration Manual.
● For Ethernet cables to be used in the system, select the ones that meet the specifications in the user's
manual for the module used. If not, normal data transmission is not guaranteed.
5
[Startup and Maintenance Precautions]
WARNING
● Do not touch any terminal while power is on. Doing so will cause electric shock or malfunction.
● Correctly connect the battery connector. Do not charge, disassemble, heat, short-circuit, solder, or
throw the battery into the fire. Also, do not expose it to liquid or strong shock. Doing so may cause the
battery to generate heat, explode, ignite, or leak, resulting in injury or fire.
● Shut off the external power supply (all phases) used in the system before cleaning the module or
retightening the terminal screws, connector screws, or module fixing screws. Failure to do so may
result in electric shock.
[Startup and Maintenance Precautions]
CAUTION
● When connecting an external device with a CPU module or intelligent function module to modify data
of a running programmable controller, configure an interlock circuit in the program to ensure that the
entire system will always operate safely. For other forms of control (such as program modification,
parameter change, forced output, or operating status change) of a running programmable controller,
read the relevant manuals carefully and ensure that the operation is safe before proceeding. Improper
operation may damage machines or cause accidents.
● Especially, when a remote programmable controller is controlled by an external device, immediate
action cannot be taken if a problem occurs in the programmable controller due to a communication
failure. To prevent this, configure an interlock circuit in the program, and determine corrective actions
to be taken between the external device and CPU module in case of a communication failure.
● Do not disassemble or modify the modules. Doing so may cause failure, malfunction, injury, or a fire.
● Use any radio communication device such as a cellular phone or PHS (Personal Handy-phone
System) more than 25cm away in all directions from the programmable controller. Failure to do so
may cause malfunction.
● Shut off the external power supply (all phases) used in the system before mounting or removing the
module. Failure to do so may cause the module to fail or malfunction.
● Tighten the screws within the specified torque range. Undertightening can cause drop of the
component or wire, short circuit, or malfunction. Overtightening can damage the screw and/or module,
resulting in drop, short circuit, or malfunction.
● After the first use of the product, do not mount/remove the module to/from the base unit, and the
terminal block to/from the module, and do not insert/remove the extended SRAM cassette to/from the
CPU module more than 50 times (IEC 61131-2 compliant) respectively. Exceeding the limit of 50 times
may cause malfunction.
● After the first use of the product, do not insert/remove the SD memory card to/from the CPU module
more than 500 times. Exceeding the limit of 500 times may cause malfunction.
● Do not touch the metal terminals on the back side of the SD memory card. Doing so may cause
malfunction or failure.
● Do not touch the integrated circuits on the circuit board of an extended SRAM cassette. Doing so may
cause malfunction or failure.
● Do not drop or apply shock to the battery to be installed in the module. Doing so may damage the
battery, causing the battery fluid to leak inside the battery. If the battery is dropped or any shock is
applied to it, dispose of it without using.
6
[Startup and Maintenance Precautions]
CAUTION
● Startup and maintenance of a control panel must be performed by qualified maintenance personnel
with knowledge of protection against electric shock. Lock the control panel so that only qualified
maintenance personnel can operate it.
● Before handling the module, touch a conducting object such as a grounded metal to discharge the
static electricity from the human body. Failure to do so may cause the module to fail or malfunction.
● Before testing the operation, set a low speed value for the speed limit parameter so that the operation
can be stopped immediately upon occurrence of a hazardous condition.
● Confirm and adjust the program and each parameter before operation. Unpredictable movements
may occur depending on the machine.
● When using the absolute position system function, on starting up, and when the module or absolute
position motor has been replaced, always perform a home position return.
● Before starting the operation, confirm the brake function.
● Do not perform a megger test (insulation resistance measurement) during inspection.
● After maintenance and inspections are completed, confirm that the position detection of the absolute
position detection function is correct.
● Lock the control panel and prevent access to those who are not certified to handle or install electric
equipment.
[Operating Precautions]
CAUTION
● When changing data and operating status, and modifying program of the running programmable
controller from an external device such as a personal computer connected to an intelligent function
module, read relevant manuals carefully and ensure the safety before operation. Incorrect change or
modification may cause system malfunction, damage to the machines, or accidents.
● Do not power off the programmable controller or reset the CPU module while the setting values in the
buffer memory are being written to the flash ROM in the module. Doing so will make the data in the
flash ROM and SD memory card undefined. The values need to be set in the buffer memory and
written to the flash ROM and SD memory card again. Doing so also may cause malfunction or failure
of the module.
● Note that when the reference axis speed is specified for interpolation operation, the speed of the
partner axis (2nd, 3rd, or 4th axis) may exceed the speed limit value.
● Do not go near the machine during test operations or during operations such as teaching. Doing so
may lead to injuries.
[Disposal Precautions]
CAUTION
● When disposing of this product, treat it as industrial waste.
● When disposing of batteries, separate them from other wastes according to the local regulations. For
details on battery regulations in EU member states, refer to the MELSEC iQ-R Module Configuration
Manual.
7
[Transportation Precautions]
CAUTION
● When transporting lithium batteries, follow the transportation regulations. For details on the regulated
models, refer to the MELSEC iQ-R Module Configuration Manual.
● The halogens (such as fluorine, chlorine, bromine, and iodine), which are contained in a fumigant
used for disinfection and pest control of wood packaging materials, may cause failure of the product.
Prevent the entry of fumigant residues into the product or consider other methods (such as heat
treatment) instead of fumigation. The disinfection and pest control measures must be applied to
unprocessed raw wood.
8
CONDITIONS OF USE FOR THE PRODUCT
(1) Mitsubishi programmable controller ("the PRODUCT") shall be used in conditions;
i) where any problem, fault or failure occurring in the PRODUCT, if any, shall not lead to any major or serious accident;
and
ii) where the backup and fail-safe function are systematically or automatically provided outside of the PRODUCT for the
case of any problem, fault or failure occurring in the PRODUCT.
(2) The PRODUCT has been designed and manufactured for the purpose of being used in general industries.
MITSUBISHI SHALL HAVE NO RESPONSIBILITY OR LIABILITY (INCLUDING, BUT NOT LIMITED TO ANY AND ALL
RESPONSIBILITY OR LIABILITY BASED ON CONTRACT, WARRANTY, TORT, PRODUCT LIABILITY) FOR ANY
INJURY OR DEATH TO PERSONS OR LOSS OR DAMAGE TO PROPERTY CAUSED BY the PRODUCT THAT ARE
OPERATED OR USED IN APPLICATION NOT INTENDED OR EXCLUDED BY INSTRUCTIONS, PRECAUTIONS, OR
WARNING CONTAINED IN MITSUBISHI'S USER, INSTRUCTION AND/OR SAFETY MANUALS, TECHNICAL
BULLETINS AND GUIDELINES FOR the PRODUCT.
("Prohibited Application")
Prohibited Applications include, but not limited to, the use of the PRODUCT in;
• Nuclear Power Plants and any other power plants operated by Power companies, and/or any other cases in which the
public could be affected if any problem or fault occurs in the PRODUCT.
• Railway companies or Public service purposes, and/or any other cases in which establishment of a special quality
assurance system is required by the Purchaser or End User.
• Aircraft or Aerospace, Medical applications, Train equipment, transport equipment such as Elevator and Escalator,
Incineration and Fuel devices, Vehicles, Manned transportation, Equipment for Recreation and Amusement, and
Safety devices, handling of Nuclear or Hazardous Materials or Chemicals, Mining and Drilling, and/or other
applications where there is a significant risk of injury to the public or property.
Notwithstanding the above, restrictions Mitsubishi may in its sole discretion, authorize use of the PRODUCT in one or
more of the Prohibited Applications, provided that the usage of the PRODUCT is limited only for the specific
applications agreed to by Mitsubishi and provided further that no special quality assurance or fail-safe, redundant or
other safety features which exceed the general specifications of the PRODUCTs are required. For details, please
contact the Mitsubishi representative in your region.
INTRODUCTION
Thank you for purchasing the Mitsubishi Electric MELSEC iQ-R series programmable controllers.
This manual describes the dedicated signals, parameters, data, and functions required for performing G-code control of the
relevant products listed below.
Before using this product, please read this manual and the relevant manuals carefully and develop familiarity with the
functions and performance of the MELSEC iQ-R series programmable controller to handle the product correctly.
When applying the program examples provided in this manual to an actual system, ensure the applicability and confirm that it
will not cause system control problems.
Please make sure that the end users read this manual.
This manual explains the dedicated instructions to use G-code
control by G-code control parameters and G-code programs.
This manual explains specifications of the Motion CPU modules,
SSCNET cables, synchronous encoder, troubleshooting, and
others.
This manual explains the Multiple CPU system configuration,
performance specifications, common parameters, auxiliary/applied
functions, error lists and others.
This manual explains the functions, programming, debugging for
Motion SFC and others.
This manual explains the servo parameters, positioning
instructions, device lists and others.
This manual explains the dedicated instructions to use
synchronous control by synchronous control parameters, device
lists and others.
This manual explains the dedicated instructions to use machine
control by machine control parameters, machine positioning data,
device lists and others.
Print book
e-Manual
PDF
Print book
e-Manual
PDF
Print book
e-Manual
PDF
Print book
e-Manual
PDF
Print book
e-Manual
PDF
Print book
e-Manual
PDF
Print book
e-Manual
PDF
e-Manual refers to the Mitsubishi Electric FA electronic book manuals that can be browsed using a dedicated
tool.
e-Manual has the following features:
• Required information can be cross-searched in multiple manuals.
• Other manuals can be accessed from the links in the manual.
• The hardware specifications of each part can be found from the product figures.
• Pages that users often browse can be bookmarked.
14
TERMS
Unless otherwise specified, this manual uses the following terms.
TermDescription
R64MTCPU/R32MTCPU/R16MTCPU or
Motion CPU (module)
MR-J4(W)-BServo amplifier model MR-J4-B/MR-J4W-B
MR-J3(W)-BServo amplifier model MR-J3-B/MR-J3W-B
AMP or Servo amplifierGeneral name for "Servo amplifier model MR-J4-B/MR-J4W-B/MR-J3-B/MR-J3W-B"
RnCPU, PLC CPU or PLC CPU moduleAbbreviation for MELSEC iQ-R series CPU module
Multiple CPU system or Motion systemAbbreviation for "Multiple PLC system of the R series"
CPUnAbbreviation for "CPU No.n (n = 1 to 4) of the CPU module for the Multiple CPU system"
Operating system softwareGeneral name for "SW10DNC-RMTFW"
Engineering software packageGeneral name for MT Developer2/GX Works3
MELSOFT MT Works2General product name for the Motion controller engineering software "SW1DND-MTW2"
MT Developer2Abbreviation for the programming software included in the "MELSOFT MT Works2" Motion controller
GX Works3General product name for the MELSEC PLC software package "SW1DND-GXW3"
Serial absolute synchronous encoder or
Q171ENC-W8
SSCNET/H
SSCNET
SSCNET(/H)General name for SSCNET/H, SSCNET
Absolute position systemGeneral name for "system using the servomotor and servo amplifier for absolute position"
Intelligent function moduleGeneral name for module that has a function other than input or output such as A/D converter module and D/A
SSCNET/H head module
Optical hub unit or MR-MV200Abbreviation for SSCNET/H Compatible Optical Hub Unit (MR-MV200)
Sensing moduleGeneral name for SSCNET/H compatible sensing module MR-MT2000 series
Sensing SSCNET/H head module
MR-MT2010
Sensing extension moduleGeneral name for I/O module (MR-MT2100), pulse I/O module (MR-MT2200), analog I/O module (MR-
Sensing I/O module or MR-MT2100Abbreviation for I/O module (MR-MT2100)
Sensing pulse I/O module or MR-MT2200Abbreviation for pulse I/O module (MR-MT2200)
Sensing analog I/O module or MR-MT2300Abbreviation for analog I/O module (MR-MT2300)
Sensing encoder I/F module or MR-MT2400 Abbreviation for encoder I/F module (MR-MT2400)
*1
*1
*1
*1
Abbreviation for MELSEC iQ-R series Motion controller
engineering software
Abbreviation for "Serial absolute synchronous encoder (Q171ENC-W8)"
High speed synchronous network between Motion controller and servo amplifier
converter module.
Abbreviation for "MELSEC-L series SSCNET/H head module (LJ72MS15)"
or
Abbreviation for SSCNET/H head module (MR-MT2010)
MT2300), encoder I/F module (MR-MT2400)
*1 SSCNET: Servo System Controller NETwork
15
MANUAL PAGE ORGANIZATION
Ex.
Ex.
Representation of numerical values used in this manual
■Axis No. representation
In the positioning dedicated signals, "n" in "M3200+20n", etc. indicates a value corresponding to axis No. as shown in the
following table.
• The range of axis No.1 to 16 (n=0 to 15) is valid in the R16MTCPU. The range of axis No.1 to 32 (n=0 to 31) is valid in the
R32MTCPU.
• Calculate as follows for the device No. corresponding to each axis.
For axis No. 32 in Q series Motion compatible device assignment
M3200+20n ([Rq.1140] Stop command)=M3200+2031=M3820
M3215+20n ([Rq.1155] Servo OFF command)=M3215+2031=M3835
In the positioning dedicated signals, "n" in "M10440+10n", etc. of the "Synchronous encoder axis status", "Synchronous
encoder axis command signal", "Synchronous encoder axis monitor device" and "Synchronous encoder axis control device"
indicates a value corresponding to synchronous encoder axis No. as shown in the following table.
• Calculate as follows for the device No. corresponding to each synchronous encoder.
For synchronous encoder axis No.12 in Q series Motion compatible device assignment
M10440+10n ([St.320] Synchronous encoder axis setting valid flag)=M10440+1011=M10550
D13240+20n ([Md.320] Synchronous encoder axis current value)=D13240+2011=D13460
16
■Machine No. representation
Ex.
Ex.
Ex.
In the positioning dedicated signals, "m" in "M43904+32m", etc. indicates a value corresponding to machine No. as shown in
the following table.
Machine No.mMachine No.m
1054
2165
3276
4387
• Calculate as follows for the device No. corresponding to each machine.
For machine No.8 in MELSEC iQ-R Motion device assignment
M43904+32m ([St.2120] Machine error detection) M43904+327=M44128
D53168+128m ([Md.2020] Machine type)=M53168+287=D54064
■Line No. representation in G-code control
In the positioning dedicated signals, "s" in "D54496+128s", etc. indicates a value corresponding to line No. as shown in the
following table.
Line No.s
10
21
• Calculate as follows for the device No. corresponding to each line.
For line No.2 in MELSEC iQ-R Motion device assignment
D54440.0+4s ([St.3208] During G-code control)=D54440.0+41=D54444.0
D54496+128s ([Md.3016] Number of axes on line)=D54496+1281=D54624
■Line No. and axis No. representation in G-code control
In the positioning dedicated signals, "sn" in "D54278+16sn", etc. indicates a value corresponding to line No. and axis No. as
shown in the following table.
Line No.Axis No.snLine No.Axis No.sn
110 218
2129
32310
43411
54512
65613
76714
87815
• Calculate as follows for the device No. corresponding to each line.
For line No.2, axis No. 8 in MELSEC iQ-R Motion device assignment
D54448.0+2sn ([St.3076] Smoothing zero)=D54448.0+215=D54478.0
D54754+32sn ([Md.3146] Rotating axis setting status)=D54754+3215=D55234
17
Representation of device No. used in this manual
The "R" and "Q" beside the device No. of positioning dedicated signals such as "[Rq.1140] Stop command (R: M34480+32n/
Q: M3200+20n)" indicate the device No. for the device assignment methods shown below. When "R" and "Q" are not beside
the device No., the device No. is the same for both device assignment methods.
• G-code control uses the Motion CPU to analyze G-code programs for control. G-code control is applied on a wide range of
manufacturing tools such as cutters and mills.
• To use G-code control, the G-code add-on library must be installed.
• By setting the parameters required for control, a system of up to 2 lines can be configured. Up to 8 axes can be configured
per line, and up to 4 axes can be configured as synchronous control axes. Program control can be separated between lines
with each program operating independently at the same time. (Lines are the groups of axes configured to execute G-code
control and is not the same as the term used for the servo networks.)
• G-code programs are created in text format on a personal computer. The program file is used by MT Developer2 for writing/
reading to/from the Motion CPU. The G-code program can also be transmitted from the SD memory card in the Motion CPU
using the file transmission at boot function.
• Use the G-code control devices from a sequence program or Motion SFC program to transfer to G-code control mode
(each line), and automatically start/stop programs, or control using auxiliary functions such as M-code etc. For axis control,
use the alphabet characters (X, Y, Z, A, B, C, U, V, W) allocated to each axis by the parameters in the instructions in the Gcode programs.
1
• G-code control can also be combined with other functions in the Motion CPU. For example, using advanced synchronous
control to send the same command to another control axis enables highly accurate operations such as multiple axis
synchronization. By combining G-code control with other functions, not only manufacturing control is possible, but a wide
array of systems can also be built.
1.1 G-Code Control Overview
1 OVERVIEW
19
1.2Performance Specifications
G-code control specifications
ItemSpecifications
Number of G-code control configured
axes (in a line)
The procedure to start up for G-code control system is shown below.
22
2 STARTING UP THE SYSTEM
2.1 Starting Up the G-Code Control System
Turn ON automatic operation start (cycle start).
Set the program No. to be executed to the
program No. setting register.
Check that the G-code control axes have
stopped, and M-code output M02 (program end)
is ON.
Turn OFF program operation mode (memory
mode).
Monitoring of
G-code
control and
start
automatic
operation
Stop
automatic
operation
End program
operation
mode
End G-code
control
• Turn ON "[Rq.3381] Program operation mode (memory
mode) (D54226.8+2s)" with the programs from STEP 3
and start memory mode of automatic operation.
• Turn ON "[Rq.3380] Reset command
(D54226.4+2s)" with the programs from STEP 3
and stop automatic operation.
• Turn OFF "[Rq.3381] Program operation mode
(memory mode) (D54226.8+2s)" with the
programs from STEP 3 and end memory mode
of automatic operation.
• Turn OFF "[Rq.3376] G-code control request
(D54226.0+2s)" with the programs from STEP 3
and end G-code control.
• Check that automatic operation has stopped.
• Check that "
[St.3211] During memory mode
(D54440.8+4s)" is turned OFF.
• Check that "[St.3208] During G-code control
(D54440.0+4s)" is turned OFF.
Check that all axes smoothing zero are ON.
• Check that the output processing including the
acceleration/deceleration time constant delay has
been completed with "[St.3210] All axes smoothing
zero (D54440.2+4s)".
• Check that the G-code program has ended with
"
[St.3220] M-code output M02 (D54442.2+4s)".
(When M30 was used for program end, check
with "
[St.3221] M-code output M30 (D54442.3+4s)".)
• Set the program No. to "
[Cd.3320] Program No.
setting register (D54278+16s)
".
• Turn ON "
[Rq.3377] Automatic operation start
(cycle start) (D54226.1+2s)
", and start the
G-code program.
• Use MT Developer2 for monitoring.
Monitor the status of G-code control.
Turn ON reset command.
STEP 12
STEP 11
STEP 10
STEP 9
STEP 8
STEP 7
Turn ON program operation mode (memory
mode).
Start program
operation
mode
• Check that "[St.3211] During memory mode
(D54440.8+4s)" is ON.
Check that the system is in memory mode.
Check that the following signals are OFF.
• [St.3212] During automatic operation
(D54441.0+4s)
Turn OFF the G-code control request of the
line to end G-code control.
Check that the system is not in G-code control.
Check that the system is not in memory mode.
End of control
(1)
2
*1 License authentication is required for G-code control add-on libraries. (Page 24 License Authentication of G-Code Control Add-On
Library)
*2 G-code control system device assignment method (Page 25 G-Code Control System Device Assignment Method)
*3 Control cycle of G-code control (Page 24 Control Cycle of G-Code Control)
*4 G-code control system parameter (Page 73 G-Code Control System Parameter)
*5 G-code control axis parameter (Page 82 G-Code Control Axis Parameter)
*6 G-code control work parameter (Page 89 G-Code Control Work Parameter)
*7 G-code program (Page 91 G-CODE CONTROL PROGRAMS)
2 STARTING UP THE SYSTEM
2.1 Starting Up the G-Code Control System
23
2.2License Authentication of G-Code Control Add-On
Library
The G-code control add-on library requires authentication. When a G-code add-on library is installed without purchasing a
license, a license period is set. When the license period is exceeded, a moderate error (error code: 3081H) occurs, and the Gcode add-on library can no longer be used.
Refer to the following for license authentication.
MELSEC iQ-R Motion Controller Programming Manual (Common)
License period
The license period for when a G-code add-on library is installed is shown below.
License periodRemarks
1500 hoursThe license period (remaining time until license authentication is required) decreases with the time in
operation (the time when the Multiple CPU system power supply is ON).
The time when the Multiple CPU system power supply is OFF is not counted.
2.3Control Cycle of G-Code Control
• Set the operation cycle to "0.888ms" or more in [Motion CPU Common Parameter][Basic Setting]"Operation Cycle". Gcode control operates at the following cycles when "Motion setting operation cycle (SD523)" is 0.888[ms] or more. This
cycle is stored in "[Md.3000] G-code control setting operation cycle (D54480)". (For functions other than G-code control,
the operation cycle is "Motion setting operation cycle (SD523)".). When "Motion setting operation cycle (SD523)" is shorter
than 0.888[ms], a moderate error (error code: 30FEH) occurs, and G-code control cannot be used.
intervals 4 times the Motion
setting operation cycle.
• Set the low speed operation cycle ratio to "Not Used" in [Motion CPU Common Parameter][Basic Setting]"Low Speed
Operation Cycle Magnification Setting". If low speed operation cycle ratio setting is set, a moderate error (error code:
30F9H) occurs.
• The time from the start of G-code control until completion is stored in "[Md.3001] G-code control operation cycle (D54481)"
every G-code setting operation cycle. The largest of the stored values is stored in "[Md.3002] G-code control maximum
operation cycle (D54482)".
• If the time in "[Md.3001] G-code control operation cycle (D54481)" exceeds that of "[Md.3000] G-code control setting
operation cycle (D54480)", "[St.3272] G-code control operation cycle over flag (D54438.0)" turns ON. Also, even with time
left over in "[Md.3001] G-code control operation cycle (D54481)", when the total time taken for Motion operation (Motion
operation cycle (SD522)) exceeds "Motion setting operation cycle (SD523)", "[St.1046] Operation cycle over flag (R:
M30054/Q: M2054)" turns ON.
• When "[St.3272] G-code control operation cycle over flag (D54438.0)" or "[St.1046] Operation cycle over flag (R: M30054/
Q: M2054)" have turned ON, perform the following.
• Change the operation cycle to a larger value in [Motion CPU Common Parameter][Basic Setting]"Operation Cycle".
• Reduce the number of event tasks and NMI task instructions being executed by the Motion SFC program.
24
2 STARTING UP THE SYSTEM
2.2 License Authentication of G-Code Control Add-On Library
2.4G-Code Control System Device Assignment
[St.3208] During G-code control
(D54440.0+4s)
[Rq.3376] G-code control request
(D54226.0+2s)
[Rq.3381] Program operation
mode (memory mode)
(D54226.8+2s)
[St.3212] During automatic
operation (D54441.0+4s)
[St.3220] M-code output M02
(D54442.2+4s)
[Rq.3380] Reset command
(D54226.4+2s)
[St.1040] Start accept flag
(R: M30080+n/Q: M2001+n)
[Cd.3320] Program No. setting
register (D54278+16s)
G-code program operation
Method
"MELSEC iQ-R Motion device assignment" is the recommended device assignment method when using G-code control.
Refer to the following for details of device assignment methods.
MELSEC iQ-R Motion Controller Programming Manual (Common)
Refer to G-code control dedicated signals for devices used by G-code control.(Page 28 G-CODE CONTROL
DEDICATED SIGNALS)
Cautions
When performing G-code control with R32MTCPU/R16MTCPU in "Q series Motion compatible device assignment", set the
data register(D) to the points below or more in [R Series Common Parameter] [Motion CPU Module] [CPU Parameter]
"Device Related Setting" "Device Points/Latch Setting". If the add-on library is installed with the default device points a
moderate error (error code: 308FH (details code: 0500H)) occurs and G-code control cannot be used.
DeviceMinimum points setting when using G-code control
Data register (D)56320 points (55k)
Refer to the following for details on device points/latch setting.
MELSEC iQ-R Motion Controller Programming Manual (Common)
2.5G-Code Control System Start/End
2
The axes set by G-code control axis parameter are controlled with G-code programs.
G-code control is started/ended by turning ON/OFF "[Rq.3376] G-code control request (D54226.0+2s)" of each line. The
status of G-code control can be checked with "[St.3208] During G-code control (D54440.0+4s)".
Memory mode of automatic operation can be selected by turning ON "[Rq.3381] Program operation mode (memory mode)
(D54226.8+2s)". Memory mode can be cancelled by turning OFF "[Rq.3381] Program operation mode (memory mode)
(D54226.8+2s)".
Turn OFF "[Rq.3376] G-code control request (D54226.0+2s)" after cancelling memory mode. By setting the program No. to be
started to "[Cd.3320] Program No. setting register (D54278+16s)", and turning ON "[Rq.3377] Automatic operation start (cycle
start) (D54226.1+2s)", memory operation is started. During memory operation "[St.3212] During automatic operation
(D54441.0+4s)" turns ON.
2 STARTING UP THE SYSTEM
2.4 G-Code Control System Device Assignment Method
25
2.6G-Code Control System Stop Operation
When one of the following stop causes occurs in a G-code control axis during G-code control, "[St.3215] G-code control
finishing (D54441.3+4s)" turns ON, and after the stop processing of all axes in the line, "[St.3208] During G-code control
(D54440.0+4s)", "[St.3215] G-code control finishing (D54441.3+4s)", and "[St.1040] Start accept flag (R: M30080+n/Q:
M2001+n)" turn OFF, and G-code control ends. After ending, the updating of G-code control related devices is stopped.
Stop causeStop processing
Multiple CPU system reset operationImmediate stop
Multiple CPU system power supply OFF
Motion CPU WDT error
Forced stop (forced stop by Motion controller (device))
• When one of the following stop causes occurs during G-code control, the stop processing is disabled and stop is not
performed. Also, an error does not occur.
• Software stroke limit detection for each axis
• Input of stop command
• Input of rapid stop command
• Servo motor maximum speed check
26
2 STARTING UP THE SYSTEM
2.6 G-Code Control System Stop Operation
Immediate stop
[St.3212] During automatic
operation (D54441.0+4s)
[St.1040] Start accept flag
(R: M30080+n/Q: M2001+n)
[St.3208] During G-code
control (D54440.0+4s)
t
V
There is no deceleration processing for this stop. The Motion CPU stops commands immediately but the servo amplifier
coasts for the amount of droop pulses in the deviation counter. The timing chart for immediate stop is shown below.
2
Deceleration stop
All axes within the line decelerate according to the acceleration/deceleration time constant in the G-code control parameter,
and G-code control ends after coming to a stop.
The timing chart for a deceleration stop is shown below.
2 STARTING UP THE SYSTEM
2.6 G-Code Control System Stop Operation
27
3G-CODE CONTROL DEDICATED SIGNALS
G-code control devices used for G-code control are shown below.
DeviceDevice range
MELSEC iQ-R Motion device assignmentQ series Motion compatible device assignment
Data register (D)D54192 to D55583 (1392 points)
• When using R32MTCPU/R16MTCPU in Q series Motion compatible device assignment, the device range
must be changed in device points/latch setting so that it is the minimum setting range or more for using Gcode control. If the add-on library is installed with the default device points, a moderate error (error code:
308FH (details code: 0500H)) occurs.(Page 25 G-Code Control System Device Assignment Method)
• This manual only explains the internal relays and data registers used for G-code control. Refer to the
following for the devices that are not explained in this manual.
MELSEC iQ-R Motion Controller Programming Manual (Positioning Control)
• G-code control devices are only valid during G-code control. (There are some G-code control devices that
are valid when not in G-code control.)
28
3 G-CODE CONTROL DEDICATED SIGNALS
3.1G-Code Control Common Command Signal
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
D54224.0Unusable
D54224.1
D54224.2
D54224.3
D54224.4
D54224.5
D54224.6
D54224.7
D54224.8
D54224.9
D54224.A
D54224.B
D54224.C
D54224.D
D54224.E
D54224.F
D54225.0Rq.3344Program load request while runningMain cycleCommand signal
D54225.1Unusable
D54225.2
D54225.3
D54225.4
D54225.5
D54225.6
D54225.7
D54225.8
D54225.9
D54225.A
D54225.B
D54225.C
D54225.D
D54225.E
D54225.F
Q series Motion
compatible
device
assignment
3
[Rq.3344] Program load request while running (D54225.0)
This signal is for requesting the load of a G-code program file while executing a program.
Setting valueDescription
ONRequest load
OFFDo not request load
3 G-CODE CONTROL DEDICATED SIGNALS
3.1 G-Code Control Common Command Signal
29
3.2G-Code Control Common Control Device
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
D54262Unusable
D54263
D54264Cd.3305Program No. for loading while runningAt running
D54265Unusable
D54266
D54267
D54268
D54269
D54270
D54271
D54272
D54273
D54274
D54275
D54276
D54277
Q series Motion
compatible
device
assignment
program load
request ON
Command
device
[Cd.3305] Program No. for loading while running (D54264)
This register is for loading the G-code program of the program No. specified in "[Rq.3344] Program load request while running
(D54225.0)".
ItemSetting range
Program No.1 to 256
30
3 G-CODE CONTROL DEDICATED SIGNALS
3.2 G-Code Control Common Control Device
3.3G-Code Control Common Status
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
D54438.0St.3272G-code control operation cycle over flag G-code control
D54438.1Unusable
D54438.2
D54438.3
D54438.4
D54438.5
D54438.6
D54438.7
D54438.8
D54438.9
D54438.A
D54438.B
D54438.C
D54438.D
D54438.E
D54438.F
D54439.0
D54439.1
D54439.2
D54439.3
D54439.4
D54439.5
D54439.6
D54439.7
D54439.8
D54439.9
D54439.A
D54439.B
D54439.C
D54439.D
D54439.E
D54439.F
Q series Motion
compatible
device
assignment
Status signal
operation cycle
3
[St.3272] G-code control operation cycle over flag (D54438.0)
This signal turns ON when G-code control operation processing is not completed within the G-code control operation cycle.
To turn OFF, perform the following operations.
• Turn the Multiple CPU system power supply OFFON
• Reset the Multiple CPU system
■Countermeasures for operation cycle over
• Change the operation cycle to a larger value in [Motion CPU Common Parameter][Basic Setting]"Operation Cycle".
• Reduce the number of executions of event task and NMI task instructions in the Motion SFC program.
3 G-CODE CONTROL DEDICATED SIGNALS
3.3 G-Code Control Common Status
31
3.4G-Code Control Common Monitor Device
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
D54480Md.3000G-code control setting operation cycleSTOPRUNMonitor device
D54481Md.3001G-code control operation cycleG-code control
D54482Md.3002G-code control maximum operation
D54483Unusable
D54484
D54485
D54486
D54487
D54488
D54489
D54490
D54491
D54492Md.3003Program load status while runningMain cycleMonitor device
D54493Md.3004Program load error information while
D54494Unusable
D54495
Q series Motion
compatible
device
assignment
operation cycle
cycle
running
[Md.3000] G-code control setting operation cycle (D54480)
The G-code control operation cycle is stored in [s] units.
The control cycle for G-code control operates at the following cycles according to "Motion setting operation cycle (SD523)".
When "Motion setting operation cycle (SD523)" is shorter than 0.888[ms], a moderate error (error code: 30FEH) occurs, and
G-code control cannot be used.
The time taken for G-code control operation processing is stored in [s] units every G-code control operation cycle.
[Md.3002] G-code control maximum operation cycle (D54482)
After Multiple CPU system power supply ON, the maximum time taken for G-code control operation processing is stored in
[s] units every G-code control operation cycle.
[Md.3003] Program load status while running (D54492)
The status of the program load while running is stored.
Monitor valuesDescription
0No request
1Executing
2Successfully completed
3Failed
32
3 G-CODE CONTROL DEDICATED SIGNALS
3.4 G-Code Control Common Monitor Device
[Md.3004] Program load error information while running (D54493)
Stores the error information when "[Md.3003] Program load status while running (D54492)" is failed.
Monitor valuesDescription
0No error
1Applicable program running
2No program file
3File format error
4Load area size exceeded
5Program No. outside of range
6Load request during STOP
7System failure
3
3 G-CODE CONTROL DEDICATED SIGNALS
3.4 G-Code Control Common Monitor Device
33
3.5G-Code Control Line Command Signal
Device No.Signal name
MELSEC iQ-R Motion
device assignment
D54226 to D54227Line 1 G-code control line command signal
D54228 to D54229Line 2 G-code control line command signal
• Details for each line
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
D54226.0+2sRq.3376G-code control requestMain cycle/
D54226.1+2sRq.3377Automatic operation start (cycle start)G-code control
D54226.2+2sRq.3378Automatic operation hold (feed hold)
D54226.3+2sRq.3379Single block
D54226.4+2sRq.3380Reset command
D54226.5+2sUnusable
D54226.6+2s
D54226.7+2s
D54226.8+2sRq.3381Program operation mode (memory
D54226.9+2sUnusable
D54226.A+2s
D54226.B+2s
D54226.C+2s
D54226.D+2s
D54226.E+2s
D54226.F+2s
D54227.0+2sRq.3382Auxiliary function complete1 (FIN1)G-code control
D54227.1+2sRq.3383Auxiliary function complete2 (FIN2)
D54227.2+2sUnusable
D54227.3+2s
D54227.4+2s
D54227.5+2s
D54227.6+2s
D54227.7+2s
D54227.8+2s
D54227.9+2s
D54227.A+2s
D54227.B+2s
D54227.C+2s
D54227.D+2s
D54227.E+2s
D54227.F+2s
Q series Motion
compatible
device
assignment
Q series Motion compatible
device assignment
mode)
G-code control
operation cycle
operation cycle
G-code control
operation cycle
operation cycle
Command signal
Command signal
Command signal
34
3 G-CODE CONTROL DEDICATED SIGNALS
3.5 G-Code Control Line Command Signal
[Rq.3376] G-code control request (D54226.0+2s)
This signal starts G-code control on a line by turning ON "[Rq.3376] G-code control request (D54226.0+2s)" of the applicable
line. Turning OFF "[Rq.3376] G-code control request (D54226.0+2s)" when "[St.3208] During G-code control (D54440.0+4s)"
is ON, ends G-code control. Refer to G-code control system start/end for details.(Page 25 G-Code Control System Start/
End)
Setting valueDescriptionFetch cycle
ONG-code control requestMain cycle
OFFG-code control finishG-code control operation cycle
• This command is used for starting G-code program start, restarting after automatic operation hold, and restarting a block
stop.
• "[St.3213] Automatic operation starting (D54441.1+4s)" is turned ON with the leading edge (OFFON) of "[Rq.3377]
Automatic operation start (cycle start) (D54226.1+2s)" until "[Rq.3378] Automatic operation hold (feed hold)
(D54226.2+2s)" turns ON, or the block is stopped with "[Rq.3379] Single block (D54226.3+2s)" turned ON.
• In the following cases, "[Rq.3377] Automatic operation start (cycle start) (D54226.1+2s)" is disabled even when turned ON.
• When "[St.3213] Automatic operation starting (D54441.1+4s)" is already ON.
• When "[Rq.3378] Automatic operation hold (feed hold) (D54226.2+2s)" is ON.
• When "[St.3216] Resetting (D54441.8+4s)" is ON.
• When an error is occurring.
• In the following cases, automatic operation hold or stop, and block stop occurs.
• When "[Rq.3378] Automatic operation hold (feed hold) (D54226.2+2s)" is turned OFFON.
• When "[Rq.3380] Reset command (D54226.4+2s)" was turned ON.
• When no longer in program operation mode.
• When the block being executed ends after "[Rq.3379] Single block (D54226.3+2s)" has turned ON.
3
[Rq.3378] Automatic operation hold (feed hold) (D54226.2+2s)
• This command is used for performing a deceleration stop while moving by automatic operation.
• After turning OFF "[Rq.3378] Automatic operation hold (feed hold) (D54226.2+2s)", the command restarts at the leading
edge (OFFON) of "[Rq.3377] Automatic operation start (cycle start) (D54226.1+2s)". If "[Rq.3377] Automatic operation
start (cycle start) (D54226.1+2s)" is turned ON when "[Rq.3378] Automatic operation hold (feed hold) (D54226.2+2s)" is
ON, a minor error (error code: 1FC2H (details code: 0202H)) occurs.
• When "[St.3213] Automatic operation starting (D54441.1+4s)" is turned ON by the leading edge (OFFON) of "[Rq.3378]
Automatic operation hold (feed hold) (D54226.2+2s)", automatic operation hold occurs and "[St.3214] Automatic operation
holding (D54441.2+4s)" turns ON.
[Rq.3379] Single block (D54226.3+2s)
• This command is used for executing the G-code programs of automatic operation one block at a time.
• When automatic operation is being executed, it stops after the block being executed ends. To execute commands for the
next block, turn ON "[Rq.3377] Automatic operation start (cycle start) (D54226.1+2s)" again.
• Operation stops after one block. Therefore it is possible to execute a G-code program one block at a time.
3 G-CODE CONTROL DEDICATED SIGNALS
3.5 G-Code Control Line Command Signal
35
[Rq.3380] Reset command (D54226.4+2s)
This command is used to reset G-code control. When "[Rq.3380] Reset command (D54226.4+2s)" is turned OFFON, the
following operations are executed.
• "[St.3216] Resetting (D54441.8+4s)" is turned ON, and moving control axes decelerate to a stop.
• After stopping, when reset ends, "[St.3216] Resetting (D54441.8+4s)" turns OFF, and "[St.3217] Reset complete
(D54441.9+4s)" turns ON.
• Modal status is initialized.
• Tool compensation data is cancelled. (No axis operation.)
• The following error devices for G-code control are cleared. However, the LED display, error display on GX Works3 and MT
Developer2, and errors on special relays and special registers are not cancelled. Refer to the following for the method for
cancelling.
MELSEC iQ-R Motion Controller Programming Manual (Common)
• [St.3209] G-code control error detection (D54440.1+4s)
• [Md.3019] G-code control error code (D54504+128s)
• [Md.3020] G-code control error details code 1 (D54505+128s)
• [Md.3021] G-code control error details code 2 (D54506+128s)
• M-code output is held. (Strobe signal is turned OFF.)
• M-code output (M00, M01, M02, M30) is turned OFF.
[Rq.3381] Program operation mode (memory mode) (D54226.8+2s)
• This command is used for memory mode of automatic operation.
• If "[Rq.3381] Program operation mode (memory mode) (D54226.8+2s)" is turned ON, memory mode of automatic operation
is selected, and automatic operation of the specified G-code program is performed. (The G-code program is started with
"[Rq.3377] Automatic operation start (cycle start) (D54226.1+2s)")
• Turn OFF "[Rq.3381] Program operation mode (memory mode) (D54226.8+2s)" to cancel memory mode. However, if
turned OFF while the program is running, a minor error (error code: 1FC2H (details code: 0222H)) occurs and the block
stops.
• Turn OFF "[Rq.3376] G-code control request (D54226.0+2s)" after turning OFF "[Rq.3381] Program operation mode
(memory mode) (D54226.8+2s)" and cancelling memory mode.
[Rq.3382] Auxiliary function complete 1 (FIN1) (D54227.0+2s)
This signal commands an auxiliary function (M function), and creates a process and completion sequence in the Motion SFC
program and sequence program, and proceeds to the next block after waiting for a completion signal. At the trailing edge of
"[Rq.3382] Auxiliary function complete 1 (FIN1) (D54227.0+2s)", operation proceeds to the next block. Refer to auxiliary
function complete for details. (Page 171 Auxiliary function complete)
[Rq.3383] Auxiliary function complete 2 (FIN2) (D54227.1+2s)
This signal commands an auxiliary function (M function), and creates a process and completion sequence in the Motion SFC
program and sequence program, and proceeds to the next block after waiting for a completion signal. At the trailing edge of
"[Rq.3383] Auxiliary function complete 2 (FIN2) (D54227.1+2s)", operation proceeds to the next block. Refer to auxiliary
function complete for details. (Page 171 Auxiliary function complete)
36
3 G-CODE CONTROL DEDICATED SIGNALS
3.5 G-Code Control Line Command Signal
3.6G-Code Control Line Control Device
Device No.Signal name
MELSEC iQ-R Motion
device assignment
D54278 to D54293Line 1 G-code control line control device
D54294 to D54309Line 2 G-code control line control device
Q series Motion compatible
device assignment
• Details for each line
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
D54278+16sCd.3320Program No. setting registerG-code control
D54279+16sUnusable
D54280+16sCd.3321Sequence No. setting registerG-code control
D54281+16s
D54282+16sCd.3322Block No. setting register
D54283+16s
D54284+16sUnusable
D54285+16s
D54286+16s
D54287+16s
D54288+16s
D54289+16s
D54290+16s
D54291+16s
D54292+16s
D54293+16s
Q series Motion
compatible
device
assignment
Command signal
operation cycle
Command signal
operation cycle
3
[Cd.3320] Program No. setting register (D54278+16s)
This setting register is for starting the G-code program of the specified program No.
Refer to automatic operation start (cycle start) for details. (Page 207 Automatic operation start (cycle start))
This setting register is for starting a G-code program from the block of the specified sequence No.
Refer to automatic operation start (cycle start) for details. (Page 207 Automatic operation start (cycle start))
This setting register is for starting a G-code program from the block of the specified block No.
Refer to automatic operation start (cycle start) for details. (Page 207 Automatic operation start (cycle start))
ItemSetting range
Block No.0 to 99999
3 G-CODE CONTROL DEDICATED SIGNALS
3.6 G-Code Control Line Control Device
37
3.7G-Code Control Line Status
Device No.Signal name
MELSEC iQ-R Motion
device assignment
D54440 to D54443Line 1 G-code control line status
D54444 to D54447Line 2 G-code control line status
• Details for each line
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
D54440.0+4sSt.3208During G-code controlMain cycleStatus signal
D54440.1+4sSt.3209G-code control error detectionImmediate
D54440.2+4sSt.3210All axes smoothing zeroG-code control
D54440.3+4sUnusable
D54440.4+4s
D54440.5+4s
D54440.6+4s
D54440.7+4s
D54440.8+4sSt.3211During memory modeG-code control
D54440.9+4sUnusable
D54440.A+4s
D54440.B+4s
D54440.C+4s
D54440.D+4s
D54440.E+4s
D54440.F+4s
D54441.0+4sSt.3212During automatic operationG-code control
D54441.1+4sSt.3213Automatic operation starting
D54441.2+4sSt.3214Automatic operation holding
D54441.3+4sSt.3215G-code control finishing
D54441.4+4sUnusable
D54441.5+4s
D54441.6+4s
D54441.7+4s
D54441.8+4sSt.3216ResettingG-code control
D54441.9+4sSt.3217Reset complete
D54441.A+4sUnusable
D54441.B+4s
D54441.C+4s
D54441.D+4s
D54441.E+4s
D54441.F+4s
Q series Motion
compatible
device
assignment
Q series Motion compatible
device assignment
operation cycle
Status signal
operation cycle
Status signal
operation cycle
Status signal
operation cycle
38
3 G-CODE CONTROL DEDICATED SIGNALS
3.7 G-Code Control Line Status
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
Q series Motion
compatible
device
assignment
D54442.0+4sSt.3218M-code output M00G-code control
D54442.1+4sSt.3219M-code output M01
D54442.2+4sSt.3220M-code output M02
D54442.3+4sSt.3221M-code output M30
D54442.4+4sSt.3222Auxiliary function strobe 1
D54442.5+4sSt.3223Auxiliary function strobe 2
D54442.6+4sSt.3224Auxiliary function strobe 3
D54442.7+4sSt.3225Auxiliary function strobe 4
D54442.8+4sUnusable
D54442.9+4s
D54442.A+4s
D54442.B+4s
D54442.C+4s
D54442.D+4s
D54442.E+4s
D54442.F+4s
D54443.0+4s
D54443.1+4s
D54443.2+4s
D54443.3+4s
D54443.4+4s
D54443.5+4s
D54443.6+4s
D54443.7+4s
D54443.8+4s
D54443.9+4s
D54443.A+4s
D54443.B+4s
D54443.C+4s
D54443.D+4s
D54443.E+4s
D54443.F+4s
operation cycle
Status signal
3
[St.3208] During G-code control (D54440.0+4s)
This signal turns ON during G-code control.
[St.3209] G-code control error detection (D54440.1+4s)
• This signal turns ON with detection of a G-code control related error, and can be used to judge whether there is an error or
not. The applicable error code is stored in "[Md.3019] G-code control error code (D54504+128s)", "[Md.3020] G-code
control error details code 1 (D54505+128s)", and "[St.3021] G-code control error details code 2 (D54506+128s)". Refer to
the following for details of error codes.
MELSEC iQ-R Motion Controller Programming Manual (Common)
• The signal turns OFF when "[Rq.3380] Reset command (D54226.4+2s)" turns ON.
3 G-CODE CONTROL DEDICATED SIGNALS
3.7 G-Code Control Line Status
39
[St.3210] All axes smoothing zero (D54440.2+4s)
Acceleration/deceleration
time constant
Feed axis
[St.3210] All axes smoothing
zero (D54440.2+4s)
ON
OFF
Axis movement
This signal turns ON when the delay (delay by acceleration/deceleration time constant) for all control axes is zero.
When the commanded movement by automatic operation, including the acceleration/deceleration time constant delay,
completes all output processing this signal turns ON. The signal turns OFF while the movement command is being executed,
and if there is an acceleration/deceleration time constant delay.
When moving at extremely low speed, "[St.3210] All axes smoothing zero (D54440.2+4s)" may turn ON even
while moving.
[St.3211] During memory mode (D54440.8+4s)
This signal turns ON during memory mode.
[St.3212] During automatic operation (D54441.0+4s)
This signal turns ON during automatic operation and stays ON from automatic operation start until reset by "[Rq.3377]
Automatic operation start (cycle start) (D54226.1+2s)" turning ON.
The status of automatic operation according to the ON/OFF status of "[St.3212] During automatic operation (D54441.0+4s)",
"[St.3213] Automatic operation starting (D54441.1+4s)", and "[St.3214] Automatic operation holding (D54441.2+4s)" is as
follows.
• Reset
When automatic operation is stopped, including after reset. Any status where automatic operation is not being performed is
a reset status.
• Automatic operation stopped
When the execution of a block has ended and automatic operation is stopped. When stopped by turning ON "[Rq.3379]
Single block (D54226.3+2s)", the status is automatic operation stopped.
• Automatic operation hold
When automatic operation is stopped with a block still being executed. Automatic operation hold status is when "[Rq.3378]
Automatic operation hold (feed hold) (D54226.2+2s)" is turned ON.
• Automatic operation running
When automatic operation is being executed.
This signal turns ON when automatic operation is running and stays ON from automatic operation start until automatic
operation hold, block stop, or reset by "[Rq.3377] Automatic operation start (cycle start) (D54226.1+2s)" turning ON. This can
be used to check if a movement command or auxiliary function (M function) is being executed.
• This signal turns ON when automatic operation is on hold, and can be used to check for a holding cause such as
"[Rq.3378] Automatic operation hold (feed hold) (D54226.2+2s)" ON when executing a movement command or auxiliary
function command.
• This signal turns ON when "[Rq.3378] Automatic operation hold (feed hold) (D54226.2+2s)" turns ON. It also turns ON
during an auxiliary function (M function) command.
• This signal turns OFF at a reset, or when "[Rq.3377] Automatic operation start (cycle start) (D54226.1+2s)" is turned ON.
However, when "[Rq.3378] Automatic operation hold (feed hold) (D54226.2+2s)" is not returned to OFF status, or when not
in memory mode, this signal is disabled.
[St.3215] G-code control finishing (D54441.3+4s)
This signal turns ON when a G-code control stop cause occurs. "[St.3215] G-code control finishing (D54441.3+4s)" turns OFF
after stop processing. Refer to G-code control system stop operation for details of stop causes. (Page 26 G-Code Control
System Stop Operation)
3
[St.3216] Resetting (D54441.8+4s)
Turns ON during reset processing by "[Rq.3380] Reset command (D54226.4+2s)".
When reset is completed immediately, the resetting status may not be detected.
[St.3217] Reset complete (D54441.9+4s)
• This signal turns ON when reset by "[Rq.3380] Reset command (D54226.4+2s)" is complete and can be used to check that
reset is completed.
• "[St.3217] Reset complete (D54441.9+4s)" does not turn OFF automatically. To check if reset is complete when resetting
again, turn ON "[Rq.3380] Reset command (D54226.4+2s)" after turning OFF "[St.3217] Reset complete (D54441.9+4s)".
[St.3218] M-code output M00 (D54442.0+4s)
• This signal turns ON when the special auxiliary function M00 is output. Although it is a special auxiliary function M00, the
normal signals "[St.3222] Auxiliary function strobe 1 (D54442.4+4s)" to "[St.3225] Auxiliary function strobe 4
(D54442.7+4s)" and "[Md.3058] M-code data 1 (D54554+128s, D54555+128s)" to "[Md.3061] M-code data 4
(D54560+128s, D54561+128s)" are output.
• The signal turns ON when M00 is output during automatic operation, and is turned OFF with "[Rq.3382] Auxiliary function
complete 1 (FIN1) (D54227.0+2s)", "[Rq.3383] Auxiliary function complete 2 (FIN2) (D54227.1+2s)", or "[Rq.3380] Reset
command (D54226.4+2s)". Refer to M-code output for details. (Page 169 M-code output)
3 G-CODE CONTROL DEDICATED SIGNALS
3.7 G-Code Control Line Status
41
[St.3219] M-code output M01 (D54442.1+4s)
• This signal turns ON when the special auxiliary function M01 is output. Although it is a special auxiliary function M01, the
normal signals "[St.3222] Auxiliary function strobe 1 (D54442.4+4s)" to "[St.3225] Auxiliary function strobe 4
(D54442.7+4s)" and "[Md.3058] M-code data 1 (D54554+128s, D54555+128s)" to "[Md.3061] M-code data 4
(D54560+128s, D54561+128s)" are output.
• The signal turns ON when M01 is output during automatic operation, and is turned OFF with "[Rq.3382] Auxiliary function
complete 1 (FIN1) (D54227.0+2s)", "[Rq.3383] Auxiliary function complete 2 (FIN2) (D54227.1+2s)", or "[Rq.3380] Reset
command (D54226.4+2s)". Refer to M-code output for details. (Page 169 M-code output)
[St.3220] M-code output M02 (D54442.2+4s)
• This signal turns ON when the special auxiliary function M02 is output. Although it is a special auxiliary function M02, the
normal signals "[St.3222] Auxiliary function strobe 1 (D54442.4+4s)" to "[St.3225] Auxiliary function strobe 4
(D54442.7+4s)" and "[Md.3058] M-code data 1 (D54554+128s, D54555+128s)" to "[Md.3061] M-code data 4
(D54560+128s, D54561+128s)" are output.
• The signal turns ON when M02 is output during automatic operation, and is turned OFF with "[Rq.3382] Auxiliary function
complete 1 (FIN1) (D54227.0+2s)", "[Rq.3383] Auxiliary function complete 2 (FIN2) (D54227.1+2s)", or "[Rq.3380] Reset
command (D54226.4+2s)". Refer to M-code output for details. (Page 169 M-code output)
[St.3221] M-code output M30 (D54442.3+4s)
• This signal turns ON when the special auxiliary function M30 is output. Although it is a special auxiliary function M30, the
normal signals "[St.3222] Auxiliary function strobe 1 (D54442.4+4s)" to "[St.3225] Auxiliary function strobe 4
(D54442.7+4s)" and "[Md.3058] M-code data 1 (D54554+128s, D54555+128s)" to "[Md.3061] M-code data 4
(D54560+128s, D54561+128s)" are output.
• The signal turns ON when M30 is output during automatic operation, and is turned OFF with "[Rq.3382] Auxiliary function
complete 1 (FIN1) (D54227.0+2s)", "[Rq.3383] Auxiliary function complete 2 (FIN2) (D54227.1+2s)", or "[Rq.3380] Reset
command (D54226.4+2s)". Refer to M-code output for details. (Page 169 M-code output)
42
3 G-CODE CONTROL DEDICATED SIGNALS
3.7 G-Code Control Line Status
[St.3222] Auxiliary function strobe 1 (D54442.4+4s)
M03
(1st group)
G-code program
Auxiliary function strobe 4
For M-commands of the 4th group
M08
(2nd group)
M10
(3rd group)
M18
(4th group)
Auxiliary function strobe 3
For M-commands of the 3rd group
Auxiliary function strobe 2
For M-commands of the 2nd group
Auxiliary function strobe 1
For M-commands of the 1st group
[Rq.3382] Auxiliary function
complete 1 (FIN1) (D54227.0+4s)
[St.3224] Auxiliary function
strobe 3 (D54442.6+4s)
OFF
ON
OFF
ON
[Md.3060] M-code data 3
(D54558+128s, D54559+128s)
5
[St.3223] Auxiliary function
strobe 2 (D54442.5+4s)
OFF
ON
[Md.3059] M-code data 2
(D54556+128s, D54557+128s)
[St.3222] Auxiliary function
strobe 1 (D54442.4+4s)
OFF
ON
[Md.3058] M-code data 1
(D54554+128s, D54555+128s)
22310
G-code program
M22M03M08M10M25M05G00 • • •
825
• This signal turns ON when the first group of auxiliary function (M function) is commanded.
• This signal turns ON when the first group of auxiliary function (M function) is commanded by the G-code program of
automatic operation.
• This signal turns OFF in the following cases.
• When "[Rq.3382] Auxiliary function complete 1 (FIN1) (D54227.0+2s)" and "[Rq.3383] Auxiliary function complete 2 (FIN2) (D54227.1+2s)" have turned
ON.
• When in a reset status.
■Operation
• Up to four auxiliary functions (M functions) can be commanded simultaneously in one block.
• While "[Rq.3382] Auxiliary function complete 1 (FIN1) (D54227.0+2s)" or "[Rq.3383] Auxiliary function complete 2 (FIN2)
(D54227.1+2s)" are turned ON, "[St.3222] Auxiliary function strobe 1 (D54442.4+4s)" to "[St.3225] Auxiliary function strobe
4 (D54442.7+4s)" do not turn ON when M function is executed.
3
• The Motion SFC program and sequence program processing is as follows.
• When auxiliary function (M function) is commanded, "[St.3222] Auxiliary function strobe 1 (D54442.4+4s)" to "[St.3225] Auxiliary function strobe 4
(D54442.7+4s)" and "[Md.3058] M-code data 1 (D54554+128s, D54555+128s)" to "[Md.3061] M-code data 4 (D54560+128s, D54561+128s)" are output.
• In the Motion SFC program or sequence program, "[St.3222] Auxiliary function strobe 1 (D54442.4+4s)" to "[St.3225] Auxiliary function strobe 4
(D54442.7+4s)" are always triggers for starting the auxiliary function (M function) processing.
• When auxiliary function (M function) processing is complete, "[Rq.3382] Auxiliary function complete 1 (FIN1) (D54227.0+2s)" or "[Rq.3383] Auxiliary
function complete 2 (FIN2) (D54227.1+2s)" turn ON.
• The Motion CPU recognizes the leading edge of "[Rq.3382] Auxiliary function complete 1 (FIN1) (D54227.0+2s)" or "[Rq.3383] Auxiliary function complete
2 (FIN2) (D54227.1+2s)", and turns OFF "[St.3222] Auxiliary function strobe 1 (D54442.4+4s)" to "[St.3225] Auxiliary function strobe 4 (D54442.7+4s)".
• In the Motion SFC program or sequence program, "[St.3222] Auxiliary function strobe 1 (D54442.4+4s)" to "[St.3225] Auxiliary function strobe 4
(D54442.7+4s)" turning OFF is confirmed, and "[Rq.3382] Auxiliary function complete 1 (FIN1) (D54227.0+2s)" or "[Rq.3383] Auxiliary function complete 2
(FIN2) (D54227.1+2s)" are turned OFF.
[St.3223] Auxiliary function strobe 2 (D54442.5+4s)
• This signal turns ON when the second group of auxiliary function (M function) is commanded.
• This signal turns ON when two or more auxiliary functions (M functions) in the same block are commanded by automatic
operation.
• The operation details are the same as "[St.3222] Auxiliary function strobe 1 (D54442.4+4s)". (Page 43 [St.3222]
Auxiliary function strobe 1 (D54442.4+4s))
3 G-CODE CONTROL DEDICATED SIGNALS
3.7 G-Code Control Line Status
43
[St.3224] Auxiliary function strobe 3 (D54442.6+4s)
• This signal turns ON when the third group of auxiliary function (M function) is commanded.
• This signal turns ON when three or more auxiliary functions (M functions) in the same block are commanded by automatic
operation.
• The operation details are the same as "[St.3222] Auxiliary function strobe 1 (D54442.4+4s)". (Page 43 [St.3222]
Auxiliary function strobe 1 (D54442.4+4s))
[St.3225] Auxiliary function strobe 4 (D54442.7+4s)
• This signal turns ON when the fourth group of auxiliary function (M function) is commanded.
• This signal turns ON when three or more auxiliary functions (M functions) in the same block are commanded by automatic
operation.
• The operation details are the same as "[St.3222] Auxiliary function strobe 1 (D54442.4+4s)". (Page 43 [St.3222]
Auxiliary function strobe 1 (D54442.4+4s))
44
3 G-CODE CONTROL DEDICATED SIGNALS
3.7 G-Code Control Line Status
3.8G-Code Control Line Monitor Device
Device No.Signal name
MELSEC iQ-R Motion
device assignment
D54496 to D54623Line 1 G-code control line monitor device
D54624 to D54751Line 2 G-code control line monitor device
Q series Motion compatible
device assignment
• Details for each line
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
D54496+128sMd.3016Number of axes on lineSTOPRUNMonitor device
D54497+128sUnusable
D54498+128sMd.3017G-code control axis configurationSTOPRUNMonitor device
D54499+128s
D54500+128s
D54501+128s
D54502+128sMd.3018SpeedG-code control
D54503+128s
D54504+128sMd.3019G-code control error codeImmediate
D54505+128sMd.3020G-code control error details code 1
D54506+128sMd.3021G-code control error details code 2
D54507+128sUnusable
D54508+128sMd.3022Program No. being executedAt G-code
D54509+128sUnusable
D54510+128sMd.3023Sequence No. being executedG-code control
D54511+128s
D54512+128sMd.3024Block No. being executed
D54513+128s
D54514+128sUnusable
D54515+128s
D54516+128s
D54517+128s
D54518+128s
D54519+128s
D54520+128sMd.3028Group 01 modal statusG-code control
D54521+128sMd.3029Group 02 modal status
D54522+128sMd.3030Group 03 modal status
D54523+128sUnusable
D54524+128s
D54525+128s
D54526+128sMd.3034Group 07 modal statusG-code control
D54527+128sMd.3035Tool radius compensation No.
D54528+128sMd.3036Tool radius compensation amount
D54529+128s
D54530+128sUnusable
D54531+128s
Q series Motion
compatible
device
assignment
Monitor device
operation cycle
Monitor device
program start
Monitor device
operation cycle
Monitor device
operation cycle
Monitor device
operation cycle
3
3 G-CODE CONTROL DEDICATED SIGNALS
3.8 G-Code Control Line Monitor Device
45
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
Q series Motion
compatible
device
assignment
D54532+128sMd.3038Group 08 modal statusG-code control
D54533+128sMd.3039Tool length compensation No.
D54534+128sMd.3040Tool length compensation amount
D54535+128s
D54536+128sUnusable
D54537+128s
D54538+128sMd.3042Tool length compensation axis No.G-code control
D54539+128sUnusable
D54540+128s
D54541+128s
D54542+128sMd.3046Group 12 modal statusG-code control
D54543+128sMd.3047Group 13 modal status
D54544+128sUnusable
D54545+128sMd.3049Group 15 modal statusG-code control
D54546+128sMd.3050Group 16 modal status
D54547+128sUnusable
D54548+128s
D54549+128s
D54550+128s
D54551+128sMd.3055Group 21 modal statusG-code control
D54552+128sUnusable
D54553+128s
D54554+128sMd.3058M-code data 1G-code control
D54555+128s
D54556+128sMd.3059M-code data 2
D54557+128s
D54558+128sMd.3060M-code data 3
D54559+128s
D54560+128sMd.3061M-code data 4
D54561+128s
operation cycle
operation cycle
operation cycle
operation cycle
operation cycle
operation cycle
Monitor device
Monitor device
Monitor device
Monitor device
Monitor device
Monitor device
46
3 G-CODE CONTROL DEDICATED SIGNALS
3.8 G-Code Control Line Monitor Device
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
Q series Motion
compatible
device
assignment
D54562+128sUnusable
D54563+128s
D54564+128s
D54565+128s
D54566+128s
D54567+128s
D54568+128s
D54569+128s
D54570+128s
D54571+128s
D54572+128s
D54573+128s
D54574+128s
D54575+128s
D54576+128s
D54577+128s
D54578+128s
D54579+128s
D54580+128s
D54581+128s
D54582+128s
D54583+128s
D54584+128s
D54585+128s
D54586+128s
D54587+128s
D54588+128sMd.3070Program comment being executedAt G-code
D54589+128s
D54590+128s
D54591+128s
D54592+128s
D54593+128s
D54594+128s
D54595+128s
program start
Monitor device
3
3 G-CODE CONTROL DEDICATED SIGNALS
3.8 G-Code Control Line Monitor Device
47
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
*1: G-code control configuration axes store 0/1.
0: Non-configuration axis
1: Configuration axis
*2: The following range is valid.
R16MTCPU: Axis No. 1 to 16, R32MTCPU: Axis No. 1 to 32
The number of axes set in [Motion Control Parameter][G-code Control Parameter][G-code Control System
Parameter]"Line Basic Setting""Number of Axes on Line" is stored.
[Md.3017] G-code control axis configuration (D54498+128s to D54501+128s)
The axis No. set in [Motion Control Parameter][G-code Control Parameter][G-code Control Axis Parameter]"Line Axis
Information""Axis No." is stored as bit data. This can be used to check what axis No. allocated by the servo network setting
is set for the axes on a line.
48
3 G-CODE CONTROL DEDICATED SIGNALS
3.8 G-Code Control Line Monitor Device
[Md.3018] Speed (D54502+128s, D54503+128s)
The speed (0.01[mm/min]) during interpolation operation or non-interpolation operation is stored.
ItemDescription
During interpolation operationStores the speed of the vector direction currently moving.
During non-interpolation operationStores the speed of the axis that has the highest speed of all axes currently moving.
[Md.3019] G-code control error code (D54504+128s)
• The corresponding error code at an error occurrence related to G-code control is stored. If another error occurs after error
code storing, the previous error code is overwritten by the new error code.
• G-code control error codes can be cleared by "[Rq.3380] Reset command (D54226.4+2s)" or "Error reset (SM50)".
Refer to the following for details of the error codes.
MELSEC iQ-R Motion Controller Programming Manual (Common)
[Md.3020] G-code control error details code 1 (D54505+128s)
• The corresponding error details code 1 at an error occurrence related to G-code control is stored. If another error occurs
after error code storing, the previous error code is overwritten by the new error code.
• G-code control error codes can be cleared by "[Rq.3380] Reset command (D54226.4+2s)" or "Error reset (SM50)".
3
Refer to G-code control error details codes for details of error details codes. (Page 237 G-code control
error details codes)
[Md.3021] G-code control error details code 2 (D54506+128s)
• The corresponding error details code 2 at an error occurrence related to G-code control is stored. If another error occurs
after error code storing, the previous error code is overwritten by the new error code.
• G-code control error codes can be cleared by "[Rq.3380] Reset command (D54226.4+2s)" or "Error reset (SM50)".
Refer to G-code control error details codes for details of error details codes. (Page 237 G-code control
error details codes)
[Md.3022] Program No. being executed (D54508+128s)
The corresponding program No. is stored when G-code program operation is being executed.
[Md.3023] Sequence No. being executed (D54510+128s, D54511+128s)
The sequence No. being executed is stored during G-code program operation.
3 G-CODE CONTROL DEDICATED SIGNALS
3.8 G-Code Control Line Monitor Device
49
[Md.3024] Block No. being executed (D54512+128s, D54513+128s)
Ex.
The block No. being executed is stored during G-code program operation.
When the sequence No. is changed, the block No. starts from "0".
When G-code program No.12 is executed.
Program[Md.3022] Program No. being
executed (D54508+128s)
G90 G00 X0. Y0.1201
G91 X100. Y100.1202
N100 X-50. Y-25.121000
N110 G01 X250. F300. 121100
Y-225.121101
X-50.121102
Y-2 5.1 211 03
N120 Y-125.121200
N130 G00 X-100.121300
N140 G01 X-200.121400
Y-175.121401
X-100.121402
Y-75.121403
N150 G90 G00 X0. Y0. 121500
N160 M02121600
[Md.3023] Sequence No. being
executed (D54510+128s,
D54511+128s)
[Md.3024] Block No. being
executed (D54512+128s,
D54513+128s)
The tool length compensation No. is stored. Because the last commanded compensation No. is stored, when compensating
for multiple axes, only the value of the axis last commanded is stored.
The tool length compensation amount is stored. Because the last commanded compensation amount is stored, when
compensating for multiple axes, only the value of the axis last commanded is stored.
[Md.3058] M-code data 1 (D54554+128s, D54555+128s)
• The value that follows after the auxiliary function address M is stored when auxiliary function (M function) is commanded.
"8-digit BCD code", "Unsigned 32-bit binary data", and "Signed 32-bit binary data" can be selected for the output M-code
data from G-code control system parameter "M Binary".
• When auxiliary function (M function) is commanded by automatic operation, "[Md.3058] M-code data 1 (D54554+128s,
D54555+128s)" is updated. Data is not updated when "[Rq.3382] Auxiliary function complete 1 (FIN1) (D54227.0+2s)" or
"[Rq.3383] Auxiliary function complete 2 (FIN2) (D54227.1+2s)" are turned ON. Data is not cleared when "[Rq.3380] Reset
command (D54226.4+2s)" is turned ON.
Up to four groups of values that follow after address M can be commanded per block. When multiple Ms are
programmed in one block, the interface that is output is determined by the programmed order.
52
3 G-CODE CONTROL DEDICATED SIGNALS
3.8 G-Code Control Line Monitor Device
[Md.3059] M-code data 2 (D54556+128s, D54557+128s)
M03 M08 M80 M82
Output to M-code data 4.
Output to M-code data 3.
Output to M-code data 2.
Output to M-code data 1.
M03 M08 M80 M82
Output to M-code data 4.
Output to M-code data 3.
Output to M-code data 2.
Output to M-code data 1.
M03 M08 M80 M82
Output to M-code data 4.
Output to M-code data 3.
Output to M-code data 2.
Output to M-code data 1.
• The value that follows after the auxiliary function address M is stored when auxiliary function (M function) is commanded.
"8-digit BCD code", "Unsigned 32-bit binary data", and "Signed 32-bit binary data" can be selected for the output M-code
data from G-code control system parameter "M Binary".
• When two or more auxiliary functions (M function) are commanded in the same block by automatic operation, "[Md.3059]
M-code data 2 (D54554+128s, D54555+128s)" is updated. Data is not updated when "[Rq.3382] Auxiliary function
complete 1 (FIN1) (D54227.0+2s)" or "[Rq.3383] Auxiliary function complete 2 (FIN2) (D54227.1+2s)" are turned ON. Data
is not cleared when "[Rq.3380] Reset command (D54226.4+2s)" is turned ON.
Up to four groups of values that follow after address M can be commanded per block. When multiple Ms are
programmed in one block, the interface that is output is determined by the programmed order.
[Md.3060] M-code data 3 (D54558+128s, D54559+128s)
• The value that follows after the auxiliary function address M is stored when auxiliary function (M function) is commanded.
"8-digit BCD code", "Unsigned 32-bit binary data", and "Signed 32-bit binary data" can be selected for the output M-code
data from G-code control system parameter "M Binary".
• When three or more auxiliary functions (M function) are commanded in the same block by automatic operation, "[Md.3060]
M-code data 3 (D54554+128s, D54555+128s)" is updated. Data is not updated when "[Rq.3382] Auxiliary function
complete 1 (FIN1) (D54227.0+2s)" or "[Rq.3383] Auxiliary function complete 2 (FIN2) (D54227.1+2s)" are turned ON. Data
is not cleared when "[Rq.3380] Reset command (D54226.4+2s)" is turned ON.
3
Up to four groups of values that follow after address M can be commanded per block. When multiple Ms are
programmed in one block, the interface that is output is determined by the programmed order.
[Md.3061] M-code data 4 (D54560+128s, D54561+128s)
• The value that follows after the auxiliary function address M is stored when auxiliary function (M function) is commanded.
"8-digit BCD code", "Unsigned 32-bit binary data", and "Signed 32-bit binary data" can be selected for the output M-code
data from G-code control system parameter "M Binary".
• When four or more auxiliary functions (M function) are commanded in the same block by automatic operation, "[Md.3061]
M-code data 4 (D54554+128s, D54555+128s)" is updated. Data is not updated when "[Rq.3382] Auxiliary function
complete 1 (FIN1) (D54227.0+2s)" or "[Rq.3383] Auxiliary function complete 2 (FIN2) (D54227.1+2s)" are turned ON. Data
is not cleared when "[Rq.3380] Reset command (D54226.4+2s)" is turned ON.
Up to four groups of values that follow after address M can be commanded per block. When multiple Ms are
programmed in one block, the interface that is output is determined by the programmed order.
3 G-CODE CONTROL DEDICATED SIGNALS
3.8 G-Code Control Line Monitor Device
53
[Md.3070] Program comment being executed (D54588+128s to D54595+128s)
The program comment of the program being executed is stored as 8-words of ASCII code.
15 characters + 1 NULL character of the comment (the character string from "(" to ")") of the block following the end of record
(%) set to the program start are stored.
54
3 G-CODE CONTROL DEDICATED SIGNALS
3.8 G-Code Control Line Monitor Device
3.9G-Code Control Line Monitor Device (Expansion)
Device No.Signal name
MELSEC iQ-R Motion
device assignment
D55264 to D55423Line 1 G-code control line monitor device (expansion)
D55424 to D55583Line 2 G-code control line monitor device (expansion)
Q series Motion compatible
device assignment
• Details for each line
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
D55264+160sMd.3178Program monitor being executed (1st
D55265+160s
D55266+160s
D55267+160s
D55268+160s
D55269+160s
D55270+160s
D55271+160s
D55272+160s
D55273+160s
D55274+160s
D55275+160s
D55276+160s
D55277+160s
D55278+160s
D55279+160s
D55280+160s
D55281+160s
D55282+160s
D55283+160s
D55284+160s
D55285+160s
D55286+160s
D55287+160s
D55288+160s
D55289+160s
D55290+160s
D55291+160s
D55292+160s
D55293+160s
D55294+160s
D55295+160s
Q series Motion
compatible
device
assignment
At block changeMonitor device
line)
3
3 G-CODE CONTROL DEDICATED SIGNALS
3.9 G-Code Control Line Monitor Device (Expansion)
55
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
Q series Motion
compatible
device
assignment
D55296+160sMd.3179Program monitor being executed (2nd
D55297+160s
D55298+160s
D55299+160s
D55300+160s
D55301+160s
D55302+160s
D55303+160s
D55304+160s
D55305+160s
D55306+160s
D55307+160s
D55308+160s
D55309+160s
D55310+160s
D55311+160s
D55312+160s
D55313+160s
D55314+160s
D55315+160s
D55316+160s
D55317+160s
D55318+160s
D55319+160s
D55320+160s
D55321+160s
D55322+160s
D55323+160s
D55324+160s
D55325+160s
D55326+160s
D55327+160s
line)
At block changeMonitor device
56
3 G-CODE CONTROL DEDICATED SIGNALS
3.9 G-Code Control Line Monitor Device (Expansion)
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
Q series Motion
compatible
device
assignment
D55328+160sMd.3180Program monitor being executed (3rd
D55329+160s
D55330+160s
D55331+160s
D55332+160s
D55333+160s
D55334+160s
D55335+160s
D55336+160s
D55337+160s
D55338+160s
D55339+160s
D55340+160s
D55341+160s
D55342+160s
D55343+160s
D55344+160s
D55345+160s
D55346+160s
D55347+160s
D55348+160s
D55349+160s
D55350+160s
D55351+160s
D55352+160s
D55353+160s
D55354+160s
D55355+160s
D55356+160s
D55357+160s
D55358+160s
D55359+160s
D55360+160sUnusable
D55361+160s
D55362+160s
D55363+160s
D55364+160s
D55365+160s
D55366+160s
D55367+160s
D55368+160s
D55369+160s
D55370+160s
D55371+160s
D55372+160s
D55373+160s
D55374+160s
D55375+160s
D55376+160s
line)
At block changeMonitor device
3
3 G-CODE CONTROL DEDICATED SIGNALS
3.9 G-Code Control Line Monitor Device (Expansion)
57
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
Q series Motion
compatible
device
assignment
D55377+160sUnusable
D55378+160s
D55379+160s
D55380+160s
D55381+160s
D55382+160s
D55383+160s
D55384+160s
D55385+160s
D55386+160s
D55387+160s
D55388+160s
D55389+160s
D55390+160s
D55391+160s
D55392+160s
D55393+160s
D55394+160s
D55395+160s
D55396+160s
D55397+160s
D55398+160s
D55399+160s
D55400+160s
D55401+160s
D55402+160s
D55403+160s
D55404+160s
D55405+160s
D55406+160s
D55407+160s
D55408+160s
D55409+160s
D55410+160s
D55411+160s
D55412+160s
D55413+160s
D55414+160s
D55415+160s
D55416+160s
D55417+160s
D55418+160s
D55419+160s
D55420+160s
D55421+160s
D55422+160s
D55423+160s
58
3 G-CODE CONTROL DEDICATED SIGNALS
3.9 G-Code Control Line Monitor Device (Expansion)
[Md.3178] Program monitor being executed (1st line) (D55264+160s to D55295+160s)
Ex.
Stores one block of the block being executed (first line) of the G-code program that is running as an ASCII character string.
A maximum of 64 characters (63 characters + \0) are stored in a block.
For a G-code program being executed on line 1
Program blockProgram
First line (executing)G91 G00 X100. Y100. Z100. C50.
ASCII character string\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
■Cautions
• Spaces in a G-code program are not stored because they are deleted when displaying a block.
• Comment lines are not stored.
• When a block is 64 characters or more, up to the 63rd character is stored and the 64th character is "\0".
[Md.3179] Program monitor being executed (2nd line) (D55296+160s to D55327+160s)
Stores one block of the second line from the block being executed (first line) of the G-code program that is running as an
ASCII character string.
A maximum of 64 characters (63 characters + \0) are stored in a block.
Refer to "[Md.3178] Program monitor being executed (1st line) (D55264+160s to D55295+160s)" for an example of the
program stored. (Page 59 [Md.3178] Program monitor being executed (1st line) (D55264+160s to D55295+160s))
[Md.3180] Program monitor being executed (3rd line) (D55328+160s to D55359+160s)
Stores one block of the third line from the block being executed (first line) of the G-code program that is running as an ASCII
character string.
A maximum of 64 characters (63 characters + \0) are stored in a block.
Refer to "[Md.3178] Program monitor being executed (1st line) (D55264+160s to D55295+160s)" for an example of the
program stored. (Page 59 [Md.3178] Program monitor being executed (1st line) (D55264+160s to D55295+160s))
60
3 G-CODE CONTROL DEDICATED SIGNALS
3.9 G-Code Control Line Monitor Device (Expansion)
3.10G-Code Control Axis Status
Device No.Signal name
MELSEC iQ-R Motion
device assignment
D54448, D54449Line 1 G-code control axis status of axis 1
D54450, D54451Line 1 G-code control axis status of axis 2
D54452, D54453Line 1 G-code control axis status of axis 3
D54454, D54455Line 1 G-code control axis status of axis 4
D54456, D54457Line 1 G-code control axis status of axis 5
D54458, D54459Line 1 G-code control axis status of axis 6
D54460, D54461Line 1 G-code control axis status of axis 7
D54462, D54463Line 1 G-code control axis status of axis 8
D54464, D54465Line 2 G-code control axis status of axis 1
D54466, D54467Line 2 G-code control axis status of axis 2
D54468, D54469Line 2 G-code control axis status of axis 3
D54470, D54471Line 2 G-code control axis status of axis 4
D54472, D54473Line 2 G-code control axis status of axis 5
D54474, D54475Line 2 G-code control axis status of axis 6
D54476, D54477Line 2 G-code control axis status of axis 7
D54478, D54479Line 2 G-code control axis status of axis 8
Q series Motion compatible
device assignment
3
• Details for each line
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
D54448.0+2snSt.3076Smoothing zeroG-code control
D54448.1+2snUnusable
D54448.2+2sn
D54448.3+2sn
D54448.4+2sn
D54448.5+2sn
D54448.6+2sn
D54448.7+2sn
D54448.8+2sn
D54448.9+2sn
D54448.A+2sn
D54448.B+2sn
D54448.C+2sn
D54448.D+2sn
D54448.E+2sn
D54448.F+2sn
D54449.0+2sn
D54449.1+2sn
D54449.2+2sn
D54449.3+2sn
D54449.4+2sn
D54449.5+2sn
D54449.6+2sn
D54449.7+2sn
Q series Motion
compatible
device
assignment
Status signal
operation cycle
3 G-CODE CONTROL DEDICATED SIGNALS
3.10 G-Code Control Axis Status
61
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
D54449.8+2snUnusable
D54449.9+2sn
D54449.A+2sn
D54449.B+2sn
D54449.C+2sn
D54449.D+2sn
D54449.E+2sn
D54449.F+2sn
Q series Motion
compatible
device
assignment
[St.3076] Smoothing zero (D54448.0+2sn)
• This signal turns ON when acceleration/deceleration processing ends, and there are no remaining commands.
• This signal turns ON when all output processing for the movement amount commanded by automatic operation, including
the delay in acceleration/deceleration, is complete.
• The signal turns OFF while executing the movement command, or when there is a delay in acceleration/deceleration.
When moving at extremely low speed, "[St.3076] Smoothing zero (D54448.0+2sn)" may turn ON even while
moving.
62
3 G-CODE CONTROL DEDICATED SIGNALS
3.10 G-Code Control Axis Status
3.11G-Code Control Axis Monitor Device
Device No.Signal name
MELSEC iQ-R Motion
device assignment
D54752 to D54783Line 1 G-code control axis monitor device of axis 1
D54784 to D54815Line 1 G-code control axis monitor device of axis 2
D54816 to D54847Line 1 G-code control axis monitor device of axis 3
D54848 to D54879Line 1 G-code control axis monitor device of axis 4
D54880 to D54911Line 1 G-code control axis monitor device of axis 5
D54912 to D54943Line 1 G-code control axis monitor device of axis 6
D54944 to D54975Line 1 G-code control axis monitor device of axis 7
D54976 to D55007Line 1 G-code control axis monitor device of axis 8
D55008 to D55039Line 2 G-code control axis monitor device of axis 1
D55040 to D55071Line 2 G-code control axis monitor device of axis 2
D55072 to D55103Line 2 G-code control axis monitor device of axis 3
D55104 to D55135Line 2 G-code control axis monitor device of axis 4
D55136 to D55167Line 2 G-code control axis monitor device of axis 5
D55168 to D55199Line 2 G-code control axis monitor device of axis 6
D55200 to D55231Line 2 G-code control axis monitor device of axis 7
D55232 to D55263Line 2 G-code control axis monitor device of axis 8
Q series Motion compatible
device assignment
3
• Details of each line
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
MELSEC iQ-R
Motion device
assignment
D54752+32snMd.3144Axis No.STOPRUNMonitor device
D54753+32snMd.3145Axis name
D54754+32snMd.3146Rotating axis setting status
D54755+32snMd.3153Tandem function enabled information
D54756+32snMd.3154Local coordinate offsetTransition to G-
D54757+32sn
D54758+32snUnusable
D54759+32sn
D54760+32sn
D54761+32sn
D54762+32sn
D54763+32sn
D54764+32sn
D54765+32sn
D54766+32sn
D54767+32sn
Q series Motion
compatible
device
assignment
code control/
G52 instruction
execution/G54
to G59
instruction
execution
3 G-CODE CONTROL DEDICATED SIGNALS
3.11 G-Code Control Axis Monitor Device
63
Device No.SymbolSignal nameRefresh cycle Fetch cycleSignal type
D54774+32snMd.3150Relative target positionG-code control
D54775+32sn
D54776+32snUnusable
D54777+32sn
D54778+32snMd.3152Program target positionG-code control
D54779+32sn
D54780+32snUnusable
D54781+32sn
D54782+32sn
D54783+32sn
Q series Motion
compatible
device
assignment
operation cycle
operation cycle
Monitor device
operation cycle
• The G-code control device address is stored as a value rounded to four decimal places or less, regardless
of the fixed parameter unit setting. The number of decimal places for the device monitor values of "[Md.20]
Feed current value (R: D32000+48n, D32001+48n/Q: D0+20n, D1+20n)", and "[Md.101] Real current value
(R: D32002+48n, D32003+48n/Q: D2+20n, D3+20n)" differ. Therefore, care must be taken when comparing
the address with the monitor value of "[Md.3147] Machine position (D54768+32n, D54769+32n)"
established at OFFON of "[Rq.3376] G-code control request (D54226.0+2s)".
• When "Rotation axis" is set to G-code control axis parameters, and "shortcut valid" or "shortcut invalid" are
set to rotation axis type, the G-code control device address is stored in the range of 0 to 359.9999[degree]
regardless of "unit setting" of fixed parameters. The recommended unit setting when using a rotating axis is
"degree".
[Md.3144] Axis No. (D54752+32sn)
The axis No. set by [Motion Control Parameter][G-code Control Parameter][G-code Control Axis Parameter]"Line Axis
Information""Axis No." is stored.
64
3 G-CODE CONTROL DEDICATED SIGNALS
3.11 G-Code Control Axis Monitor Device
[Md.3145] Axis name (D54753+32sn)
The number of the axis name set by [Motion Control Parameter][G-code Control Parameter][G-code Control Axis
Parameter]"Line Axis Information""Axis Name" is stored.
The following values are stored for each axis name number.
Monitor valueAxis name
0No setting
1X
2Y
3Z
4A
5B
6C
7U
8V
9W
[Md.3146] Rotating axis setting status (D54754+32sn)
The information set by [Motion Control Parameter][G-code Control Parameter][G-code Control Axis Parameter]"Line
Axis Information""Rotation Axis" is stored.
Monitor valueDescription
0Linear axis
1Rotation axis
3
[Md.3153] Tandem function enabled information (D54755+32sn)
Stores the master axis No. in tandem function.
Monitor valueDescription
0Tandem function not used (master control axis is 0)
1Master axis No. when tandem function is used
[Md.3154] Local coordinate offset (D54756+32sn, D54757+32sn)
Stores the setting value of the local coordinate system in the coordinate system currently selected.
[Md.3147] Machine position (D54768+32sn, D54769+32sn)
With "[St.3208] During G-code control (D54440.0+4s)" turned ON, the machine position of the control axis is stored.
The machine position is established by the position of "[Md.20] Feed current value (R: D32000+48n, D32001+48n/Q: D0+20n,
D1+20n)" at OFFON of "[Rq.3376] G-code control request (D54226.0+2s)".
[Md.3148] Machine target position (D54770+32sn, D54771+32sn)
The end point of the machine position in the block being executed is stored.
3 G-CODE CONTROL DEDICATED SIGNALS
3.11 G-Code Control Axis Monitor Device
65
[Md.3149] Relative position (D54772+32sn, D54773+32sn)
Ex.
Machine position
0
10000000
-10000000
Work coordinate system G54
zero-position
Relative position
0
Absolute zero-position
The current value of work coordinate system selection (G54 to G59) is stored.
When 1000. is set to G54
When in the 10000000 machine position, "relative position=0".
The relative position shifts according to the work coordinate system selection (G54 to G59).
[Md.3150] Relative target position (D54774+32sn, D54775+32sn)
The end point of the relative position in the block being executed is stored.
[Md.3152] Program target position (D54778+32sn, D54779+32sn)
The end point of the program position in the block being executed is stored.
This chapter describes the parameters used for G-code control.
Refer to the following for R series common parameters, and Motion CPU common parameters.
MELSEC iQ-R Motion Controller Programming Manual (Common)
Refer to the following for Motion control parameters.
MELSEC iQ-R Motion Controller Programming Manual (Positioning Control)
When using G-code control set the following. If the following settings are not made G-code control cannot be
performed.
• Set "0.888ms" or more in [Motion CPU Common Parameter][Basic Setting]"Operation Cycle".
(Page 24 Control Cycle of G-Code Control)
• According to the lines being used, set "Use Line 1 only" or "Use Line 1 and Line 2" in [Motion CPU Common
Parameter][Basic Setting]"G-code Control Setting"
1: Move to the end point of each axis, at the fast-
forward speed of each axis. (Non-interpolation)
Indirect setting*2Reference
*1
Valid/
invalid
section
Fetch
cycle
(Required
size)
76
76
76
76
76
77
4
7G1G1
8Arc
9Permissible
10Override
setting
11A ut oma tic
12Length before
13Fast forward
14Cutting feed
15Override
Deceleration
*3
check
*3
deviation
compensation
value of arc
center
*3
deviation
Automatic
corner
*3
override
corner
override
maximum
*3
angle
automatic
corner
override
*3
corner
rate
*3
override
rate
*3
override
*3
cancel
10: Do not execute deceleration check
100(10
4
[mm])
-
0(10
4
[mm])
0[%]0 to 100[%] Page
0[degree]0 to 180[degree] Page
-
0(10
4
[mm])
1: Execute deceleration check
-
1 to 1000(10
-1000 to 100(10
0 to 99999999(10
-4
[mm]) Page
-4
[mm]) Page
-4
[mm]) Page
Page
(1 word)
(1 word)
(1 bit)
G-
code
control
operati
on
cycle
77
77
78
78
78
78
Page
78
Page
78
Page
78
4 G-CODE CONTROL PARAMETERS
4.1 G-Code Control System Parameter
73
No. ItemDefault
value
16Plane
composition
17Base axis J
18Base axis K
19Normal line
control
20Normal line
21Minimum
22Normal line
23Minimum
24Normal line
25Normal line
26Auxiliary
function
27Polar
coordinate
interpolation
28Polar
Base axis I*310: No setting
*3
2
*3
3
Normal line
control axis
control type
rotating
*3
angle
control axis
rotating
*3
speed
rotating
movement
amount
control axis
rotating
*3
radius
control axis
insert radius
M binary
Polar
coordinate
interpolation
linear axis
coordinate
interpolation
rotating axis
00: No normal line control
*3
00: Normal line control type
*3
00 to 3600000(10-4[degree]) Page
20001 to 100000[degree/min] Page
00 to 99999999(10-4[mm]) Page
*3
00 to 99999999(10-4[mm]) Page
00 to 99999999(10-4[mm]) Page
*3
*3
00: BCD
00: No setting
*3
0 Page
*3
Setting rangeDirect
setting
Valid/
invalid
Page
1: X
2: Y
3: Z
4: A
5: B
6: C
7: U
8: V
9: W
Page
1: X
2: Y
3: Z
4: A
5: B
6: C
7: U
8: V
9: W
Page
1: Normal line control type
Page
1: Unsigned binary
-1: Signed binary
Page
1: X
2: Y
3: Z
4: A
5: B
6: C
7: U
8: V
9: W
Indirect setting*2Reference
*1
Valid/
invalid
section
Fetch
cycle
(Required
size)
79
79
79
79
79
80
80
80
80
80
80
74
4 G-CODE CONTROL PARAMETERS
4.1 G-Code Control System Parameter
No. ItemDefault
value
Setting rangeDirect
setting
Valid/
invalid
29High-
accuracy
control
30Acceleration/
31Tolerable
32Corner
33Corner
34Curve
35Arc
36Arc
Acceleration/
deceleration
before
interpolation maximum
*3
speed
deceleration
before
interpolation time
*3
constant
acceleration
control for
each axis
*3
ON
deceleration
*3
angle
accuracy
coefficient
accuracy
coefficient
deceleration
speed
change
deceleration
speed
*3
*3
*3
*3
2000[mm/
min]
100[ms]1 to 5000[ms] Page
00: Optimum corner deceleration
5[degree]1 to 89[degree] Page
0[%]-1000 to 99[%] Page
0[%]-1000 to 99[%] Page
00: Do not decelerate
1[mm/min]1 to 999999[mm/min] Page
1 to 999999[mm/min] Page
Page
1: Tolerable acceleration control for each axis
Page
1: Decelerate
*1 For direct setting using MT Developer2, use the decimal format instead of the exponential format.
*2 Refer to the following for the range of devices used for indirect setting.
Set the number of G-code control axes to be used on a line.
In G-code control axis parameter, provide settings for the number of axes set here in order from axis No.1.
When the number of axes on line 1 is "4"
Axis No.1, No.2, No.3, and No.4 are allocated in order on line 1 of G-code control. Because axis No.1 to No.4 are used,
settings for axis No.1 to No.4 must be made in G-code control axis parameter.
Modal initial setting
Interpolation mode
Select the linear command mode at Multiple CPU system power supply ON, or reset.
Plane selection
Select the plane at Multiple CPU system power supply ON, or reset.
When "0" is set, it is the same as if "1: X-Y plane (G17 command status)" has been set.
Absolute setting
Select the absolute setting/incremental setting mode at Multiple CPU system power supply ON, or reset.
Control setting
G00 Non-interpolation
Select the type of operation path of G00.
0: Move to the end point in a straight line. (Interpolation type)1: Move to the end point of each axis, at the fast forward speed
of each axis (Non-interpolation type)
• Uses the interpolation speed.
• The movement path of the tool in positioning is the shortest path connecting
the start point and end point. The positioning speed is automatically
calculated so that the fastest time distribution is obtained without exceeding
the fast forward speed of the commanded speed of each axis.
(Example) When the fast forward speed of X-axis and Y-axis are both
1000[mm/min]
G91 G00 X300. Y200. ,F1000
• Uses the command speed for each axis.
• The movement path of the tool in positioning is determined by the fast
forward speed of each axis from the start point to the end point.
(Example) When the fast forward speed of X-axis and Y-axis are both
1000[mm/min]
G91 G00 X300. Y200. ,F1000
76
4 G-CODE CONTROL PARAMETERS
4.1 G-Code Control System Parameter
Deceleration check
Speed
Time
Interpolation
complete
Block complete
*: Arrival at the target position of the
position command is not checked.
Command
speed
Deceleration
check time
The execution block selects the deceleration check method of fast forward command (G00) and cutting command (G01, G02,
G03). There are three deceleration check methods. Set the following values with the fast forward command (G00) and cutting
command (G01, G02, G03).
1Smoothing check methodThe block is complete when the deceleration check time
The block is complete when the deceleration check time*1 has elapsed after interpolation is completed.
*1
all axes on the line satisfy the following conditions.
• The command position has arrived at the target position.
Speed
Command
speed
Deceleration
check time
elapses after interpolation is completed, and
4
Time
Interpolation
complete
2In-position check methodThe block is complete when the deceleration check time
axes on the line satisfy the following conditions.
• The command position has arrived at the target position.
• The actual motor position is within the in-position width.
Speed
Command
speed
Actual
motor speed
Interpolation
complete
Block complete
*: Arrival at the target position of the
position command is checked.
*1
Deceleration
check time
In-position width
Time
Block
complete
elapses after interpolation ends, and all
*1 The deceleration check time is calculated automatically from the acceleration/deceleration mode and acceleration/deceleration time
constant.
G1->G1 deceleration check
When G1G1 movement direction is reversed, select whether to execute deceleration check, or not execute deceleration
check.
G1->G1 deceleration checkDescription
0: Do not execute deceleration
check
1: Execute deceleration checkAfter interpolation is complete, start the movement of the next block after executing deceleration check.
After interpolation is complete, start movement of the next block without executing deceleration check.
Arc deviation
For an arc command, set the permissible deviation range when there is a difference between the end point and center
coordinate.
4 G-CODE CONTROL PARAMETERS
4.1 G-Code Control System Parameter
77
Permissible compensation value of arc center deviation
Set the permissible compensation value for deviation of the center coordinate value of R-specified circular interpolation. When
the deviation between "line connecting the start point and end point" and "command radius 2" is less than or equal to the
permissible value, a correction is made so that the mid point of the line connecting the start point and end point becomes the
arc center.
• When setting value<0: 0 (No compensation of center deviation)
• When setting value=0: 2minimum setting unit (0.0001)
• When setting value>0: Set value
Override setting
Automatic corner override
Set the override value of automatic corner override.
Setting "0[%]", or "100[%]" disables automatic corner override.
Automatic corner override maximum angle
Set the maximum angle of the corner for automatic deceleration by automatic corner override.
Setting "0[degree]" or "180[degree]" disables automatic corner override.
Length before automatic corner override corner
Set the position for starting deceleration for the corner of automatic corner override.
Set the distance from the corner to the point where deceleration starts.
Fast forward rate override
Set the device for setting the ratio of fast forward rate override. Override can be applied in 1[%] increments against the fast
forward speed.
Set the following value to the specified device.
Setting range
0 to 100[%]
Cutting feed rate override
Set the device for setting the ratio of cutting feed rate override. Override can be applied in 1[%] increments against the feed
speed command set in the G-code program.
Set the following value to the specified device.
Setting range
0 to 327[%]
Override cancel
Set the device for cancelling override.
By turning ON the set device, the override applied to the cutting feed rate override in automatic operation becomes "100[%]".
This device is "disabled" for automatic corner override, and fast forward rate override.
78
4 G-CODE CONTROL PARAMETERS
4.1 G-Code Control System Parameter
Plane composition
Base axis I/Base axis J/Base axis K
Set the axis names of the base axes for which the plane is composed.
Set the axis names set here to [Motion Control Parameter][G-code Control Parameter][G-code Control Axis
Parameter]"Line Axis Information""Axis name" also.
When using two axes etc., set "0" to items that are not used (Base axis I, Base axis J, Base axis K).
Normally, by setting X, Y, and Z to "Base axis I", "Base axis J", and "Base axis K", the following relationships are established.
When setting axis names other than the following, set any given axis name.
•G17: X-Y
•G18: Z-X
•G19: Y-Z
When the axis names set to "Base axis I", "Base axis J", and "Base axis K" are the same, or the set axis names have not been
set in [Motion Control Parameter][G-code Control Parameter][G-code Control Axis Parameter]"Line Axis
Information""Axis name", a moderate error (error code: 30FDH (details code: 0010H)) occurs.
Normal line control
Normal line control axis
Set the axis names of the axes performing normal line control.
When the axes of the specified names have not been set, a moderate error (error code: 30FDH (details code: 0011H)) occurs.
Set the axis name of a rotating axis for normal line control axes. When an axis name of a linear axis is set, a moderate error
(error code: 30FDH (details code: 0012H)) occurs.
The axis names of axes set to "Base axis I", "Base axis J", "Base axis K" cannot be set to normal line control axes. When set
to normal line control axes, a moderate error (error code: 30FDH (details code: 0012H)) occurs.
4
Normal line control type
Set the normal line control type.
Normal line
control type
0: Normal line control
type
1: Normal line control
type
Details
Rotating directionRotating speed for block jointRotating speed for circular interpolation
Direction for which there is less than
180[degree] (shortest way)
■At start
Direction for which there is less than
180[degree] (shortest way)
■Other than start
Command direction
Parameter speed settingThe speed at which the program path follows the
command speed.
The speed at which the blade of the tool follows the command speed.
Minimum rotating angle
Set the minimum rotating angle of a normal line control axis at a block joint during normal line control.
Normal line control axis rotating speed
Set the normal line control axis rotating speed of the block joint during normal line control.
Normal line control axis rotating speed is enabled for normal line control type .
When the value set in normal line control axis rotating speed exceeds the normal line control axis value set in [G-code Control
Axis Parameter]"Speed/Time Constant""Cutting Feed Clamp Speed", a moderate error (error code: 30FDH(details code:
012H)) occurs.
4 G-CODE CONTROL PARAMETERS
4.1 G-Code Control System Parameter
79
Minimum rotating movement amount
Set the minimum movement amount of the block that performs a rotation operation at the joint directly before, during normal
line control.
Normal line control axis rotating radius
Set the length from the center of the normal line control axis to the tip of the tool.
Used to calculate the rotating speed of the block joint, and during circular interpolation.
Normal line control axis rotating radius is enabled for normal line control type .
Normal line control axis insert radius
Set the radius of the arc to be automatically inserted in the corner during normal line control. Normal line control axis insert
radius is enabled for normal line control type .
Auxiliary function
M binary
Set whether to output auxiliary function (M function) in BCD, or binary (signed or unsigned).
Polar coordinate interpolation
Polar coordinate interpolation linear axis
Set the name of the linear axis performing polar coordinate interpolation.
When the axis of the specified name has not been set, a moderate error (error code: 30FDH (details code:0013H)) occurs.
For polar coordinate interpolation linear axis, set the axis name of the linear axis. When an axis name of a rotating axis is set,
a moderate error (error code: 30FDH (details code: 0014H)) occurs.
Set the axis names set to "Base axis I", "Base axis J", and "Base axis K". When the set axis name is not set to "Base axis I",
"Base axis J", and "Base axis K", a moderate error (error code: 30FDH (details code: 0014H)) occurs.
Set both the polar coordinate interpolation linear axis and polar coordinate interpolation rotating axis. When only one is set, a
moderate error (error code: 30FDH (details code: 0013H)) occurs.
Polar coordinate interpolation rotating axis
Set the name of the rotating axis performing polar coordinate interpolation.
When the axis of the specified name has not been set, a moderate error (error code: 30FDH (details code:0013H)) occurs.
For polar coordinate interpolation rotating axis, set the axis name of the rotating axis. When an axis name of a linear axis is
set, a moderate error (error code: 30FDH (details code: 0014H)) occurs.
Set the axis names not set in the following. When the set axis name is set in the following, a moderate error (error code:
30FDH (details code: 0014H)) occurs.
• Base axis I, Base axis J, and Base axis K
• Normal line control axis
Set both the polar coordinate interpolation linear axis and polar coordinate interpolation rotating axis. When only one is set, a
moderate error (error code: 30FDH (details code: 0013H)) occurs.
High-accuracy control
Acceleration/deceleration before interpolation - maximum speed
Set the cutting feed speed for acceleration/deceleration before interpolation.
When the value set to G-code control axis parameter "Cutting feed clamp speed for high-accuracy control mode", or G-code
control system parameter "acceleration/deceleration before interpolation - maximum speed" is larger than the value set to Gcode control axis parameter "Cutting feed clamp speed", a moderate error (error code: 30FDH (details code: 0015H)) occurs.
80
4 G-CODE CONTROL PARAMETERS
4.1 G-Code Control System Parameter
Acceleration/deceleration before interpolation - time constant
Vector speed
Time
Time constant
Maximum
speed
• When (θ>setting value) there is corner deceleration.
• When (θ≤setting value) there is no corner deceleration.
θ
Set the cutting feed time constant for acceleration/deceleration before interpolation.
The relationship between the vector speed waveform and "acceleration/deceleration before interpolation - maximum speed"
and "Acceleration/deceleration before interpolation - time constant" is shown below.
Tolerable acceleration control for each axis ON
Select the calculation method for corner deceleration speed between blocks when high-accuracy control is enabled.
Setting valueDescription
0: Optimum corner decelerationThe deceleration speed is calculated using a common tolerable acceleration for all axes determined from
the G-code control system parameters "Acceleration/deceleration before interpolation - maximum speed"
and "Acceleration/deceleration before interpolation - time constant".
1: Tolerable acceleration control for each axisThe deceleration speed is calculated using the tolerable acceleration for each axis determined from the G-
code control axis parameters "Cutting feed for each axis before interpolation - maximum speed" and
"Cutting feed for each axis before interpolation - time constant".
Corner deceleration angle
Set the minimum value of the angle (outside angle) to be deemed as a corner.
When the angle (outside angle) between blocks during high-accuracy mode is larger than the setting value, it is deemed as a
corner and decelerates in order to produce an edge.
Corner accuracy coefficient
Set the compensation coefficient when making the rounded curve on corners smaller or larger during high-accuracy control
mode. In theory, the larger the setting value, the smaller the path deviation. However, because the corner deceleration speed
becomes lower, the cycle time increases.
4
Curve accuracy coefficient
Set the compensation coefficient when making the radius reduction in a curve (arc) smaller or larger during high-accuracy
control mode. In theory, the larger the setting value, the smaller the path deviation. However, because the arc clamp speed
becomes lower, the cycle time increases.
Arc deceleration speed change
Select whether to decelerate or not decelerate when entering the start and end of an arc during high-accuracy control mode.
Arc deceleration speed
Set the deceleration speed when entering the start and end of an arc.
4 G-CODE CONTROL PARAMETERS
4.1 G-Code Control System Parameter
81
4.2G-Code Control Axis Parameter
Set the parameters for the axis information of each axis on each line for G-code control.
[Motion Control Parameter][G-code Control Parameter][G-code Control Axis Parameter]
No. ItemDefault valueSetting rangeDirect
setting
Valid/
invalid
1Line axis
information
2Axis name00: No setting
3Rotation axis
4Stored
stroke limit
5Software limit +99999999(10
6Speed/
time
constant
7Cutting feed
8G0 time
9G1 time
10Rotation
axis
information
11Tandem
function
Axis No.10:No setting
1 to 64: Axis No.
1: X
2: Y
3: Z
4: A
5: B
6: C
7: U
8: V
9: W
*2
00: Linear axis
1: Rotation axis
-4
Software limit --99999999(10
Fast forward
speed
clamp speed
constant (linear)
constant (linear)
Rotation axis
*2
type
Master control
axis name
2000[mm/min]■When linear axis is set
2000[mm/min]■When linear axis is set
1000[ms]1 to 4000[ms] Page
1000[ms]1 to 4000[ms] Page
00: Shortcut invalid
00: No setting
*2
[mm]) ■When linear axis is set
-4
-99999999 to 99999999(10
[mm])
■When rotation axis is set
-99999999 to 99999999(10
1 to 1000000[mm/min]
■When rotation axis is set
1 to 1000000[degree/min]
1 to 1000000[mm/min]
■When rotation axis is set
1 to 1000000[degree/min]
1: Shortcut valid
3: All linear coordinates
1: X
2: Y
3: Z
4: A
5: B
6: C
7: U
8: V
9: W
-4
[mm])
-4
[degree])
Page
Page
Page
Page
Page
Page
Page
Page
Indirect settingReference
*1
Valid/
invalid
section
Fetch
cycle
(Required
size)
83
83
83
84
85
85
85
85
86
87
82
4 G-CODE CONTROL PARAMETERS
4.2 G-Code Control Axis Parameter
No. ItemDefault valueSetting rangeDirect
setting
Valid/
invalid
12High-
accuracy
control
13Cutting feed
14Cutting feed for
15Cutting feed for
16Accuracy
Rapid traverse
rate during highaccuracy control
*2
mode
clamp speed for
high-accuracy
control mode
each axis
before
interpolation maximum
speed
each axis
before
interpolation time constant
coefficient for
each axis
*2
*2
*2
*2
0[mm/min]0 to 1000000[mm/min] Page
0[mm/min]0 to 1000000[mm/min] Page
0[mm/min]0 to 999999[mm/min] Page
0[ms]0 to 5000[ms] Page
0[%]-1000 to 99[%] Page
*1 For direct setting using MT Developer2, use the decimal format instead of the exponential format.
*2 This setting can be omitted.
Indirect settingReference
*1
Valid/
invalid
section
Fetch
cycle
(Required
size)
88
88
88
88
88
4
Line axis information
Axis No.
Set the axis No. to be controlled by G-code control.
Set the axis No. that was set in the servo network setting. Duplicate axis Nos. cannot be set.
When an axis No. not set in the servo network setting or duplicate axis Nos. are set, a moderate error (error code: 30FDH
(details code: 0020H)) occurs.
Axis name
Set the name of each axis with the following letters: X, Y, Z, A, B, C, U, V, W.
The same axis name cannot be set more than once in the same line. When the same axis name is set more than once in the
same line, a moderate error (error code: 30FDH (details code: 0021H)) occurs. However, the same axis name being set in
another line can be set.
Rotation axis
Set whether the axis to be controlled is a linear axis or rotation axis.
When a rotation axis is set, the axis is controlled by a rotation coordinate system.
Rotation axis type is set with "rotation axis type". (Page 86 Rotation axis type)
Depending on the rotation axis type that is set, set the units of the axis set in axis No. to the following units in [Motion Control
Parameter][Axis Setting Parameter]"Fixed Parameter""Unit Setting". When units other than the following are set, a
moderate error (error code: 30FDH (details code: 0022H)) occurs.
Rotation axisUnit setting
0: Linear axismm, pulse
1: Rotation axisdegree, pulse
4 G-CODE CONTROL PARAMETERS
4.2 G-Code Control Axis Parameter
83
Stored stroke limit
Valid range for
machine movement
Basic machine
coordinate system
Point 1
Point 2
- Setting value
Distance (L)
Feed speed
+ Setting value
: Prohibited area
Set point 1 and point 2
position in machine coordinates.
Software limit -/Software limit +
Set the movement range in the + direction (upper limit value) and - direction (lower limit value) of the stored stroke limit.
In the following cases, a moderate error (error code: 30FDH (details code: 0024H)) occurs.
Rotation axisRotation axis typeStore stroke limit
Valid/invalid
0: Linear axisValid(Software limit -) (Software limit +)
3: All linear coordinatesValid(Software limit -) (Software limit +)
The following types of stored stroke limit are available.
■Stored stroke limit I
Going outside of the set perimeter is prohibited.
The stroke limit is not valid immediately after turning ON the power supply of controlling equipment. Instead, it becomes valid
after transition to G-code control. During G-code control, the fixed parameter stroke limit settings become invalid. When
transitioning to G-code control, if there is an axis outside of the valid range for machine movement, there is no transition to Gcode control, and a minor error (error code: 1FC1H (details code: 0101H)) occurs.
Error conditions
In automatic operation, a minor error (error code: 1FC2H (details code: 0221H)) occurs to avoid going into the prohibited area.
When an error occurs on one axis, all axes decelerate to a stop. The stopping position is always before the prohibited area.
The distance (L) between the prohibited area and stop position differs according to the feed speed.
Before transition to G-code control, check that there are no problems with the current machine position using
"[Md.20] Feed current value (R: D32000+48n, D32001+48n/Q: D0+20n, D1+20n)". When the axis unit setting
is [degree], "[Md.20] Feed current value (R: D32000+48n, D32001+48n/Q: D0+20n, D1+20n)" is the rotating
range (0 to 359.99999[degree]), but to check the machine position in the linear range (-2147483648 to
84
2147483647), set the "cumulative current value" data type in the optional data monitor setting. It can then be
checked in the set storage device.
4 G-CODE CONTROL PARAMETERS
4.2 G-Code Control Axis Parameter
Speed/time constant
Speed
Time
G0 time constantG0 time constant
Speed
Time
G1 time constantG1 time constant
Fast forward speed
Set the fast forward speed for each axis. Refer to fast forward speed for details. (Page 173 Fast forward speed)
Cutting feed clamp speed
Set the maximum speed for cutting feed rate on each axis. When the feed rate in G01 is commanding a value that exceeds
the cutting feed clamp speed, the speed is clamped at the cutting feed clamp speed that has been set. Refer to cutting feed
speed for details. (Page 174 Cutting feed speed)
G0 time constant (linear)
Set the time constant of linear control in fast forward acceleration/deceleration. Refer to fast forward speed for details.
(Page 173 Fast forward speed)
G1 time constant (linear)
Set the time constant of linear control in cutting feed acceleration/deceleration. Refer to cutting feed speed for details.
(Page 174 Cutting feed speed)
4
4 G-CODE CONTROL PARAMETERS
4.2 G-Code Control Axis Parameter
85
Rotation axis information
Ex.
Ex.
90°
(2)
(3)
(4)
0
°
45°
90°
(2)
(3)
(4)
0
°
45°
Rotation axis type
Set the rotation axis type to rotation (shortcut valid/invalid), or linear.
The setting is valid when rotation axis is set to "1: Rotation axis".
The method of movement differs according to the rotation axis type that is set.
■Rotation type (0: Shortcut invalid)
• The machine position, work coordinate position, and relative position all have a range of 0 to 359.9999[degree].
• For an absolute value command, the movement follows the sign for the remainder only, after dividing by 360.0000[degree].
When the following G-code program is executed with "0: Shortcut invalid"
OperationProgram[Md.3149] Relative position (D54772+32sn,
D54773+32sn)[degree]
(1)G90 C0.0.00000.0000
(2)G90 C-270.90.000090.0000
(3)C405.45.000045.0000
(4)G91 C180.225.000225.000
[Md.3147] Machine position (D54768+32sn,
D54769+32sn)[degree]
■Rotation type (1: Shortcut valid)
• The machine position, work coordinate position, and relative position all have a range of 0 to 359.9999[degree].
• For an absolute value command, movement is in the direction with the least movement amount to the end point. However,
when movement amounts are the same (180.0000[degree]) in both the forward and reverse direction, movement is in the
forward direction.
When the following G-code program is executed with "1: Shortcut valid"
OperationProgram[Md.3149] Relative position (D54772+32sn,
D54773+32sn)[degree]
(1)G90 C0.0.00000.0000
(2)G90 C-270.90.000090.0000
(3)C405.45.000045.0000
(4)G91 C180.225.000225.000
[Md.3147] Machine position (D54768+32sn,
D54769+32sn)[degree]
86
4 G-CODE CONTROL PARAMETERS
4.2 G-Code Control Axis Parameter
■Linear type (3: All linear coordinates)
Ex.
90°
(2)
(3)
(4)
0
°
45°
• All linear coordinates have a range of -9999.9999 to 9999.9999[degree].
• Same operation as a linear axis.
• After ending G-code control once and then transitioning to G-code control again, the work coordinate position is set based
on the machine coordinate position.
When the following G-code program is executed with "3: All linear coordinates"
OperationProgram[Md.3149] Relative position (D54772+32sn,
D54773+32sn)[degree]
(1)G90 C0.0.00000.0000
(2)G90 C-270.-270.0000-270.0000
(3)C405.405.0000405.0000
(4)G91 C180.585.0000585.0000
• The coordinate position when transitioning to G-code control again, after ending G-code control once.
Work [degree]Machine position [degree]
585.0000585.0000
[Md.3147] Machine position (D54768+32sn,
D54769+32sn)[degree]
4
Tandem function
Master control axis name
Set the master control axis name for using tandem function.
In the follow cases, a moderate error (error code: 30FDH (details code: 0023H)) occurs.
• When this setting was used with an axis set to the following G-code control system parameters.
• When this setting was used with axes with G-code control axis parameter "axis name" other than "U", "V", "W".
• When the axis of the specified axis name has not been set.
• When the axis of the specified axis name is set as a slave control axis.
• When the axis of the specified axis name and the following parameters do not match.
• G-code control axis parameter "Rotation axis"
• G-code control axis parameter "Rotating axis type"
4 G-CODE CONTROL PARAMETERS
4.2 G-Code Control Axis Parameter
87
High-accuracy control
Rapid traverse rate during high-accuracy control mode
Set the fast forward speed during high-accuracy control mode for each axis.
When set to "0", the G-code control axis parameter "fast forward speed" is used.
Cutting feed clamp speed for high-accuracy control mode
Set the cutting feed maximum speed during high-accuracy control for each axis.
When set to "0", the G-code control axis parameter "cutting feed clamp speed" is used.
Cutting feed for each axis before interpolation - maximum speed
Set the maximum speed for calculating the tolerable acceleration of each axis when tolerable acceleration control for each
axis is enabled.
When set to "0", the G-code control axis parameter "fast forward speed" is used.
Cutting feed for each axis before interpolation - time constant
Set the time constant (the time it takes to reach the maximum speed) for calculating the tolerable acceleration of each axis
when tolerable acceleration control for each axis is enabled.
When set to "0", the G-code control axis parameter "G0 time constant (linear)" is used.
Accuracy coefficient for each axis
Set the compensation coefficient for adjusting the path deviation on corners and the clamp speed on each axis during highaccuracy control mode, when tolerable acceleration control for each axis is enabled.
The larger the setting value, the more accurate the edges become. However, because speed is reduced at corners, the cycle
time increases.
88
4 G-CODE CONTROL PARAMETERS
4.2 G-Code Control Axis Parameter
4.3G-Code Control Work Parameter
Set the parameters of the tool used for processing in G-code control.
[Motion Control Parameter][G-code Control Parameter][G-code Control Work Parameter]
2: Interference check avoidChange the path so there is no interference.
4 G-CODE CONTROL PARAMETERS
4.3 G-Code Control Work Parameter
89
Select tool radius or diameter compensation
Tool radius
compensation amount
Tool length
compensation amount
Set tool compensation amount specified by radius or diameter.
Tool compensation data
Tool radius compensation amount
Set the compensation amount for the tool radius.
Up to 40 can be set for both lines.
Tool length compensation amount
Set the compensation amount for the tool length.
Up to 40 can be set for both lines.
Workpiece coordinate offset
Coordinate offset (X to W)
Set an offset from the machine coordinate system to set the base point of the workpiece to be processed as the home
position.
Set the offset amounts for each axis name to No. 1 to 6 of the workpiece coordinate system.
Program coordinate rotation
Coordinate rotation type
Select the start point in the first movement command after a program coordinate rotation command.
Coordinate rotation typeDescription
0: Coordinate rotation type 0The start point does not rotate with the coordinate rotation. The end position is calculated from the current position on
1: Coordinate rotation type 1The end position is calculated assuming that the start point rotates with the coordinate rotation.
the local coordinate system before rotation.
90
4 G-CODE CONTROL PARAMETERS
4.3 G-Code Control Work Parameter
5G-CODE CONTROL PROGRAMS
5.1G-Code Control Program Composition
The files of the G-code program are created in text format. One G-code program is created per file. Multiple G-code programs
cannot be created in one file.
Refer to the following for the storage destination of G-code program files.
MELSEC iQ-R Motion Controller Programming Manual (Common)
G-code programs are created and written to the Motion CPU by the following methods.
G-code program operations with MT Developer2
Text files created on a personal computer can be written to/read from/verified with/deleted from the Motion CPU using MT
Developer2. Refer to the following for details of operation.
Help of MT Developer2
G-code program operations with GOT
G-code programs can be created on GOT and written to/read from the Motion CPU.
Refer to G-code program operation by GOT for details. (Page 236 G-Code Program Operation by GOT)
5
Operations to the Motion CPU with file transmission via FTP server
Text files created on a personal computer can be written to/read from the Motion CPU using the file transmission via FTP
server. Refer to the following for details of the file transmission via FTP server.
MELSEC iQ-R Motion Controller Programming Manual (Common)
The file format of a G-code program is shown below.
ItemDescription
Line feed codeCRLF(0x0D, 0x0A)
Character codeASCII code
File sizeUp to 512k bytes
G-code program
A G-code program is a collection of units called "blocks" which command a single operation (sequence) of a machine. These
blocks describe the actual order in which the tool moves.
No.NameDescription
(1)Program startEnd of record (%) is always written on the first line of the G-code program.
(2)CommentWhen control out "(" is at the start of a block, that block is ignored and recognized as a comment. Information such as
(3)Program blockThe program block is required for operation, and is made up of multiple blocks in the order of which control is performed.
(4)Program endEnd of record (%) is always written on the last line of the G-code program.
The lines from end of record (%) to the end of record of program end (%) are read as one program.
program names and comments (ASCII code) can be written.
Also, for comments that are written on the line following end of record (%) in (1), 15 characters (excluding spaces) of that
comment are stored in "[Md.3070] Program comment being executed (D54588+128s to D54595+128s)" while the
program is being executed.
A line break at the end of the program block is recognized as the end of the block.
When end of record (%) is not written at the end of a G-code program, a minor error (error code: 1FC3H (details code:
0309H)) occurs.
• Write the program start and program end at the start of the block. When "%" is written at a place other than
the start of a block, it is not recognized as program start or program end.
• Write control out "(" at the start of the block. When "(" is written at a place other than the start of a block, it is
not recognized as a comment, and a minor error (error code: 1FC3H (details code: 0306H)) occurs when
the program is executed.
• When the start of the program block is not a character from "A" to "Z", a minor error (error code: 1FC0H
(details code: 0042H)) occurs. However, when the block is a line break only, that program is ignored and the
block No. is not counted.
92
5 G-CODE CONTROL PROGRAMS
5.1 G-Code Control Program Composition
Block
F15000.Z300.Y200.X100.G01N100
Word
(1)
(2)(3)(4)
WordWord
Block
WordWordWord
X
Letter
(address)
100
Number
Word
A block is a collection of units called "words" which include instructions for a single operation. A block includes the information
required to perform specific operations on a machine, and is a complete command. With a line break, the line feed code is
recognized as the end of the block.
No.NameDescription
(1)Sequence No.Comprises an address N and the numbers (up to 5 digits) that follow it.
Used as an index (destination at program branches etc.) for searching for the required block on a program. It has
no influence on operation.
(2)Prepared functions (G-code, G-
function)
(3)Coordinate languageSpecifies the coordinate position and movement amount for each axis.
(4)Feed function (F-function)Specifies the relative speed of the tool to the workpiece.
Comprises an address G and the 2 digits, or 3 digits (includes 2 digit numbers with 1 decimal place) that follow it.
G-code is used for specifying functions such as moving an axis and setting a coordinate system.
Comprises the address that indicates each axis and the values (plus/minus sign and a number) that follow it.
The letters X, Y, Z, A, B, C, U, V, W are used for the address.
Comprises an address F and the numbers that follow it.
5
Word
A word is a collection of instruction code, numbers and symbols in a specific order. A word comprises a letter called an
address and numbers (numerical values). The meaning of the numerical values and the valid number of digits differs
according to the address.
For numbers, the leading zeros (zeros preceding the actual number) can be omitted.
5 G-CODE CONTROL PROGRAMS
5.1 G-Code Control Program Composition
93
5.2Fetching G-Code Program Files
The G-code program is stored in the standard ROM on the Motion CPU as a G-code program file. Refer to the following for
storage destinations in the standard ROM.
MELSEC iQ-R Motion Controller Programming Manual (Common)
The timing for fetching files is shown below.
• Multiple CPU system power supply ON
• Multiple CPU system reset
•STOPRUN
Fetching G-code program file during operation
During G-code program operation, programs can be updated (fetch G-code program file) without stopping the Motion CPU by
RUNSTOP. Fetch the program that is transferred to the fetching area during program operation in the Motion CPU.
Fetching G-code program files during operation can be executed using the following methods.
• G-code program operation in MT Developer2. (Page 91 G-code program operations with MT Developer2)
• GOT program input/output and GOT program editing. (Page 236 G-Code Program Operation by GOT)
• G-code program transmission by file transmission via FTP server. (Page 95 Fetching program file during operation
using file transmission via FTP server)
Cautions
• In the following cases, G-code program fetch fails. The causes and corrective action are shown below.
Error details and causeCorrective action
When there was a G-code program fetch request during the operation of the
applicable program.
When there is an error in the G-code program file format.Correct the G-code program file format.
When the G-code program size exceeds the size of the fetching area during
program operation.
When the specified program No. is outside of the range.• Check "[Cd.3305] Program No. for loading while running (D54264)"
When program fetch during operation is requested during STOP.Do not request program fetch during operation during STOP. The program will
• While executing program fetch, when the applicable G-code program is started, a minor error (error code: 1FC3H (details
code: 031FH)) occurs.
Check that the applicable G-code program is not in operation.
End G-code control, RUNSTOP, and fetch the G-code program again.
• Check the applicable program is stored in the "$MMTPRJ$/gcode/prog/
temp" folder in the standard ROM.
be fetched at STOPRUN by storing the program in the folder as usual.
94
5 G-CODE CONTROL PROGRAMS
5.2 Fetching G-Code Program Files
Fetching program file during operation using file transmission via FTP server
Operating procedure
The following describes the procedure for fetching program file during operation using the file transmission via FTP server.
Refer to the following for details of file transmission via FTP server.
MELSEC iQ-R Motion Controller Programming Manual (Common)
1. Store the G-code program file in storage folder for the G-code program file ($MMTPRJ$/gcode/prog/temp).
2. Set the program No. (1 to 256) of the G-code program to be fetched in "[Cd.3305] Program No. for loading while running
(D54264)".
3. Turn ON "[Rq.3344] Program load request while running (D54225.0)".
4. When completed successfully, "2: Successfully completed" is stored in "[Md.3003] Program load status while running
(D54492)". When failed "3: Failed" is stored.
5. When fetching program files consecutively, repeat procedures 2. to 4.
■Used devices
The following devices are used in the transmission of G-code programs by file transmission via FTP server.
Refer to G-code control dedicated signals for details of the devices. (Page 28 G-CODE CONTROL DEDICATED
SIGNALS)
• [Rq.3344] Program load request while running (D54225.0)
• [Cd.3305] Program No. for loading while running (D54264)
• [Md.3003] Program load status while running (D54492)
• [Md.3004] Program load error information while running (D54493)
5.3Pre-read Buffer
Normally, in automatic operation one block is read in advance to facilitate smooth program analyzing. Also, during tool radius
compensation, three blocks of movement commands (up to five blocks if there are not three blocks of movement commands)
are read in advance in order to calculate the intersection that includes interference check.
The details of pre-read are described below.
• Pre-read saves the data of one block.
• Comments are not loaded to the pre-read buffer.
• The pre-read buffer is cleared by turning ON "[Rq.3380] Reset command (D54226.4+2s)".
• During continuous operation, when "[Rq.3379] Single block (D54226.3+2s)" is turned ON, the pre-read buffer saves the
data of the next block and stops.
5
5 G-CODE CONTROL PROGRAMS
5.3 Pre-read Buffer
95
5.4Decimal Point Input
In the G-code program input information which defines the path, distance, and speed of the tool, a decimal point that
commands the zero point in [mm] units can be input. For commands that do not use a decimal point, the minimum digit is the
minimum input command unit.
• Decimal point command is valid for distance, angle, time and speed in the G-code program.
• For command value data without decimal points, a movement command of 1 is a movement amount of
0.0001[mm](0.1[m]).
• For speed command data without decimal points, a speed command of 1 is a speed of 1.00[mm/min].
• For time command data without decimal points, a time command of 1 is a time of 0.001[s].
• The valid command value range for decimal point commands is shown below. Do not execute commands with G-code
programs that exceed the valid command value range.
CommandValid command value range
Movement command (linear)-9999.9999 to 9999.9999[mm]
Movement command (rotation)/rotation angle-99999.9999 to 99999.9999[degree]
Feed speed0.01 to 1000000.00[mm/min]
Dwell0 to 99999.999[s]
Decimal point command list
The list for decimal point commands is shown below. A minor error (error code: 1FC3H (details code: 031AH)) occurs for
decimal point commands for addresses where decimal point command are invalid.
: Valid, : Invalid
AddressDecimal point commandApplicationRemark
ACoordinate position data
BCoordinate position data
CCoordinate position data
DTool radius compensation No.
FCutting feed rate
Fast forward speedSpecified as ,F
GPrepared function code
HTool length compensation No.
IArc center
Vector component of tool radius compensation
JArc center
Vector component of tool radius compensation
KArc center
Vector component of tool radius compensation
MAuxiliary function code
NSequence No.
OProgram No.
PDwell time
RRadius of R-specified arc
Rotation angle
UCoordinate position data
VCoordinate position data
WCoordinate position data
XCoordinate position data
Dwell time
YCoordinate position data
ZCoordinate position data
96
5 G-CODE CONTROL PROGRAMS
5.4 Decimal Point Input
When a decimal point is not used at an address where decimal point command are valid, the last digit of the
X
Y
Basic machine
coordinate system
Y
Work coordinate
system 1
X
Y
Local coordinates
X
Y
Local
coordinates
X
Y
Work coordinate
system 2
X
Y
Local coordinates
X
Y
Local
coordinates
X
command data matches with the command unit.
(Example)
When "X1" is specified, the command is equivalent to "X0.0001".
5.5Coordinate System
This section describes the coordinate systems.
The coordinate home position symbols that indicate the coordinate systems are shown below.
5
Coordinate home position symbol NameDescription
Machine coordinate home position Position specifically determined by the machine
Work coordinate home positionHome position of the coordinate system used for processing work
Local coordinate home positionHome position of the coordinate system when the work coordinate system
is temporarily changed.
Basic machine coordinate system
This is a coordinate system specific to the machine, and is used to indicate positions specifically determined by the machine
(tool exchange position, stroke end position etc.).
The tool is moved to the command position on the machine coordinate system by the G53 command and the coordinate
command that follows.
Only the G53 command and coordinate commands in the same block are commands to the machine coordinate system.
Work coordinate system
The work coordinate system is used when creating a G-code program and sets the base point on the work as the coordinate
home position. The work coordinate system specifies positions with an offset amount from the basic machine coordinate
system. The set offset amount is the distance from the machine coordinate system home position (0). Up to six work
coordinate systems (work coordinate 1 to 6) can be set. They are set in the G-code control work parameter "Workpiece
coordinate offset", or work coordinate system 1 selection (G54) to work coordinate system 6 selection (G59).
5 G-CODE CONTROL PROGRAMS
5.5 Coordinate System
97
Local coordinate system
This coordinate system is for specifying a coordinate system within the work coordinate system currently selected. With this,
the work coordinate system can be temporarily changed. Local coordinate systems can be independently specified on each
work coordinate system, for work coordinate system 1 to 6 (G54 to G59).
The home position of a local coordinate system is commanded by the distance from the home position of the specified work
coordinate system.
When in incremental value mode, the local coordinate home position is the position with the specified local coordinate offset
amount added to it.
When a work coordinate system has not been specified, the local coordinate system is created on the work coordinate system
currently selected.
Automatic coordinate system setting
When transitioning to G-code control, the basic machine coordinate system, and work coordinate system are automatically
set according to parameters set beforehand.
The coordinate systems created by automatic coordinate system setting are as follows.
• Basic machine coordinate system
• Work coordinate system (G54 to G59)
Parameters related to coordinates are all set by the distance from the home position of basic machine coordinate system.
When automatic coordinate system setting is executed, local coordinate system setting by G52 command is cancelled.
Coordinate system for rotation axes
Axes with the G-code control axis parameter "Rotation axis" set to "1: Rotation axis" are controlled with the coordinate system
for rotation axes.
The types of rotation axes are rotation type (shortcut valid/invalid), and linear type. Set each axis type in [Motion Control
Parameter][G-code Control Parameter][G-code Control Axis Parameter]"Rotation Axis Information""Rotation Axis
Type".
The machine position and relative position differs according to the parameter.
Rotation axes are commanded in [degree] units.
When restricting the movement range, set the G-code control axis parameter "Rotation axis type" to "3: All linear coordinates",
and set the stored stroke limit. When not restricting the movement range, set the G-code control axis parameter "Rotation axis
type" to "0: Shortcut invalid" or "1: Shortcut valid", and set the stored stroke limit upper value and lower value to the same
value. Refer to stored stroke limit for details of stored stroke limit. (Page 84 Stored stroke limit)
Rotation axisLinear axis
Rotation axis typeLinear type
Shortcut invalidShortcut validAll linear coordinates
Work coordinate position0 to 359.9999[degree]-9999.9999 to 9999.9999
Machine position/Relative
position
ABS commandMoves in direction of the sign
INC commandMoves in the direction of the sign for the incremental amount commanded with the current position as the origin.
Stored stroke limit setting
range
0 to 359.9999[degree]-9999.9999 to 9999.9999
Moves the shortest way to the
for the remainder of the
movement amount of the end
point minus the current
position divided by
360[degree].
Set the upper limit value and lower limit value to the same
value.
end point.
[degree]
[degree]
Same as a normal linear axis. Moves in the direction of the sign
for the movement amount of the end point minus the current
position without rounding to 360[degree].
-9999.9999 to 9999.9999
[degree]
-9999.9999 to 9999.9999[mm]
-9999.9999 to 9999.9999[mm]
-9999.9999 to 9999.9999[mm]
98
5 G-CODE CONTROL PROGRAMS
5.5 Coordinate System
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.