Mitsubishi MELSEC-L02CPU-P, MELSEC-L06CPU-P, MELSEC-L06CPU, MELSEC-L02CPU, MELSEC-L02SCPU-P User Manual

...
MELSEC-L CPU Module User's Manual (Built-In I/O Function)
-L02SCPU
-L02SCPU-P
-L02CPU
-L02CPU-P
-L06CPU
-L06CPU-P
-L26CPU
-L26CPU-P
-L26CPU-BT
-L26CPU-PBT

SAFETY PRECAUTIONS

WARNING
CAUTION
Indicates that incorrect handling may cause hazardous conditions, resulting in death or severe injury.
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.
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) Machine OPR (Original Point Return) of the positioning function is controlled by two kinds of data:
an OPR direction and an OPR speed. Deceleration starts when the near-point dog signal turns on. If an incorrect OPR direction is set, motion control may continue without deceleration. To prevent machine damage caused by this, configure an interlock circuit external to the programmable controller.
(3) When the CPU module detects an error during control by the positioning function, the motion
slows down and stops.
(4) 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.
(5) 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-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection).
(6) Outputs may remain on or off due to a failure of a component such as a 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.
For the operating status of each station after a communication failure, refer to relevant manuals for each network. Incorrect output or malfunction due to a communication failure may result in an accident.
[Design Precautions]
WARNING
When changing data from a peripheral device connected to the CPU module during operation, 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 or operating status change) of a running programmable controller, read the relevant manuals carefully and ensure that the operation is safe before proceeding. 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.
An absolute position restoration by the positioning function may turn off the servo-on signal (servo off) for approximately 20ms, and the motor may run unexpectedly. If this causes a problem, provide an electromagnetic brake to lock the motor during absolute position restoration.
[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.
[Installation Precautions]
WARNING
Shut off the external power supply (all phases) used in the system before mounting or removing a module. Failure to do so may result in electric shock or cause the module to fail or malfunction.
[Installation Precautions]
CAUTION
Use the programmable controller in an environment that meets the general specifications in the MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection). Failure to do so may result in electric shock, fire, malfunction, or damage to or deterioration of the product.
To interconnect modules, engage the respective connectors and securely lock the module joint levers until they click. Incorrect interconnection may cause malfunction, failure, or drop of the module.
Do not directly touch any conductive parts and electronic components of the module. Doing so can cause malfunction or failure of the module.
Securely connect an extension cable to the connectors of a branch module and an extension module. After connections, check that the cable is inserted completely. 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.
Do not directly touch any conductive parts and electronic components of the module or SD memory card. Doing so can cause malfunction or failure of the module.
[Wiring Precautions]
WARNING
Shut off the external power supply (all phases) used in the system before 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.
[Wiring Precautions]
CAUTION
Individually ground the FG terminal of the programmable controller with a ground resistance of 100
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 a terminal block screw comes loose, resulting in failure.
Check the rated voltage and terminal 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 a 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.
Do not install the control lines or communication cables together with the main circuit lines or power
cables. 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.
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 block screws within the specified torque range. Undertightening can cause short circuit, fire, or malfunction. Overtightening can damage the screw and/or module, resulting in drop, short circuit, 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.
To use the high-speed counter function, ground the shield cable on the encoder side (relay box). Always ground the FG and LG terminals to the protective ground conductor. Failure to do so may cause malfunction.
Mitsubishi 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 methods, refer to the MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection).
[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 will cause the battery to produce heat, explode, ignite, or leak, resulting in injury and fire.
Shut off the external power supply (all phases) used in the system before cleaning the module or retightening the terminal block screws. Failure to do so may result in electric shock.
[Startup and Maintenance Precautions]
CAUTION
Before performing online operations (especially, program modification, forced output, and operating status change) for the running CPU module from the peripheral device connected, read relevant manuals carefully and ensure the safety. Improper operation may damage machines or cause accidents.
Do not disassemble or modify the module. 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 a module. Failure to do so may cause the module to fail or malfunction.
Tighten the terminal block 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 (module, display unit, and terminal block), the number of connections/disconnections is limited to 50 times (in accordance with IEC 61131-2). Exceeding the limit may cause malfunction.
After the first use of the SD memory card, do not insert/remove the memory card more than 500 times. Exceeding the limit may cause malfunction.
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.
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 by the positioning function, set a low speed value for the speed limit parameter so that the operation can be stopped immediately upon occurrence of a hazardous condition.
[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-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection).)
[Transportation Precautions]
CAUTION
When transporting lithium batteries, follow the transportation regulations. (For details on the regulated models, refer to the MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection).)

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

Remark
Thank you for purchasing the Mitsubishi MELSEC-L series programmable controllers. This manual describes the functions of the external I/O interface of the LCPU and programming.
Before using this product, please read this manual and the relevant manuals carefully and develop familiarity with the functions and performance of the MELSEC-L series programmable controller to handle the product correctly. When applying the program examples introduced 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 CPU modules
CPU module Model
LCPU
This manual describes only built-in I/O functions for the CPU module. For the functions except for built-in I/O functions of the CPU module, refer to the following.
MELSEC-L CPU Module User's Manual (Function Explanation, Program Fundamentals) MELSEC-L CPU Module User's Manual (Built-In Ethernet Function) QnUDVCPU/LCPU User's Manual (Data Logging Function)
Unless otherwise specified, this manual describes examples of assigning from X0 to XF for input numbers and from Y0 to Y7 for output numbers in each function. For I/O number assignment, refer to the following. MELSEC-L CPU Module User's Manual (Function Explanation, Program Fundamentals)
Unless otherwise specified, Chapter 7 POSITIONING FUNCTION in this manual is described as using examples of the setting, special relay, special register, dedicated instruction, error code and warning code supported for Axis 1.
Unless otherwise specified, Chapter 8 HIGH-SPEED COUNTER FUNCTION in this manual is described as using examples of the setting, special relay, special register, dedicated instruction, error code and warning code supported for CH1.
L02SCPU, L02SCPU-P, L02CPU, L02CPU-P, L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, L26CPU-PBT

RELEVANT MANUALS

(1) CPU module user's manual
Manual name
<manual number (model code)>
MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection)
<SH-080890ENG, 13JZ36>
MELSEC-L CPU Module User's Manual (Function Explanation, Program Fundamentals)
<SH-080889ENG, 13JZ35>
MELSEC-L CPU Module User's Manual (Built-In Ethernet Function)
<SH-080891ENG, 13JZ37>
QnUDVCPU/LCPU User's Manual (Data Logging Function)
<SH-080893ENG, 13JZ39>
(2) Programming manual
Manual name
<manual number (model code)>
MELSEC-Q/L Programming Manual (Common Instruction)
<SH-080809ENG, 13JW10>
Description
Specifications of the CPU modules, power supply modules, display unit, branch module, extension module, SD memory cards, and batteries, information on how to establish a system, maintenance and inspection, and troubleshooting
Functions and devices of the CPU module, and programming
The built-in Ethernet function of the CPU module
The data logging function of the CPU module
Description
Detailed description and usage of instructions used in programs
(3) Operating manual
Manual name
<manual number (model code)>
GX Works2 Version 1 Operating Manual (Common)
<SH-080779ENG, 13JU63>
GX Developer Version 8 Operating Manual
<SH-080373E, 13JU41>
System configuration, parameter settings, and online operations of GX Works2, which are common to Simple projects and Structured projects
Operating methods of GX Developer, such as programming, printing, monitoring, and debugging
(4) I/O module and intelligent function module manual
Manual name
<manual number (model code)>
MELSEC-L I/O Module User's Manual
<SH-080888ENG, 13JZ34>
Specifications and troubleshooting of the I/O module
Description
Description
10
Memo
11

CONTENTS

CONTENTS
SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
CONDITIONS OF USE FOR THE PRODUCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
RELEVANT MANUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
MANUAL PAGE ORGANIZATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
TERMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
CHAPTER 1 OVERVIEW 20
CHAPTER 2 EXTERNAL I/O SPECIFICATIONS 22
CHAPTER 3 GENERAL-PURPOSE INPUT FUNCTION 31
CHAPTER 4 GENERAL-PURPOSE OUTPUT FUNCTION 33
CHAPTER 5 INTERRUPT INPUT FUNCTION 35
CHAPTER 6 PULSE CATCH FUNCTION 39
CHAPTER 7 POSITIONING FUNCTION 42
7.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.1.1 Procedure for performing the positioning function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.2 Connection to External Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
7.2.1 I/O signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
7.2.2 Wiring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55
7.3 Parameter Setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.3.1 Positioning parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57
7.4 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
7.5 Checking Current Position and Operation Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
7.6 OPR Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
7.6.1 Machine OPR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71
7.6.2 Fast OPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89
7.6.3 Forced off of Axis 1 OPR request (SM1842) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90
7.6.4 Precautions on Axis 1 OPR request (SM1842) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90
7.7 Positioning Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
7.7.1 Start of positioning control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95
7.7.2 Position control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97
7.7.3 Speed/position switching control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98
7.7.4 Current value change. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100
7.7.5 Speed control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101
7.8 Multiple Axes Simultaneous Start Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
7.9 JOG Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
7.10 Sub Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
7.10.1 OPR retry function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
7.10.2 Speed limit function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
12
7.10.3 Speed change function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
7.10.4 Software stroke limit function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120
7.10.5 Hardware stroke limit function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123
7.10.6 Target position change function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124
7.10.7 Acceleration/deceleration processing function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128
7.10.8 Stop processing function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130
7.11 Absolute Position Restoration Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
7.12 Dedicated Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
7.12.1 Details of dedicated instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138
7.12.2 Precautions on dedicated instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161
7.13 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
7.14 Errors and Warnings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
7.15 Monitoring with a Programming Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
CHAPTER 8 HIGH-SPEED COUNTER FUNCTION 179
8.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
8.1.1 Procedure for performing the high-speed counter function . . . . . . . . . . . . . . . . . . . . . . . . . .181
8.2 Connecting to External Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
8.2.1 I/O signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .182
8.2.2 Wiring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185
8.3 Parameter Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
8.3.1 Common settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193
8.4 Normal Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
8.4.1 Preset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .202
8.4.2 Coincidence output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205
8.4.3 Coincidence detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .208
8.4.4 Counter function selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211
8.5 Frequency Measurement Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
8.6 Rotation Speed Measurement Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
8.7 Pulse Measurement Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
8.8 PWM Output Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
8.9 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
8.10 Dedicated Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
8.10.1 Details of dedicated instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .242
8.10.2 Precautions on dedicated instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257
8.11 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
8.12 Errors and Warnings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
8.13 When the LCPU Stops Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
8.14 Monitoring with a Programming Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
APPENDICES 269
Appendix 1 Processing Time of Each Instruction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Appendix 2 Connection Examples with Servo Amplifiers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Appendix 2.1 Connection examples with servo amplifiers manufactured by Mitsubishi . . . . . . . . .271
13
Appendix 2.2 Connection examples with stepping motors manufactured by ORIENTAL MOTOR
CO.,LTD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273
Appendix 2.3 Connection examples with servo amplifiers manufactured by Panasonic Corporation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .277
Appendix 2.4 Connection examples with servo amplifiers manufactured by SANYODENKI CO.,LTD
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279
Appendix 2.5 Connection examples with servo amplifiers manufactured by YASKAWA Electric
Corporation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .280
INDEX 281
INSTRUCTION INDEX 284
REVISIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
WARRANTY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
14

MANUAL PAGE ORGANIZATION

The section of the current page is shown.
The chapter of the current page is shown.
"" is used for screen names and items.
[ ] is used for items in the menu bar and the project window.
shows operating procedures.
shows reference manuals.
shows notes that requires attention.
shows mouse operations.
*1
shows reference pages.
shows setting or operating examples.
Ex.
shows useful information.
A window selected in the view selection area is displayed.
View selection area
[Online] [Write to PLC...]
Select [Online] on the menu bar, and then select [Write to PLC...].
Project window
[Parameter]
[PLC Parameter]
Select [Project] from the view selection area to open the Project window.
Menu bar
Ex.
Ex.
In the Project window, expand [Parameter] and select [PLC Parameter].
In this manual, pages are organized and the symbols are used as shown below. The following illustration is for explanation purpose only, and should not be referred to as an actual documentation.
*1 The mouse operation example (for GX Works2) is provided below.
15
Pages describing instructions are organized as shown below.
Descriptions of
setting data and data type
Instruction name
Structure of the instruction in the ladder mode
shows the devices applicable to the instruction
Descriptions of control data (if any)
Execution condition of the instruction
Setting side User
: Device value is set by the user. System: Device value is set by the CPU module.
C
error codes For the errors not described in this manual, refer to the following. MELSEC-Q/L Programming Manual (Common Instruction)
Simple program example(s) and descriptions of the devices used
Detailed descriptions of the instruction
The following illustration is for explanation purpose only, and should not be referred to as an actual documentation.
onditions for the error and
16
• Instructions can be executed under the following conditions.
Execution condition Any time During on On the rising edge During off On the falling edge
Symbol No symbol
• The following devices can be used.
Internal device
Setting
data
Applicable
*1
device
(system, user)
Bit Word Bit Word
X, Y, M, L, S, M, F, B,
SB, FX, FY
*2
T, ST, C, D, W, SD, SW,
FD, @
File
register
R, ZR U\G ZK, H, E, $
*1 For details on each device, refer to the following.
MELSEC-L CPU Module User's Manual (Function Explanation, Program Fundamentals)
*2 FX and FY can be used for bit data only, and FD for word data only. *3 In the "Constant" and "Others" columns, a device(s) that can be set for each instruction is shown.
Link direct device
J\
Intelligent
function module
device
U\G
Index
register
Zn
Constant *3Others
P, I, J,
U, D, X,
DY, N,
BL, TR,
BL\S,V
• The following data types can be used.
Data type Description
Bit Bit data or the start number of bit data
BIN 16-bit 16-bit binary data or the start number of word device
BIN 32-bit 32-bit binary data or the start number of double-word device
BCD 4-digit Four-digit binary-coded decimal data
BCD 8-digit Eight-digit binary-coded decimal data
Real number Floating-point data
Character string Character string data
Device name Device name data
*3
17

TERMS

Unless otherwise specified, this manual uses the following terms.
Ter m Description
CPU module The abbreviation for the MELSEC-L series CPU module
Power supply module The abbreviation for the MELSEC-L series power supply module
Branch module The abbreviation for the MELSEC-L series branch module
Extension module The abbreviation for the MELSEC-L series extension module
END cover A cover to be attached to the right side of the rightmost MELSEC-L series module
Display unit A liquid crystal display to be attached to the CPU module
Extension cable The abbreviation for the MELSEC-L series extension cable
LCPU Another term for the MELSEC-L series CPU module
Programming tool A generic term for GX Works2 and GX Developer
GX Works2
GX Developer
Encoder One of the pulse generators that converts input data into binary data (on and off)
Near-point dog
Servo on
Servo motor
Stepping motor
Zero signal PG0 of a pulse generator (encoder), that is detected once in one rotation
Drive unit (servo amplifier)
Pulse generator
Warning
PWM
The product name of the software package for the MELSEC programmable controllers
A switch used in positioning systems, placed in front of the starting point of a workpiece When this switch turns on, the feed speed is switched to creep speed. Therefore, the deceleration time is required while this switch is on.
A signal that indicates the normal status of a servo amplifier. A servo amplifier is operable only when this signal is on.
A motor that rotates according to a command. This motor is highly responsive, therefore frequent and rapid start and stop are available with high precision. DC and AC type motors are available. Feedback control is available with the included pulse generator that detects the number of rotations.
A motor that rotates by the predetermined angle for every pulse. The number of rotations is proportional to the number of pulses. A small power motor is applied, and it rotates accurately without feedbacks. Do not overload the motor, otherwise it will be out of step.
A unit used to amplify the power and control the motor in the operation by the positioning function since the signals, such as pulses, that are output from the CPU module are low voltage and small current. The unit, also called a servo amplifier, is provided with a servomotor and step motor.
A device that generates pulses. For example, by attaching this device on a motor axis, pulses can be generated by the rotation of the axis.
Different from an error, a warning is a minor error that does not terminate or stop the operation even if it is detected.
The abbreviation for pulse-width modulation, a method of changing a ratio of on width to off width of a pulse wave
18
Memo
19

