Mitsubishi Electric MELSEC iQ-R16MTCPU, MELSEC iQ-R64MTCPU, MELSEC iQ-R32MTCPU Programming Manual

MELSEC iQ-R Motion Controller Programming Manual (G-Code Control)
-R16MTCPU
-R32MTCPU
-R64MTCPU

SAFETY PRECAUTIONS

WARNING
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.
Relevant products
R16MTCPU, R32MTCPU, R64MTCPU
9

CONTENTS

SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
CONDITIONS OF USE FOR THE PRODUCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
INTRODUCTION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
RELEVANT MANUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
TERMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
MANUAL PAGE ORGANIZATION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
CHAPTER 1 OVERVIEW 19
1.1 G-Code Control Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.2 Performance Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.3 G-Code Control Add-On Library Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
G-code control add-on library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Files size/Memory usage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
CHAPTER 2 STARTING UP THE SYSTEM 22
2.1 Starting Up the G-Code Control System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.2 License Authentication of G-Code Control Add-On Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.3 Control Cycle of G-Code Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.4 G-Code Control System Device Assignment Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.5 G-Code Control System Start/End . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.6 G-Code Control System Stop Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Immediate stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Deceleration stop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
CHAPTER 3 G-CODE CONTROL DEDICATED SIGNALS 28
3.1 G-Code Control Common Command Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.2 G-Code Control Common Control Device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.3 G-Code Control Common Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.4 G-Code Control Common Monitor Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.5 G-Code Control Line Command Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.6 G-Code Control Line Control Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.7 G-Code Control Line Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.8 G-Code Control Line Monitor Device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.9 G-Code Control Line Monitor Device (Expansion) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.10 G-Code Control Axis Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
3.11 G-Code Control Axis Monitor Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.12 Internal Relay (M)/Data Register (D) Availability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Internal relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Data registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
CHAPTER 4 G-CODE CONTROL PARAMETERS 72
4.1 G-Code Control System Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Line basic setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Modal initial setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Control setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Override setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Plane composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Normal line control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
10
Auxiliary function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Polar coordinate interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
High-accuracy control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
4.2 G-Code Control Axis Parameter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Line axis information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Stored stroke limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Speed/time constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Rotation axis information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Tandem function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
High-accuracy control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
4.3 G-Code Control ProcessWork Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Tool radius compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Tool compensation data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Workpiece coordinate offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Program coordinate rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
CHAPTER 5 G-CODE CONTROL PROGRAMS 91
5.1 G-Code Control Program Composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
G-code program format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
5.2 Fetching G-Code Program Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Fetching G-code program file during operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.3 Pre-read Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
5.4 Decimal Point Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.5 Coordinate System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Basic machine coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Work coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Local coordinate system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Automatic coordinate system setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Coordinate system for rotation axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
5.6 G-Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
G-code list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Modal/Unmodal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
G-code priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
G00: Positioning (Fast forward). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
G01: Linear interpolation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
G02: Circular interpolation CW (center specified) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
G03: Circular interpolation CCW (center specified). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
G02: Circular interpolation CW (R-specified) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
G03: Circular interpolation CCW (R-specified) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
G04: Dwell (time specified) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
G09: Exact stop check. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
G12.1: Polar coordinate interpolation mode start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
G13.1: Polar coordinate interpolation mode cancel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
G17 to G19: Plane selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
G38: Tool radius compensation vector setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
G39: Tool radius compensation corner arc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
G40: Tool radius compensation cancel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
G41: Tool radius compensation - Left . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
G42: Tool radius compensation - Right . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
G40.1: Normal line control cancel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
CONTENTS
11
G41.1: Normal line control - Left ON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
G42.1: Normal line control - Right ON. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
G43: Tool length compensation (+) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
G44: Tool length compensation (-) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
G49: Tool length compensation cancel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
G52: Local coordinate system setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
G53: Basic machine coordinate system selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
G54 to G59: Work coordinate system 1 selection to work coordinate system 6 selection . . . . . . . . . . . . . . . . 142
G61: Exact stop check mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
G61.1: High-accuracy control mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
G62: Automatic corner override. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
G64: Cutting mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
G68: Program coordinate rotation mode start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
G69: Program coordinate rotation mode cancel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
G90: Absolute value command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
G91: Incremental value command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
G94: Feed per minute (non-synchronized feed) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
5.7 M-Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
M00: Program stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
M01: Optional stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
M02: Program end. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
M30: Program end. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
CHAPTER 6 AUXILIARY AND APPLIED FUNCTIONS 167
6.1 Relationship between G-Code Control and Each Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .167
6.2 Auxiliary Function (M Function). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
M-code output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Auxiliary function complete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
6.3 Feed Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Fast forward speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Cutting feed speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Feed speed specification and the effects on each control axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175
Deceleration check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
6.4 Tool Compensation Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Tool compensation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Tool length compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Tool radius compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
6.5 Operation Supporting Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Automatic operation start (cycle start) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Automatic operation hold (feed hold). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Single block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
6.6 Normal Line Control Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
6.7 High-Accuracy Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Acceleration/deceleration before interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Optimum speed control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Vector accuracy interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Arc entrance/exit speed control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
6.8 Tandem Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
6.9 G-Code Program Operation by GOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
12
GOT program input/output function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
GOT program edit function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
APPENDICES 237
Appendix 1 G-Code Control Error/G-Code Control Event Details Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
G-code control error details codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Add-on license error details codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Appendix 2 G-code Control Event Details Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
G-code control event details codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
REVISIONS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .244
WARRANTY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .245
TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246
CONTENTS
13

RELEVANT MANUALS

Manual Name [Manual Number] Description Available form
MELSEC iQ-R Motion Controller Programming Manual (G-Code Control) [IB-0300371] (This manual)
MELSEC iQ-R Motion Controller User's Manual [IB-0300235]
MELSEC iQ-R Motion Controller Programming Manual (Common) [IB-0300237]
MELSEC iQ-R Motion Controller Programming Manual (Program Design) [IB-0300239]
MELSEC iQ-R Motion Controller Programming Manual (Positioning Control) [IB-0300241]
MELSEC iQ-R Motion Controller Programming Manual (Advanced Synchronous Control) [IB-0300243]
MELSEC iQ-R Motion Controller Programming Manual (Machine Control) [IB-0300309]
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.
Term Description
R64MTCPU/R32MTCPU/R16MTCPU or Motion CPU (module)
MR-J4(W)-B Servo amplifier model MR-J4-B/MR-J4W-B
MR-J3(W)-B Servo amplifier model MR-J3-B/MR-J3W-B
AMP or Servo amplifier General name for "Servo amplifier model MR-J4-B/MR-J4W-B/MR-J3-B/MR-J3W-B"
RnCPU, PLC CPU or PLC CPU module Abbreviation for MELSEC iQ-R series CPU module
Multiple CPU system or Motion system Abbreviation for "Multiple PLC system of the R series"
CPUn Abbreviation for "CPU No.n (n = 1 to 4) of the CPU module for the Multiple CPU system"
Operating system software General name for "SW10DNC-RMTFW"
Engineering software package General name for MT Developer2/GX Works3
MELSOFT MT Works2 General product name for the Motion controller engineering software "SW1DND-MTW2"
MT Developer2 Abbreviation for the programming software included in the "MELSOFT MT Works2" Motion controller
GX Works3 General 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 system General name for "system using the servomotor and servo amplifier for absolute position"
Intelligent function module General 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-MV200 Abbreviation for SSCNET/H Compatible Optical Hub Unit (MR-MV200)
Sensing module General name for SSCNET/H compatible sensing module MR-MT2000 series
Sensing SSCNET/H head module MR-MT2010
Sensing extension module General name for I/O module (MR-MT2100), pulse I/O module (MR-MT2200), analog I/O module (MR-
Sensing I/O module or MR-MT2100 Abbreviation for I/O module (MR-MT2100)
Sensing pulse I/O module or MR-MT2200 Abbreviation for pulse I/O module (MR-MT2200)
Sensing analog I/O module or MR-MT2300 Abbreviation 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.
Axis No. n Axis No. n Axis No. n Axis No. n Axis No. n Axis No. n Axis No. n Axis No. n
1 0 9 8 17 16 25 24 33 32 41 40 49 48 57 56
2 1 10 9 18 1726 2534 3342 4150 4958 57
3 2 11 10 19 18 27 26 35 34 43 42 51 50 59 58
4 3 12 11 20 19 28 27 36 35 44 43 52 51 60 59
5 4 13 12 21 20 29 28 37 36 45 44 53 52 61 60
6 5 14 13 22 21 30 29 38 37 46 45 54 53 62 61
7 6 15 14 23 22 31 30 39 38 47 46 55 54 63 62
8 7 16 15 24 23 32 31 40 39 48 47 56 55 64 63
• 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+2031=M3820 M3215+20n ([Rq.1155] Servo OFF command)=M3215+2031=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.
Synchronous encoder axis No. n Synchronous encoder axis No. n Synchronous encoder axis No. n
105498
2165109
32761110
43871211
• 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+1011=M10550 D13240+20n ([Md.320] Synchronous encoder axis current value)=D13240+2011=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. m Machine 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+327=M44128 D53168+128m ([Md.2020] Machine type)=M53168+287=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+41=D54444.0 D54496+128s ([Md.3016] Number of axes on line)=D54496+1281=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. sn Line No. Axis No. sn
110 218
21 29
32 310
43 411
54 512
65 613
76 714
87 815
• 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+215=D54478.0 D54754+32sn ([Md.3146] Rotating axis setting status)=D54754+3215=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.
Symbol Device assignment method
R MELSEC iQ-R Motion device assignment
Q Q series Motion compatible device assignment
18
1 OVERVIEW
F10
G10
F11
G11
END
G transition
memory mode
<Motion SFC program><Sequence program> <G-code program>
% (Prog130_2_3-a) N1 G91 G00 X2.5 N2 Y-5. N3 Z0.5 N4 C-2.5 N5 X1.25 N6 Y2.5 N7 Z-0.25 N8 C1.25 N9 X-2.5 Y5. Z-0.5 C2.5 N10 G00 X-1.25 Y2.5 Z0.25 C-1.25 M30 %
G-code program operation
M0
Automatic
operation
Automatic
operation mode
Start Stop
Stop Start
Stop
Start
1.1 G-Code Control Overview
• 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 G­code 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.2 Performance Specifications
G-code control specifications
Item Specifications
Number of G-code control configured axes (in a line)
Number of contouring control axes Up to 4 axes
Number of lines Up to 2 lines
Operation mode Memory operation
Program size/1 program Up to 512k bytes
Number of programs Up to 256 (O001 to O256)
Total program size Up to 2M bytes
G-code G00, G01, G02, G03, G04, G09, G17, G18, G19, G38, G39, G40, G40.1, G41, G41.1, G42, G42.1, G43, G44, G49,
M-code M-99999999 to M99999999 (Up to 4 groups can be commanded per block)
Special M-code M00, M01, M02, M30
Control units of G-code control Linear axis: mm, pulse
Data units Minimum command
unit
Interpolation functions Linear interpolation, circular interpolation
Feed function Rapid speed, cutting speed, deceleration check
Override function Rapid override, cutting feed rate override, override cancel, automatic corner override
G-code auxiliary functions
Tool compensation function
Coordinate systems Basic machine coordinate system, work coordinate system, automatic coordinate system, rotating axis coordinate
Supporting functions Automatic operation start, automatic operation hold, single block, G-code control reset, normal line control
M-code output M00, M01, M02, M30
Auxiliary function complete
Compensation memory
Number of compensation groups
Up to 8 axes
G53, G54, G55, G56, G57, G58, G59, G61, G62, G64, G90, G91, G94
Rotating axis: degree, pulse
Linear axis: 0.0001[mm] Rotating axis: 0.0001[degree]
Auxiliary function complete 1 (FIN1), Auxiliary function complete 2 (FIN2)
Tool length compensation, tool radius compensation
Up to 40 groups
system
20
1 OVERVIEW

1.2 Performance Specifications

1.3 G-Code Control Add-On Library Configuration

G-code control add-on library

The add-on library used for G-code control is shown below.
Application Model
G-code control SW10DND-GCD Gcode_Ctrl.adm
*1 indicates the number of licenses. (01, 05, 10, 15, 20)

Files size/Memory usage

The file size and memory usage of the add-on library is shown below.
Add-on library name File size [byte] Memory usage [byte]
Gcode_Ctrl.adm 131000 (approximately 128k bytes) 5977472 (approximately 5.7M bytes)
*1
Add-on library name
1
1 OVERVIEW

1.3 G-Code Control Add-On Library Configuration

21
2 STARTING UP THE SYSTEM
• ¢MELSEC iQ-R Motion Controller Programming Manual (Program Design)
• ¢MELSEC iQ-R Motion Controller Programming Manual (Positioning Control)
• G-code program
*7
• Device assignment method of G-code control
system
*2
• License authentication of G-code control
add-on library.
*1
Control cycle of G-code control system
*3
• ¢MELSEC iQ-R Motion Controller Programming Manual (Common)
• G-code control system parameter
*4
• G-code control axis parameter
*5
• G-code control work parameter
*6
• ¢MELSEC iQ-R Motion Controller Programming Manual (Positioning Control)
• ¢MELSEC iQ-R Motion Controller Programming Manual (Positioning Control)
Write the parameters and programs created in STEP 1 to STEP 3 to the Motion CPU (write the sequence programs to the PLC CPU).
Reset the Multiple CPU system.
(1)
Turn ON the G-code control request of the line to start G-code control.
Perform home position return for G-code control axes.
Check the machine operation with JOG operation.
Check that the system is performing G-code control.
Start G-code control
• Check that "[St.3208] During G-code control (D54440.0+4s)" is turned ON.
• Turn ON "[Rq.3376] G-code control request (D54226.0+2s)" with the programs from STEP 3 and start G-code control.
Set the following common parameter.
• R series common parameter
• Motion CPU common parameter
Set the device assignment method of the Motion CPU to "MELSEC iQ-R Motion device assignment".
Authenticate the license of the G-code control add-on library.
Create the programs for G-code control (Motion SFC program, sequence program, G-code program).
Set the following parameters for positioning.
• Motion control parameter
Set the G-code control setting of the following parameter to "Use Line 1 only", or "Use Line 1 and Line 2".
• Motion CPU common parameter (Basic setting)
Set the operation cycle setting of the following parameter to "0.888ms" or more.
• Motion CPU common parameter (Basic setting)
Set the G-code control parameters.
• G-code control system parameter
• G-code control axis parameter
• G-code control work parameter
• ¢MELSEC iQ-R Motion Controller Programming Manual (Common)
Preparation
Install the add-on library for G-code control.
STEP 1
STEP 2
STEP 3
STEP 4
STEP 5
STEP 6
The procedure for G-code control is shown below.
2.1 Starting Up the G-Code Control System
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)
• [St.3213] Automatic operation starting (D54441.1+4s)
• [St.3214] Automatic operation holding (D54441.2+4s)
Check that the following signals are OFF.
• [St.3212] During automatic operation (D54441.0+4s)
• [St.3213] Automatic operation starting (D54441.1+4s)
• [St.3214] Automatic operation holding (D54441.2+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.2 License 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 G­code 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 period Remarks
1500 hours The 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.3 Control Cycle of G-Code Control

• Set the operation cycle to "0.888ms" or more in [Motion CPU Common Parameter][Basic Setting]"Operation Cycle". G­code 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.
Motion setting operation cycle (SD523) [Md.3000] G-code control setting operation cycle (D54480) Remarks
0.888[ms] 3.555[ms] G-code control operates at
1.777[ms] 7.111[ms]
3.555[ms] 14.222[ms]
7.111[ms] 28.444[ms]
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.4 G-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.3211] During memory mode (D54440.8+4s)
[Rq.3377] Automatic operation start (cycle start) (D54226.1+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.
Device Minimum 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.5 G-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.6 G-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 cause Stop processing
Multiple CPU system reset operation Immediate stop
Multiple CPU system power supply OFF
Motion CPU WDT error
Forced stop (forced stop by Motion controller (device))
Forced stop (servo amplifier forced stop input terminal)
Servo error occurrence
Servo amplifier control circuit power supply ONOFF
Input from external input signals (STOP/FLS/RLS) Deceleration stop
Motion CPU RUNSTOP
"[Rq.3376] G-code control request (D54226.0+2s)" ONOFF
• A check for stop causes is performed every operation cycle, but stop processing is executed at the G-code control operation cycle.
• During G-code control, parameter block settings are disabled.
• At a stop cause occurrence, the following signals turn OFF when "[St.3215] G-code control finishing (D54441.3+4s)" turns ON.
• [St.3211] During memory mode (D54440.8+4s)
• [St.3212] During automatic operation (D54441.0+4s)
• [St.3213] Automatic operation starting (D54441.1+4s)
• [St.3214] Automatic operation holding (D54441.2+4s)
• [St.3216] Resetting (D54441.8+4s)
• [St.3217] Reset completion (D54441.9+4s)
• 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)
Immediate stop cause
[St.3211] During memory mode (D54440.8+4s)
[St.3213] Automatic operation starting (D54441.1+4s)
[St.3215] G-code control finishing (D54441.3+4s)
[St.3210] All axes smoothing zero (D54440.2+4s)
[St.1040] Start accept flag (R: M30080+n/Q: M2001+n)
[St.3208] During G-code control (D54440.0+4s)
t
V
[St.3212] During automatic operation (D54441.0+4s)
Deceleration stop cause
[St.3211] During memory mode (D54440.8+4s)
[St.3213] Automatic operation starting (D54441.1+4s)
[St.3215] G-code control finishing (D54441.3+4s)
[St.3210] All axes smoothing zero (D54440.2+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
3 G-CODE CONTROL DEDICATED SIGNALS
G-code control devices used for G-code control are shown below.
Device Device range
MELSEC iQ-R Motion device assignment Q 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 G­code 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.1 G-Code Control Common Command Signal
Device No. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
D54224.0 Unusable 
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.0 Rq.3344 Program load request while running Main cycle Command signal
D54225.1 Unusable 
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 value Description
ON Request load
OFF Do not request load
3 G-CODE CONTROL DEDICATED SIGNALS

3.1 G-Code Control Common Command Signal

29
3.2 G-Code Control Common Control Device
Device No. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
D54262 Unusable 
D54263
D54264 Cd.3305 Program No. for loading while running At running
D54265 Unusable 
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)".
Item Setting range
Program No. 1 to 256
30
3 G-CODE CONTROL DEDICATED SIGNALS