CHAPTER 1 OVERVIEW

The LCPU supports the following built-in I/O functions. The built-in I/O functions allow constructing a small-scale system using the LCPU alone because dedicated modules for these functions are not required. Therefore, the system cost can be reduced.
• General-purpose input function
• General-purpose output function
• Interrupt input function
• Pulse catch function
• Positioning function
• High-speed counter function
General-purpose input function, interrupt input function, and pulse catch function
General-purpose output function
Positioning function
High-speed counter function
20
CHAPTER 1 OVERVIEW
(1) Number of points used for each function
X0 to XF and Y0 to Y7 are sorted for each function.
Function Available range
General-purpose input function
General-purpose output function
Interrupt input function 0 to 16 points (input signal) 0 to 16 points
Pulse catch function 0 to 16 points (input signal) 0 to 16 points
High-speed counter
*1
function
Positioning function
0 to 16 points (input signal) 0 to 16 points
0 to 8 points (output signal) 0 to 8 points
0 to 2CH
• Input signal: 0 to 5 points (points/channel) (depending on settings)
• Output Signal: 0 to 2 points (points/channel) (depending on settings)
0 to 2 axes
• Input signal: 0 to 6 points (points/axis) (depending on
*1
settings)
• Output signal: 2 to 3 points (points/axis) (depending on settings)
• When using only one channel: 0 to 5 points
• When using two channels simultaneously: 0 to 10 points
• When using only one axis: 0 to 6 points
• When using two axes simultaneously: 0 to 12 points
Input Output
*1 Assignment of some signals used for the high-speed counter function and positioning function (such as A phase, B
phase, and near-point dog) are fixed. When using these functions, no signal can be assigned in place of the signals.
Number of points
• When using only one channel: 0 to 2 points
• When using two channels simultaneously: 0 to 4 points
• When using only one axis: 2 to 3 points
• When using two axes simultaneously: 4 to 6 points
21

CHAPTER 2 EXTERNAL I/O SPECIFICATIONS

60
4
01020304050
10
16
55
14
6
12
8
Ambient temperature ( )
Input voltage: 24VDC
Input voltage: 28.8VDC
(16 points, 55 )
(8 points, 55 )
(16 points, 45 )
2
0
Input voltage:
26.4VDC
Simultaneous on points (point)
This chapter describes internal circuits, pin numbers and corresponding signal names, and specifications of external I/O interface. For connectors used for external wiring, refer to MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection).
(1) Input specifications
Item Specifications
Signal name
Rated input voltage
Rated input current 6.0mA (TYP.) (at 24VDC) 4.1mA (TYP.) (at 24VDC)
ON voltage/ON current 19.0V or higher/5.0mA or higher 19.0V or higher/3.5mA or higher
OFF voltage/OFF current 8V or lower/1.5mA or lower 8V or lower/1.0mA or lower
Input resistance 3.8k 5.6k
Off On
Response time
Withstand voltage 510VAC for 1 minute between input terminal and internal power supply (altitude: 0 to 2000m)
Insulation resistance 10M or higher between input terminals and internal power supply (500VDC insulation resistance tester)
Wiring method for common Independent common 10 points/common
On Off
24VDC (+20%/-15%, ripple ratio
Depending on the setting value of the input response time setting
24V input Differential input 24V input
within 5%)
High-speed input (IN0 to IN5) Standard input (IN6 to INF)
24VDC (+20%/-15%, ripple ratio
(0.01ms
EIA Standard RS-422-A
Differential line driver level
(AM26LS31 (Manufactured by
Texas Instruments Incorporated)
or equivalent)
*2
/0.1ms/0.2ms/0.4ms/0.6ms/1ms)
Depending on the setting value of
the input response time setting
(0.1ms*1/1ms/5ms/10ms/20ms/70
within 5%)
ms)
*1 The response time at turning on off of input devices can take 0.2ms even if the input response time is set to "0.1ms". *2 The response time can take 0.02ms even if the input response time is set to "0.01ms".
The following shows a temperature derating curve for the input signal.
22
CHAPTER 2 EXTERNAL I/O SPECIFICATIONS
B20 B19 B18 B17 B16 B15 B14 B13 B12 B11 B10 B09 B08 B07 B06 B05 B04 B03 B02 B01
A20 A19 A18 A17 A16 A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01
(2) Output specifications
Item Specifications
Signal name Output (OUT0 to OUT7)
Rated load voltage 5 to 24VDC
Maximum load current 0.1A/point
Maximum voltage drop at ON 0.2V (TYP.)
Leakage current at OFF 0.1mA or lower
Response time
On 1s or less (rated load, resistive load)
Off 1s or less (rated load, resistive load)
Withstand voltage 510VAC for 1 minute between output terminal and internal power supply (altitude: 0 to 2000m)
Insulation resistance
Wiring method for common
10M or higher between output terminals and internal power supply (500VDC insulation resistance
tester)
L02SCPU, L02CPU, L06CPU, L26CPU, L26CPU-BT: 8 points/common (sink type)
L02SCPU-P, L02CPU-P, L06CPU-P, L26CPU-P, L26CPU-PBT: 8 points/common (source type)
(3) Signal assignment of the connector for external devices
Viewed from the front of the module
23
(4) Internal circuits
(a) L02SCPU, L02CPU, L06CPU, L26CPU, L26CPU-BT
Classification
Input
Output
External wiring
Fuse
24VDC
24VDC
24VDC
24VDC
Load
Load
Load
Load
5 to 24VDC
Pin number Internal circuit
A20
*1
B20
B19 A19
3.6k 1/2W
680
1/10W
220
B18 A18
B17 A17
3.6k
1/2W
B16 A16
*1
680
1/10W
220
B15 A15
*1
B14 A14
B13 A13
3.6k 1/2W
680
1/10W
220
B12 A12
B11 A11
B10 A10
5.6k 1/3W
B09 A09
B08 A08
B07 A07
B06 A06
5.6k 1/3W
5.6k 1/3W
5.6k 1/3W
5.6k 1/3W
B05 A05
B04 A04
B03 A03
B02 A02
B01 A01
1k
1/10W
1k
1/10W
1k
1/10W
1k
1/10W
1k
1/10W
Insulating element
Insulating element
Insulating element
Insulating element
Signal name
B line
High-speed 24V
input (IN0-24V)
High-speed
differential
input (IN0-DIFF)
High-speed
input common
(IN0-COM)
High-speed 24V
input (IN1-24V)
High-speed
differential
input (N1-DIFF)
High-speed
input common
(IN1-COM)
High-speed 24V
input (IN4-24V)
High-speed
differential
input (IN4-DIFF)
High-speed
input common
(IN4-COM)
High-speed 24V
input (IN2-24V)
High-speed
differential
input (IN2-DIFF)
High-speed
input common
(IN2-COM)
High-speed 24V
input (IN3-24V)
High-speed
differential
input (IN3-DIFF)
High-speed
input common
(IN3-COM)
High-speed 24V
input (IN5-24V)
High-speed
differential
input (IN5-DIFF)
High-speed
input common
(IN5-COM)
Standard input common
(INCOM)
Standard input
Standard input
(IN6)
Standard input
Standard input
(IN8)
Standard input
Standard input
(INA)
Standard input
Standard input
(INC)
Standard input
Standard input
(INE)
Output (OUT0)
Output (OUT2)
Output (OUT4)
Output (OUT6)
Output (OUT1)
Output (OUT3)
Output (OUT5)
Output (OUT7)
Output common (OUTCOM)
*2
A line
(IN7)
(IN9)
(INB)
(IND)
(INF)
24
*1 High-speed inputs can be connected based on the 24V input mode or differential input mode. *2 For signal names when using the positioning function or high-speed counter function, refer to the following.
• Positioning function: Page 51, Section 7.2.1
• High-speed counter function: Page 182, Section 8.2.1
CHAPTER 2 EXTERNAL I/O SPECIFICATIONS
Classification
B line
A line
Input
B20
A20
B19 A19
B18 A18
B17 A17
B16 A16
B15 A15
B14 A14
B13 A13
B12 A12
B11 A11
B10 A10
B09 A09
B08 A08
B07 A07
B06 A06
Output
B05 A05
B04 A04
B03 A03
B02 A02
B01 A01
3.6k 1/2W
680
1/10W
220
3.6k 1/2W
680
1/10W
220
3.6k 1/2W
680
1/10W
220
5.6k 1/3W
5.6k 1/3W
5.6k 1/3W
5.6k 1/3W
5.6k 1/3W
1k
1/10W
1k
1/10W
1k
1/10W
1k
1/10W
1k
1/10W
Insulating element
Insulating element
Insulating element
Insulating element
Pin number Internal circuit
Signal name
*2
Load
Load
Load
Load
5 to 24VDC
Fuse
External wiring
*1
*1
*1
24VDC
24VDC
24VDC
24VDC
High-speed
24V input (IN0-24V)
High-speed
24V input (IN2-24V)
High-speed
differential input
(IN0-DIFF)
High-speed
differential input
(IN2-DIFF)
High-speed
input common
(IN0-COM)
High-speed
input common
(IN2-COM)
High-speed
24V input (IN1-24V)
High-speed
24V input (IN3-24V)
High-speed
differential input
(IN1-DIFF)
High-speed
differential input
(IN3-DIFF)
High-speed
input common
(IN1-COM)
High-speed
input common
(IN3-COM)
High-speed
24V input (IN4-24V)
High-speed
24V input (IN5-24V)
High-speed
differential input
(IN4-DIFF)
High-speed
differential input
(IN5-DIFF)
High-speed
input common
(IN4-COM)
High-speed
input common
(IN5-COM)
Standard input common
(INCOM)
Standard input
(IN6)
Standard input
(IN8)
Standard input
(INA)
Standard input
(INC)
Standard input
(INE)
Standard input
(IN7)
Standard input
(IN9)
Standard input
(INB)
Standard input
(IND)
Standard input
(INF)
Output
(OUT0)
Output
(OUT2)
Output
(OUT4)
Output
(OUT6)
Output
(OUT1)
Output
(OUT3)
Output
(OUT5)
Output
(OUT7)
Output common
(OUT24V)
(b) L02SCPU-P, L02CPU-P, L06CPU-P, L26CPU-P, L26CPU-PBT
*1 High-speed inputs can be connected based on the 24V input mode or differential input mode. *2 For signal names when using the positioning function or high-speed counter function, refer to the following.
• Positioning function: Page 51, Section 7.2.1
• High-speed counter function: Page 182, Section 8.2.1
25
(5) I/O connector pin numbers and corresponding I/O signals
Pin
number
B20
B18 A18
B17
B15 A15
B14
B12 A12
B11 Input common A11 Input common
B10 Standard X6 A10 Standard X7
B09 Standard X8 A09 Standard X9
B08 Standard XA A08 Standard XB
B07 Standard XC A07 Standard XD
B06 Standard XE A06 Standard XF
B05
B04
B03
B02
B01
Cate-
gory
Input
Output
Typ e
High-
speed
High-
speed
High-
speed
High-
speed
High-
speed
High-
speed
High-
speed
Correspondence
for line driver
X0
X1
X4
Y0 A05
Y2 A04
Y4 A03
Y6 A02
O
utput common
Corresponding
I/O signal
*1
Pin
number
A20
A17
A14
A01
Cate-
gory
Input
Output
Typ e
High-
speed
High-
speed
High-
speed
High-
speed
High-
speed
High-
speed
High-
speed
Correspondence
for line driver
X2B19 A19
X3B16 A16
X5B13 A13
Y1
Y3
Y5
Y7
Output common
Corresponding
*1
I/O signal
*1 B01 and A01 are used as negative common on the L02SCPU, L02CPU, L06CPU, L26CPU, and L26CPU-BT, while they
are used as positive common on the L02SCPU-P, L02CPU-P, L06CPU-P, L26CPU-P, and L26CPU-PBT.
26
(6) Input signal assignment
External
input
signal
X0 (High-
speed)
X1 (High-
speed)
X2 (High-
speed)
X3 (High-
speed)
X4 (High-
speed)
X5 (High-
speed)
X6
(Standard)
X7
(Standard)
X8
(Standard)
X9
(Standard)
XA
(Standard)
XB
(Standard)
XC
(Standard)
XD
(Standard)
XE
(Standard)
XF
(Standard)
General­purpose
input
Interrupt
input
*1
*1
*1
*1












CHAPTER 2 EXTERNAL I/O SPECIFICATIONS
: Selectable, : No combination
Function
Pulse catch High-speed counter Positioning
Counter CH1 A Phase
Counter CH1 B Phase
Counter CH2 A Phase
Counter CH2 B Phase
Counter CH1 Z Phase
Counter CH2 Z Phase
Counter CH1 Function Input
Counter CH2 Function Input
Counter CH1 Latch Counter
Counter CH2 Latch Counter
*3
*3
*3
*3
*3
*3
*1
*1
*1
*1
*2
*2
*2
*2
*2
*2
Axis #1 Zero Signal
Axis #2 Zero Signal
Axis #1 External Command Signal
Axis #2 External Command Signal
Axis #1 Drive Module READY Signal
Axis #2 Drive Module READY Signal
Axis #1 Near-point Dog Signal
Axis #2 Near-point Dog Signal
Axis #1 Upper Limit Signal
Axis #2 Upper Limit Signal
Axis #1 Lower Limit Signal
Axis #2 Lower Limit Signal
*3
*3
*3
*3
*2
*2
*2
*2
*2
*2
*2
*2
*2
*2
*2
*2
*1 When using CH1 for the high-speed counter function, X0 and X1 cannot be used as interrupt inputs. Also, when using
CH2 for the high-speed counter function, X2 and X3 cannot be used as interrupt inputs. Other functions such as the
general-purpose input can be used. *2 When this signal is not used, the input signal can be used for other functions such as the general-purpose input. *3 When the high-speed counter function or positioning function is selected, this signal is not used for that function. This
signal can be used for another function such as the general-purpose input function.
27
(7) Output signal assignment
: Selectable, : No combination
Function
External
output signal
Y0
Y1
Y2
Y3
Y4
Y5
Y6
Y7
*1 This signal must be used depending on parameter settings. When this signal is not used, the output signal can be used
for the general-purpose output function. *2 When this signal is not used, the output signal can be used for the general-purpose output function. *3 When the high-speed counter function or positioning function is selected, this signal is not used for that function. This
signal can be used for the general-purpose output function.
General­purpose
output
High-speed counter Positioning
CH1 Coincidence Output No.1
CH2 Coincidence Output No.1
CH1 Coincidence Output No.2
CH2 Coincidence Output No.2
*3
*3
*3
*3
*1
*1
*2
*2
Axis #1 Deviation Counter Clear
Axis #2 Deviation Counter Clear
Axis #1 CW/PULSE/A Phase Output
Axis #2 CW/PULSE/A Phase Output
Axis #1 CCW/SIGN/B Phase Output
Axis #2 CCW/SIGN/B Phase Output
*3
*3
*1
*1
*1
*1
*1
*1
28
CHAPTER 2 EXTERNAL I/O SPECIFICATIONS
Remark
Remark
(8) Simplified chart of I/O signals
The following shows a simplified chart of I/O signals for the high-speed counter function and positioning function.
High-speed counter Positioning
CH1 CH2 Axis #1 Axis #2
X5 X7 X9 XB XD XF Y3 Y5 Y7
X0 X1 X4 X6 X8 Y0 Y2
X2 X3 X5 X7 X9 Y1 Y3
X4 X6 X8 XA XC XE Y2 Y4 Y6
(9) External input signals (X0 to XF) when using the functions
The on/off status of the external input signals (X0 to XF) are reflected to the input device (X0 to XF) in the program when any built-in I/O functions (except the pulse catch function) is used. When the pulse catch function is used, the input device turns on for one scan by detecting the rising edge of the external input signal ( Page 39, CHAPTER 6). When selecting positioning function or high-speed counter function, an input signal that is not used due to settings of the functions operates as the general-purpose input.
The IN0 to IN F LEDs indicate status of the external input signals (X0 to XF). However, the indicating status is not affected by turning on or off the input device (X0 to XF) in the program.
(10)External output signals (Y0 to Y7) when using the functions
The external output signals (Y0 to Y7) reflect the output status of the function selected from the general-purpose output, positioning, and high-speed counter functions. Therefore, the output status are not affected by turning on or off the output device (Y0 to Y7) in the program when the output signals are used for the positioning or high­speed counter function. The output device (Y0 to Y7) do not reflect the status of the output signals used for the positioning or high-speed counter function.
The OUT 0 to OUT 7 LEDs indicate status of the external output signals. So the output status of the output device (Y0 to Y7) are indicated when the output signals are used for the general-purpose output function. Actual output status of the positioning or high-speed counter function are indicated when the output signals are used for those functions. (The indicating status is not affected by turning on or off the output device in the program.)
29
(11)Monitoring by the programming tool
To check the I/O settings, open the "I/O Monitor" window by using the programming tool.
[Tool] [Built-in I/O Module Tool]
For details, refer to the followings. GX Works2 Version 1 Operating Manual (Common)
30

CHAPTER 3 GENERAL-PURPOSE INPUT FUNCTION

Select a response time.
Select "General-purpose input".
CHAPTER 3 GENERAL-PURPOSE INPUT
FUNCTION
This function uses the built-in external input signals (16 points) as general-purpose inputs to read the on/off status of external devices such as switches and sensors. The on/off status of the external input signals are refreshed to the input device (X0 to XF) and used in programs.
(1) Parameter setting
Set the input signals and input response time values.
Project window [Parameter] [PLC Parameter] "Built-in I/O Function Setting" tab
(2) External input signal types
The following two types are available.
• High-speed input: X0 to X5 (6 points)
• Standard input: X6 to XF (10 points)
(3) Read timing of external input signals
The on/off status of the external input signals are refreshed to the input device (X0 to XF) at execution of the END instruction. Therefore, a delay for one scan (maximum) occurs from when an external input signal changes until when the input device turns on.
(4) Direct input
By using the direct input device (DX0 to DXF) for the external input signals, the external input status can be loaded at execution of sequence instructions using the direct input device.
31
(5) Partial refresh
The LCPU can read the current external input status by executing partial refresh using the RFS instruction to the input device (X0 to XF). For the RFS instruction, refer to the following. MELSEC-Q/L Programming Manual (Common Instruction)
(6) Performance specifications
The following is the performance specifications of the general-purpose output function.
Item Description
Points 10
Input voltage/current 24VDC, 4.1mA (TYP.)
Standard input
High-speed input
Minimum input response time
Input response time setting
Points 6
DC input 24VDC, 6.0mA (TYP.)
Input voltage/current
Minimum input response time
Input response time setting
Differential input
*1
Depending on the setting value of the input response
time
*2
0.1ms
/1ms/5ms/10ms/20ms/70ms
EIA Standard RS-422-A Differential line driver level
(AM26LS31 (manufactured by Texas Instruments
Incorporated) or equivalent)
Depending on the setting value of the input response
time
0.01ms*3/0.1ms/0.2ms/0.4ms/0.6ms/1ms
*1 The shorter the input response time is, the more the module is susceptible to noise. When setting the input response
time, check that the module will not be affected by noise. For details on measures against noise, refer to the following.
MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection) *2 The response time at turning on off of input devices can take 0.2ms even if the input response time is set to "0.1ms". *3 The response time can take 0.02ms even if the input response time is set to "0.01ms".
32

CHAPTER 4 GENERAL-PURPOSE OUTPUT FUNCTION

Select "General Output".
Select an error time output mode.
CHAPTER 4 GENERAL-PURPOSE OUTPUT
FUNCTION
This function uses the built-in external output signals (8 points) as general-purpose outputs for external devices such as lamps. By turning on/off the output device (Y0 to Y7) in programs, the LCPU can output the signals externally.
(1) Parameter setting
Set the output signals and error time output mode.
Project window [Parameter] [PLC Parameter] "Built-in I/O Function Setting" tab
(2) External output timing
On/off status of the output device are refreshed to the external outputs (Y0 to YF) at execution of the END instruction. Therefore, a delay for one scan (maximum) occurs from when an external device turns on/off in programs until when the on/off status is refreshed to the external output.
(3) Direct output
When using the output device (Y0 to Y7) for the direct output device (DY0 to DY7), on/off status of the device are refreshed to the external outputs by using the instruction such as the SET instruction.
(4) Partial refresh
The output device status (only specified range) is refreshed to the external output by executing partial refresh using the RFS instruction to the output device (Y0 to Y7) ( MELSEC-Q/L Programming Manual (Common Instruction)).
33
(5) Error time output mode
Select the output mode (Hold or Clear) for the output status of the output device (Y0 to Y7) when an error to stop the program occurs. (This is not the setting for outputs to the output modules and the intelligent function modules. For details on the error time output mode setting for modules, refer to the following. MELSEC-L CPU Module User's Manual (Function Explanation, Program Fundamentals)
(6) Performance specifications
The following is the performance specifications of the general-purpose output function.
Description
Item
Output type Sink type Source type
Points 8
Output voltage/current 5 to 24VDC, 0.1A
Response time
On 1s or less (rated load, resistive load)
Off 1s or less (rated load, resistive load)
L02SCPU, L02CPU, L06CPU,
L26CPU, L26CPU-BT
L02SCPU-P, L02CPU-P, L06CPU-P,
L26CPU-P, L26CPU-PBT
34

CHAPTER 5 INTERRUPT INPUT FUNCTION

Select "Interrupt input".
Select a response time.
Select an interrupt processing condition.
CHAPTER 5 INTERRUPT INPUT FUNCTION
This function executes an interrupt program when triggered by the input signal (X0 to XF).
(1) Parameter setting
Set the input signals, input response time values, and interrupt processing condition.
Project window [Parameter] [PLC Parameter] "Built-in I/O Function Setting" tab
35
(2) Interrupt pointer assignment and interrupt priority
The following shows interrupt pointers corresponding to input signals (X0 to XF).
I/O signal Interrupt pointer
X0 I0 5
X1 I1 6
X2 I2 7
X3 I3 8
X4 I4 9
X5 I5 10
X6 I6 11
X7 I7 12
X8 I8 13
X9 I9 14
XA I10 15
XB I11 16
XC I12 17
XD I13 18
XE I14 19
XF I15 20
*1 The priority 1 to 4 are used for interrupt pointers I28 to I31 (interrupt by build-in timers).
Priority
*1
Interrupt pointer numbers can be changed. ( Page 37, (2) (a))
36
CHAPTER 5 INTERRUPT INPUT FUNCTION
Ex.
(a) Changing the interrupt pointer numbers
1. Click the button in the "PLC System" tab.
Project window [Parameter] [PLC Parameter] "PLC System" tab
2. Set the interrupt pointer start No., interrupt pointer count, start I/O No., and start SI No.
3. Click the button to exit.
When assigning the interrupt inputs X0 and X1 to the interrupt pointers I50 and later
• Precautions When the range of interrupt input that is specified in the "Intelligent Function Module Interrupt Pointer
Setting" and the interrupt input is not selected for the built-in I/O function in the range, "PARAMETER ERROR" (error cord: 3000) occurs. The following shows a correct example and an incorrect example of assigning the interrupt inputs to the interrupt pointers I50 and later as shown above.
• Correct example As shown below, the interrupt inputs are set within the range specified in "Intelligent Function Module
Interrupt Pointer Setting", so the error will not occur.
Input signal function selection: Interrupt input is set to X0 and X1.
• Incorrect example As shown below, input signal X2 and X3 are set to the interrupt inputs, but no interrupt input is set within
the range specified in "Intelligent Function Module Interrupt Pointer Setting", so the error will occur.
Input signal function selection: X2 and X3 are set to the interrupt inputs.
37
(3) Interrupt processing condition
The following table lists three types of conditions to execute the interrupt programs by the interrupt inputs.
Interrupt processing
condition
Rising edge The interrupt program is executed at the rising edge of the interrupt input signal.
Falling edge The interrupt program is executed at the falling edge of the interrupt input signal.
Rising edge + Falling edge
The interrupt program is executed at both the rising edge and the falling edge of the interrupt input signal.
Description
When the condition is set to "Rising edge + Falling edge", an interrupt factor occurred during execution of an interrupt program is held only once, and the second and subsequent factors are ignored. When the second rising edge (falling edge) of the signal is detected after the falling edge (rising edge) during execution of the interrupt program due to the first one, the second one cannot execute the interrupt program. To avoid this, keep an enough interval between on and off of the interrupt input. In addition, a continuous interrupt input of signals with a short ON width and OFF width causes frequent halts of the main routine program. Adjust the ON width and OFF width for interrupt input not to interfere with the execution of the main routine program.
(4) Interrupt enable/disable
Use the EI instruction to enable the interrupt. Also, use the DI instruction to disable interrupt, and the IMASK instruction to mask the interrupt program. ( MELSEC-Q/L Programming Manual (Common Instruction))
(5) Performance specifications
The following is the performance specifications of the interrupt input function.
Item Description
Points 10
Input voltage/current 24VDC, 4.1mA (TYP.)
Standard input
High-speed input
*1 The response time at turning on off of input devices can take 0.2ms even if the input response time is set to "0.1ms". *2 The response time can take 0.02ms even if the input response time is set to "0.01ms".
Minimum input response time
Input response time setting
Points 6
DC input 24VDC, 6.0mA (TYP.)
Input voltage/current
Minimum input response time
Input response time setting
Differential input
Depending on the setting value of the input response
time setting
*1
0.1ms
/1ms/5ms/10ms/20ms/70ms
EIA Standard RS-422-A Differential line driver level
(AM26LS31 (manufactured by Texas Instruments
Incorporated) or equivalent)
Depending on the setting value of the input response
time setting
*2
0.01ms
/0.1ms/0.2ms/0.4ms/0.6ms/1ms
38

CHAPTER 6 PULSE CATCH FUNCTION

Program
External input signal
X0
Input device
X0
0 step END
0 step END
0 step
1) Input signal ON
2) ON for 1 scan
OFF
OFF
CHAPTER 6 PULSE CATCH FUNCTION
This function can catch pulse signals that the general-purpose input function cannot catch because the on time is shorter than the scan time.
(1) Parameter setting
Set the input signals and input response time values.
Project window [Parameter] [PLC Parameter] "Built-in I/O Function Setting" tab
Select a response time.
Select "Pulse Catch".
(2) Basic operation of the pulse catch function
The function turns on the input device for one scan after detecting a pulse signal, and turns off the input device during the END processing.
(a) Operation when using an input signal (X0) as the pulse catch function
The input device turns on for one scan after detecting a rising edge of the external input signal (X0).
39
(b) Operation when detecting more than one pulse in one scan
External
input signal
X0
1 scan
1): Interrupt program execution
2): Interrupt program execution in the next scan
3): If a pulse is input after completion of the interrupt program by
1), the interrupt program is executed at time after the next.
Interrupt program
1)
2)
3)
OFF
Program
External input signal
X0
Input device
X0
0 step END
0 step
END
0 step
0 step
END
1) Input signal ON
ON for 2 scans
3) Input signal ON
4) ON for 1 scan2) ON for 1 scan
OFF
OFF
Second pulse and later are ignored. Input pulse signals at intervals of one scan or more.
0 step END
0 step END
Program
1) Input signal ON
0 step
External input signal
X0
Input device
X0
OFF
OFF
These pulses are ignored.
2) ON for 1 scan
To count the second and third pulse inputs, use the interrupt input function. However, if the third pulse is detected before the end of the execution of the interrupt program, the pulse cannot be counted.
(c) Operation when detecting same pulse in two scans or more
The input device turns on for scans by the number of detected pulses. Input pulse signals at intervals of one scan or more.
40
CHAPTER 6 PULSE CATCH FUNCTION
(d) Operation when detecting a pulse that has on width of two scans or more
The input device turns on for one scan.
0 step END
0 step
Program
0 step
END
External input signal
X0
Input device
X0
OFF
OFF
1) Input signal ON
2) ON for 1 scan
(3) Detectable pulse width
Pulse width that meets the following condition can be detected.
ON or OFF width of the pulse input > Input response time
When the condition is not met, the pulse cannot be detected correctly. Set the input response time values to meet the condition.
(4) Precautions
Avoid the following actions for the input device (X0 to XF) that is set to the pulse catch function. Otherwise, the input device does not turn on correctly for one scan after detecting a pulse.
• Use of the direct device (DX)
• Execution of the instruction that performs input refresh at execution, such as RFS, COM, CCOM(P), and MTR
(5) Performance specifications
The following is the performance specifications of the pulse catch function.
Item Description
Points 10
Input voltage/current 24VDC, 4.1mA (TYP.)
Standard input
High-speed input
*1 The response time at turning on off of input devices can take 0.2ms even if the input response time is set to "0.1ms". *2 The response time can take 0.02ms even if the input response time is set to "0.01ms".
Minimum input response time
Input response time setting
Points 6
DC input 24VDC, 6.0mA (TYP.)
Input voltage/current
Minimum input response time
Input response time setting
Differential input
Depending on the setting value of the input response
time setting
*1
0.1ms
/1ms/5ms/10ms/20ms/70ms
EIA Standard RS-422-A Differential line driver level
(AM26LS31 (manufactured by Texas Instruments
Incorporated) or equivalent)
Depending on the setting value of the input response
time setting
*2
0.01ms
/0.1ms/0.2ms/0.4ms/0.6ms/1ms
41

CHAPTER 7 POSITIONING FUNCTION

Mechanical system
Hardware stroke upper limit switch
Workpiece
Workpiece
Near-point watchdog
Near-point watchdog
Drive unit
Drive unit
Servo motor
Servo motor
Hardware stroke lower limit switch
Hardware stroke upper limit switch
Hardware stroke lower limit switch
Motor power cable
Motor power cable
Encoder cable
Encoder cable
Programming tool LCPU