3.2 G-Code Control Common Control Device

3.3 G-Code Control Common Status
Device No. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
D54438.0 St.3272 G-code control operation cycle over flag G-code control
D54438.1 Unusable 
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 OFFON
• 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.4 G-Code Control Common Monitor Device
Device No. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
D54480 Md.3000 G-code control setting operation cycle STOPRUN Monitor device
D54481 Md.3001 G-code control operation cycle G-code control
D54482 Md.3002 G-code control maximum operation
D54483 Unusable 
D54484
D54485
D54486
D54487
D54488
D54489
D54490
D54491
D54492 Md.3003 Program load status while running Main cycle Monitor device
D54493 Md.3004 Program load error information while
D54494 Unusable 
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.
Motion setting operation cycle (SD523) [Md.3000] G-code control setting operation cycle (D54480)
0.888[ms] 3.555[ms]
1.777[ms] 7.111[ms]
3.555[ms] 14.222[ms]
7.111[ms] 28.444[ms]
[Md.3001] G-code control operation cycle (D54481)
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 values Description
0 No request
1 Executing
2 Successfully completed
3 Failed
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 values Description
0 No error
1 Applicable program running
2 No program file
3 File format error
4 Load area size exceeded
5 Program No. outside of range
6 Load request during STOP
7 System failure
3
3 G-CODE CONTROL DEDICATED SIGNALS
3.4 G-Code Control Common Monitor Device
33
3.5 G-Code Control Line Command Signal
Device No. Signal name
MELSEC iQ-R Motion device assignment
D54226 to D54227 Line 1 G-code control line command signal
D54228 to D54229 Line 2 G-code control line command signal
• Details for each line
Device No. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
D54226.0+2s Rq.3376 G-code control request Main cycle/
D54226.1+2s Rq.3377 Automatic operation start (cycle start) G-code control
D54226.2+2s Rq.3378 Automatic operation hold (feed hold)
D54226.3+2s Rq.3379 Single block
D54226.4+2s Rq.3380 Reset command
D54226.5+2s Unusable 
D54226.6+2s
D54226.7+2s
D54226.8+2s Rq.3381 Program operation mode (memory
D54226.9+2s Unusable 
D54226.A+2s
D54226.B+2s
D54226.C+2s
D54226.D+2s
D54226.E+2s
D54226.F+2s
D54227.0+2s Rq.3382 Auxiliary function complete1 (FIN1) G-code control
D54227.1+2s Rq.3383 Auxiliary function complete2 (FIN2)
D54227.2+2s Unusable 
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 value Description Fetch cycle
ON G-code control request Main cycle
OFF G-code control finish G-code control operation cycle
[Rq.3377] Automatic operation start (cycle start) (D54226.1+2s)
• 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 OFFON.
• 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.6 G-Code Control Line Control Device
Device No. Signal name
MELSEC iQ-R Motion device assignment
D54278 to D54293 Line 1 G-code control line control device
D54294 to D54309 Line 2 G-code control line control device
Q series Motion compatible device assignment
• Details for each line
Device No. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
D54278+16s Cd.3320 Program No. setting register G-code control
D54279+16s Unusable 
D54280+16s Cd.3321 Sequence No. setting register G-code control
D54281+16s
D54282+16s Cd.3322 Block No. setting register
D54283+16s
D54284+16s Unusable 
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))
Item Setting range
Program No. 1 to 256
[Cd.3321] Sequence No. setting register (D54280+16s, D54281+16s)
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))
Item Program No.
Sequence No. 0 to 99999
[Cd.3322] Block No. setting register (D54282+16s, D54283+16s)
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))
Item Setting range
Block No. 0 to 99999
3 G-CODE CONTROL DEDICATED SIGNALS

3.6 G-Code Control Line Control Device