7.1 Overview

(1) Definition
This function is used to move a table, machining target, tool, or other moving body (workpiece) at a specified speed with the purpose of stopping it accurately at a target position.
(2) Features
The positioning function is controlled by dedicated instructions.
(a) 2-axis control
Two drive units (two motors) can be connected and two coordinates can be controlled independently or simultaneously.
(b) OPR (Original point return)
Six types of OPR methods are available. A near-point dog (OP sensor) can be used to establish the OP (position that becomes the starting point of each control) and "address" of this position. (Machine OPR) OPR can also be performed automatically within the range defined by the upper and lower limit switches. (OPR retry function)
(c) Target position and speed
• The workpiece can be moved to the target position based on a specified address or movement amount. (Position control)
• The workpiece can be moved until a stop instruction is executed. (Speed control)
• The current position can be changed to a specified value. (Current value change function)
• The target position can be changed while the workpiece is moving. (Target position change function)
• The speed can be changed while the workpiece is moving. (Speed change function)
42
CHAPTER 7 POSITIONING FUNCTION
(d) Limitation of the moving range of the workpiece
Desired positions can be set as the logical upper limit and lower limit of the moving range of the workpiece, without using switches. (Software stroke limit function) Also, upper and lower limit switches can be used to limit the moving range. (Hardware stroke limit function)
(e) JOG operation
The workpiece can be moved to a desired position according to the pulses that are output continuously while a JOG operation instruction is executed. (JOG operation function)
(f) Absolute position detection
A servomotor with absolute position detector can be used to restore the current position after a power failure. (Absolute position restoration function)
7.1 Overview
43
(3) Function list
The following table lists and describes functions available for the positioning function.
Item Description Reference
Machine OPR
OPR control
Fast OPR
Position control
(1-axis linear control)
Speed/position switching
Positioning
control
Multiple axes simultaneous start control A function to start two axes simultaneously at the pulse output level
JOG operation function
Sub function
Acceleration/deceleration
Stop processing function
Absolute position restoration function
control
Current value change
function
Speed control
OPR retry
function
Speed limit function
Speed change function A function to change the speed during operation
Software stroke limit
function
Hardware stroke limit
function
Target position change
function
processing function
A function to mechanically establish the reference point (OP) for positioning control using a near-point dog or stopper
A function to execute positioning control to the OP address stored by machine OPR or standby address that has been set
A function to execute positioning control to a specified position according to the address or movement amount set by positioning data
A function to start under speed control and then switch to position control (positioning control based on specified movement amount) via an external command signal
A function to change the address (current feed value)
A function to implement positioning control via operation at a specified speed
A function to output pulses only while a JOG start instruction(IPJOG1) is executed to move the workpiece to a desired position
A function to perform machine OPR automatically by detecting an off edge of the limit signal and moving to a position where machine OPR is possible, even when the OP is not located in the OPR direction
A function to limit the speed to within the setting range of speed limit when the operating speed exceeds the positioning parameter "Speed Limit Value"
A function to not start operation when a start instruction is given to move to the target position which is outside the range set by the upper stroke limit and lower stroke limit. The limit function also stops operation when the current position (current feed value) deviates from the setting range.
A function to decelerate the axis to a stop using a limit switch connected to the connector for external devices
A function to change the address or movement amount during positioning control
A function to adjust the acceleration/deceleration processing as part of control
A function to control the stopping method to be applied when a stop cause occurs during operation
A function to restore the current position (current feed value) using a servomotor with absolute position detector, without executing machine OPR, in the event such as a momentary power failure or emergency stop. (Connectable servo amplifiers are limited to those products in the general-purpose AC servo MEL SERVO series (pulse-train type) supporting absolute position detection systems.)
Page 71, Section
7.6.1
Page 89, Section
7.6.2
Page 97, Section
7.7.2
Page 98, Section
7.7.3
Page 100,
Section 7.7.4
Page 101,
Section 7.7.5
Page 102,
Section 7.8
Page 104,
Section 7.9
Page 110, Section
7.10.1
Page 114, Section
7.10.2
Page 115, Section
7.10.3
Page 120,
Section 7.10.4
Page 123,
Section 7.10.5
Page 124,
Section 7.10.6
Page 128,
Section 7.10.7
Page 130,
Section 7.10.8
Page 133,
Sec
tion 7.11
44
CHAPTER 7 POSITIONING FUNCTION
Programming tool
LCPU
Drive unit
Motor
Workpiece
External signal
Error detection
The drive unit ready signal and zero signal are output to LCPU.
Pulses are output to the drive unit by using a programming tool and external command signal.
Motor drive command with pulse commands from the CPU module
The actual work is performed by the commands from the drive unit.
Signals such as a limit signal and a positioning control switching signal are output.
Parameter setting Start instruction for the positioning control such as a JOG operation Positioning operation monitoring
(4) Mechanism of a positioning control system
Positioning control is implemented based on pulses output from the LCPU. In a positioning system, software and external devices are used to perform the roles shown below.
7.1 Overview
45
(5) Operation inside the drive unit
LCPU
Program
Operation such as data read and write
Positioning function
Programming tool
Forward run pulse train
Reverse run pulse train
Drive unit
Interface
Servo amplifier
Feedback pulse
Servomotor
Pulse generator
M
PLG
Deviation counter
D/A converter
After receiving a pulse input from the LCPU, the following operations occur in the drive unit.
(a) Starting
When pulses are output from the LCPU, the input pulses are retained in the deviation counter of the drive unit. The integration value of this pulse (droop pulse) is converted to an analog DC voltage by the D/A converter to give a speed command for the servomotor (M). The servomotor starts rotating by the speed command from the drive unit.
(b) During operation
As the servomotor rotates, the pulse generator (PLG) supplied with the servomotor generates feedback pulses in proportion to the speed. The generated feedback pulses are fed back to the drive unit and the deviation counter droop pulse are decremented accordingly. The servomotor continues to rotate with the deviation counter maintaining a certain amount of droop pulses.
(c) Stopping
When the command pulse output from the LCPU stops, the deviation counter droop pulse decrease and the speed drops. The servomotor stops once the droop pulses become 0.
The rotation speed of the servomotor is proportional to the command pulse frequency, while the rotation angle of the servomotor is proportional to the number of output command pulses. Therefore, the workpiece can be fed to a position proportional to the number of pulses in the pulse train by specifying the movement amount per pulse beforehand. Note that the pulse frequency defines the rotation speed of the servomotor (feed speed).
46
CHAPTER 7 POSITIONING FUNCTION
=
Total number of pulses required to move designated distance
Designated distance
Movement amount of machine (load) side when motor rotates once
Number of pulses required for motor to rotate once
*
1
(6) Principles of position control and speed control
(a) Position control
The total No. of pulses needed to move a specified distance can be obtained by the formula below.
*1 Encoder resolution
Give the calculated total No. of pulses to the drive unit from the LCPU, and the workpiece will be controlled to move the specified distance. Note that the movement amount of the machine when one pulse is output to the drive unit is called "movement amount per pulse." This value corresponds to the minimum movement of the workpiece and determines the accuracy of electrical positioning control.
(b) Speed control
The speed is controlled by the "pulse frequency" output to the drive unit from the LCPU.
Pulse frequency (pulse/s)
This trapezoid area is equal to the total number of pulses.
Moving time
The value of "movement amount per pulse" is determined by the machine.
The LCPU controls the position and speed based on the "total No. of pulses" and "pulse frequency," respectively.
t
7.1 Overview
47
(7) Pulses output from the LCPU
V
Pulse distribution
Servomotor speed
Stop setting time
Acceleration
t
Deceleration
Pulse train Sparse SparseDense
Pulse droop amount
• Pulse trains are sparse when the servomotor is accelerating, and become denser as the servomotor approaches the stable speed that has been set.
• At the stable speed, constant pulse trains are output.
• When the pulses output from the LCPU become sparse, the servomotor decelerates until pulses are no longer output. There is a slight delay from the LCPU command pulses to the time the servomotor decelerates and stops. This difference is necessary to ensure sufficient stopping accuracy and is referred to as the "stop setting time"
48
CHAPTER 7 POSITIONING FUNCTION
Internal thread
External thread
V
R
L
P0
P
Table
Workpiece
Worm gear
Servomotor
Pulse generator (PLG)
A
: Movement amount per pulse (mm/pulse) Vs : Command pulse frequency (pulse/s) n : Pulse generator resolution (pulse/rev)
L
: Worm gear lead (mm/rev) R
: Deceleration ratio V
: Movable section speed (mm/s) N
: Motor speed (r/min)
K
: Position loop gain (1/s)
: Deviation counter droop pulse amount P0 : OP (pulse) P
: Address (pulse)
A=
L
(mm/pulse)
R
n
Vs =
A
V
(pulse/s)
(8) Movement amount and speed of a worm gear system
This section describes methods of calculations required for positioning control by using worm gear system. The worm gear consists of a balls lined up in an engagement part, just like a ball bearing. The ball screw has no backlash and can rotate with a small force.
The calculations are performed based on the system described below.
(a) Movement amount per pulse
Calculated from the worm gear lead, deceleration ratio, and pulse generator resolution.
The movement amount is calculated by (Number of output pulses) x (Movement amount per pulse).
(b) Command pulse frequency
Calculated from the movable section speed and movement amount per pulse.
(c) Deviation counter droop pulse amount
Calculated from the command pulse frequency and position loop gain*1.
Vs
(pulse)
=
K
*1 Ratio of the command pulse frequency to the number of deviation counter droop pulses. A desired position loop gain can
be set adjusting the drive unit. To improve the stopping accuracy, increase the gain. Note, however, that an excessively high gain may cause overshooting (beyond the target position) and make the operation unstable. An excessively low gain increases the stopping error, although the movement becomes smoother at stopping.
7.1 Overview
49

7.1.1 Procedure for performing the positioning function

Start
Connect an external device.
Set parameters by a programming tool.
Create programs.
End
Execute the programs.
The following shows the procedure.
Connection to an external device (Page 51, Section 7.2)
Positioning parameters OPR parameters Positioning data
Dedicated Instructions Programming
(Page 57, Section 7.3.1) (Page 64, Section 7.6) (Page 91, Section 7.7)
(Page 137, Section 7.12) (Page 163, Section 7.13)
50
CHAPTER 7 POSITIONING FUNCTION
Axis 1 Axis 2
B20 A20
-
B19 A19
B18 A18
B17 A17
B16 A16
B15 A15
B14 A14
B13 A13
Differential
B12 A12
B11 A11
B10 A10
B09 A09
B08 A08
B07 A07
B06 A06
24VDC
*1
24VDC
*1
24VDC
*1
24VDC
5.6k 1/3W
1k
1/10W
5.6k 1/3W
1k
1/10W
5.6k 1/3W
1k
1/10W
5.6k 1/3W
1k
1/10W
5.6k 1/3W
1k
1/10W
External wiring
Pin number
Internal circuit Signal name
(Not used for the positioning function)
+24V
(PG0 -24V)
Zero signal (PG0 )
(PG0 -DIFF)
COM
(PG0 -COM)
Input common
External command signal (CHG )
Drive unit ready signal (READY )
Near-point watchdog signal (DOG )
Upper limit signal (FLS )
Lower limit signal (RLS )
3.6k
1/2W
680
1/10W
220
3.6k
1/2W
680
1/10W
220
3.6k
1/2W
680
1/10W
220
7.2 Connection to External Devices
7.2.1 I/O signals
The following shows the simplified diagrams of the internal circuits of LCPU external device connection interface. "" in the signal name indicates either 1 (Axis 1) or 2 (Axis 2). For I/O signal settings, refer to Page 56, Section 7.3.
(1) Input

7.2 Connection to External Devices

7.2.1 I/O signals

*1 High-speed inputs can be connected based on the 24V input mode or differential input mode.
51
(2) Output
Internal circuit
Axis 1 Axis 2
B05 A05
-
B04 A04
B03 A03
B02 A02
B01 A01
Signal name
(Not used for the positioning function)
Deviation counter clear signal (CLEAR )
CW/PULSE/A phase output (PULSE F )
CCW/SIGN/B phase output (PULSE R )
Output common
Insulating element
Insulating element
Insulating element
Insulating element
Pin number
Internal circuit
Axis 1 Axis 2
B05
A05
-
B04 A04
B03 A03
B02 A02
B01 A01
Signal name
(Not used for the positioning function)
Deviation counter clear signal (CLEAR )
CW/PULSE/A phase output (PULSE F )
CCW/SIGN/B phase output (PULSE R )
Output common
Pin number
Insulating element
Insulating element
Insulating element
Insulating element
(a) L02SCPU, L02CPU, L06CPU, L26CPU, L26CPU-BT
(b) L02SCPU-P, L02CPU-P, L06CPU-P, L26CPU-P, L26CPU-PBT
52
(3) Details of I/O signals
The following table lists and describes the I/O signals of the connector for LCPU external devices.
Category Signal name Description
• The zero signal from the pulse generator is used to input the OP signal for performing the machine OPR.
• This signal is also used to indicate the completion of the machine OPR that uses a stopper method for the machine OPR method.
• This signal is detected at the leading edge.
Common line for the external command signals, drive unit ready signal, near-point dog signal, upper limit signal and lower limit signal
Used to input control switching signals in speed/position switching control.
• This signal turns on when the drive unit is normal and able to accept pulses.
• The LCPU checks this signal and if the drive unit is not ready, it turns on the Axis 1 OPR request (SM1842).
• This signal turns off if the drive unit is inoperable, like when the control power supply of the drive unit failed.
• If this signal is turned off during positioning, the system stops. The system does not start even if this signal is turned on again.
• When this signal turns off, the Axis 1 OPR completion (SM1843) also turns off.
• If this signal is not selected for the input signal function selection, the signal is regarded as being on.
• This signal is used to detect the near-point dog during machine OPR. The near-point dog signal is detected at the leading edge.
• The signal is input from the limit switch installed at the upper limit position of the stroke.
• When this signal turns off, positioning stops.
• This signal defines the upper limit which is used to find the near-point dog when the OPR retry function is enabled.
• If this signal is not selected for the input signal function selection, the signal is regarded as being on.
• The signal is input from the limit switch installed at the lower limit position of the stroke.
• When this signal turns off, positioning stops.
• This signal defines the lower limit which is used to find the near-point dog when the OPR retry function is enabled.
• If this signal is not selected for the input signal function selection, the signal is regarded as being on.
This signal is output during machine OPR. (Count 2 is excluded.) For the drive unit, use a model capable of resetting the internal deviation counter droop pulse amount when the LCPU turns this signal on.
These signals are output as positioning pulses with pulse code to the drive unit.
Common line for the deviation counter clear signal, CW/PULSE/phase A outputs and CCW/SIGN/phase B outputs.
Input
Output
Zero signal
(PG0)
Input common
External command signal
(CHG)
Drive unit ready signal
(READY)
Near-point dog signal
(DOG)
Upper limit signal
(FLS)
Lower limit signal
(RLS)
Deviation counter clear signal
(CLEAR)
CW/PULSE/A phase output
(PULSE F)
CCW/SIGN/B phase output
(PULSE R)
Output common
CHAPTER 7 POSITIONING FUNCTION
7.2 Connection to External Devices
7.2.1 I/O signals
53
(4) On/off status of input signals
(Photocoupler OFF)
INn
IN - COM
24VDC
(n = 6 to F)
(Photocoupler ON)
INn
IN - COM
24VDC
(n = 6 to F)
(a) On/off status of input signals
On/off status of input signals is determined according to external wiring.
Signal name External wiring Signal on/off status as viewed from LCPU
High-speed input
IN0 to IN5
Standard input
IN6 to INF
(Photocoupler OFF)
(Photocoupler ON)
24VDC
24VDC
INn - 24V
INn - COM
(n = 0 to 5)
INn - 24V
INn - COM
(n = 0 to 5)
OFF
ON
OFF
54
ON
In the context of the LCPU's positioning function, the status shown above are defined as representing the "negative logic".
(b) Internal circuit
With the LCPU, the "input signal OFF" status is defined as the off status of the corresponding internal circuit (photocoupler).
• Voltage not applied: Photocoupler OFF
• Voltage applied: Photocoupler ON
CHAPTER 7 POSITIONING FUNCTION
7.2.2 Wiring
For connectors used for external wiring, refer to MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection). For examples of connection with servo amplifiers, refer to Page 271, Appendix 2.

7.2.2 Wiring

7.2 Connection to External Devices
55

7.3 Parameter Setting

Select the "Use positioning function (Axis #1)" checkbox.
According to the settings, external signals are assigned.
Select an option from the pull-down menu as necessary.
Set parameters for each axis.
1. Click the button in the "Built-in I/O Function Setting" tab.
Project window[Parameter][PLC Parameter]"Built-in I/O Function Setting" tab
2. Select the "Use positioning function (Axis #1)" checkbox on the top left on the "Positioning Axis
#1 Detailed Setting" window.
3. Configure required settings.
4. Click the button to exit.
Item Description Reference
Positioning Parameter
OPR Parameter These parameters define data used in OPR control. Page 64, Section 7.6
Positioning Data A group of data required in a single positioning operation. Page 91, Section 7.7
When the setting is complete, the necessary external signals are assigned automatically. The drive unit ready signal and limit signals should be set as necessary. Set the input response time for input signals. The Error time output mode is fixed to "Clear.
These parameters define data that must be set upon system start-up according to the drive unit, motor and system configuration used.
Page 57, Section 7.3.1
56
CHAPTER 7 POSITIONING FUNCTION
Forward run
CW
CCW
Reverse run
OFF
OFF
ON
ON
7.3.1 Positioning parameters
Positioning parameters are common to all controls. Set these parameters for each axis.
Setting item Setting range Default
CW/CCW Mode
Pulse Output Mode
Rotation Direction Setting
S/W Stroke Upper Limit (pulse)
S/W Stroke Lower Limit (pulse) -2147483648
Speed Limit Value (pulse/s) 1 to 200000 10000
Bias Speed at Start (pulse/s) 0 to 200000 0
Acceleration/Deceleration System Selection
A Phase/B Phase Mode (Multiple of 1)
A Phase/B Phase Mode (Multiple of 4)
Current Value Increment with Forward Run
Current Value Increment with Reverse Run
Executable controls and corresponding positioning parameters are shown below.
Positioning parameter OPR control
Pulse Output Mode    
Rotation Direction Setting    
S/W Stroke Upper Limit (pulse)   
S/W Stroke Lower Limit (pulse)   
Speed Limit Value (pulse/s)    
Bias Speed at Start (pulse/s)    
Acceleration/Deceleration System Selection    
PULSE/SIGN Mode
Pulse Output
Pulse Output
-2147483648 to 2147483647
Trapezoid Acceleration/Deceleration
S-curve Acceleration/Deceleration
: Must be set, : Set as necessary, : Need not be set
Positioning control
Position
control
Speed
control
Speed/position
switching control
CW/CCW Mode
Current Value Increment with Forward
Run Pulse Output
2147483647
Trapezoid Acceleration/Deceleration
Current
value change
JOG
operation
7.3 Parameter Setting

7.3.1 Positioning parameters

(1) Pulse output mode
Set the pulse output mode applicable to the drive unit used.
(a) CW/CCW mode
Forward run feed pulses (CW) are output when the motor is rotating forward. Reverse run feed pulses (CCW) are output when the motor is rotating in reverse.
57
(b) PULSE/SIGN mode
Ex.
Ex.
Forward run
Move in + direction
Reverse run
Move in - direction
PULSE
SIGN
OFF
OFF
ON
ON
Forward run
Reverse run
Command 1 pulse output Command 1 pulse output
Phase A
(A )
Phase B
(B )
Phase B runs slower than phase A by 90 .
Phase A runs slower than phase B by 90 .
OFF
OFF
ON
ON
OFF
OFF
ON
ON
Forward/reverse control is based on on/off of the direction sign (SIGN).
• The direction sign turns on when the motor is rotating forward.
• The direction sign turns off when the motor is rotating in reverse.
For CCW, pulses are output 100s after the direction sign turns off.
1 pulse
PULSE
OFF
ON
SIGN
OFF
100 s
ON
(c) A phase/B phase mode (multiple of 1), A phase/B phase mode (multiple of 4)
Forward/reverse control is based on the difference between phase A (A) and phase B (B).
• Phase B lags phase A by 90° when the motor is rotating forward.
• Phase A lags phase B by 90° when the motor is rotating in reverse.
• When "A Phase/B Phase Mode (Multiple of 1)" is set
Forward run
Command 1 pulse output Command 1 pulse output
Phase A
(A )
Phase B
(B )
OFF
ON
OFF
ON
OFF
ON
OFF
ON
Phase B runs slower than phase A by 90 .
When one command pulse output corresponds to 1 pulse/s, there are four leading/trailing edges per second.
• When "A Phase/B Phase Mode (Multiple of 4)" is set
Reverse run
Phase A runs slower than phase B by 90 .
58
When one command pulse output corresponds to 1 pulse/s, there is one leading/trailing edge per second.
CHAPTER 7 POSITIONING FUNCTION
Remark
1
3
2
OP
M
Motor
Forward run pulse
LCPU
W
Workpiece
Address increment direction
Address decrement direction
Workpiece moveable range
Software stroke limit lower limit
Software stroke limit upper limit
Limit switch for emergency stop
Limit switch for emergency stop
OP
(2) Rotation direction setting
Set how the current position would increase/decrease in each rotation direction of the motor. Check the settings by JOG operation. ( Page 104, Section 7.9)
1. Set "Current Value Increment with Forward Run Pulse Output" for the rotation direction setting
and perform forward JOG operation.
2. If the workpiece moves in the address decreasing direction defined by the system, set "Current
Value Increment with Reverse Run Pulse Output" for the rotation direction setting to change the rotation direction. (If the workpiece moves in the address increasing direction defined by the system, the current setting need not be changed.)
3. Perform forward JOG operation again and if the workpiece (W) moves in the address increasing
direction, the setting is complete.
If Rotation Direction Setting was changed from "Current Value Increment with Forward Run Pulse Output" to "Current Value Increment with Reverse Run Pulse Output," perform JOG operation to check if the upper limit switch and lower limit switch operate correctly. If any operation problem was found, review the wirings.
(3) S/W stroke upper limit, S/W stroke lower limit
Set the upper/lower limits of the moving range of the workpiece.
• Set the software stroke limits according to the condition specified below: Software stroke lower limit < Software stroke upper limit
• To disable the software stroke limits, set the same value for both the upper limit and lower limit. (Desired values can be set as long as they are within the setting range.)
7.3 Parameter Setting
7.3.1 Positioning parameters
In general, the OP is set at the lower limit or upper limit of the software stroke.
59
(4) Speed limit value
t
V
The acceleration and deceleration follow a straight line.
Set the maximum speed for OPR control, positioning control and JOG operation. If any of the following settings exceeds the speed limit, the speed is limited to the specified limit.
•OPR speed
• Command speed
• JOG speed
• New speed value
• Bias speed at start
The speed limit is determined by the two conditions below:
• Motor speed
• Moving speed of the workpiece
(5) Bias speed at start
Set the minimum speed for OPR control, positioning control, and JOG operation. When a stepping motor is used, set this speed to ensure smooth starting of the motor. (Stepping motors do not start smoothly if the motor speed at start is low. For the bias speed at start, set a value not exceeding the speed limit.
(6) Acceleration/deceleration system selection
Set "Trapezoid Acceleration/Deceleration" or "S-curve Acceleration/Deceleration" for acceleration/deceleration processing. If S-curve Acceleration/Deceleration is set when a stepping motor is used, the motor does not operate normally.
Trapezoid Acceleration/Deceleration S-curve Acceleration/Deceleration
V
The acceleration and deceleration follow a Sine curve.
t
60
7.4 Specifications
(1) Performance specifications
The following is the performance specifications of the positioning function.
Item
Number of controlled axes 2
Control unit pulse
Operation pattern
Number of positioning data 10 data/axis
Positioning
control
Command
pulse output
External input
External output
Positioning control
method
Positioning range
Acceleration/deceleration system selection
Acceleration/deceleration time 0 to 32767 ms
OPR method 6 types
Starting time (1-axis linear control)
Maximum output pulse 200k pulses/s
Maximum connection distance with drive unit 2 m
Zero signal
Speed/position switching signal
Near-point dog signal
Upper and lower limit signal
Drive unit ready signal
Minimum input response time
Deviation counter clear signal
Response time
Speed/position switching
Speed/position switching
Speed command 0 to 200k pulses/s
Pulse output type
Pulse output mode 4 modes
Differential input
CHAPTER 7 POSITIONING FUNCTION
Description
L02SCPU, L02CPU, L06CPU,
L26CPU, L26CPU-BT
*1
PTP
control
Path control Not usable
*1
control
PTP
control
*1
control
PTP
control
Automatic trapezoid acceleration/deceleration and S-curve
Trapezoid acceleration/deceleration (single-axis start): 30 s/axis
S-curve acceleration/deceleration (single-axis start): 35 s/axis
DC input 24VDC, 6.0mA (TYP.)
(AM26LS31 (by Texas Instruments Japan Limited.) or equivalent)
Speed/position switching signal, near-point dog signal: 100s
Upper and lower limit signal, drive unit ready signal: 2ms
(5 to 24VDC, 0.1A)
On 1s or less (rated load, resistive load)
Off 1s or less (rated load, resistive load)
-2147483648 to 2147483647 pulses
0 to 2147483647 pulses
acceleration/deceleration
Sink type
(5 to 24VDC)
EIA RS-422-A differential line driver level
24VDC, 4.1mA (TYP.)
Sink type
L02SCPU-P, L02CPU-P, L06CPU-P,
L26CPU-P, L26CPU-PBT
Available
ABS/INC
INC
Zero signal: 10s

7.4 Specifications

Source type
(5 to 24VDC)
*2
Source type
(5 to 24VDC, 0.1A)
*1 Abbreviation for "Point to Point". This is a type of position control. *2 The response time at turning on off of input devices takes 200s even if the input response time is set to “0.1ms”
61
(2) Special relay and special register
The following table lists the special relay (SM) and special register (SD) related to the positioning function. in the name indicates either 1 (Axis 1) or 2 (Axis 2). For details of the special relay and special register other than the Axis 1 axis operation status (SD1844) ( Page 63, Section 7.5), refer to MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection).
Special relay number
Axis 1 Axis 2 Axis 1 Axis 2
SM1840 SM1860 Axis busy SD1840 SD1860
SM1841 SM1861
SM1842 SM1862 Axis OPR request SD1842 SD1862
SM1843 SM1863 Axis OPR completed SD1843 SD1863
SM1844 SM1864 Axis speed 0 SD1844 SD1864 Axis axis operation status
SM1845 SM1865 Axis error SD1845 SD1865 Axis error code
SM1846 SM1866 Axis warning SD1846 SD1866 Axis warning code
SM1847 SM1867 Axis start during operation SD1847 SD1867 Axis external I/O signals
SM1848 SM1868 Axis start instruction SD1848 SD1868
SM1850 SM1870 Axis error reset SD1849 SD1869
SM1851 SM1871 Axis OPR request off
SM1852 SM1872
Name
Axis positioning
completion
Axis speed/position
switching
Special register number
SD1841 SD1861
SD1850 SD1870
Name
Axis current feed value
Axis current speed
Axis movement amount after
near-point dog ON
Axis data No. of positioning
being executed
62
CHAPTER 7 POSITIONING FUNCTION
7.5 Checking Current Position and Operation Status
The current position and operation status of the moving workpiece can be monitored in the special register.
(1) Checking a current position
Values indicating the current position are stored in the Axis 1 current feed value (SD1840, SD1841). The address established by machine OPR is used as the reference.
(2) Checking an operation status
The Axis 1 axis operation status (SD1844) indicates the operation status of the axis.
Stored
value
0 Standby
1 Stopped
2 In JOG operation JOG operation is in progress.
3 In OPR Machine OPR is in progress.
4 In position control Position control is in progress.
5 In speed-position control (speed) Speed control of speed/position switching control is in progress.
6
7 Decelerating (axis stop ON) The axis is decelerating according to the Axis stop instruction (IPSTOP1).
8 Decelerating (JOG start OFF)
9 In high-speed OPR Fast OPR is in progress.
10 In speed control Speed control is in progress.
11 Analyzing Absolute position restoration is in progress.
-1 Error occurring An error is present.
Operating status Description
This is the status after the following operations:
• (Successful) completion of operation
• Power-on
• When the CPU module is reset
• Error reset
• After JOG operation
• End of absolute position restoration
The axis has stopped successfully according to the Axis stop instruction (IPSTOP1).
In speed-position control
(position)
Position control of speed/position switching control is in progress.
The axis is decelerating after the execution command for JOG start instruction (IPJOG1) turned off.

7.5 Checking Current Position and Operation Status

63

7.6 OPR Control