37
3.7 G-Code Control Line Status
Device No. Signal name
MELSEC iQ-R Motion device assignment
D54440 to D54443 Line 1 G-code control line status
D54444 to D54447 Line 2 G-code control line status
• Details for each line
Device No. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
D54440.0+4s St.3208 During G-code control Main cycle Status signal
D54440.1+4s St.3209 G-code control error detection Immediate
D54440.2+4s St.3210 All axes smoothing zero G-code control
D54440.3+4s Unusable 
D54440.4+4s
D54440.5+4s
D54440.6+4s
D54440.7+4s
D54440.8+4s St.3211 During memory mode G-code control
D54440.9+4s Unusable 
D54440.A+4s
D54440.B+4s
D54440.C+4s
D54440.D+4s
D54440.E+4s
D54440.F+4s
D54441.0+4s St.3212 During automatic operation G-code control
D54441.1+4s St.3213 Automatic operation starting
D54441.2+4s St.3214 Automatic operation holding
D54441.3+4s St.3215 G-code control finishing
D54441.4+4s Unusable 
D54441.5+4s
D54441.6+4s
D54441.7+4s
D54441.8+4s St.3216 Resetting G-code control
D54441.9+4s St.3217 Reset complete
D54441.A+4s Unusable 
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. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
Q series Motion compatible device assignment
D54442.0+4s St.3218 M-code output M00 G-code control
D54442.1+4s St.3219 M-code output M01
D54442.2+4s St.3220 M-code output M02
D54442.3+4s St.3221 M-code output M30
D54442.4+4s St.3222 Auxiliary function strobe 1
D54442.5+4s St.3223 Auxiliary function strobe 2
D54442.6+4s St.3224 Auxiliary function strobe 3
D54442.7+4s St.3225 Auxiliary function strobe 4
D54442.8+4s Unusable 
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.
Status [St.3212] During automatic
operation (D54441.0+4s)
Reset OFF OFF OFF
Automatic operation stopped ON OFF OFF
Automatic operation hold ON OFF ON
Automatic operation running ON ON OFF
[St.3213] Automatic operation starting (D54441.1+4s)
[St.3214] Automatic operation holding (D54441.2+4s)
The following is a description for each status.
• 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.
[St.3213] Automatic operation starting (D54441.1+4s)
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.
40
3 G-CODE CONTROL DEDICATED SIGNALS
3.7 G-Code Control Line Status
[St.3214] Automatic operation holding (D54441.2+4s)
[Rq.3380] Reset command (D54226.4+2s)
[Rq.3378] Automatic operation hold (feed hold) (D54226.2+2s)
[St.3214] Automatic operation holding (D54441.2+4s)
[St.3213] Automatic operation starting (D54441.1+4s)
[Rq.3377] Automatic operation start (cycle start) (D54226.1+2s)
OFF
OFF
Axis movement status G00X100••• G00X100•••
ON
ON
OFF
ON
OFF
ON
OFF
ON
• 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)
22 310
G-code program
M22 M03M08 M10M25M05 G00 • • •
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.8 G-Code Control Line Monitor Device
Device No. Signal name
MELSEC iQ-R Motion device assignment
D54496 to D54623 Line 1 G-code control line monitor device
D54624 to D54751 Line 2 G-code control line monitor device
Q series Motion compatible device assignment
• Details for each line
Device No. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
D54496+128s Md.3016 Number of axes on line STOPRUN Monitor device
D54497+128s Unusable 
D54498+128s Md.3017 G-code control axis configuration STOPRUN Monitor device
D54499+128s
D54500+128s
D54501+128s
D54502+128s Md.3018 Speed G-code control
D54503+128s
D54504+128s Md.3019 G-code control error code Immediate
D54505+128s Md.3020 G-code control error details code 1
D54506+128s Md.3021 G-code control error details code 2
D54507+128s Unusable 
D54508+128s Md.3022 Program No. being executed At G-code
D54509+128s Unusable 
D54510+128s Md.3023 Sequence No. being executed G-code control
D54511+128s
D54512+128s Md.3024 Block No. being executed
D54513+128s
D54514+128s Unusable 
D54515+128s
D54516+128s
D54517+128s
D54518+128s
D54519+128s
D54520+128s Md.3028 Group 01 modal status G-code control
D54521+128s Md.3029 Group 02 modal status
D54522+128s Md.3030 Group 03 modal status
D54523+128s Unusable 
D54524+128s
D54525+128s
D54526+128s Md.3034 Group 07 modal status G-code control
D54527+128s Md.3035 Tool radius compensation No.
D54528+128s Md.3036 Tool radius compensation amount
D54529+128s
D54530+128s Unusable 
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. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
Q series Motion compatible device assignment
D54532+128s Md.3038 Group 08 modal status G-code control
D54533+128s Md.3039 Tool length compensation No.
D54534+128s Md.3040 Tool length compensation amount
D54535+128s
D54536+128s Unusable 
D54537+128s
D54538+128s Md.3042 Tool length compensation axis No. G-code control
D54539+128s Unusable 
D54540+128s
D54541+128s
D54542+128s Md.3046 Group 12 modal status G-code control
D54543+128s Md.3047 Group 13 modal status
D54544+128s Unusable 
D54545+128s Md.3049 Group 15 modal status G-code control
D54546+128s Md.3050 Group 16 modal status
D54547+128s Unusable 
D54548+128s
D54549+128s
D54550+128s
D54551+128s Md.3055 Group 21 modal status G-code control
D54552+128s Unusable 
D54553+128s
D54554+128s Md.3058 M-code data 1 G-code control
D54555+128s
D54556+128s Md.3059 M-code data 2
D54557+128s
D54558+128s Md.3060 M-code data 3
D54559+128s
D54560+128s Md.3061 M-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. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
Q series Motion compatible device assignment
D54562+128s Unusable 
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+128s Md.3070 Program comment being executed At 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. Symbol Signal name Refresh cycle Fetch cycle Signal 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
Axis
16
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Axis15Axis14Axis13Axis12Axis11Axis10Axis9Axis8Axis7Axis6Axis5Axis4Axis3Axis2Axis
1
[Md.3017] G-code control axis configuration
D54498+128s
Axis
32
Axis31Axis30Axis29Axis28Axis27Axis26Axis25Axis24Axis23Axis22Axis21Axis20Axis19Axis18Axis
17
D54499+128s
Axis
48
Axis47Axis46Axis45Axis44Axis43Axis42Axis41Axis40Axis39Axis38Axis37Axis36Axis35Axis34Axis
33
D54500+128s
Axis
64
Axis63Axis62Axis61Axis60Axis59Axis58Axis57Axis56Axis55Axis54Axis53Axis52Axis51Axis50Axis
49
D54501+128s
MELSEC iQ-R Motion device assignment
Q series Motion compatible device assignment
D54596+128s Unusable 
D54597+128s
D54598+128s
D54599+128s
D54600+128s
D54601+128s
D54602+128s
D54603+128s
D54604+128s
D54605+128s
D54606+128s
D54607+128s
D54608+128s
D54609+128s
D54610+128s
D54611+128s
D54612+128s
D54613+128s
D54614+128s
D54615+128s
D54616+128s
D54617+128s
D54618+128s
D54619+128s
D54620+128s
D54621+128s
D54622+128s
D54623+128s
[Md.3016] Number of axes on line (D54496+128s)
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.
Item Description
During interpolation operation Stores the speed of the vector direction currently moving.
During non-interpolation operation Stores 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. 12 0 1
G91 X100. Y100. 12 0 2
N100 X-50. Y-25. 12 100 0
N110 G01 X250. F300. 12 110 0
Y-225. 12 110 1
X-50. 12 110 2
Y-2 5. 1 2 11 0 3
N120 Y-125. 12 120 0
N130 G00 X-100. 12 130 0
N140 G01 X-200. 12 140 0
Y-175. 12 140 1
X-100. 12 140 2
Y-75. 12 140 3
N150 G90 G00 X0. Y0. 12 150 0
N160 M02 12 160 0
[Md.3023] Sequence No. being executed (D54510+128s, D54511+128s)
[Md.3024] Block No. being executed (D54512+128s, D54513+128s)
[Md.3028] Group 01 modal status (D54520+128s)
Modal status of group 01 is stored.
G-code modal status Stored value
G00 Positioning 0
G01 Linear interpolation 10
G02 Circular interpolation CW 20
G03 Circular interpolation CCW 30
[Md.3029] Group 02 modal status (D54521+128s)
Modal status of group 02 is stored.
G-code modal status Stored value
G17 X-Y plane selection 170
G18 Z-X plane selection 180
G19 Y-Z plane selection 190
[Md.3030] Group 03 modal status (D54522+128s)
Modal status of group 03 is stored.
G-code modal status Stored value
G90 Absolute value command 900
G91 Incremental value command 910
50
3 G-CODE CONTROL DEDICATED SIGNALS
3.8 G-Code Control Line Monitor Device
[Md.3034] Group 07 modal status (D54526+128s)
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Axis
8
Not used
Axis7Axis6Axis5Axis4Axis3Axis2Axis
1
*1: The axis being executed stores 0/1. 0: Not being executed 1: Being executed
[Md.3042] Tool length compensation axis No. (D54538+128s)
Modal status of group 07 is stored.
G-code modal status Stored value
G40 Tool radius compensation cancel 400
G41 Tool radius compensation left 410
G42 Tool radius compensation right 420
[Md.3035] Tool radius compensation No. (D54527+128s)
The tool radius compensation No. is stored.
[Md.3036] Tool radius compensation amount (D54528+128s, D54529+128s)
The tool radius compensation amount is stored.
[Md.3038] Group 08 modal status (D54532+128s)
Modal status of group 08 is stored.
G-code modal status Stored value
G43 Tool length compensation (+) 430
G44 Tool length compensation (-) 440
G49 Tool length compensation cancel 490
[Md.3039] Tool length compensation No. (D54533+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.
[Md.3040] Tool length compensation amount (D54534+128s, D54535+128s)
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.
3
[Md.3042] Tool length compensation axis No. (D54538+128s)
The axis No. in the line that is executing tool length compensation is stored as bit data.
[Md.3046] Group 12 modal status (D54542+128s)
Modal status of group 12 is stored.
G-code modal status Stored value
G54 Work coordinate system 1 selection 540
G55 Work coordinate system 2 selection 550
G56 Work coordinate system 3 selection 560
G57 Work coordinate system 4 selection 570
G58 Work coordinate system 5 selection 580
G59 Work coordinate system 6 selection 590
3 G-CODE CONTROL DEDICATED SIGNALS
3.8 G-Code Control Line Monitor Device
51
[Md.3047] Group 13 modal status (D54543+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.
Modal status of group 13 is stored.
G-code modal status Stored value
G61 Exact stop check mode 610
G61.1 High-accuracy control mode 611
G62 Automatic corner override 620
G64 Cutting mode 640
[Md.3049] Group 15 modal status (D54545+128s)
Modal status of group 15 is stored.
G-code modal status Stored value
G40.1 Normal line control cancel 401
G41.1 Normal line control left 411
G42.1 Normal line control right 421
[Md.3050] Group 16 modal status (D54546+128s)
Modal status of group 16 is stored.
G-code modal status Stored value
G68 Program coordinate rotation mode start 680
G69 Program coordinate rotation mode cancel 690
[Md.3055] Group 21 modal status (D54551+128s)
Modal status of group 21 is stored.
G-code modal status Stored value
G12.1 Polar coordinate interpolation mode start 121
G13.1 Polar coordinate interpolation mode cancel 131
[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.9 G-Code Control Line Monitor Device (Expansion)
Device No. Signal name
MELSEC iQ-R Motion device assignment
D55264 to D55423 Line 1 G-code control line monitor device (expansion)
D55424 to D55583 Line 2 G-code control line monitor device (expansion)
Q series Motion compatible device assignment
• Details for each line
Device No. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
D55264+160s Md.3178 Program 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 change Monitor device
line)
3
3 G-CODE CONTROL DEDICATED SIGNALS

3.9 G-Code Control Line Monitor Device (Expansion)

55
Device No. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
Q series Motion compatible device assignment
D55296+160s Md.3179 Program 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 change Monitor device
56
3 G-CODE CONTROL DEDICATED SIGNALS
3.9 G-Code Control Line Monitor Device (Expansion)
Device No. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
Q series Motion compatible device assignment
D55328+160s Md.3180 Program 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+160s Unusable 
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 change Monitor device
3
3 G-CODE CONTROL DEDICATED SIGNALS
3.9 G-Code Control Line Monitor Device (Expansion)
57
Device No. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
Q series Motion compatible device assignment
D55377+160s Unusable 
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 block Program
First line (executing) G91 G00 X100. Y100. Z100. C50.
Second line G90 G94 G17 G00 X1000.0000 Y1000.0000 Z1000.0000 C180.0000 F10000.00 M100 M200 M300
Third line G04 P1
• Device values stored in [Md.3178] Program monitor being executed (1st line)
Item Device No.
D55264 D55265 D55266 D55267 D55268 D55269 D55270 D55271
LowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpp
er
ASCII character stringG91G00X100. Y100.
Item Device No.
D55272 D55273 D55274 D55275 D55276 D55277 D55278 D55279
LowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpp
er
ASCII character stringZ 1 0 0 . C 5 0 . \0\0\0\0\0\0\0
3
Item Device No.
D55280 D55281 D55282 D55283 D55284 D55285 D55286 D55287
LowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpp
er
ASCII character string \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
Item Device No.
D55288 D55289 D55290 D55291 D55292 D55293 D55294 D55295
LowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpp
er
ASCII character string \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
• Device values stored in [Md.3179] Program monitor being executed (2nd line)
Item Device No.
D55296 D55297 D55298 D55299 D55300 D55301 D55302 D55303
LowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpp
er
ASCII character stringG90G94G17G00X100
Item Device No.
D55304 D55305 D55306 D55307 D55308 D55309 D55310 D55311
LowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpp
er
ASCII character string0. 0000Y1000. 0000
Item Device No.
D55312 D55313 D55314 D55315 D55316 D55317 D55318 D55319
LowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpp
er
ASCII character stringZ1000. 0000C180. 0
3 G-CODE CONTROL DEDICATED SIGNALS
3.9 G-Code Control Line Monitor Device (Expansion)
59
Item Device No.
D55320 D55321 D55322 D55323 D55324 D55325 D55326 D55327
LowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpp
er
ASCII character string000F10000. 00M10\0
• Device values stored in [Md.3180] Program monitor being executed (3rd line)
Item Device No.
D55328 D55329 D55330 D55331 D55332 D55333 D55334 D55335
LowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpp
er
ASCII character stringG 0 4 P 1 \0\0\0\0\0\0\0\0\0\0\0
Item Device No.
D55336 D55337 D55338 D55339 D55340 D55341 D55342 D55343
LowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpp
er
ASCII character string \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
Item Device No.
D55344 D55345 D55346 D55347 D55348 D55349 D55350 D55351
LowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpp
er
ASCII character string \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
Item Device No.
D55352 D55353 D55354 D55355 D55356 D55357 D55358 D55359
LowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpperLowerUpp
er
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.10 G-Code Control Axis Status
Device No. Signal name
MELSEC iQ-R Motion device assignment
D54448, D54449 Line 1 G-code control axis status of axis 1
D54450, D54451 Line 1 G-code control axis status of axis 2
D54452, D54453 Line 1 G-code control axis status of axis 3
D54454, D54455 Line 1 G-code control axis status of axis 4
D54456, D54457 Line 1 G-code control axis status of axis 5
D54458, D54459 Line 1 G-code control axis status of axis 6
D54460, D54461 Line 1 G-code control axis status of axis 7
D54462, D54463 Line 1 G-code control axis status of axis 8
D54464, D54465 Line 2 G-code control axis status of axis 1
D54466, D54467 Line 2 G-code control axis status of axis 2
D54468, D54469 Line 2 G-code control axis status of axis 3
D54470, D54471 Line 2 G-code control axis status of axis 4
D54472, D54473 Line 2 G-code control axis status of axis 5
D54474, D54475 Line 2 G-code control axis status of axis 6
D54476, D54477 Line 2 G-code control axis status of axis 7
D54478, D54479 Line 2 G-code control axis status of axis 8
Q series Motion compatible device assignment
3
• Details for each line
Device No. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
D54448.0+2sn St.3076 Smoothing zero G-code control
D54448.1+2sn Unusable 
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. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
D54449.8+2sn Unusable 
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.11 G-Code Control Axis Monitor Device
Device No. Signal name
MELSEC iQ-R Motion device assignment
D54752 to D54783 Line 1 G-code control axis monitor device of axis 1
D54784 to D54815 Line 1 G-code control axis monitor device of axis 2
D54816 to D54847 Line 1 G-code control axis monitor device of axis 3
D54848 to D54879 Line 1 G-code control axis monitor device of axis 4
D54880 to D54911 Line 1 G-code control axis monitor device of axis 5
D54912 to D54943 Line 1 G-code control axis monitor device of axis 6
D54944 to D54975 Line 1 G-code control axis monitor device of axis 7
D54976 to D55007 Line 1 G-code control axis monitor device of axis 8
D55008 to D55039 Line 2 G-code control axis monitor device of axis 1
D55040 to D55071 Line 2 G-code control axis monitor device of axis 2
D55072 to D55103 Line 2 G-code control axis monitor device of axis 3
D55104 to D55135 Line 2 G-code control axis monitor device of axis 4
D55136 to D55167 Line 2 G-code control axis monitor device of axis 5
D55168 to D55199 Line 2 G-code control axis monitor device of axis 6
D55200 to D55231 Line 2 G-code control axis monitor device of axis 7
D55232 to D55263 Line 2 G-code control axis monitor device of axis 8
Q series Motion compatible device assignment
3
• Details of each line
Device No. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
D54752+32sn Md.3144 Axis No. STOPRUN Monitor device
D54753+32sn Md.3145 Axis name
D54754+32sn Md.3146 Rotating axis setting status
D54755+32sn Md.3153 Tandem function enabled information
D54756+32sn Md.3154 Local coordinate offset Transition to G-
D54757+32sn
D54758+32sn Unusable 
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. Symbol Signal name Refresh cycle Fetch cycle Signal type
MELSEC iQ-R Motion device assignment
D54768+32sn Md.3147 Machine position Operation cycle Monitor device
D54769+32sn
D54770+32sn Md.3148 Machine target position G-code control
D54771+32sn
D54772+32sn Md.3149 Relative position Operation cycle
D54773+32sn
D54774+32sn Md.3150 Relative target position G-code control
D54775+32sn
D54776+32sn Unusable 
D54777+32sn
D54778+32sn Md.3152 Program target position G-code control
D54779+32sn
D54780+32sn Unusable 
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 value Axis name
0 No 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 value Description
0 Linear axis
1 Rotation axis
3
[Md.3153] Tandem function enabled information (D54755+32sn)
Stores the master axis No. in tandem function.
Monitor value Description
0 Tandem function not used (master control axis is 0)
1 Master 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.
66
3 G-CODE CONTROL DEDICATED SIGNALS
3.11 G-Code Control Axis Monitor Device
3.12 Internal Relay (M)/Data Register (D) Availability
The availability of common devices such as internal relays (M) and data registers (D), and devices on each axis during G­code control is shown below.

Internal relays

Common device
: Available : Not available
Device No. Symbol Signal name During
MELSEC iQ-R Motion device assignment
Q series Motion compatible device
G-code control
assignment
M30000 M2000 Rq.1120 PLC ready flag
M30001 to M30037
M30038 M2038 St.1041 Motion SFC debugging flag
M30039 M2039 Unusable
M30040 M2040 Rq.1122 Speed switching point specified flag
M30041 M2041 Unusable
M30042 M2042 Rq.1123 All axes servo ON command No servo OFF during G-code control. (G-
M30043 to M30047
M30048 M2048 Rq.1124 JOG operation simultaneous start
M30049 M2049 St.1045 All axes servo ON accept flag
M30050 M2050 Unusable
M30051 M2051 Rq.1125 Manual pulse generator 1 enable flag
M30052 M2052 Rq.1126 Manual pulse generator 2 enable flag
M30053 M2053 Rq.1127 Manual pulse generator 3 enable flag
M30054 M2054 St.1046 Operation cycle over flag
M30055 to M30079
M30080 to M30143
M30144 to M30207
M30208 to M30271
M30272 to M30335
M30336 to M30399
M30400 to M30639
Unusable
M2043 to M2047
Unusable
M2001 to M2032
M2061 to M2092
M2128 to M2159
M2240 to M2271
M2272 to M2303

Unusable
command
St.1040 Start accept flag Turns ON at G-code control start.
St.1047 Speed change accepting flag
St.1048 Automatic decelerating flag Turns OFF at G-code control start.
St.1049 Speed change "0" accepting flag
St.1050 Control loop monitor status
Unusable
Remarks
code control does not end.) When G-code control ends, the command status at that time becomes valid.
Turns OFF at G-code control end.
3
3 G-CODE CONTROL DEDICATED SIGNALS

3.12 Internal Relay (M)/Data Register (D) Availability

67
Axis status
: Available : Not available
Device No. Symbol Signal name During
MELSEC iQ-R Motion device assignment
Q series Motion compatible device
G-code control
assignment
M32400+32n M2400+20n St.1060 Positioning start complete Turns OFF at G-code control start.
M32401+32n M2401+20n St.1061 Positioning complete
M32402+32n M2402+20n St.1062 In-position Updated every operation cycle.
M32403+32n M2403+20n St.1063 Command in-position Turns OFF at G-code control start.
M32404+32n M2404+20n St.1064 Speed controlling
M32405+32n M2405+20n St.1065 Speed/position switching latch
M32406+32n M2406+20n St.1066 Zero pass
M32407+32n M2407+20n St.1067 Error detection Errors detected by G-code control are not
M32408+32n M2408+20n St.1068 Servo error detection
M32409+32n M2409+20n St.1069 Home position return request When turned ON, a minor error (error
M32410+32n M2410+20n St.1070 Home position return complete When turned ON, it turns OFF at G-code
M32411+32n M2411+20n St.1071 External
M32412+32n M2412+20n St.1072 RLS
M32413+32n M2413+20n St.1073 STOP
M32414+32n M2414+20n St.1074 DOG/CHANGE
M32415+32n M2415+20n St.1075 Servo ready
M32416+32n M2416+20n St.1076 Torque limiting
M32417+32n M2417+20n Unusable
M32418+32n M2418+20n
M32419+32n M2419+20n St.1079 M-code outputting
M32420+32n to M32431+32n
Unusable
signals
FLS
Remarks
updated. Errors detected by other than G-code control are updated.
code: 19A6H) occurs at G-code control request.
control start.
68
3 G-CODE CONTROL DEDICATED SIGNALS
3.12 Internal Relay (M)/Data Register (D) Availability
Axis command signals
: Available : Not available
Device No. Symbol Signal name During
MELSEC iQ-R Motion device assignment
Q series Motion compatible device
G-code control
assignment
M34480+32n M3200+20n Rq.1140 Stop command
M34481+32n M3201+20n Rq.1141 Rapid stop command
M34482+32n M3202+20n Rq.1142 Forward rotation JOG start command
M34483+32n M3203+20n Rq.1143 Reverse rotation JOG start command
M34484+32n M3204+20n Rq.1144 Complete signal OFF command
M34485+32n M3205+20n Rq.1145 Speed/position switching enable
command
M34486+32n M3206+20n Unusable
M34487+32n M3207+20n Rq.1147 Error reset command Errors related to G-code control are not
M34488+32n M3208+20n Rq.1148 Servo error reset command
M34489+32n M3209+20n Rq.1149 External stop input disable at start
M34490+32n M3210+20n Unusable
M34491+32n M3211+20n
M34492+32n M3212+20n Rq.1152 Feed current value update command
M34493+32n M3213+20n Unusable
M34494+32n M3214+20n
M34495+32n M3215+20n Rq.1155 Servo OFF command No servo OFF during G-code control. (G-
M34496+32n M3216+20n Rq.1156 Gain changing command
M34497+32n M3217+20n Rq.1157 PI-PID switching command
M34498+32n M3218+20n Rq.1158 Control loop changing command
M34499+32n M3219+20n Rq.1159 FIN signal
M34500+32n to M34511+32n
Unusable
command
Remarks
reset. Valid at axes with errors occurring by other than G-code control.
code control does not end.) When G-code control ends, the command status at that time becomes valid.
3
3 G-CODE CONTROL DEDICATED SIGNALS
3.12 Internal Relay (M)/Data Register (D) Availability
69

Data registers

Axis monitor devices
: Available : Not available
Device No. Symbol Signal name During
MELSEC iQ-R Motion device assignment
Q series Motion compatible device
G-code control
assignment
D32000+48n D0+20n Md.20 Feed current value Updated every operation cycle.
D32001+48n D1+20n
D32002+48n D2+20n Md.101 Real current value
D32003+48n D3+20n
D32004+48n D4+20n Md.102 Deviation counter value
D32005+48n D5+20n
D32006+48n D6+20n Md.1003 Warning code Errors detected by G-code control are not
D32007+48n D7+20n Md.1004 Error code
D32008+48n D8+20n Md.1005 Servo error code
D32009+48n D9+20n Md.1006 Home position return re-travel value
D32010+48n D10+20n Md.34 Travel value after proximity dog ON
D32011+48n D11+20n
D32012+48n D12+20n Md.1008 Execute program No.. Clears at the G-code control start.
D32013+48n D13+20n Md.25 M-code
D32014+48n D14+20n Md.35 Torque limit value
D32015+48n D15+20n Md.1011 Data set pointer for continuous trajectory
control
D32016+48n D16+20n Unusable
D32017+48n D17+20n
D32018+48n D18+20n Md.1012 Real current value at stop input
D32019+48n D19+20n
D32020+48n #8001+20n Md.104 Motor current
D32021+48n #8017+20n Unusable
D32022+48n #8002+20n Md.103 Motor speed
D32023+48n #8003+20n
D32024+48n #8004+20n Md.28 Command speed
D32025+48n #8005+20n
D32026+48n #8006+20n Md.100 Home position return re-travel value
D32027+48n #8007+20n
D32028+48n #8008+20n Md.1019 Servo amplifier display servo error code
D32029+48n #8009+20n Md.107 Parameter error No.
D32030+48n #8000+20n Md.1014 Servo amplifier type
D32031+48n #8016+20n Md.1027 Servo amplifier vendor ID
D32032+48n #8010+20n Md.108 Servo status1
D32033+48n #8011+20n Md.1022 Servo status2
D32034+48n #8012+20n Md.125 Servo status3
D32035+48n #8013+20n Unusable
D32036+48n #8014+20n
D32037+48n #8015+20n
D32038+48n #8018+20n Md.500 Servo status7
Remarks
updated. Errors detected by other than G-code control are updated.
The G-code program No. being executed is not stored.
70
3 G-CODE CONTROL DEDICATED SIGNALS
3.12 Internal Relay (M)/Data Register (D) Availability
Device No. Symbol Signal name During
MELSEC iQ-R Motion device assignment
D32039+48n #8019+20n Unusable
D32040+48n to D32047+48n
Q series Motion compatible device assignment
G-code control
Remarks
3
3 G-CODE CONTROL DEDICATED SIGNALS
3.12 Internal Relay (M)/Data Register (D) Availability
71
4 G-CODE CONTROL PARAMETERS
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"
72

4 G-CODE CONTROL PARAMETERS

4.1 G-Code Control System Parameter
G01 deceleration check method 0: Command deceleration method 1: In-position check method 2: Smoothing check method
G00 deceleration check method 0: Command deceleration method 1: In-position check method 2: Smoothing check method
H 0 0
Parameters for setting the number of axes used on a line etc., for each G-code control line.
[Motion Control Parameter][G-code Control Parameter][G-code Control System Parameter]
No. Item Default
value
1 Line basic
setting
2 Modal initial
setting
3 Plane
4 Absolute
5Control
setting
6 Deceleration
Number of axes on line
Interpolation
*3
mode
*3
selection
*3
setting
G00 Non­interpolation
*3
check
1 1 to 8: Axes on line  Page
0 0: Linear interpolation (G01 command status)
0 0: X-Y plane (G17 command status)
0 0: Increment setting (G91 command status)
0 0: Move to the end point in a straight line
*3
0000H  Page
Setting range Direct
setting
Valid/ invalid
 Page
1: Positioning (G00 command status)
 Page
1: X-Y plane (G17 command status) 2: Z-X plane (G18 command status) 3: Y-Z plane (G19 command status)
 Page
1: Absolute setting (G90 command status)
 Page
(Interpolation)
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
7G1G1
8Arc
9 Permissible
10 Override
setting
11 A ut oma tic
12 Length before
13 Fast forward
14 Cutting feed
15 Override
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
1 0: 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. Item Default
value
16 Plane
composition
17 Base axis J
18 Base axis K
19 Normal line
control
20 Normal line
21 Minimum
22 Normal line
23 Minimum
24 Normal line
25 Normal line
26 Auxiliary
function
27 Polar
coordinate interpolation
28 Polar
Base axis I*31 0: 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
0 0: No normal line control
*3
0 0: Normal line control type
*3
0 0 to 3600000(10-4[degree])  Page
2000 1 to 100000[degree/min]  Page
0 0 to 99999999(10-4[mm])  Page
*3
0 0 to 99999999(10-4[mm])  Page
0 0 to 99999999(10-4[mm])  Page
*3
*3
00: BCD
0 0: No setting
*3
0  Page
*3
Setting range Direct
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. Item Default
value
Setting range Direct
setting
Valid/ invalid
29 High-
accuracy control
30 Acceleration/
31 Tolerable
32 Corner
33 Corner
34 Curve
35 Arc
36 Arc
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
0 0: Optimum corner deceleration
5[degree] 1 to 89[degree]  Page
0[%] -1000 to 99[%]  Page
0[%] -1000 to 99[%]  Page
0 0: 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.
MELSEC iQ-R Motion Controller Programming Manual (Common)
*3 This setting can be omitted.
Indirect setting*2Reference
*1
Valid/ invalid
section
Fetch
cycle (Required size)
80
81
81
81
81
81
81
81
4
4 G-CODE CONTROL PARAMETERS
4.1 G-Code Control System Parameter
75

Line basic setting

Ex.
Y
Start point
End point
100
100
200 300
200
X
[Unit: mm]
X-axis executing speed
832.05[mm/min]
1000[mm/min]
Y-axis executing speed
554.70[mm/min]
Y
Start point
End point
100
100
200 300
200
X
[Unit: mm]
X-axis executing speed
1000[mm/min]
Y-axis executing speed 1000[mm/min]
Number of axes on line
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).
Setting value Deceleration check method Description
0 Command deceleration check
method
1 Smoothing check method The 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
2 In-position check method The 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 check Description
0: Do not execute deceleration check
1: Execute deceleration check After 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 direction Rotating speed for block joint Rotating 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 setting The 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 G­code 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 value Description
0: Optimum corner deceleration The 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 axis The 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.2 G-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. Item Default value Setting range Direct
setting
Valid/ invalid
1 Line axis
information
2 Axis name 0 0: No setting
3 Rotation axis
4Stored
stroke limit
5 Software limit + 99999999(10
6 Speed/
time constant
7 Cutting feed
8G0 time
9G1 time
10 Rotation
axis information
11 Tandem
function
Axis No. 1 0: 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
0 0: 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
0 0: Shortcut invalid
0 0: 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 setting Reference
*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. Item Default value Setting range Direct
setting
Valid/ invalid
12 High-
accuracy control
13 Cutting feed
14 Cutting feed for
15 Cutting feed for
16 Accuracy
Rapid traverse rate during high­accuracy 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 setting Reference
*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 axis Unit setting
0: Linear axis mm, pulse
1: Rotation axis degree, 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 axis Rotation axis type Store stroke limit
Valid/invalid
0: Linear axis Valid (Software limit -) (Software limit +)
1: Rotation axis 0: Shortcut invalid Invalid (Software limit -) != (Software limit +)
1: Shortcut valid Invalid (Software limit -) != (Software limit +)
3: All linear coordinates Valid (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 G­code 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 constant G0 time constant
Speed
Time
G1 time constant G1 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"
Operation Program [Md.3149] Relative position (D54772+32sn,
D54773+32sn)[degree]
(1) G90 C0. 0.0000 0.0000
(2) G90 C-270. 90.0000 90.0000
(3) C405. 45.0000 45.0000
(4) G91 C180. 225.000 225.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"
Operation Program [Md.3149] Relative position (D54772+32sn,
D54773+32sn)[degree]
(1) G90 C0. 0.0000 0.0000
(2) G90 C-270. 90.0000 90.0000
(3) C405. 45.0000 45.0000
(4) G91 C180. 225.000 225.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"
Operation Program [Md.3149] Relative position (D54772+32sn,
D54773+32sn)[degree]
(1) G90 C0. 0.0000 0.0000
(2) G90 C-270. -270.0000 -270.0000
(3) C405. 405.0000 405.0000
(4) G91 C180. 585.0000 585.0000
The coordinate position when transitioning to G-code control again, after ending G-code control once.
Work [degree] Machine position [degree]
585.0000 585.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.
• Base axis I, Base axis J, Base axis K
• Normal line control
• Polar coordinate interpolation linear axis, polar coordinate interpolation rotating axis
• 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 high­accuracy 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.3 G-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]
No. Item Default
value
1 Tool radius
compensation
2 Interference check
3 Select tool radius or
4 Tool
compensation data
5 Tool length
6 Workpiece
coordinate
7Y0  
offset
8Z0  
9A0  
10 B 0  
11 C 0  
12 U 0  
13 V 0  
14 W 0  
15 Program
coordinate rotation
Tool radius compensation type
diameter compensation
Tool radius compensation amount
compensation amount
Coordinate
*2
offset
Coordinate rotation
*2
type
*2
*2
*2
X0 When linear axis is set
0 0: Type A
0 0: Interference check alarm
0 0: Radius compensation amount
0(10
*2
4
[mm])
0(10
*2
4
[mm])
0 0: Coordinate rotation type 0
Setting range Direct
1: Type B
1: Interference check invalid 2: Interference check avoid
1: Diameter compensation amount
-
-99999999 to 99999999(10
-
-99999999 to 99999999(10
-99999999 to 99999999(10
When rotation axis is set
-99999999 to 99999999(10
1: Coordinate rotation type 1
Indirect setting Reference
*1
setting
Valid/ invalid
Valid/ invalid
Fetch
cycle (Required size)
 Page
 Page
 Page
-4
[mm])  Page
-4
[mm])  Page
-4
[mm])
-4
[degree])
 Page
 Page
section
89
89
90
90
90
90
90
4
*1 For direct setting using MT Developer2, use the decimal format instead of the exponential format. *2 This setting can be omitted.

Tool radius compensation

Tool radius compensation type
Set the intersection operation processing method at startup and cancel command operations in tool radius compensation.
Tool radius compensation type Description
0: Type A Does not perform intersection operation processing for startup and cancel blocks, and performs an offset vector at a
right angle to the command.
1: Type B Performs the intersection operation processing for the command block and the next command block.
Interference check
Set the interference (loss) control to the work caused by the tool radius in tool radius compensation.
Interference check Description
0: Interference check alarm An alarm stops operation when it is determined that there will be interference.
1: Interference check invalid No interference check.
2: Interference check avoid Change 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 type Description
0: Coordinate rotation type 0 The start point does not rotate with the coordinate rotation. The end position is calculated from the current position on
1: Coordinate rotation type 1 The 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
5 G-CODE CONTROL PROGRAMS
5.1 G-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)

5 G-CODE CONTROL PROGRAMS

5.1 G-Code Control Program Composition

91

G-code program format

% (Proc Prog1) G91 G64 G00 X50. Y100. Z150. G01 X100. Y200. Z300. F15000. G04 P1 G09 G01 X-100. Y-200. Z-300. F15000. G91 C500. M02 %
(3)
(2)
(1)
(4)
The file format of a G-code program is shown below.
Item Description
Line feed code CRLF(0x0D, 0x0A)
Character code ASCII code
File size Up 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. Name Description
(1) Program start End of record (%) is always written on the first line of the G-code program.
(2) Comment When control out "(" is at the start of a block, that block is ignored and recognized as a comment. Information such as
(3) Program block The program block is required for operation, and is made up of multiple blocks in the order of which control is performed.
(4) Program end End 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)
Word Word
Block
Word Word Word
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. Name Description
(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 language Specifies 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.2 Fetching 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
•STOPRUN

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 cause Corrective 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.3 Pre-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.4 Decimal 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.
Command Valid command value range
Movement command (linear) -9999.9999 to 9999.9999[mm]
Movement command (rotation)/rotation angle -99999.9999 to 99999.9999[degree]
Feed speed 0.01 to 1000000.00[mm/min]
Dwell 0 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
Address Decimal point command Application Remark
A Coordinate position data
B Coordinate position data
C Coordinate position data
D Tool radius compensation No.
F Cutting feed rate
Fast forward speed Specified as ,F
G Prepared function code
H Tool length compensation No.
I Arc center
Vector component of tool radius compensation
J Arc center
Vector component of tool radius compensation
K Arc center
Vector component of tool radius compensation
M Auxiliary function code
N Sequence No.
O Program No.
P Dwell time
R Radius of R-specified arc
Rotation angle
U Coordinate position data
V Coordinate position data
W Coordinate position data
X Coordinate position data
Dwell time
Y Coordinate position data
Z Coordinate 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.5 Coordinate 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 Name Description
Machine coordinate home position Position specifically determined by the machine
Work coordinate home position Home position of the coordinate system used for processing work
Local coordinate home position Home 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 axis Linear axis
Rotation axis type Linear type
Shortcut invalid Shortcut valid All linear coordinates
Work coordinate position 0 to 359.9999[degree] -9999.9999 to 9999.9999
Machine position/Relative position
ABS command Moves in direction of the sign
INC command Moves 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...