Two controls (machine OPR and fast OPR) are defined as OPR controls in line with the flow of OPR operation of the LCPU.
OPR control Description Reference
This is control to establish the reference position (= OP) to be used when positioning control is started. This control is executed when requested by the LCPU at power-on. The OP is
Machine OPR
Fast OPR
To implement OPR control, the OPR parameters must be set on the "Positioning Function Parameter Setting" window. The OPR parameters that have been set apply commonly to each axis. Setting details are explained below.
OPR Acceleration/Deceleration Time (ms)
OPR Deceleration Stop Time (ms)
Setting of Movement Amount after Near-point Dog
established by using a near-point dog or zero signal. Set machine OPR for the original position return type of the OPR start instruction (IPOPR1(P)) and execute the instruction to start the operation.
Fast OPR is used to return the axis, which has stopped at a position other than the OP after positioning control, to the OP. After the machine OPR establishes the OP, the workpiece is moved to the OP address or standby address by the fast OPR without using a near-point dog or zero signal. Set fast OPR (OP address) or fast OPR (standby address) for the original position return type of the OPR start instruction (IPOPR1(P)) and execute the instruction to start the operation.
Setting item Setting range Default
Near-point Dog Method
Stopper 1
Stopper 2
OPR Method
OPR Direction
OP Address (pulse) -2147483648 to 2147483647 0
OPR Speed (pulse/s)
Creep Speed (pulse/s)
ON (pulse)
OPR Dwell Time (ms) 0 to 65535
Stopper 3
Count 1
Count 2
No Method
Forward RUN
Reverse RUN
1 to 200000 1
0 to 32767 1000
0 to 2147483647
Near-point Dog Method
Forward RUN
Page 71, Section 7.6.1
Page 89, Section 7.6.2
0
Note that the explanations in this section assume use of Axis 1. For the special relay, special register, dedicated instructions, and error codes for Axis 2, refer to the following.
• Special relay and special register: Page 62, Section 7.4 (2)
• Dedicated instructions: Page 137, Section 7.12
• Error codes: Page 173, Section 7.14 (1)
64
CHAPTER 7 POSITIONING FUNCTION
First zero after the near-point watchdog signal OFF
t
Creep speed
V
Zero signal
Near-point watchdog signal
ON
OFF
1)
2)
3)
4)
Bias speed at start
OPR speed
t
OPR speed
Creep speed
V
Near-point watchdog signal
ON
OFF
Stopped by stopper
Zero signal
1)
2)
3)
4)
5)
Bias speed at start
(1) OPR method
Set the method of machine OPR. (This setting does not affect the fast OPR.) Operations under each method are explained below. For details of each method and applicable precautions, refer to ( Page 71, Section 7.6.1).
Near-point dog method
1) Start of machine OPR.
2) The axis starts to decelerate upon detection of turning on of the near-point dog.
3) The axis decelerates to the creep speed and moves at the creep speed thereafter.
4) Pulse output from the LCPU stops when the first zero signal is issued after the near-point dog has turned off, and machine OPR is complete.
1)
Near-point watchdog signal
V
Bias speed at start
OPR speed
OFF
2)
3)
ON
Dwell time counting
Creep speed
4)
5) t
Range where motor rotation is forcibly stopped by stopper
Dwell time out
Stopper 1
1) Start of machine OPR.
2) The axis starts to decelerate upon detection of turning on of the near-point dog.
3) The axis decelerates to the creep speed and moves at the creep speed thereafter.
4) The axis contacts the stopper at the creep speed and stops.
5) Upon elapse of the OPR dwell time after the near-point dog has turned on, pulse output from the LCPU stops and machine OPR is complete.
Stopper 2
1) Start of machine OPR.
2) The axis starts to decelerate upon detection of turning on of the near-point dog.
3) The axis decelerates to the creep speed and moves at the creep speed thereafter.
4) The axis contacts the stopper at the creep speed and stops.
5) When the zero signal is detected, pulse output from the LCPU stops and machine OPR is complete.
7.6 OPR Control
65
Stopper 3
t
V
Creep speed
Zero signal
Stopped by stopper
1)
2)
3)
Bias speed at start
First zero after movement amount has been traveled after near-point watchdog signal OFF
t
V
Zero signal
Near-point watchdog signal
ON
OFF
Setting for the movement amount after near-point watchdog signal ON
The near-point watchdog signal should be turned off with enough distance provided from OP position.
4)
3)
2)
1)
Bias speed at start
OPR speed
Movement amount after near­point watchdog signal ON
Creep speed
t
V
Movement amount after near-point watchdog signal ON
Setting for the movement amount after near-point watchdog signal ON
Near-point watchdog signal
ON
OFF
1)
2)
3)
4)
Creep speed
Bias speed at start
OPR speed
1) Start of machine OPR.
2) The axis contacts the stopper at the creep speed and stops.
3) When the zero signal is detected, pulse output from the LCPU stops and machine OPR is complete.
Count 1
1) Start of machine OPR.
2) The axis starts to decelerate upon detection of turning on of the near-point dog.
3) The axis decelerates to the creep speed and moves at the creep speed thereafter.
4) Pulse output from the LCPU stops at the first zero signal after the near-point dog has turned on and the axis has moved the distance set by "Movement amount after near-point dog ON", and the machine OPR is complete.
Count 2
1) Start of machine OPR.
2) The axis starts to decelerate upon detection of turning on of the near-point dog.
3) The axis decelerates to the creep speed and moves at the creep speed thereafter.
4) Pulse output from the LCPU stops after the axis has moved the distance set by "Movement amount after near-point dog ON" (the axis starts to decelerate from the creep speed over the OPR deceleration stop time), and the machine OPR is complete.
66
CHAPTER 7 POSITIONING FUNCTION
Lower limit
Address increment direction
Address decrement direction
Upper limit
When the OP is set at the lower limit side, the OPR direction is in the direction of arrow 1). Set "Reverse run direction".
When the OP is set at the upper limit side, the OPR direction is in direction of arrow 2). Set "Forward run direction".
OP
1)
Lower limit
Address increment direction
Address decrement direction
Upper limit
2)
OP
(a) OPR methods and OPR parameters
Different OPR parameters are required depending on each OPR method. The relationships are shown below. For the settings required for the fast OPR, refer to Page 89, Section 7.6.2.
: Must be set, : Need not be set
OPR method
OPR parameter
OPR Direction 
OP Address 
OPR Speed 
Creep Speed 
OPR Acceleration/Deceleration
Time
OPR Deceleration Stop Time 
Setting of Movement Amount
after Near-point Dog ON
OPR Dwell Time
Near-point
Dog Method


*1
Stopper 1 Stopper 2 Stopper 3 Count 1 Count 2

*1
*1
*1 This setting becomes effective when OPR is retried.
(2) OPR direction
Set the direction in which to start machine OPR. (This setting does not affect the fast OPR.) Forward RUN: The axis operates in the direction of increasing address (arrow 2)). Reverse RUN: The axis operates in the direction of decreasing address (arrow 1)).
Normally the OP is set near the lower limit switch or upper limit switch. Accordingly, set the OPR direction as shown below.
7.6 OPR Control
(3) OP address
Set the position that becomes the reference point of position control (ABS). Upon completion of machine OPR, the address of the stop position (Axis 1 current feed value (SD1840, SD1841) changes to the OP address that has been set.
67
(4) OPR speed
Near-point watchdog signal
Zero signal
OFF
ON
V
Machine OPR start
Creep speed
OPR speed
t
Bias speed at start
t
V
OPR speed
Bias speed at start
OPR ACC/DEC time
Creep speed
t
V
Bias speed at start
OPR ACC/DEC time
Creep speed
Set the speed of OPR control. The following condition must be met:
Bias speed at start Creep speed OPR speed Speed limit
(5) Creep Speed
Set the low speed at which the axis moves immediately before stopping after decelerating from the OPR speed following the turning on of the near-point dog. The following condition must be met: (This setting does not affect the fast OPR.)
Bias speed at start Creep speed OPR speed Speed limit
68
The creep speed affects the detection error in an OPR method using a zero signal, or degree of impact of collision in the OPR Method using a stopper method.
(6) OPR acceleration/deceleration time
Set the time required to reach the OPR speed from the bias speed at start, or creep speed from the OPR speed.
When the OPR Method is set to other than "Stopper 3": When the OPR Method is set to "Stopper 3":
CHAPTER 7 POSITIONING FUNCTION
Ex.
t
V
OPR speed
Bias speed at start
Creep speed
OPR DEC/STOP time
t
V
OPR speed
Bias speed at start
Creep speed
OPR DEC/STOP time
Axis stop factor occurrence
[Machine OPR control operation]
[Deceleration distance] =
= 2000
1 2
=
Vz (t+t')
2000
=
Vz
t+t' 1000
2000
10 10
3
(320+80)
80ms: t'
Creep speed: Vc=2 kpulses/s
OPR speed: Vz=10 kpulses/s
OFF
ON
Near-point watchdog signal
OPR ACC/DEC time: t=320ms
Set 2000 pulses or more in "Setting of Movement Amount after near-point Dog ON".
(7) OPR deceleration stop time
Set the time required for the following conditions.
• For "Count 2", this time is from when the axis decelerates the speed from the creep speed to when it stops at the bias speed at start.
• For all OPR method, this time is from when a stop cause occurs during OPR control to when the axis stops at the bias speed at start from the OPR speed.
• For the fast OPR, this time is from when the axis decelerates the speed from the OPR speed to when it stops at the bias speed at start. ( Page 89, Section 7.6.2)
When the OPR Method is set to "Count 2":
When a stop cause occurs during OPR control:
(This applies commonly to all OPR methods.)
(8) Setting of movement amount after near-point dog ON
• Set the movement amount from the position at which the near-point dog turns on until a zero signal is input when the OPR Method is set to "Count 1.
• Set the movement amount from the position at which the near-point dog turns on to the OP when the OPR Method is set to "Count 2.
For "Setting of Movement Amount after Near-point Dog ON", set a value equal to or greater than the deceleration distance from the OPR speed to creep speed. (This setting does not affect the fast OPR.)
Calculation of "Movement Amount after Near-point Dog ON" when "OPR Speed" is set to 10 kpulses/s, "Creep Speed" to 2 kpulses/s, and "OPR Acceleration/Deceleration Time" to 320ms
7.6 OPR Control
69
(9) OPR dwell time
Set this parameter in the conditions below. (This setting does not affect the fast OPR.)
(a) When the OPR Method is set to "Stopper 1":
Set the time required for machine OPR to complete after the near-point dog turns on. For the OPR dwell time, set a value equal to or greater than the moving time after the near-point dog turns on until the axis stops at the stopper.
(b) When the OPR retry function is enabled:
Set the stopping time after the axis decelerates to a stop. ( Page 110, Section 7.10.1)
70
CHAPTER 7 POSITIONING FUNCTION
7.6.1 Machine OPR
The machine OPR establishes the machine OP using the OPR start instruction (IPOPR1(P)). ( Page 146, Section
7.12.1 (4)) Once the machine OPR is complete, the mechanically established position becomes the "OP" which defines the starting point of positioning control. (No address information stored in the LCPU or servo amplifier is used.) How the OP is established by machine OPR varies depending on the "OPR method". Select one of the six methods that best suits your system.
(1) OPR method and I/O signal
Different I/O signals are used under each OPR method. A correspondence table of OPR methods and I/O signals is shown below.
: Wiring required, : Wire as necessary, : Wiring not required
OPR method
I/O signal
Zero signal
Near-point dog signal 
Deviation counter clear signal   
External command signal
CW/PULSE/A phase output   
CCW/SIGN/B phase output   
Drive unit ready signal
Upper limit signal
Lower limit signal
*1
*1*2
*1*2
*1
Near-point
dog method
   
  
  
  
Stopper 1 Stopper 2 Stopper 3 Count 1 Count 2 No method
*1
 
*1

*1
*1
*1
*1
*1
*1
*1
7.6 OPR Control

7.6.1 Machine OPR

*1 When this signal is not required, it can be used for other functions such as the general-purpose input and general-
purpose output.
*2 These signals are required when the OPR retry function or hardware stroke limit function is used.
(2) Sub function
The OPR retry function can be used when the upper and lower limit signals are input. ( Page 110, Section 7.10.1)
71
Important
OPR direction
(1) The direction of the OP must always be the same when viewed from any arbitrary position in the moving area of the workpiece (= the OP must be
positioned near the upper limit or lower limit of the machine).
(2) Set the OPR direction correctly so that the workpiece moves toward the OP.
If the above two conditions are not met, the OPR retry function may actuate inadvertently. The following situations may also result:
• The near-point dog is already off at the start of machine OPR.
• Machine OPR starts in the opposite direction of near-point dog.
In this case, no near-point dog is detected after machine OPR is started. As a result, the axis may continue to operate at the OPR speed until reaching the limit switch and damage the machine system. If this is the possibility, use the OPR retry function (Page 110, Section 7.10.1) or perform JOG operation (Page 104, Section 7.9) to move the workpiece until just before the near-point dog as viewed from the OPR direction.
Deceleration stop time
If any of the following stop causes occurs during OPR operation, the axis decelerates to a stop over the "OPR deceleration stop time," not "OPR acceleration/deceleration time":
• The program is stopped.
• The drive unit ready signal is turned off.
• A hardware stroke limit is reached. (If the OPR retry function is enabled, the axis decelerates to a stop and then starts moving in the opposite direction.)
• The Axis stop instruction (IPSTOP1) is executed.
When decelerating from the OPR speed, for example, the data to be used as the deceleration time varies between "deceleration due to near-point dog ON" and "deceleration by Axis stop instruction (IPSTOP1) execution command ON." Since the motor load changes according to the deceleration time, set this time properly by giving full consideration to the impact on the machine.
72
(3) Operations of near-point dog method and precautions
ON
OFF
One motor rotation
OFF
OFF
ON
ON
OFF
ON
0
Unfixed
Unfixed
(Updated according to the movement)
OP address
(Updated according to the movement)
Near-point watchdog
Zero signal
Movement amount after near-point watchdog ON *1
Output time 10ms
1)
2)
3)
3)
4)
OPR start instruction
execution command
Axis 1 OPR request
(SM1842)
Axis 1 OPR complete
(SM1843)
Axis 1 operation status
(SD1844)
Axis 1 current feed value
(SD1840, SD1841)
Axis 1 movement amount after
near-point watchdog ON
(SD1848, SD1849)
*1 value
t
V
Standby (0)
Returning to OP (3)
Standby (0)
Deviation counter clear signal
Set the near-point watchdog OFF position as close to the center of zero signal length as possible. If the near-point watchdog turns off in the zero signal state, the OPR stop position may change by one servomotor rotation.
Under the near-point dog method, machine OPR completes when a zero signal is input after the near-point dog has turned off. The following operations take place.
Operation step Description of operation
Machine OPR starts upon execution of the OPR start instruction (IPOPR1(P)). The axis accelerates from the bias speed
1)
2)
3)
4)
at start to the OPR speed in the OPR direction over the OPR acceleration/deceleration time and moves at the OPR speed.
The axis starts to decelerate upon detection of turning on of the near-point dog. The axis decelerates to the creep speed and moves at the creep speed thereafter.
When the first zero signal (signal for outputting one pulse per motor rotation) is issued after the near-point dog has turned off, the LCPU stops outputting pulses and outputs a deviation counter clear signal to the drive unit.
Upon completion of output of the deviation counter clear signal (output for 10 ms), the Axis 1 OPR completion (SM1843) turns on and Axis 1 OPR request (SM1842) turns off.
CHAPTER 7 POSITIONING FUNCTION
7.6 OPR Control
7.6.1 Machine OPR
73
(a) Required pulse generator
Use a pulse generator with zero signal. If a pulse generator without zero signal is used, generate a zero signal using an external signal.
(b) Near-point dog length
The near-point dog length should be equal to or longer than the distance moved by the axis as it decelerates from the OPR speed to creep speed. If the length is short, the near-point dog turns off while the axis is still decelerating from the OPR speed to creep speed. When the zero signal turns on in this condition, the axis stops immediately to complete machine OPR. As a result, the OP position deviates and the motor load also increases because the axis stops suddenly at the creep speed or higher.
V
When the near-point watchdog length is increased sufficiently
t
Near-point watchdog
Zero signal
For the method to calculate the distance from the near-point dog ON position to OP, refer to Page 69, Section 7.6 (8).
ON
OFF
74
CHAPTER 7 POSITIONING FUNCTION
(c) Advantages of using limit switches
The following functions can be used when the upper and lower limit signals are selected:
• OPR retry function When machine OPR is started in a position indicated as interval A (where the near-point dog is turned off
and no near-point dog is found in the OPR direction) in the figure below, the axis continues to operate at the OPR speed until reaching the limit switch of the machine system because it cannot detect the near­point dog. When the limit signal in the OPR direction turns off, the OPR retry function actuates. As a result, the axis decelerates to a stop and then move in the opposite direction to complete machine OPR successfully. ( Page 110, Section 7.10.1) This eliminates the need to perform JOG operation to return to the position before the near-point dog turns on.
• Hardware stroke limit function When the limit signal in the direction opposite the OPR direction turns off, the axis decelerates to a stop
due to the hardware stroke limit function. (Page 123, Section 7.10.5) This prevents damage to the machine system.
When started from here
Near-point watchdog
Zero signal
Retry operation
ON OFF
Moving in the opposite direction
Interval A
When started from here
Limit switch
OFF
7.6 OPR Control
7.6.1 Machine OPR
75
(d) Machine OPR from a position where the near-point dog is turned on
When machine OPR is started at a position indicated as interval B (where the near-point dog is turned on) in the figure below, the OPR retry function does not operate. The axis moves at the creep speed to complete machine OPR.
V
Creep speed
t
Interval B
Near-point watchdog
ON
Zero signal
OFF
76
(4) Operations of stopper 1 and precautions
ON
OFF
OFF
OFF
ON
OFF
ON
ON
0
Standby (0)Standby (0)
Unfixed
Unfixed
OP address
Near-point watchdog
Returning to OP (3)
Output time 10ms
Dwell time counting start
Dwell time elapsed
Stopper
1)
2)
V
t
3)
OPR start instruction
execution command
Axis 1 movement amount after
near-point watchdog ON
(SD1848, SD1849)
Axis 1 OPR request
(SM1842)
Axis 1 OPR complete
(SM1843)
Axis 1 operation status
(SD1844)
Axis 1 current feed value
(SD1840, SD1841)
(Updated according to the movement)
(Updated according to the movement)
4)
5)
Deviation counter clear signal
Movement amount after near-point watchdog ON *
1
*1 value
Under this method, machine OPR completes upon elapse of the OPR dwell time after the detection of near-point dog ON. The following operations take place.
Operation step Description of operation
Machine OPR starts upon execution of the OPR start instruction (IPOPR1(P)). The axis accelerates from the bias speed
1)
2)
3) The axis contacts the stopper at the creep speed and stops.
4)
5)
at start to the OPR speed in the OPR direction over the "OPR acceleration/deceleration time" and moves at the OPR speed.
The axis starts to decelerate upon detection of turning on of the near-point dog. The axis decelerates to the creep speed and moves at the creep speed thereafter.
Upon elapse of the OPR dwell time after the near-point dog has turned on, the LCPU stops outputting pulses and outputs a deviation counter clear signal to the drive unit.
Upon completion of output of the deviation counter clear signal (output for 10 ms), the Axis 1 OPR completion (SM1843) turns on and Axis 1 OPR request (SM1842) turns off.
CHAPTER 7 POSITIONING FUNCTION
7.6 OPR Control
7.6.1 Machine OPR
(a) Motor torque limit
Be sure to limit the motor torque after the creep speed is reached. If the torque is not limited, the motor may be damaged when the stopper is contacted. For limitation of torque, refer to the manual for the drive unit.
77
(b) Setting of OPR dwell time
Suddenly stopped during deceleration to the creep speed
ON
OFF
Near-point watchdog
OPR dwell time
t
V
Stopper
t
V
Interval A
Creep speed
ON
OFF
Near-point watchdog
Stopper
For "OPR dwell time," set a value equal to or greater than the moving time from the near-point dog ON position until the stopper is contacted. If the OPR dwell time is short, machine OPR completes before the stopper is contacted and the OP position deviates. If the OPR dwell time is shorter than the OPR acceleration/deceleration time, the motor stops suddenly at the higher speed than the creep speed. As a result, load for motor is increased.
(c) Near-point dog and starting position
• When machine OPR is started in a position indicated as interval A (where the near-point dog is turned on) in the figure below, the axis moves at the creep speed to complete machine OPR.
78
• When starting position is in interval B (between the near-point dog OFF position and stopper) in the figure below, no near-point dog is detected and thus the axis may collide with the stopper at the OPR speed. Make sure the near-point dog is longer than the distance to the stopper.
Near-point watchdog
ON
(d) OPR retry function
The OPR retry function cannot be used.
V
Collision at OPR speed
Stopper
t
Interval B
OFF
(5) Operations of stopper 2 and precautions
ON
OFF
Near-point watchdog
Zero signal
Output time 10ms
Stopper
OPR start instruction
execution command
Axis 1 movement amount after
near-point watchdog ON
(SD1848, SD1849)
Axis 1 OPR request
(SM1842)
Axis 1 OPR complete
(SM1843)
Axis 1 operation status
(SD1844)
Axis 1 current feed value
(SD1840, SD1841)
Movement amount after near-point watchdog ON *
1
3)
4)
1)
2)
V
t
4)
OFF
OFF
ON
OFF
ON
ON
0
Standby (0)Standby (0)
Unfixed
Unfixed
OP address
Returning to OP (3)
(Updated according to the movement)
(Updated according to the movement)
*1 value
5)
Deviation counter clear signal
Under this method, machine OPR completes upon input of a zero signal via an external switch, following stopper contact. The following operations take place.
Operation step Description of operation
Machine OPR starts upon execution of the OPR start instruction (IPOPR1(P)). The axis accelerates from the bias speed
1)
2)
3) The axis contacts the stopper at the creep speed and stops.
4)
5)
at start to the OPR speed in the OPR direction over the "OPR acceleration/deceleration time" and moves at the OPR speed.
The axis starts to decelerate upon detection of turning on of the near-point dog. The axis decelerates to the creep speed and moves at the creep speed thereafter.
When a zero signal (output upon detection of stopper contact) is issued after the axis has stopped, the LCPU stops outputting pulses and outputs a deviation counter clear signal to the drive unit.
Upon completion of output of the deviation counter clear signal (output for 10 ms), the Axis 1 OPR completion (SM1843) turns on and Axis 1 OPR request (SM1842) turns off.
CHAPTER 7 POSITIONING FUNCTION
7.6 OPR Control
7.6.1 Machine OPR
79
(a) Motor torque limit
t
V
Interval A
Creep speed
ON
OFF
Near-point watchdog
Stopper
Be sure to limit the motor torque after the creep speed is reached. If the torque is not limited, the motor may be damaged when the stopper is contacted. For limitation of torque, refer to the manual for the drive unit.
(b) Near-point dog and starting position
• When machine OPR is started in a position indicated as interval A (where the near-point dog is on) in the figure below, the axis moves at the creep speed to complete machine OPR.
• When starting position of the machine OPR is in interval B (between the near-point dog OFF position and stopper) in the figure below, no near-point dog is detected and thus the axis may collide with the stopper at the OPR speed. Make sure the near-point dog is longer than the distance to the stopper.
Near-point watchdog
ON
(c) OPR retry function
The OPR retry function cannot be used.
V
Collision at OPR speed
Stopper
t
Interval B
OFF
80
CHAPTER 7 POSITIONING FUNCTION
Suddenly stopped during deceleration to the creep speed
ON OFF
Near-point watchdog
t
V
Stopper
Zero signal
(d) Zero signal input
• Input a zero signal after the stopper has been contacted. If a zero signal is input before the stopper is contacted, machine OPR completes at that point. As a result, the OP position deviates and if a zero signal is input while the axis is decelerating to the creep speed, the motor load also increases because the axis stops suddenly at the creep speed or higher.
• Do not input a zero signal before machine OPR is started. If a zero signal is already input externally when machine OPR is started, a "Zero signal ON" error (Axis 1 error code: 1200) occurs and machine OPR is not performed.
7.6 OPR Control
7.6.1 Machine OPR
81
(6) Operations of stopper 3 and precautions
OFF
OFF
ON
OFF
ON
ON
Standby (0)
Standby (0)
Unfixed
OP address
Deviation counter clear signal
Zero signal
Returning to OP (3)
Output time 10ms
Stopper
OPR start instruction
execution command
Axis 1 OPR request
(SM1842)
Axis 1 OPR complete
(SM1843)
Axis 1 operation status
(SD1844)
Axis 1 current feed value
(SD1840, SD1841)
V
t
2)
3)
1)
3)
4)
(Updated according to the movement)
Under this method, machine OPR completes upon input of a zero signal via an external switch, following stopper contact. This method is effective when no near-point dog is installed. Note, however, that it takes a longer time to complete machine OPR because the axis operates at the creep speed, not at the OPR speed. The following operations take place.
Operation step Description of operation
Machine OPR starts upon execution of the OPR start instruction (IPOPR1(P)). The axis accelerates from the bias speed
1)
2) The axis contacts the stopper at the creep speed and stops.
3)
4)
at start to the creep speed in the OPR direction over the "OPR acceleration/deceleration time" and moves at the creep speed.
When a zero signal (output upon detection of stopper contact) is issued after the axis has stopped, the LCPU stops outputting pulses and outputs a deviation counter clear signal to the drive unit.
Upon completion of output of the deviation counter clear signal (output for 10 ms), the Axis 1 OPR completion (SM1843) turns on and Axis 1 OPR request (SM1842) turns off.
82
(a) Motor torque limit
Be sure to limit the motor torque after the creep speed is reached. If the torque is not limited, the motor may be damaged when the stopper is contacted. For limitation of torque, refer to the manual for the drive unit.
(b) OPR retry function
The OPR retry function cannot be used.
(c) Zero signal input
• Input a zero signal after the stopper has been contacted. If a zero signal is input before the stopper is contacted, machine OPR completes at that point and the OP position deviates.
• Do not input a zero signal before machine OPR is started. If a zero signal is already input externally when machine OPR is started, a "Zero signal ON" error (Axis 1 error code: 1200) occurs and machine OPR is not performed.
(7) Operations of count 1 and precautions
ON
OFF
One motor rotation
OFF
OFF
ON
OFF
ON
ON
0
Unfixed
Unfixed
OP address
Near-point watchdog
Zero signal
Setting the movement amount after the near-point watchdog ON
Output time 10ms
3)
1)
2)
4)
3)
OPR start instruction
execution command
Axis 1 movement amount after
near-point watchdog ON
(SD1848, SD1849)
Axis 1 OPR request
(SM1842)
Axis 1 OPR complete
(SM1843)
Axis 1 operation status
(SD1844)
Axis 1 current feed value
(SD1840, SD1841)
(Updated according to the movement)
(Updated according to the movement)
*1 value
Standby (0)
Returning to OP (3)
Standby (0)
t
V
Movement amount after near-point watchdog ON *1
Deviation counter clear signal
Set the near-point watchdog OFF position as close to the center of zero signal length as possible. If the near-point watchdog turns off in the zero signal state, the OPR stop position may change by one servomotor rotation.
Under this method, machine OPR completes when the first zero signal is input after the axis has moved the distance set by "Movement amount after near-point dog ON" from the near-point dog ON point. The following operations take place.
Operation step Description of operation
Machine OPR starts upon execution of the OPR start instruction (IPOPR1(P)). The axis accelerates from the bias speed
1)
2)
3)
4)
at start to the OPR speed in the OPR direction over the "OPR acceleration/deceleration time" and moves at the OPR speed.
The axis starts to decelerate upon detection of turning on of the near-point dog. The axis decelerates to the creep speed and moves at the creep speed thereafter.
When the first zero signal (signal for outputting one pulse per motor rotation) is issued after the axis has moved the distance set by "Movement amount after near-point dog ON," the LCPU stops outputting pulses and outputs a deviation counter clear signal to the drive unit.
Upon completion of output of the deviation counter clear signal (output for 10 ms), the Axis 1 OPR completion (SM1843) turns on and Axis 1 OPR request (SM1842) turns off.
CHAPTER 7 POSITIONING FUNCTION
7.6 OPR Control
7.6.1 Machine OPR
83
(a) Required pulse generator
A pulse generator with a zero signal is required. If a pulse generator without zero signal is used, generate a zero signal using an external signal.
(b) Movement amount after near-point dog ON
The "Movement amount after near-point dog ON" should be equal to or longer than the distance moved by the axis as it decelerates from the OPR speed to creep speed. ( Page 69, Section 7.6 (8)) If a zero signal is input after the axis has moved the distance set by "Movement amount after near-point dog ON" while still decelerating from the OPR speed to creep speed, the axis stops immediately at that point to complete machine OPR. As a result, the OP position deviates and the motor load also increases because the axis stops suddenly at the creep speed or higher.
V
Near-point watchdog
ON
Setting the movement amount after the near-point watchdog ON
Suddenly stopped during deceleration to the creep speed
t
OFF
Zero signal
84
CHAPTER 7 POSITIONING FUNCTION
ON
OFF
Near-point watchdog
Zero signal
Retry operation
Limit switch
OFF
Moving in the opposite direction
Interval A
Interval B
When started from here
When started from here
(c) Advantages of using limit switches
The following functions can be used when the upper and lower limit signals are selected:
• OPR retry function When machine OPR is started in a position indicated as interval A (where the near-point dog is turned off
and no near-point dog is found in the OPR direction) in the figure below, the axis continues to operate at the OPR speed until reaching the limit switch of the machine system because it cannot detect the near­point dog. When the limit signal in the OPR direction turns off, the OPR retry function actuates. As a result, the axis decelerates to a stop and then move in the opposite direction to complete machine OPR successfully. ( Page 110, Section 7.10.1) This eliminates the need to perform JOG operation to return to the position before the near-point dog turns on.
• Hardware stroke limit function When the limit signal in the direction opposite the OPR direction turns off, the axis decelerates to a stop
due to the hardware stroke limit function. (Page 123, Section 7.10.5) This prevents damage to the machine system.
(d) Machine OPR from a position where the near-point dog is turned on
When machine OPR is started in a position indicated as interval B (where the near-point dog is turned on) in the figure above, the axis starts moving at the OPR speed in the direction opposite the OPR direction due to the OPR retry function to perform machine OPR. ( Page 113, Section 7.10.1 (4))
7.6 OPR Control
7.6.1 Machine OPR
85
(8) Operations of count 2 and precautions
ON
OFF
OFF
OFF
ON
OFF
ON
ON
0Unfixed
Unfixed
(Updated according to the movement)
OP address
Near-point watchdog
V
2)
1)
t
3)
OPR start instruction
execution command
Axis 1 movement amount after
near-point watchdog ON
(SD1848, SD1849)
Axis 1 OPR request
(SM1842)
Axis 1 OPR complete
(SM1843)
Axis 1 operation status
(SD1844)
Axis 1 current feed value
(SD1840, SD1841)
(Updated according to the movement)
Movement amount after near-point watchdog ON *1
3)
Setting the movement amount after the near-point watchdog ON
Standby (0)
Standby (0)
Returning to OP (3)
*1 value
Under this method, the position achieved by moving the distance set by "Movement amount after near-point dog ON" from the near-point dog ON point is set as the OP. This method is effective when a stepping motor is used so that a zero signal cannot be issued. Note that the stop position varies more than when the count 1 method is used. The following operations take place.
Operation step Description of operation
Machine OPR starts upon execution of the OPR start instruction (IPOPR1(P)). The axis accelerates from the bias speed
1)
2)
3)
at start to the OPR speed in the OPR direction over the OPR acceleration/deceleration time and moves at the OPR speed.
The axis starts to decelerate upon detection of turning on of the near-point dog. The axis decelerates to the creep speed and moves at the creep speed thereafter.
After the axis has moved the distance set by "Movement amount after near-point dog ON," the LCPU stops outputting pulses (the axis starts decelerating from the creep speed over the OPR deceleration stop time). The Axis 1 OPR completion (SM1843) turns on, while the Axis1 OPR request (SM1842) turns off.
86
(a) Wiring of deviation counter clear signal
Deviation counter clear signals are not output in the count 2 method. Use a general-purpose output signal and output it to the servo amplifier.
CHAPTER 7 POSITIONING FUNCTION
(b) Movement amount after near-point dog ON
The "Movement amount after near-point dog ON" should be equal to or longer than the distance moved by the axis as it decelerates from the OPR speed to creep speed. ( Page 69, Section 7.6 (8)) If the axis has moved the distance set by "Movement amount after near-point dog ON" while still decelerating from the OPR speed to creep speed, the axis stops immediately at that point to complete machine OPR. As a result, the OP position deviates and the motor load also increases because the axis stops suddenly at the creep speed or higher.
V
Near-point watchdog
ON
Setting the movement amount after the near-point watchdog ON
Suddenly stopped during deceleration to the creep speed
t
OFF
7.6 OPR Control
7.6.1 Machine OPR
87
(c) Advantages of using limit switches
The following functions can be used when the upper and lower limit signals are selected:
• OPR retry function When machine OPR is started in a position indicated as interval A (where the near-point dog is turned off
and no near-point dog is found in the OPR direction) in the figure below, the axis continues to operate at the OPR speed until reaching the limit switch of the machine system because it cannot detect the near­point dog. When the limit signal in the OPR direction turns off, the OPR retry function actuates. As a result, the axis decelerates to a stop and then move in the opposite direction to complete machine OPR successfully. ( Page 110, Section 7.10.1) This eliminates the need to perform JOG operation to return to the position before the near-point dog turns on.
• Hardware stroke limit function When the limit signal in the direction opposite the OPR direction turns off, the axis decelerates to a stop
due to the hardware stroke limit function. (Page 123, Section 7.10.5) This prevents damage to the machine system.
When started from here
Near-point watchdog
Retry operation
ON
Interval B
Interval A
OFF
When started from here
Moving in the opposite direction
Limit switch
OFF
(d) Machine OPR from a position where the near-point dog is turned on
When machine OPR is started in a position indicated as interval B (where the near-point dog is turned on) in the figure above, the axis starts moving at the OPR speed in the direction opposite the OPR direction due to the OPR retry function to perform machine OPR. ( Page 113, Section 7.10.1 (4))
(9) Setting of no method
"No method" is provided as an OPR method for those systems that do not use machine OPR. The I/O signals used for OPR can be used with other functions. If "No method" is set, an attempt to start machine OPR with the OPR start instruction (IPOPR1(P)) generates "OPERATION ERROR" (error code: 4116).
88
CHAPTER 7 POSITIONING FUNCTION
V
Fast OPR
OP or standby address
OPR speed
Fast OPR (9)Standby (0) Standby (0)
OPR ACC/DEC time
OPR DEC/STOP time
t
OPR start instruction
execution command
Axis 1 start instruction in
execution (SM1848)
Axis 1 BUSY (SM1840)
Axis 1 positioning complete
(SM1841)
Axis 1 operation status (SD1844)
Axis 1 OPR request (SM1842)
Axis 1 OPR complete (SM1843)
Axis 1 movement amount after
near-point watchdog ON
(SD1848, SD1849)
Not changed
OFF
OFF
OFF
OFF
OFF
OFF
ON
ON
ON
ON
ON
7.6.2 Fast OPR
The fast OPR is a function to perform positioning to the "OP address" established by machine OPR or other position (standby address).
Address Description
OP address This address is used to perform positioning using the OP established by machine OPR as the starting point.
This address is used to perform positioning using a position other than the OP established by machine OPR
Standby address
High-speed positioning control is started with the OPR start instruction (IPOPR1(P)) and implemented without using a near-point dog or zero signal.( Page 146, Section 7.12.1 (4))
(1) Fast OPR operation
This operation uses the following OPR parameters, except for the OP address and standby address set for the OPR start instruction (IPOPR1(P).
as the starting point. In certain situations such as when a near-point dog cannot be installed near the standby address and thus the standby address is not the same as the OP in machine system design, fast OPR can be implemented to the standby address to return the workpiece to the starting point ( OP).
Setting item Data type
OPR Speed
OPR ParameterOPR Acceleration/Deceleration Time
OPR Deceleration Stop Time
(2) Precautions
• Establish the OP via machine OPR before starting fast OPR. Otherwise, the "Machine OPR not performed" error (Axis 1 error code: 1201) occurs and operation does not start.
• If the system uses speed control, speed/position switching control and current value change, the Axis 1 current feed value (SD1840, SD1841) is different from the coordinate calculated with reference to the machine OP and thus fast OPR to the machine OP or standby address cannot be performed.
89
7.6 OPR Control

7.6.2 Fast OPR

7.6.3 Forced off of Axis 1 OPR request (SM1842)

When the LCPU requests machine OPR upon power on, the Axis 1 OPR request (SM1842) turns on. If the system does not require machine OPR, the Axis 1 OPR request (SM1842) can be forcibly turned off by turning on the Axis 1 OPR request off (SM1851). The Axis 1 OPR request off (SM1851) should be turned off again after checking that the Axis 1 OPR request (SM1842) has turned off.

7.6.4 Precautions on Axis 1 OPR request (SM1842)

In the following condition, the Axis 1 OPR request (SM1842) needs to be turned on to perform the machine OPR.
•At power on
•At reset
• When the operating status is switched from STOP to RUN
• When the drive unit ready signal is turned off
• At the start of machine OPR control
While the Axis 1 OPR request (SM1842) is on, address information stored in the LCPU cannot be guaranteed. When the machine OPR is performed and successfully completed, the Axis 1 OPR request (SM1842) turns off and the Axis 1 OPR completion (SM1843) turns on.
90
CHAPTER 7 POSITIONING FUNCTION
Dwell Time
Command Speed
Positioning Address/
Movement Amount
Control System
Positioning data No. 1
2
3
9
10
Acceleration/Deceleration
Time
Deceleration Stop Time
Dwell Time
Command Speed
Positioning Address/
Movement Amount
Control System
Positioning data No. 1
2
3
9
10
Acceleration/Deceleration
Time
Deceleration Stop Time
Axis 2Axis 1
7.7 Positioning Control
The positioning control method is set by the positioning data "Control System". 10 positioning data can be set for each axis with the programming tool. To start positioning control using positioning data set with the programming tool, use the Table start instruction (IPPSTRT1(P)) ( Page 138, Section 7.12.1 (1)). To start positioning control using 10 or more positioning data, set them as the setting data of the Positioning start instruction (IPDSTRT1(P)) ( Page 140, Section 7.12.1 (2)).
Setting item Setting range Default
Control System
Acceleration/Deceleration Time (ms)
Deceleration Stop Time (ms)
Dwell Time (ms) 0 to 65535
Command Speed (pulse/s) 0 to 200000
Positioning Address/Movement Amount (pulse)
Not selected (blank)
Position Control (ABS)
Position Control (INC)
Speed-position Switching Control (Forward RUN)
Speed-position Switching Control (Reverse RUN)
Current Value Change
Speed Control (Forward RUN)
Speed Control (Reverse RUN)
0 to 32767 1000
-2147483648 to 2147483647
(0 to 2147483647 if the control system is
speed/position switching control)

7.7 Positioning Control

Not selected (blank)
0
Setting details are explained below.
Note that the explanations in this section assume use of Axis 1. For the special relay, special register, dedicated instructions, error codes, and warning codes for Axis 2, refer to the following.
• Special relay and special register: Page 62, Section 7.4 (2)
• Dedicated instructions: Page 137, Section 7.12
• Error codes: Page 173, Section 7.14 (1)
• Warning codes: Page 177, Section 7.14 (2)
91
(1) Control system
Set the positioning control system.
Control system Description Reference
Not selected (blank) Set this option if positioning control is not performed.
Position Control (ABS)
Position Control (INC)
Speed-position Switching
Control (Forward RUN)
Speed-position Switching
Control (Reverse RUN)
Current Value Change The Axis 1 current feed value (SD1840, SD1841) is changed to the set address.
Speed Control (Forward RUN)
Speed Control (Reverse RUN)
The following lists the control systems and the required positioning data.
Positioning data
Acceleration/Deceleration Time 
Deceleration Stop Time 
Dwell Time 
Command Speed 
Positioning Address/Movement
Positioning control is implemented from the position at which the axis is currently stopped, to the specified position. (1-axis linear control)
Speed control is implemented first and when the external command signal is turned on, position control (positioning control based on specified movement amount) is implemented successively.
After acceleration, operation continues until the execution command for Axis stop instruction (IPSTOP1) turns on.
: Must be set, : Set as necessary, : Need not be set
Control System
Speed/position
switching control
Amount
Position control Speed control

Page 97, Section
7.7.2
Page 98, Section
7.7.3
Page 100,
Section 7.7.4
Page 101,
Section 7.7.5
Current value
change
92
CHAPTER 7 POSITIONING FUNCTION
(2) Acceleration/deceleration time, deceleration stop time, dwell time, and
command speed
• Acceleration/deceleration time: Set the time required for the axis to reach the command speed from the bias speed at start.
• Deceleration stop time: Set the time required for the axis to reach the bias speed at start from the command speed and then stop upon completion of position control or occurrence of a stop cause.
• Dwell time: Set the time required for Axis 1 positioning completion (SM1841) to turn on after completion of positioning control.
• Command speed: Set the speed at which to implement positioning control. If the set command speed exceeds the speed limit, positioning control is implemented at the speed limit. If the set command speed is less than the bias speed at start, positioning control is implemented at the bias speed at start.
V
Command speed
ACC/DEC time
Axis 1 positioning complete (SM1841)
DEC/STOP time
Bias speed at start
t
Dwell time
ON
7.7 Positioning Control
OFF
93
(3) Positioning address/movement amount
-1000 3000
Stop position (positioning start address)
Movement amount: 2000 Movement amount: 2000
1000
Stop position (positioning start address)
Moving in negative direction
Moving in positive direction
-30000 30000
(Movement amount) (Movement amount)
Set the address or movement amount to be used as the target value for positioning control. The setting range of values varies depending on the control system.
(a) Position control (ABS), current value change
Set the address from the OP.
(b) Position control (INC)
Set the movement amount with sign.
• When the movement amount is positive: Move in the positive direction (address increasing direction)
• When the movement amount is negative: Move in the negative direction (address decreasing direction)
(c) Speed-position switching control (forward RUN/reverse RUN)
Set the movement amount after switching from speed control to position control. The setting range is 0 to 2147483647 (pulses).
V
(d) Speed control (forward RUN/reverse RUN)
The set value is ignored.
Speed control
Movement amount setting
Position control
t Speed/position switching command
94
CHAPTER 7 POSITIONING FUNCTION
7.7.1 Start of positioning control
Positioning control can be started by using positioning data set with the programming tool or by setting positioning data in a program. The I/O signals used under each control system are shown below.
: Wiring required, : Wire as necessary, : Wiring not required
Control system
I/O signal
Zero signal
Near-point dog signal
Deviation counter clear signal
External command signal
CW/PULSE/A phase output 
CCW/SIGN/B phase output 
Drive unit ready signal
Upper limit signal
Lower limit signal
*1 When this signal is not required, it can be used for other functions such as the general-purpose input and general-
purpose output.
*2 These signals are required when the hardware stroke limit and OPR retry functions are used.
*1
*1
*1
*1
*1*2
*1*2
Position control Speed control



*1



*1
Speed/position switching
control
(1) Starting with positioning data set by the programming tool
Positioning data (up to 10 sets of data for each axis) can be set easily using the programming tool. Note that once set, positioning data cannot be changed in a program. Two axes can be started simultaneously at the pulse output level using the Two axes simultaneous start instruction (IPSIMUL(P)).
(a) Setting
Set positioning data (10 sets of data for each axis) using the programming tool and write the data to the LCPU.
(b) Starting
Start positioning with the Table start instruction (IPPSTRT1(P)) by specifying a positioning data No. ( Page 138, Section 7.12.1 (1)) Only one set of positioning data can be executed with each instruction. To start two axes simultaneously, use the Two axes simultaneous start instruction (IPSIMUL(P)).
(2) Starting by setting positioning data with a device
Start positioning with the Positioning start instruction (IPDSTRT1(P)) by specifying the device in which positioning data is stored. Positioning data can be changed every time positioning is started. Use this mode when there are many positioning points and 10 sets of positioning data are not enough, or when positioning addresses and command speeds are calculated by a program, among others.
(a) Setting
Set positioning data to a device by a program.

7.7.1 Start of positioning control

7.7 Positioning Control
(b) Starting
Positioning is started when the set device is specified as setting data and the Positioning start instruction (IPDSTRT1(P)) is executed in the program ( Page 140, Section 7.12.1 (2)). Two axes cannot be started simultaneously.
95
(3) Sub function
• The command speed can be changed using the Speed change instruction (IPSPCHG1(P)) ( Page 115,
Section 7.10.3).
• The software stroke limit function can be used when the software stroke upper/lower limits are set (
Page 120, Section 7.10.4).
• The hardware stroke limit function can be used when upper/lower limit signals are input ( Page 123,
Section 7.10.5).
• The target position can be changed using the Target position change instruction (IPTPCHG1(P)) ( Page
124, Section 7.10.6).
96
CHAPTER 7 POSITIONING FUNCTION
Ex.
Ex.
Start address
0 2000 11000
Positioning address (End address)
Positioning control (movement amount 9000)
Start address
0
-9000
2000
End address
Positioning control (movement amount -11000)
7.7.2 Position control
Positioning control is implemented for the specified axis from the current position to specified position.
(1) Positioning control by ABS (absolute) method
Positioning is performed by specifying a position with reference to the OP. The moving direction is determined by the current position.
Operation when the starting point address is 2000 and "Positioning address/movement amount" is set to 11000:
(2) Positioning control by INC (incremental) method
Positioning is performed by the set movement amount from the current position being the starting point. The moving direction is determined by the sign of "Positioning address/movement amount."
Operation when the starting point address is 2000 and "Positioning address/movement amount" is set to ­11000:
(3) Precautions
If the value of "Positioning address/movement amount" exceeds the upper limit of the software stroke, a "Software stroke limit+" error (Axis 1 error code: 1103) occurs. If the value is smaller than the lower limit of the software stroke, a "Software stroke limit-" error (Axis 1 error code: 1104) occurs. In these cases, position control does not start.

7.7.2 Position control

7.7 Positioning Control
97

7.7.3 Speed/position switching control

Bias speed at start
V
Speed control
Position control
Dwell time
Command speed
Start instruction
execution command
Axis 1 BUSY (SM1840)
Axis 1 positioning complete
(SM1841)
External command signal
Axis 1 speed/position
switching enable
(SM1852)
Axis 1 current feed value
(SD1840, SD1841)
t
0
(Will be updated)
OFF
OFF
OFF
OFF
OFF
ON
ON
ON
ON
ON
After the start instruction has been executed, positioning control is started via speed control first. When the external command signal turns on, speed control switches to position control and positioning control is implemented by the movement amount set by "Positioning address/movement amount." Speed/position switching control is implemented in forward and reverse directions. To switch from speed control to position control, the Axis 1 Speed/position switching enable (SM1852) must be turned on beforehand.
(1) Speed/position switching control operations
(a) Operation timings
(b) Axis 1 current feed value (SD1840, SD1841)
98
This value is cleared to 0 at the start of speed control. It is not refreshed during speed control, and refreshed only after switching to position control.
Loading...