Omron NJ501-1400, NJ501-1300, NJ501-1500 User Manual

Page 1
Machine Automation Controller
NJ-series
CPU Unit Motion Control
User’s Manual
NJ501-1300 NJ501-1400 NJ501-1500
CPU Unit
W507-E1-01
Page 2
OMRON, 2011
No patent liability is assumed with respect to the use of the information contained herein. Moreover, because OMRON is constantly striving to improve its high-quality products, the information contained in this manual is subject to change without notice. Every precaution has been taken in the preparation of this manual. Nevertheless, OMRON assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained in this publication.
Page 3
Introduction
Thank you for purchasing an NJ-series CPU Unit. This manual contains information that is necessary to use the Motion Control Function Module of an NJ-series CPU Unit. Please read this manual and make sure you understand the functionality and per­formance of the NJ-series CPU Unit before you attempt to use it in a control system. Keep this manual in a safe place where it will be available for reference during operation.
Intended Audience
This manual is intended for the following personnel, who must also have knowledge of electrical sys­tems (an electrical engineer or the equivalent).
Personnel in charge of introducing FA systems.
Personnel in charge of designing FA systems.
Personnel in charge of installing and maintaining FA systems.
Personnel in charge of managing FA systems and facilities.
For programming, this manual is intended for personnel who understand the programming language specifications in international standard IEC 61131-3 or Japanese standard JIS B3503.
Introduction
Applicable Products
This manual covers the following products.
NJ-series CPU Units
NJ501-1300
NJ501-1400
NJ501-1500
NJ-series CPU Unit Motion Control User’s Manual (W507)
1
Page 4
Relevant Manuals
Relevant Manuals
There are three manuals that provide basic information on the NJ-series CPU Units: the NJ-series CPU Unit Hardware User’s Manual, the NJ-series CPU Unit Software User’s Manual (this manual), and the NJ-series Instructions Reference Manual. Most operations are performed from the Sysmac Studio Automation Software. Refer to the Sysmac Stu­dio Version 1 Operation Manual (Cat. No. W504) for information on the Sysmac Studio.
Other manuals are necessary for specific system configurations and applications. Read all of the manuals that are relevant to your system configuration and application to make the most of the NJ-series CPU Unit.
Basic information
NJ-series User’s Manuals
Introduction to NJ-series Controllers
Setting devices and hardware
Using motion control
Using EtherCAT
Using EtherNet/IP
Using CJ-series Units
Software settings
Using motion control
Using EtherCAT
Using EtherNet/IP
Programming
Using motion control
Using EtherCAT
Using CJ-series Units
Programming error processing
Testing operation and debugging
Using motion control
Using EtherCAT
Using EtherNet/IP
Troubleshooting and managing errors in an NJ-series Controller
NJ-series CPU Unit
Hardware User´s Manual
Use the relevant manuals for references according to any error that occurs.
NJ-series CPU Unit
Software User´s Manual
NJ-series Instructions
Reference Manual
NJ-series CPU Unit Motion
Control User´s Manual
NJ-series CPU Unit Built-in
EtherCAT Port User´s Manual
NJ-series Motion Control
Instructions Reference Manual
NJ-series CPU Unit Built-in
EtherNet/IP Port User´s Manual
NJ-series Troubleshooting Manual
CJ-series Special Unit Operation
Manuals for NJ-series CPU Unit
Maintenance
Using EtherCAT
Using EtherNet/IP
Using CJ-series Units
2
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 5
Manual Configuration
NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500)
Section Description
Section 1 Introduction
Section 2 System Configuration
Section 3 Configuration Units
Section 4 Installation and Wiring
Section 5 Troubleshooting
Section 6 Inspection and Maintenance
Appendices
This section provides an introduction to the NJ-series Controllers and their features, and gives the NJ-series Controller specifications.
This section describes the system configuration used for NJ-series Controllers.
This section describes the parts and functions of the configuration devices in the NJ­series Controller configuration, including the CPU Unit and Configuration Units.
This section describes where and how to install the CPU Unit and Configuration Units and how to wire them.
This section describes the event codes, error confirmation methods, and corrections for errors that can occur.
This section describes the contents of periodic inspections, the service life of the Bat­tery and Power Supply Units, and replacement methods for the Battery and Power Supply Units.
The appendices provide the specifications of the Basic I/O Units, Unit dimensions, load short-circuit protection detection, line disconnection detection, and measures for EMC Directives.
Manual Configuration
NJ-series CPU Unit Software User’s Manual (Cat. No. W501)
Section Description
Section 1 Introduction
Section 2 CPU Unit Operation
Section 3 I/O Ports, Slave Configuration, and Unit Configuration
Section 4 Controller Setup
Section 5 Designing Tasks
Section 6 Programming
Section 7 Simulation, Transferring Projects to the Physical CPU Unit, and Opera­tion
Section 8 CPU Unit Status
Section 9 CPU Unit Functions
Section 10 Communications Setup
Section 11 Example of Actual Application Pro­cedures
Section 12 Troubleshooting
Appendices
This section provides an introduction to the NJ-series Controllers and their features, and gives the NJ-series Controller specifications.
This section describes the variables and control systems of the CPU Unit and CPU Unit status.
This section describes how to use I/O ports, how to create the slave configuration and unit configuration and how to assign functions.
This section describes the initial settings of the function modules.
This section describes the task system and types of tasks.
This section describes programming, including the programming languages and the variables and instructions that are used in programming.
This section describes simulation of Controller operation and how to use the results of simulation.
This section describes CPU Unit status.
This section describes the functionality provided by the CPU Unit.
This section describes how to go online with the CPU Unit and how to connect to other devices.
This section describes the procedures that are used to actually operate an NJ-series Controller.
This section describes the event codes, error confirmation methods, and corrections for errors that can occur.
The appendices provide the CPU Unit specifications, task execution times, system­defined variable lists, data attribute lists, CJ-series Unit memory information, CJ­series Unit memory allocation methods, and data type conversion information.
NJ-series CPU Unit Motion Control User’s Manual (W507)
3
Page 6
Manual Configuration
NJ-series CPU Unit Motion Control User’s Manual (Cat. No. W507) (This Manual)
Section Description
Section 1 Introduction to the Motion Control Function Module
Section 2 Motion Control Configuration and Principles
Section 3 Configuring Axes and Axes Groups
Section 4 Checking Wiring from the Sysmac Studio
Section 5 Motion Control Parameters
Section 6 Motion Control Programming
Section 7 Manual Operation
Section 8 Homing
Section 9 Motion Control Functions
Section 10 Sample Programming
Section 11 Troubleshooting
Appendices
This section describes the features, system configuration, and application flow for the Motion Control Function Module.
This section outlines the internal structure of the CPU Unit and describes the config­uration and principles of the MC Function Module.
This section describes the concept of axes and axes groups, the settings for axes that are required for the MC Test Run operations to function on the Sysmac Studio, and the instructions for creating and configuring axes and axes groups using the Sys­mac Studio.
This section describes the MC Test Run operations of the Sysmac Studio. You can use the MC Test Run operations to monitor sensor signals, check Servomotor wiring, and more, all without any programming.
This section provides information on the axis parameters and axes group parameters that are used for motion control.
This section provides the specifications of a motion control program and the operat­ing procedures that are required up through actual program development.
This section describes manual operation when the MC Function Module is used together with an OMRON G5-series Servo Drive.
This section describes homing.
This section describes the motion control functions that are used when connected to OMRON G5-series Servo Drives with built-in EtherCAT communications.
This section describes basic application methods for homing, error monitoring, and other functions, and provides programming samples for absolute positioning, cam operation, and other axis operations.
This section describes the items to check when problems occur in the MC Function Module. It includes error diagnosis and countermeasures for error indications, and error diagnosis and countermeasures for operating conditions.
The appendices describe settings and connection methods for OMRON G5-series Servo Drive objects.
NJ-series Instructions Reference Manual (Cat. No. W502)
Section Description
Section 1 Instruction Set
Section 2 Instruction Descriptions
Appendices
4
This section provides a table of the instructions that are described in this manual.
This section describes instruction specifications in detail.
The appendices provide a table of error codes and other supplemental information to use instructions.
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 7
Manual Configuration
NJ-series CPU Unit Built-in EtherCAT Port User’s Manual (Cat. No. W505)
Section Description
Section 1 Introduction
Section 2 Part Names and Slave Settings
Section 3 EtherCAT Communications
Section 4 EtherCAT Network Wiring
Section 5 Setting Up EtherCAT Communica­tions with the Sysmac Studio
Section 6 Process Data Communications and SDO Communications
Section 7 System-defined Variables That Are Related to the Built-in EtherCAT Port
Section 8 Example of Operations for EtherCAT Communications
Section 9 Troubleshooting
Appendices
This section provides an overview of EtherCAT communications, describes the sys­tem configuration and specifications, and provides operating procedures.
This section provides the part names and describes the slave settings and Sysmac device functions.
This section describes the different types of EtherCAT communications, EtherCAT settings, and state transitions.
This section describes how to connect and wire an EtherCAT network.
This section describes how to set the network configuration information and how to check EtherCAT communications from the Sysmac Studio.
This section describes the timing of communications, response times, and special instructions for process data communications and SDO communications. It also pro­vides sample programming.
This section describes the system-defined variables that are related to the built-in EtherCAT port.
This section provides a series of example operations for when an NJ-series CPU Unit is connected to slaves.
This section describes the event codes, error confirmation methods, and corrections for errors that can occur for EtherCAT communications. It also describes how to replace slaves.
The appendices describe the relation of EtherCAT communications to overall CPU Unit status, packet monitoring functions, and multi-vendor application.
NJ-series Motion Control Instructions Reference Manual (Cat. No. W508)
Section Description
Section 1 Introduction to Motion Control Instructions
Section 2 Variables and Instructions
Section 3 Axis Command Instructions
Section 4 Axes Group Instructions
Section 5 Common Command Instructions
Appendices The appendices describe the error codes that are generated by the instructions.
This section gives an introduction to motion control instructions supported by NJ­series CPU Units.
This section describes the variables and instructions for the Motion Control Function Module.
This section describes the instructions that are used to perform single-axis control for the MC Function Module.
This section describes the instructions to perform multi-axes coordinated control for the MC Function Module.
This section describes the instructions that are used for both axes and axes groups.
NJ-series Troubleshooting Manual (Cat. No. W503)
Section Description
Section 1 Overview of Errors
Section 2 Error Troubleshooting Methods
Section 3 Error Tables
This section describes the errors that can occur on an NJ-series Controller, the oper­ation that occurs for errors, and methods to confirm errors.
This section describes how to handle errors.
This section lists all of the error events that can occur on NJ-series Controllers.
NJ-series CPU Unit Motion Control User’s Manual (W507)
5
Page 8
Manual Configuration
Sysmac Studio Version 1 Operation Manual (Cat. No. W504)
Section Description
Section 1 Introduction
Section 2 Installation and Uninstallation
Section 3 System Design
Section 4 Programming
Section 5 Online Connections to a Controller
Section 6 Debugging
Section 7 Other Functions
Section 8 Reusing Programming
Section 9 Support Software Provided with the Sysmac Studio
Section 10 Troubleshooting
Appendices
This section provides an overview and lists the specifications of the Sysmac Studio and describes its features and components.
This section describes how to install and uninstall the Sysmac Studio.
This section describes the basic concepts for designing an NJ-series System with the Sysmac Studio and the basic operating procedures.
This section describes how to create programs with the Sysmac Studio.
This section describes how to go online with a Controller.
This section describes how to debug the programs online on the Controller or debug it offline with the Simulator.
This section describes Sysmac Studio functions other than system design functions.
This section describes how to reuse the programs that you create with the Sysmac Studio.
This section describes the Support Software that is provided with the Sysmac Studio.
This section describes the error messages that are displayed when you check a pro­gram on the Sysmac Studio and how to correct those errors.
The appendices describe the following: Driver Installation for Direct USB Cable Connection Specifying One of Multiple Ethernet Interface Cards Online Help Simulation Instructions
6
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 9
Manual Structure
Page Structure
The following page structure is used in this manual.
Manual Structure
Level 2 heading
Level 3 heading
A step in a procedure
Indicates a procedure.
Special information
Icons indicate precautions, additional information, or reference information.
4 Installation and Wiring
4-3 Mounting Units
4-3-1 Connecting Controller Components
The Units that make up an NJ-series Controller can be connected simply by pressing the Units together and locking the sliders by moving them toward the back of the Units. The End Cover is connected in the same way to the Unit on the far right side of the Controller.
1 Join the Units so that the connectors fit exactly.
2 The yellow sliders at the top and bottom of each Unit lock the Units together. Move the sliders
toward the back of the Units as shown below until they click into place.
Precautions for Correct UsePrecautions for Correct Use
The sliders on the tops and bottoms of the Power Supply Unit, CPU Unit, I/O Units, Special I/O Units, and CPU Bus Units must be completely locked (until they click into place) after connecting the adjacent Unit connectors.
Hook
Connector
Move the sliders toward the back until they lock into place.
Hook holes
Release
Lock
Slider
Level 1 heading Level 2 heading Level 3 heading
Gives the current headings.
stinU gnitnuoM 3-4
4
stnenopmoC rellortnoC gnitcennoC 1-3-4
Page tab
Gives the number of the main section.
Manual name
NJ-series CPU Unit Hardware User’s Manual (W500)
This illustration is provided only as a sample. It may not literally appear in this manual.
Special Information
Special information in this manual is classified as follows:
Precautions for Safe Use
Precautions on what to do and what not to do to ensure safe usage of the product.
Precautions for Correct Use
Precautions on what to do and what not to do to ensure proper operation and performance.
Additional Information
Additional information to read as required. This information is provided to increase understanding or make operation easier.
Note References are provided to more detailed or related information.
NJ-series CPU Unit Motion Control User’s Manual (W507)
4-9
7
Page 10
Manual Structure
Precaution on Terminology
In this manual, “download” refers to transferring data from the Sysmac Studio to the physical Controller and “upload” refers to transferring data from the physical Controller to the Sysmac Studio.
For the Sysmac Studio, synchronization is used to both upload and download data. Here, “synchronize” means to automatically compare the data for the Sysmac Studio on the computer with the data in the physical Controller and transfer the data in the direction that is specified by the user.
8
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 11
Sections in this Manual
Sections in this Manual
1
2
3
4
5
Introduction to the Motion Control Function Module
Motion Control Configuration and Principles
Configuring Axes and Axes Groups
Checking Wiring from the Sysmac Studio
Motion Control Parameters
10
11
A
I
Sample Programming
Troubleshooting
Appendices
Index
1
2
3
4I
10
11
A
5
6
7
6
7
8
9
8
Motion Control Programming
9
Manual Operation
Homing
Motion Control Functions
NJ-series CPU Unit Motion Control User’s Manual (W507)
9
Page 12
Sections in this Manual
10
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 13
CONTENTS
Introduction............................................................................................................... 1
Relevant Manuals...................................................................................................... 2
Manual Configuration............................................................................................... 3
Manual Structure ...................................................................................................... 7
Sections in this Manual............................................................................................ 9
Read and Understand this Manual........................................................................ 17
Safety Precautions ................................................................................................. 21
Precautions for Safe Use ....................................................................................... 22
CONTENTS
Precautions for Correct Use .................................................................................. 23
Regulations and Standards ................................................................................... 24
Unit Versions ........................................................................................................... 26
Related Manuals ..................................................................................................... 29
Revision History ..................................................................................................... 31
Section 1 Introduction to the Motion Control Function Module
1-1 Features.................................................................................................................................... 1-2
1-2 System Configuration ............................................................................................................. 1-3
1-3 Application Procedure ............................................................................................................ 1-4
1-4 Specifications .......................................................................................................................... 1-6
1-4-1 General Specifications................................................................................................................ 1-6
1-4-2 Performance Specifications ........................................................................................................ 1-6
1-4-3 Function Specifications............................................................................................................... 1-7
Section 2 Motion Control Configuration and Principles
2-1 Internal Configuration of the CPU Unit.................................................................................. 2-2
2-2 Motion Control Configuration.................................................................................................2-3
2-3 Motion Control Principles....................................................................................................... 2-4
2-3-1 CPU Unit Tasks........................................................................................................................... 2-4
2-3-2 Example of Task Operations for Motion Control ......................................................................... 2-7
2-4 EtherCAT Communications and Motion Control ................................................................ 2-11
2-4-1 CAN Application Protocol over EtherCAT (CoE)....................................................................... 2-11
2-4-2 Relationship between EtherCAT Master Function Module and MC Function Module .............. 2-12
2-4-3 Relationship between Process Data Communications Cycle and Motion Control Period ........ 2-13
NJ-series CPU Unit Motion Control User’s Manual (W507)
11
Page 14
CONTENTS
Section 3 Configuring Axes and Axes Groups
3-1 Axes .......................................................................................................................................... 3-2
3-1-1 Introduction to Axes ....................................................................................................................3-2
3-1-2 Introduction to Axis Parameters ..................................................................................................3-3
3-1-3 Introduction to Axis Variables......................................................................................................3-5
3-1-4 Specifying an Axis in the User Program...................................................................................... 3-7
3-2 Axis Setting Procedure ........................................................................................................... 3-8
3-2-1 Axis Configuration Procedure .....................................................................................................3-8
3-2-2 Setting Procedure .......................................................................................................................3-8
3-3 Axes Groups .......................................................................................................................... 3-17
3-3-1 Introduction to Axes Groups......................................................................................................3-17
3-3-2 Introduction to Axes Group Parameters .................................................................................... 3-18
3-3-3 Introduction to Axes Group Variables........................................................................................3-19
3-3-4 Specifying an Axes Group in the User Program........................................................................3-21
3-4 Setting Procedures for Axes Groups................................................................................... 3-22
3-4-1 Setting Procedure for an Axes Group .......................................................................................3-22
3-4-2 Setting Procedure .....................................................................................................................3-22
Section 4 Checking Wiring from the Sysmac Studio
4-1 Functions of the Sysmac Studio ............................................................................................ 4-2
4-1-1 MC Test Run Function.................................................................................................................4-2
4-1-2 Application Procedure .................................................................................................................4-4
4-1-3 Axis Parameter Setting Example.................................................................................................4-5
4-1-4 Starting the MC Test Run Function .............................................................................................4-6
4-2 Monitoring Sensor Signals ..................................................................................................... 4-7
4-3 Checking Motor Operation...................................................................................................... 4-8
4-3-1 Turning ON the Servo ................................................................................................................. 4-8
4-3-2 Jogging........................................................................................................................................ 4-8
4-3-3 Homing........................................................................................................................................4-9
4-3-4 Absolute Positioning..................................................................................................................4-10
4-3-5 Relative Positioning ...................................................................................................................4-11
Section 5 Motion Control Parameters
5-1 Introduction.............................................................................................................................. 5-2
5-2 Axis Parameters....................................................................................................................... 5-4
5-2-1 Axis Parameters..........................................................................................................................5-4
5-2-2 Axis Basic Settings......................................................................................................................5-5
5-2-3 Unit Conversion Settings............................................................................................................. 5-8
5-2-4 Operation Settings ....................................................................................................................5-11
5-2-5 Other Operation Settings .......................................................................................................... 5-12
5-2-6 Limit Settings............................................................................................................................. 5-13
5-2-7 Position Count Settings.............................................................................................................5-13
5-2-8 Servo Drive Settings .................................................................................................................5-15
5-2-9 Homing Settings........................................................................................................................5-16
5-2-10 Axis Parameter Setting Example...............................................................................................5-17
5-3 Axes Group Parameters........................................................................................................5-20
5-3-1 Axes Group Parameters ............................................................................................................5-20
5-3-2 Axes Group Basic Settings ....................................................................................................... 5-21
5-3-3 Axes Group Operation Settings ................................................................................................5-22
5-3-4 Enabling an Axes Group ...........................................................................................................5-23
12
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 15
Section 6 Motion Control Programming
6-1 Introduction.............................................................................................................................. 6-2
6-2 Motion Control Instructions.................................................................................................... 6-3
6-2-1 Function Blocks for PLCopen Motion Control............................................................................. 6-3
6-2-2 Motion Control Instructions of the MC Function Module............................................................. 6-3
6-3 State Transitions...................................................................................................................... 6-4
6-3-1 Status of the Motion Control Function Module............................................................................ 6-4
6-3-2 Axis States.................................................................................................................................. 6-4
6-3-3 Axes Group States...................................................................................................................... 6-6
6-4 Execution and Status of Motion Control Instructions.......................................................... 6-8
6-4-1 Basic Rules for Execution of Instructions ................................................................................... 6-8
6-4-2 Execution Timing Charts .......................................................................................................... 6-10
6-4-3 Timing Chart for Re-execution of Motion Control Instructions .................................................. 6-12
6-4-4 Timing Chart for Multi-execution of Motion Control Instructions ............................................... 6-13
6-5 Positions................................................................................................................................. 6-14
6-5-1 Types of Positions..................................................................................................................... 6-14
6-5-2 Valid Positions for Each Axis Type............................................................................................ 6-14
6-6 System-defined Variables for Motion Control..................................................................... 6-15
6-6-1 Overview of System-defined Variables for Motion Control........................................................ 6-15
6-6-2 System for System-defined Variables for Motion Control ......................................................... 6-17
6-6-3 Tables of System-defined Variables for Motion Control ............................................................ 6-18
6-7 Cam Tables and Cam Data Variables ................................................................................... 6-28
CONTENTS
6-8 Programming Motion Controls............................................................................................. 6-32
6-9 Creating Cam Tables ............................................................................................................. 6-34
Section 7 Manual Operation
7-1 Outline ...................................................................................................................................... 7-2
7-2 Turning ON the Servo.............................................................................................................. 7-3
7-2-1 Turning ON the Servo................................................................................................................. 7-3
7-2-2 Setting Axis Parameters ............................................................................................................. 7-4
7-2-3 Programming Example ............................................................................................................... 7-4
7-3 Jogging..................................................................................................................................... 7-5
7-3-1 Jogging Procedure...................................................................................................................... 7-5
7-3-2 Setting Axis Parameters ............................................................................................................. 7-6
7-3-3 Setting Example for Input Variables............................................................................................ 7-6
7-3-4 Programming Example ............................................................................................................... 7-7
Section 8 Homing
8-1 Outline ...................................................................................................................................... 8-2
8-2 Homing Procedure................................................................................................................... 8-5
8-2-1 Setting Homing Parameters........................................................................................................ 8-5
8-2-2 Monitoring the Homing Operation............................................................................................. 8-10
8-3 Homing Operation ................................................................................................................. 8-11
8-4 Homing with an Absolute Encoder ...................................................................................... 8-12
8-4-1 Outline of Function.................................................................................................................... 8-13
8-4-2 Setting Procedure..................................................................................................................... 8-13
8-5 High-speed Homing............................................................................................................... 8-15
NJ-series CPU Unit Motion Control User’s Manual (W507)
13
Page 16
CONTENTS
Section 9 Motion Control Functions
9-1 Single-axis Position Control................................................................................................... 9-3
9-1-1 Outline of Operation.................................................................................................................... 9-3
9-1-2 Absolute Positioning....................................................................................................................9-4
9-1-3 Relative Positioning .....................................................................................................................9-4
9-1-4 Interrupt Feeding.........................................................................................................................9-5
9-1-5 Stopping...................................................................................................................................... 9-6
9-1-6 Override Factors.......................................................................................................................... 9-9
9-2 Single-axis Synchronized Control ....................................................................................... 9-11
9-2-1 Overview of Synchronized Control............................................................................................9-11
9-2-2 Gear Operation .........................................................................................................................9-11
9-2-3 Positioning Gear Operation .......................................................................................................9-12
9-2-4 Cam Operation..........................................................................................................................9-13
9-2-5 Cam Tables ............................................................................................................................... 9-14
9-2-6 Synchronous Positioning...........................................................................................................9-19
9-2-7 Combining Axes........................................................................................................................9-21
9-2-8 Master Axis Phase Shift............................................................................................................ 9-22
9-3 Single-axis Velocity Control .................................................................................................9-23
9-3-1 Velocity Control ......................................................................................................................... 9-23
9-3-2 Cyclic Synchronous Velocity Control.........................................................................................9-24
9-4 Single-axis Torque Control ...................................................................................................9-25
9-5 Common Functions for Single-axis Control ....................................................................... 9-26
9-5-1 Positions....................................................................................................................................9-26
9-5-2 Velocity ......................................................................................................................................9-28
9-5-3 Acceleration and Deceleration ..................................................................................................9-29
9-5-4 Jerk ........................................................................................................................................... 9-31
9-5-5 Specifying the Operation Direction............................................................................................9-32
9-5-6 Re-executing Motion Control Instructions .................................................................................9-35
9-5-7 Multi-execution of Motion Control Instructions (Buffer Mode) ...................................................9-41
9-6 Multi-axes Coordinated Control ........................................................................................... 9-46
9-6-1 Outline of Operation.................................................................................................................. 9-46
9-6-2 Linear Interpolation ...................................................................................................................9-48
9-6-3 Circular Interpolation................................................................................................................. 9-49
9-6-4 Stopping Under Multi-axes Coordinated Control....................................................................... 9-50
9-6-5 Overrides for Multi-axes Coordinated Control........................................................................... 9-51
9-7 Common Functions for Multi-axes Coordinated Control................................................... 9-53
9-7-1 Velocity Under Multi-axes Coordinated Control......................................................................... 9-53
9-7-2 Acceleration and Deceleration Under Multi-axes Coordinated Control ..................................... 9-54
9-7-3 Jerk for Multi-axes Coordinated Control....................................................................................9-55
9-7-4 Re-executing Motion Control Instructions for Multi-axes Coordinated Control.......................... 9-56
9-7-5 Multi-execution (Buffer Mode) of Motion Control Instructions for Multi-axes Coordinated Control 9-
56
9-8 Other Functions..................................................................................................................... 9-65
9-8-1 Changing the Current Position .................................................................................................. 9-65
9-8-2 Torque Limit............................................................................................................................... 9-66
9-8-3 Latching.....................................................................................................................................9-66
9-8-4 Zone Monitoring ........................................................................................................................9-67
9-8-5 Software Limits..........................................................................................................................9-68
9-8-6 Following Error Monitoring ........................................................................................................ 9-69
9-8-7 Following Error Counter Reset..................................................................................................9-70
9-8-8 Axis Following Error Monitoring ................................................................................................9-70
9-8-9 In-position Check ...................................................................................................................... 9-71
Section 10 Sample Programming
10-1 Overview of Sample Programming ...................................................................................... 10-2
10-1-1 Devices .....................................................................................................................................10-2
14
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 17
CONTENTS
10-1-2 Installation and Wiring .............................................................................................................. 10-2
10-1-3 Setup ........................................................................................................................................ 10-3
10-2 Basic Programming Samples ............................................................................................... 10-4
10-2-1 Monitoring EtherCAT Communications and Turning ON Servos .............................................. 10-4
10-2-2 Interlocking Axis Operation with Master Control Instructions ................................................... 10-6
10-2-3 Error Monitoring and Error Resetting for Single-axis Operation and Synchronized Operation. 10-8
10-2-4 Error Monitoring and Error Resetting for Multi-axes Coordinated Operation.......................... 10-10
10-2-5 Monitoring for Instruction Errors ............................................................................................. 10-16
10-2-6 Checking to See If Errors Are Reset....................................................................................... 10-18
10-2-7 Stopping Axes during Single-axis Operation .......................................................................... 10-20
10-2-8 Stopping an Axes Group in Coordinated Motion .................................................................... 10-24
10-2-9 Homing and Absolute Positioning........................................................................................... 10-30
10-2-10 Changing the Target Position by Re-execution of an Instruction ............................................ 10-35
10-2-11 Interrupt Feeding .................................................................................................................... 10-41
10-2-12 Changing the Cam Table by Re-execution of an Instruction ................................................... 10-45
10-2-13 Using a Cam Profile Curve to Correct the Sync Start Position............................................... 10-54
10-2-14 Shifting the Phase of a Master Axis in Cam Motion................................................................ 10-64
10-2-15 Changing the Actual Position during Velocity Control............................................................. 10-72
10-2-16 Changing a Cam Data Variable and Saving the Cam Table ................................................... 10-78
10-2-17 Temporarily Changing Axis Parameters.................................................................................. 10-87
10-2-18 Updating the Cam Table End Point Index ............................................................................... 10-90
Section 11 Troubleshooting
11-1 Overview of Errors................................................................................................................. 11-2
11-1-1 How to Check for Errors............................................................................................................ 11-3
11-1-2 Errors Related to the Motion Control Function Module............................................................. 11-5
11-2 Troubleshooting................................................................................................................... 11-10
11-2-1 Error Table .............................................................................................................................. 11-10
11-2-2 Error Descriptions................................................................................................................... 11-19
11-2-3 Error Causes and Remedies .................................................................................................. 11-53
Appendices
A-1 Connecting the Servo Drive....................................................................................................A-2
A-1-1 Wiring the Servo Drive................................................................................................................A-2
A-1-2 Servo Drive Settings...................................................................................................................A-2
A-2 Connecting to Encoder Input Terminals .............................................................................A-11
A-2-1 Wiring to Encoder Input Terminals............................................................................................A-11
A-2-2 Settings for Encoder Input Terminals........................................................................................A-11
A-3 Terminology ...........................................................................................................................A-15
A-3-1 NJ-series Controller.................................................................................................................. A-15
A-3-2 Motion Control ..........................................................................................................................A-16
A-3-3 EtherCAT Communications.......................................................................................................A-17
Index
NJ-series CPU Unit Motion Control User’s Manual (W507)
15
Page 18
CONTENTS
16
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 19
Read and Understand this Manual
Read and Understand this Manual
Please read and understand this manual before using the product. Please consult your OMRON representative if you have any questions or comments.
Warranty and Limitations of Liability
WARRANTY
OMRON's exclusive warranty is that the products are free from defects in materials and workmanship for a period of one year (or other period if specified) from date of sale by OMRON.
OMRON MAKES NO WARRANTY OR REPRESENTATION, EXPRESS OR IMPLIED, REGARDING NON­INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR PARTICULAR PURPOSE OF THE PRODUCTS. ANY BUYER OR USER ACKNOWLEDGES THAT THE BUYER OR USER ALONE HAS DETERMINED THAT THE PRODUCTS WILL SUITABLY MEET THE REQUIREMENTS OF THEIR INTENDED USE. OMRON DISCLAIMS ALL OTHER WARRANTIES, EXPRESS OR IMPLIED.
LIMITATIONS OF LIABILITY
OMRON SHALL NOT BE RESPONSIBLE FOR SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES, LOSS OF PROFITS OR COMMERCIAL LOSS IN ANY WAY CONNECTED WITH THE PRODUCTS, WHETHER SUCH CLAIM IS BASED ON CONTRACT, WARRANTY, NEGLIGENCE, OR STRICT LIABILITY.
In no event shall the responsibility of OMRON for any act exceed the individual price of the product on which liability is asserted.
IN NO EVENT SHALL OMRON BE RESPONSIBLE FOR WARRANTY, REPAIR, OR OTHER CLAIMS REGARDING THE PRODUCTS UNLESS OMRON'S ANALYSIS CONFIRMS THAT THE PRODUCTS WERE PROPERLY HANDLED, STORED, INSTALLED, AND MAINTAINED AND NOT SUBJECT TO CONTAMINATION, ABUSE, MISUSE, OR INAPPROPRIATE MODIFICATION OR REPAIR.
NJ-series CPU Unit Motion Control User’s Manual (W507)
17
Page 20
Read and Understand this Manual
Application Considerations
SUITABILITY FOR USE
OMRON shall not be responsible for conformity with any standards, codes, or regulations that apply to the combination of products in the customer's application or use of the products.
At the customer's request, OMRON will provide applicable third party certification documents identifying ratings and limitations of use that apply to the products. This information by itself is not sufficient for a complete determination of the suitability of the products in combination with the end product, machine, system, or other application or use.
The following are some examples of applications for which particular attention must be given. This is not intended to be an exhaustive list of all possible uses of the products, nor is it intended to imply that the uses listed may be suitable for the products:
• Outdoor use, uses involving potential chemical contamination or electrical interference, or conditions or uses not described in this manual.
• Nuclear energy control systems, combustion systems, railroad systems, aviation systems, medical equipment, amusement machines, vehicles, safety equipment, and installations subject to separate industry or government regulations.
• Systems, machines, and equipment that could present a risk to life or property.
Please know and observe all prohibitions of use applicable to the products.
NEVER USE THE PRODUCTS FOR AN APPLICATION INVOLVING SERIOUS RISK TO LIFE OR PROPERTY WITHOUT ENSURING THAT THE SYSTEM AS A WHOLE HAS BEEN DESIGNED TO ADDRESS THE RISKS, AND THAT THE OMRON PRODUCTS ARE PROPERLY RATED AND INSTALLED FOR THE INTENDED USE WITHIN THE OVERALL EQUIPMENT OR SYSTEM.
PROGRAMMABLE PRODUCTS
OMRON shall not be responsible for the user's programming of a programmable product, or any consequence thereof.
18
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 21
Read and Understand this Manual
Disclaimers
CHANGE IN SPECIFICATIONS
Product specifications and accessories may be changed at any time based on improvements and other reasons.
It is our practice to change model numbers when published ratings or features are changed, or when significant construction changes are made. However, some specifications of the products may be changed without any notice. When in doubt, special model numbers may be assigned to fix or establish key specifications for your application on your request. Please consult with your OMRON representative at any time to confirm actual specifications of purchased products.
DIMENSIONS AND WEIGHTS
Dimensions and weights are nominal and are not to be used for manufacturing purposes, even when tolerances are shown.
PERFORMANCE DATA
Performance data given in this manual is provided as a guide for the user in determining suitability and does not constitute a warranty. It may represent the result of OMRON's test conditions, and the users must correlate it to actual application requirements. Actual performance is subject to the OMRON Warranty and Limitations of Liability.
ERRORS AND OMISSIONS
The information in this manual has been carefully checked and is believed to be accurate; however, no responsibility is assumed for clerical, typographical, or proofreading errors, or omissions.
NJ-series CPU Unit Motion Control User’s Manual (W507)
19
Page 22
Read and Understand this Manual
20
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 23
Safety Precautions
Definition of Precautionary Information
Refer to the following manuals for safety precautions.
• NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500)
• NJ-series CPU Unit Software User’s Manual (Cat. No. W501)
Safety Precautions
NJ-series CPU Unit Motion Control User’s Manual (W507)
21
Page 24
Precautions for Safe Use
Precautions for Safe Use
Refer to the following manuals for precautions for safe use.
• NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500)
• NJ-series CPU Unit Software User’s Manual (Cat. No. W501)
22
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 25
Precautions for Correct Use
Refer to the following manuals for precautions for correct use.
• NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500)
• NJ-series CPU Unit Software User’s Manual (Cat. No. W501)
Precautions for Correct Use
NJ-series CPU Unit Motion Control User’s Manual (W507)
23
Page 26
Regulations and Standards
Regulations and Standards
Conformance to EC Directives
Applicable Directives
• EMC Directives
• Low Voltage Directive
Concepts
z EMC Directive
OMRON devices that comply with EC Directives also conform to the related EMC standards so that they can be more easily built into other devices or the overall machine. The actual products have been checked for conformity to EMC standards.* Whether the products conform to the standards in the system used by the customer, however, must be checked by the customer. EMC-related performance of the OMRON devices that comply with EC Directives will vary depending on the configuration, wiring, and other conditions of the equipment or control panel on which the OMRON devices are installed. The customer must, therefore, perform the final check to confirm that devices and the overall machine conform to EMC standards.
* Applicable EMC (Electromagnetic Compatibility) standards are as follows:
EMS (Electromagnetic Susceptibility): EN 61131-2 and EN 61000-6-2 EMI (Electromagnetic Interference): EN 61131-2 and EN 61000-6-4 (Radiated emission: 10-m regulations)
z Low Voltage Directive
Always ensure that devices operating at voltages of 50 to 1,000 VAC and 75 to 1,500 VDC meet the required safety standards. The applicable directive is EN 61131-2.
z Conformance to EC Directives
The NJ-series Controllers comply with EC Directives. To ensure that the machine or device in which the NJ-series Controller is used complies with EC Directives, the Controller must be installed as fol­lows:
• The NJ-series Controller must be installed within a control panel.
• You must use reinforced insulation or double insulation for the DC power supplies connected to DC Power Supply Units and I/O Units.
• NJ-series Controllers that comply with EC Directives also conform to the Common Emission Stan­dard (EN 61000-6-4). Radiated emission characteristics (10-m regulations) may vary depending on the configuration of the control panel used, other devices connected to the control panel, wir­ing, and other conditions. You must therefore confirm that the overall machine or equipment complies with EC Directives.
24
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 27
Conformance to Shipbuilding Standards
The NJ-series Controllers comply with the following shipbuilding standards. Applicability to the ship­building standards is based on certain usage conditions. It may not be possible to use the product in some locations. Contact your OMRON representative before attempting to use a Controller on a ship.
Usage Conditions for NK and LR Shipbuilding Standards
• The NJ-series Controller must be installed within a control panel.
• Gaps in the door to the control panel must be completely filled or covered with gaskets or other material.
• The following noise filter must be connected to the power supply line.
Noise Filter
Manufacturer Model
Cosel Co., Ltd. TAH-06-683
Regulations and Standards
Trademarks
• Sysmac and SYSMAC are trademarks or registered trademarks of OMRON Corporation in Japan and other countries for OMRON factory automation products.
• Windows, Windows 98, Windows XP, Windows Vista, and Windows 7 are registered trademarks of Microsoft Corporation in the USA and other countries.
•EtherCAT is a registered trademark of Beckhoff Automation GmbH for their patented technology.
• The SD logo is a trademark of SD-3C, LLC.
Other company names and product names in this document are the trademarks or registered trade­marks of their respective companies.
Software Licenses and Copyrights
This product incorporates certain third party software. The license and copyright information associ­ated with this software is available at http://www.fa.omron.co.jp/nj_info_e/.
NJ-series CPU Unit Motion Control User’s Manual (W507)
25
Page 28
Unit Versions
Unit Versions
Unit Versions
A “unit version” has been introduced to manage CPU Units in the NJ Series according to differences in functionality accompanying Unit upgrades.
Notation of Unit Versions on Products
The unit version is given on the ID information label of the products for which unit versions are man­aged, as shown below.
Example for NJ-series NJ501-@@@@ CPU Unit:
ID information label
Unit model
NJ501 -1500 Ver.1.@@
PORT1 MAC ADDRESS: @@@@@@@@@@@@ PORT2 MAC ADDRESS: @@@@@@@@@@@@
Lot No. DDMYY@ xxxx
Unit version
Lot number and serial number MAC address
The following information is provided on the ID information label.
Item Description
Unit model Gives the model of the Unit.
Unit version Gives the unit version of the Unit.
Lot number and serial number
MAC address Gives the MAC address of the built-in port on the Unit.
Gives the lot number and serial number of the Unit.
DDMYY: Lot number, @: For use by OMRON, xxxx: Serial number
“M” gives the month (1 to 9: January to September, X: October, Y: November, Z: December)
26
Confirming Unit Versions with Sysmac Studio
You can use the Unit Production Information on the Sysmac Studio to check the unit version of the CPU Unit, CJ-series Special I/O Units, CJ-series CPU Bus Units, and EtherCAT slaves. The unit versions of CJ-series Basic I/O Units cannot be checked from the Sysmac Studio.
z CPU Unit and CJ-series Units
1 Double-click CPU/Expansion Racks under Configurations and Setup in the Multiview
Explorer. Or, right-click CPU/Expansion Racks under Configurations and Setup and select Edit from the menu.
The Unit Editor is displayed for the Controller Configurations and Setup layer.
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 29
Unit Versions
2 Right-click any open space in the Unit Editor and select Production Information.
The Production Information Dialog Box is displayed.
Simple Display Detailed Display
In this example, “Ver.1.0” is displayed next to the unit model.
The following items are displayed.
CPU Unit CJ-series Units
Unit model
Unit version
Lot number
Unit model
Unit version
Lot number
Rack number, slot number, and unit number
z EtherCAT Slaves
1 Double-click EtherCAT under Configurations and Setup in the Multiview Explorer. Or, right-
click EtherCAT under Configurations and Setup and select Edit from the menu.
The EtherCAT Configuration Tab Page is displayed for the Controller Configurations and Setup layer.
2 Right-click the master in the EtherCAT Configurations Editing Pane and select Display Produc-
tion Information.
The Production Information Dialog Box is displayed.
The following items are displayed. Node address Type information* Serial number
* If the model number cannot be determined (such as when there is no ESI file), the vendor ID, product
code, and revision number are displayed.
NJ-series CPU Unit Motion Control User’s Manual (W507)
27
Page 30
Unit Versions
Unit Version Notation
In this manual, unit versions are specified as shown in the following table.
Product nameplate Notation in this manual Remarks
“Ver.1.0” or later to the right of the lot number
Unit version 1.0 or later Unless unit versions are specified, the information in this manual
applies to all unit versions.
28
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 31
Related Manuals
The following manuals are related to the NJ-series Controllers. Use these manuals for reference.
Manual name Cat. No. Model numbers Application Description
NJ-series CPU Unit Hardware User’s Manual
NJ-series CPU Unit Soft­ware User’s Manual
NJ-series CPU Unit Motion Control User’s Manual
NJ-series Instructions Reference Manual
NJ-series Motion Control Instructions Reference Manual
CJ-series Special Unit Manuals for NJ-series CPU Unit
W500 NJ501-@@@@ Learning the basic specifi-
cations of the NJ-series CPU Units, including intro­ductory information, designing, installation, and maintenance. Mainly hard­ware information is pro­vided.
W501 NJ501-@@@@ Learning how to program
and set up an NJ-series CPU Unit. Mainly software information is provided.
W507 NJ501-@@@@ Learning about motion
control settings and pro­gramming concepts.
W502 NJ501-@@@@ Learning about the specifi-
W508 NJ501-@@@@ Learning about the specifi-
W490 W498 W499 W491 Z310 W492 W494 W497
CJ1W-@@@@ Learning how to use CJ-
cations of the instruction set that is provided by OMRON.
cations of the motion con­trol instructions that are provided by OMRON.
series Units with an NJ­series CPU Unit.
An introduction to the entire NJ-series system is provided along with the following information on a Controller built with an NJ501 CPU Unit.
• Features and system configuration
• Introduction
• Part names and functions
• General specifications
• Installation and wiring
• Maintenance and inspection
Use this manual together with the NJ-series CPU Unit Software User’s Manual (Cat. No. W501).
The following information is provided on a Con­troller built with an NJ501 CPU Unit.
• CPU Unit operation
• CPU Unit features
• Initial settings
• Programming based on IEC 61131-3 lan­guage specifications
Use this manual together with the NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500).
The settings and operation of the CPU Unit and programming concepts for motion control are described. Use this manual together with the NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500) and NJ-series CPU Unit Soft- ware User’s Manual (Cat. No. W501).
The instructions in the instruction set (IEC 61131-3 specifications) are described. When programming, use this manual together with the
NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500) and NJ-series CPU Unit Soft­ware User’s Manual (Cat. No. W501).
The motion control instructions are described. When programming, use this manual together with the NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500), NJ-series CPU Unit Software User’s Manual (Cat. No. W501) and
NJ-series CPU Unit Motion Control User’s Man­ual (Cat. No. W507).
The methods and precautions for using CJ­series Units with an NJ501 CPU Unit are described, including access methods and pro­gramming interfaces. Manuals are available for the following Units. Analog I/O Units, Insulated-type Analog I/O Units, Temperature Control Units, ID Sensor Units, High-speed Counter Units, Serial Com­munications Units, and DeviceNet Units.
Use these manuals together with the NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500) and NJ-series CPU Unit Software User’s Manual (Cat. No. W501).
Related Manuals
NJ-series CPU Unit Motion Control User’s Manual (W507)
29
Page 32
Related Manuals
Manual name Cat. No. Model numbers Application Description
NJ-series CPU Unit Built­in EtherCAT Port User’s Manual
NJ-series CPU Unit Built­in EtherNet/IP Port User’s Manual
NJ-series Troubleshoot­ing Manual
Sysmac Studio Version 1 Operation Manual
CX-Integrator CS/CJ/CP/NSJ-series Network Configuration Tool Operation Manual
CX-Designer User’s Manual
CX-Protocol Operation Manual
W505 NJ501-@@@@ Using the built-in EtherCAT
port on an NJ-series CPU Unit.
W506 NJ501-@@@@ Using the built-in Ether-
Net/IP port on an NJ-series CPU Unit.
W503 NJ501-@@@@ Learning about the errors
that may be detected in an NJ-series Controller.
W504 SYSMAC-
SE2@@@
W464 Learning how to configure
V099 Learning to create screen
W344 Creating data transfer pro-
Learning about the operat­ing procedures and func­tions of the Sysmac Studio.
networks (data links, rout­ing tables, Communica­tions Unit settings, etc.).
data for NS-series Pro­grammable Terminals.
tocols for general-purpose devices connected to CJ­series Serial Communica­tions Units.
Information on the built-in EtherCAT port is pro­vided. This manual provides an introduction and provides information on the configuration, fea­tures, and setup. Use this manual together with the NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500) and NJ-series CPU Unit Software User’s Manual (Cat. No. W501).
Information on the built-in EtherNet/IP port is provided. Information is provided on the basic setup, tag data links, and other features. Use this manual together with the NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500) and NJ-series CPU Unit Software User’s Manual (Cat. No. W501).
Concepts on managing errors that may be detected in an NJ-series Controller and informa­tion on individual errors are described. Use this manual together with the NJ-series CPU Unit Hardware User’s Manual (Cat. No. W500) and NJ-series CPU Unit Software User’s Manual (Cat. No. W501).
Describes the operating procedures of the Sys­mac Studio.
Describes operating procedures for the CX-Inte­grator.
Describes operating procedures for the CX­Designer.
Describes operating procedures for the CX-Pro­tocol.
30
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 33
Revision History
A manual revision code appears as a suffix to the catalog number on the front and back covers of the manual.
Revision History
Cat. No.
Revision code Date Revised content
01 July 2011 Original production
W507-E1-01
Revision code
NJ-series CPU Unit Motion Control User’s Manual (W507)
31
Page 34
Revision History
32
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 35
Introduction to the Motion Control Function Module
This section describes the features, system configuration, and application flow for the Motion Control Function Module.
1-1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
1-2 System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
1-3 Application Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
1-4 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
1-4-1 General Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
1-4-2 Performance Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
1-4-3 Function Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
1
NJ-series CPU Unit Motion Control User’s Manual (W507)
1-1
Page 36
1 Introduction to the Motion Control Function Module
1-1 Features
The Motion Control Function Module (sometimes abbreviated to “MC Function Module”) is a software function module that is built into the CPU Unit. The MC Function Module can perform motion control for up to 64 axes through the EtherCAT port that is built into the CPU Unit. Cyclic communications are per­formed with Servo Drives that are connected to the EtherCAT port to enable high-speed, high-precision machine control.
Motion Control Instructions Based on PLCopen
The motion control instructions of the MC Function Module are based on motion control function blocks that are standardized by PLCopen. These instructions allow you to program single-axis PTP position­ing, interpolation control, synchronized control (e.g., of electronic cams), velocity control, and torque control. You can set the velocity, acceleration rate, deceleration rate, and jerk each time a motion con­trol instruction is executed to flexibly control operation according to the application.
Additional Information
• PLCopen
PLCopen is an association that promotes IEC 61131-3. It has its headquarters in Europe and a world-wide membership. PLCopen standardizes function blocks for motion control to define a program interface for the languages specified in IEC 61131-3 (JIS B 3503).
•Jerk
Jerk is the rate of change in the acceleration rate or deceleration rate. If you specify the jerk, the velocity graph will form an S-curve for acceleration and deceleration.
Data Transmission Using EtherCAT Communications
The MC Function Module can be combined with OMRON G5-series Servo Drives with built-in EtherCAT communications to enable exchange of all control information with high-speed data communications. The various control commands are transmitted via data communications. That means that the Servo­motor's operational performance is maximized without being limited by interface specifications, such as the response frequency of the encoder feedback pulses. You can use the Servo Drive's various control parameters and monitor data on a host controller to unify management of system information.
Additional Information
1-2
What Is EtherCAT?
EtherCAT is an open high-speed industrial network system that conforms to Ethernet (IEEE
802.3). Each node achieves a short cycle time by transmitting Ethernet frames at high speed. A mechanism that allows sharing clock information enables high-precision synchronized control with low communications jitter.
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 37
1 Introduction to the Motion Control Function Module
1-2 System Configuration
The MC Function Module receives sensor signal status from devices and control panels. It receives commands from the motion control instructions that are executed in the user program. It uses both of these to perform motion control with the Servo Drives and Encoder Input Terminals.
1-2 System Configuration
z Motion Control Configuration
The EtherCAT network configuration and Sysmac Studio are used for the MC Function Module.
EtherCAT Network Configuration The MC Function Module performs control for Servo Drives and Encoder Input Terminals through the EtherCAT master port that is built into the CPU Unit. The EtherCAT network configuration is used to perform precise motion control in a fixed period with very little deviation.
Sysmac Studio The Sysmac Studio is connected to the peripheral USB port on the CPU Unit with a commercially available USB cable. You can also connect it to the built-in EtherNet/IP port on the CPU Unit with Ethernet cable.
Sysmac Studio
Peripheral USB port
EtherCAT
G5-series Servo Drives with Built-in
EtherCAT Communications
EtherCAT Network
Configuration
Encoder Input Terminal
LAN
USB
Or
EtherNet/IP
NJ-series Controller
Power Supply Unit
Built-in EtherNet/IP port
Built-in EtherCAT port
Positive limit input Negative limit input Immediate stop input Home proximity input Home input External latch input, etc.
CPU Unit
1
NJ-series CPU Unit Motion Control User’s Manual (W507)
1-3
Page 38
1 Introduction to the Motion Control Function Module
1-3 Application Procedure
This section provides the basic procedure to perform motion control with the MC Function Module.
Basic Flow of Operation
START
Transferring
Checking Wiring
Checking Operation
Create a project.Setup
Create the EtherCAT Network Configuration.
Add axes.
Assign the axes.
Set the axis parameters.
Set the Controller Setup.
Transfer the project to the Controller.
Open the MC Test Run Tab Page.
Monitor input signals to check the wiring.
Perform jogging.
Sysmac Studio Version 1 Operation Manual
(Cat. No. W504)
NJ-series CPU Unit Software User’s Manual
*
(Cat. No. W501)
Section 3 Configuring Axes and Axes Groups
NJ-series CPU Unit Software User’s Manual
(Cat. No. W501)
Section 4 Checking Wiring from the Sysmac Studio
Continues to on next page.
* The EtherCAT Network Configuration can be set online if you are connected to the physical network.
The EtherCAT Network Configuration can be selected offline if the hardware is not available yet.
1-4
A
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 39
A
1 Introduction to the Motion Control Function Module
1-3 Application Procedure
Programming
Manual operation
Homing
Programming
Debugging
Operation
Write a program to perform jogging.
Jog the axes with the user program.
Define the homes of the Servomotor axes to control.
Program the motion controls.
Error?
No
Operate the Controller and the machine.
Yes
Read the error code.
Remove the cause of the error and clear the error.
Section 6 Motion Control Pro­gramming
Section 7 Manual Operation
Section 8 Homing
Section 6 Motion Control Pro­gramming
Section 10 Sample Program­ming
Section 11 Troubleshooting
Section 9 Motion Control Functions
1
Maintenance
Perform periodic maintenance.
END
NJ-series CPU Unit Motion Control User’s Manual (W507)
1-5
Page 40
1 Introduction to the Motion Control Function Module
1-4 Specifications
This section gives the specifications of the MC Function Module.
1-4-1 General Specifications
General specifications conform to the general specifications of the CPU Unit.
Refer to the NJ-series CPU Unit Hardware User's Manual (Cat. No. W500) for details.
1-4-2 Performance Specifications
Item
Applicable Servo Drives OMRON G5-series Servo Drives with Built-in EtherCAT Communica-
Applicable Encoder Input Terminals
Control method Control commands using EtherCAT communications
Control modes Position control (Cyclic Synchronous Position Control Mode)
Number of con­trolled axes
Number of axes groups 32 axes groups max.
Unit conversions Unit of display Pulses, millimeters, micrometers, nanometers, degrees, or inches
Positions that can be administered Command position and actual position
Position command values
Velocity command values Negative or positive long reals (LREAL) or 0 (command units/s)
Acceleration command values and decel­eration command values
Jerk command values
Override factors 0.00% or 0.01% to 500.00%
Axis types Servo axes, virtual servo axes, encoder axes, and virtual encoder
Motion control period Same as the process data communications cycle for EtherCAT com-
Maximum number of controlled axes
Single-axis control 16 axes max. 32 axes max. 64 axes max.
Linear interpolation control
Circular interpolation control
Electronic gear ratio Pulses per motor rotation/travel distance per motor rotation
NJ501-1300 NJ501-1400 NJ501-1500
*1
tions
OMRON GX-series GX-EC0211/EC0241 Encoder I/O Terminals*2
Velocity control (Cyclic Synchronous Velocity Control Mode)
Torque control (Cyclic Synchronous Torque Control Mode)
16 axes 32 axes 64 axes
4 axes max. per axes group
2 axes per axes group
Negative or positive long reals (LREAL) or 0 (command units
Positive long reals (LREAL) or 0 (command units/s
Positive long reals (LREAL) or 0 (command units/s
axes
munications
Specification
*2
)
2
)
3
)
1-6
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 41
1 Introduction to the Motion Control Function Module
Item
Cams Cam data points 65,535 points max. per cam table
Number of cam tables 640 tables max.
Cam profile curves Created with Cam Editor.
Overwriting cam data Cam data can be overwritten from the user program.
*1 The recommended unit version is 2.1 or later.
*2 The recommended unit version is 1.1 or later.
*3 Positions can be set to within the range of 40-bit signed integers when they are converted to pulses.
1-4-3 Function Specifications
The following functions are supported when connected to an OMRON G5-series Servo Drive with built­in EtherCAT communications.
Item Description
Single axes
Single-axis position control
Single-axis velocity control
Single-axis torque con­trol
Single-axis synchro­nized con­trol
Single-axis manual operation
Absolute positioning The absolute target position is specified to perform position-
Relative positioning The travel distance from the command current position is
Interrupt feeding Positioning is performed for the specified travel distance from
Velocity control Velocity control is implemented in Position Control Mode.
Cyclic synchronous velocity control
Torque control The torque of the motor is controlled.
Starting cam operation Cam operation is started using a specified cam table.
Ending cam operation Cam operation is ended for the axis specified with the input
Starting gear operation The gear ratio between the master axis and the slave axis is
Positioning gear opera­tion
Ending gear operation The current gear operation or positioning gear operation is
Synchronous position­ing
Master axis phase shift The phase of the master axis currently in synchronized con-
Combining axes The sum or difference of the command positions of two axes
Powering the Servo The Servo for the Servo Drive is turned ON to enable opera-
Jogging Jogging is performed according to the specified target veloc-
Specification
NJ501-1300 NJ501-1400 NJ501-1500
1,048,560 points max. total for all cam tables
Positions (master axis phase and slave axis displacement) can be specified to change phase pitches for each section.
ing.
specified to perform positioning.
the position where an external device triggers an interrupt input.
A velocity command is output each control period in Velocity Control Mode.
parameter.
specified and gear operation is started.
The gear ratio between the master axis and the slave axis and the position to synchronize are specified and gear oper­ation is started.
stopped.
Positioning is performed in sync with the specified master axis.
trol is shifted.
is output as the command position.
tion.
ity.
1-4 Specifications
1
1-4-3 Function Specifications
NJ-series CPU Unit Motion Control User’s Manual (W507)
1-7
Page 42
1 Introduction to the Motion Control Function Module
Item Description
Single axes
Axes groups
Com­mon items
Auxiliary functions for single­axis control
Multi-axes coordi­nated con­trol
Auxiliary functions for multi­axes coor­dinated control
Cams Setting cam table prop-
Parameters Writing MC settings Some of the axis parameters or axes group parameters are
Resetting axis errors Axis errors are cleared.
Homing The motor is operated to determine the home using the limit
signals, home proximity signal, and home signal.
High-speed homing The axis returns to home using an absolute position of 0 as
the target position.
Stopping The axis is forced to stop.
Immediate stop The axis is stopped immediately.
Setting override factors The target velocity for an axis is changed.
Changing the current position
Enabling external latches
Disabling external latches
Zone monitoring The system determines if the command position or actual
Axis following error monitoring
Following error counter reset
Torque limit The output torque is limited by enabling and disabling the
Absolute linear interpo­lation
Relative linear interpola­tion
Circular 2D interpolation Circular interpolation is performed for two axes.
Resetting axes group errors
Enabling an axes group An axes group is enabled.
Disabling an axes group An axes group is disabled.
Stopping an axes group All axes in interpolated movement are decelerated to a stop.
Immediately stopping an axes group
Setting axes group over­ride factors
erties
Saving cam tables The cam table that is specified in the input parameter is
The command current position or the actual current position is changed as required for an axis.
The position of an axis is recorded when a trigger occurs.
The current latch is disabled.
current position of an axis is within a specified zone.
The following error between the command positions or actual positions of two specified axes is monitored to see if it exceeds the allowed value.
The error between the command current position and the actual current position is set to zero.
torque limit function of the Servo Drive and by setting the torque limit value.
An absolute position is specified and linear interpolation is performed.
A relative position is specified and linear interpolation is per­formed.
Axes group errors and axis errors are cleared.
All axes in interpolated movement are stopped immediately.
The blended target velocity is changed during interpolated movement.
The end point index of the cam table that is specified in the input parameter is changed.
saved to non-volatile memory in the CPU Unit.
overwritten temporarily.
1-8
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 43
1 Introduction to the Motion Control Function Module
Item Description
Auxiliary functions
External interface signals The following Servo Drive input signals are used.
Count Modes You can select either Linear Mode (finite length) or Rotary
Mode (infinite length).
Unit conversions You can set the display unit for each axis according to the
machine.
Accelera­tion/decel­eration control
In-position check You can set an in-position range and in-position check time
Stop Method You can set the stop method to determine when the immedi-
Re-execution of motion control instruc­tions
Multi-execution of motion control instructions (Buffer Mode)
Continuous axes group motions (Tran­sition Mode)
Monitoring functions
Absolute encoder support You can use an OMRON G5-series Servomotor with an
Backlash compensation Servo Drive auxiliary functions are used.
Automatic accelera­tion/deceleration control
Changing the accelera­tion and deceleration rates
Software limits Software limits are set for each axis.
Following error The following error between the command current value and
Velocity, acceleration rate, deceleration rate, torque, interpolation velocity, interpolation acceleration rate, and interpolation decelera­tion rate
The acceleration/deceleration curve is automatically adjusted for an axis motion or axes group motion. You can select a trapezoidal curve or you can set the jerk for an S­curve.
You can change the acceleration or deceleration rate even during acceleration or deceleration.
to confirm when positioning is completed.
ate stop input signal or limit input signal is valid.
You can change the input variables for a motion control instruction during execution and execute the instruction again to change the target values during operation.
You can specify when to start execution and how to connect the velocities between operations when another motion con­trol instruction is executed during operation.
You can specify the Transition Mode for multi-execution of instructions for axes group operation.
You can detect when a range is exceeded during axis motion and when the target position is outside the range when a motion control instruction is executed. You can also set warning values.
the actual current value is monitored for each axis and an error is created to stop motion if a set value is exceeded.
You can set warning values for each axis and each axes group.
Absolute Encoder to eliminate the need to perform homing at startup.
The compensation method and setting range depend on the specifications of the Servo Drive.
Home signal, home proximity signal, positive limit signal, negative limit signal, immediate stop signal, and interrupt input signal
1-4 Specifications
1
1-4-3 Function Specifications
NJ-series CPU Unit Motion Control User’s Manual (W507)
1-9
Page 44
1 Introduction to the Motion Control Function Module
1-10
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 45
Motion Control Configuration and Principles
This section outlines the internal structure of the CPU Unit and describes the configura­tion and principles of the MC Function Module.
2-1 Internal Configuration of the CPU Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
2-2 Motion Control Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
2-3 Motion Control Principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
2-3-1 CPU Unit Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
2-3-2 Example of Task Operations for Motion Control . . . . . . . . . . . . . . . . . . . . . . . 2-7
2-4 EtherCAT Communications and Motion Control . . . . . . . . . . . . . . . . . . . . 2-11
2-4-1 CAN Application Protocol over EtherCAT (CoE) . . . . . . . . . . . . . . . . . . . . . . 2-11
2-4-2 Relationship between EtherCAT Master Function Module and MC Function
Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
2-4-3 Relationship between Process Data Communications Cycle and Motion Control
Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13
2
NJ-series CPU Unit Motion Control User’s Manual (W507)
2-1
Page 46
2 Motion Control Configuration and Principles
2-1 Internal Configuration of the CPU
Unit
This section provides an overview of the internal mechanisms of the NJ-series CPU Unit. The CPU Unit has the following software configuration. The Motion Control Function Module is a software module that performs motion control.
Motion Control Function
Module
PLC Function Module
* Refer to the NJ-series CPU Unit Hardware User's Manual (Cat. No. W500) for details.
The PLC Function Module runs on top of the OS. The other Function Modules run on top of the PLC Function Module. A description of each Function Module is given in the following table.
Function Module name Abbreviation Description
PLC Function Module PLC This module manages overall scheduling, executes
Motion Control Function Module MC This module performs motion control according to
EtherCAT Master Function Module ECAT This module communicates with the EtherCAT
EtherCAT Master Function
Module
OS
the user program, sends commands to the Motion Control Function Module, and provides interfaces to USB and the SD Memory Card.
the commands from motion control instructions that are executed in the user program. It sends data to the EtherCAT Master Function Module.
slaves as the EtherCAT master.
Other Function
Modules
*
2-2
Note Refer to the NJ-series CPU Unit Hardware User's Manual (Cat. No. W500) for details on other Function Mod-
ules.
This manual provides the specifications and operating procedures for the Motion Control Function Mod­ule (sometimes abbreviated to “MC Function Module”). Refer to the other NJ-series user’s manuals as required when using the MC Function Module in an application.
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 47
2 Motion Control Configuration and Principles
2-2 Motion Control Configuration
A control system built with Servo Drives generally controls motor operation with a semi-closed loop. The semi-closed loop uses an encoder attached to the motor to detect the amount of rotation that has been performed by the motor in response to the command value. This is provided as feedback of the machine’s travel distance. The following error between the command value and actual motor rotation is calculated and control is performed to bring the following error to zero.
In a machine configuration that uses the MC Function Module, no feedback information is provided for the commands from the user program in the CPU Unit. A feedback system is built into the Servo Drive.
NJ-series CPU Unit
User program MC Function
Motion control
instruction
Module
Command
interpretation
Data processing
EtherCAT
Communications
Master Module
Communications
processing
EtherCAT
communications
Servo Drive
Communica-
tions
processing
Command
interpretation
Status
Position
control
Velocity
control
Torque control
2-2 Motion Control Configuration
2
M
E
A feedback system is not configured.
A feedback system is configured.
When motion control instructions are executed in the user program, the MC Function Module inter­prets the resulting commands.
The MC Function Module then performs motion control processing at a fixed period based on the results of the command interpretation. It generates command values to send to the Servo Drive. The following command values are generated: target position, target velocity, and target torque.
The command values are sent by using PDO communications during each process data communica­tions cycle of EtherCAT communications.
The Servo Drive performs position loop control, velocity loop control, and torque loop control based on the command values received during each process data communications cycle of EtherCAT com­munications.
The encoder’s current value and the Servo Drive status are sent to the CPU Unit during each process data communications cycle of EtherCAT communications.
Additional Information
Motion control processing and process data communications in EtherCAT communications are
performed during the same time period.
The MC Function Module controls the Servo Drive, which contains the position control loop, velocity control loop, and torque control loop.
NJ-series CPU Unit Motion Control User’s Manual (W507)
2-3
Page 48
2 Motion Control Configuration and Principles
2-3 Motion Control Principles
This section provides information on the CPU Unit tasks and how they relate to motion control.
2-3-1 CPU Unit Tasks
Tasks are attributes of programs that determine the execution conditions and sequence of the pro­grams. The NJ-series CPU Units support the following tasks.
Typ e of t ask Task name
Tasks that execute programs at a fixed period Primary periodic task
Periodic tasks (execution priority: 16, 17, and 18)
Refer to the NJ-series CPU Unit Software User’s Manual (Cat. No. W501) for details on programs, tasks, and setting methods.
Types of Tasks and Task Priority
The NJ-series CPU Unit can execute the user program with a single task or multiple tasks. Tasks have an execution priority. Tasks with the highest execution priority are executed first. If the execution condi­tions are met for another task with a higher execution priority while a task is under execution, the task with the higher execution priority is given priority in execution. The following table lists the tasks in which you can use motion control instructions and the task priorities for the NJ-series CPU Unit.
Type of task
Primary periodic task
Periodic tasks 0 or 1
* The CPU Unit has some periodic tasks with an execution priority of 17 or 18. However, you cannot use motion
control instructions in these tasks. These tasks also do not perform I/O refreshing.
Number of
tasks
1 4 (fixed) This task executes I/O refreshing, programs, and motion con-
Priority Operation
trol in the specified task period. This task has the highest exe­cution priority of all tasks and can be executed quickly and precisely. Therefore, this task is best suited for situations when synchronized control or highly responsive control is required. Use the primary periodic task to execute all control with a sin­gle task.
16
*
These tasks execute programs and I/O refreshing in the speci­fied task period. The execution period for this task is longer than the execution period of the primary periodic task. There­fore, periodic tasks are used to execute programs. For exam­ple, synchronized control and control requiring a fast response time are placed in the primary periodic task. Overall device control is placed in a periodic task.
2-4
Precautions for Correct UsePrecautions for Correct Use
Motion control instructions can be used in the primary periodic task and in a priority-16 peri-
odic task.
If motion control instructions are used in any other tasks, an error will occur when the user pro­gram is built on the Sysmac Studio.
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 49
2 Motion Control Configuration and Principles
Basic Operation of Tasks
z Overall Task Operation
The primary periodic task and periodic tasks operate based on the task period of the primary peri­odic task (also known as the primary period). The primary periodic task includes operations such as system common processing and motion control in addition to I/O refreshing and user program exe­cution. Processing of motion control instructions in the programs is executed during the next motion control (MC) period after the END instruction is executed in the task.
Primary period Primary period
Primary
periodic task
Priority-16
periodic task
IO: I/O refreshing
UPG: User program execution
MC: Motion control
IO UPG MC IO UPG MC
A dotted line represents a transition to another task.
IO UPG UPG
Task period (primary period × 2)
A double line means that all processing for that task has been completed.
A dashed-dotted line means that processing for that task has been interrupted.
2-3 Motion Control Principles
2
2-3-1 CPU Unit Tasks
z Operation of the Primary Periodic Task
Task period (= primary period)
Task execution time
I/O refresh
Refresh
executed.
Output data processing
Processing Processing contents
Output data processing Output refresh data is created for Output Units that execute I/O refreshing.
Refresh execution This process exchanges data with I/O.
Input data processing Input refresh data is loaded from Input Units that execute I/O refreshing.
System common processing 1 Variable refresh processing (if there are accessing tasks) is performed.
Control processing
User program
execution
Input data processing
System common processing 1
If forced refreshing is set, the forced refreshing values are reflected in the output refresh data.
If forced refreshing is set, the forced refreshing values are reflected in the input refresh data that was read.
Motion input processing is performed.
Data tracing processing (sampling and trigger checking) is performed.
Motion control
System common processing 2
NJ-series CPU Unit Motion Control User’s Manual (W507)
2-5
Page 50
2 Motion Control Configuration and Principles
Processing Processing contents
User program execution Programs assigned to tasks are executed in the order that they are
assigned.
Motion control The motion control commands from the motion control instructions in the
programs are executed.
Motion output processing is performed.
System common processing 2 Variable refresh processing (if there are refreshing tasks) is performed.
Variable access processing is performed.
z Operation of a Periodic Task with an Execution Priority of 16
You can refresh I/O in the priority-16 periodic task.
Task period
Task execution time
Task processing time
**
I/O refresh
Refresh
Output data processing
* The CPU Unit will temporarily interrupt the execution of a task in order to execute a task with a higher execution
priority.
Control processing
executed.
Input data processing
System common
processing 1
User program
execution
Task processing time
Control processing
User program
execution
System common
processing 2
Task Period
The primary period, which is the task period for the primary periodic task, is the standard period for exe­cution. The primary period is automatically used as the motion control period. (It is also the same as the process data communications cycle for EtherCAT communications.) Periodic task execution is synchro­nized with the primary period. Set the task period of a periodic task as an integer multiple of the primary period. For example, if the primary period is 1 ms, then you can set the task period of a priority-16 peri­odic task to 4 ms. In that case, the start of the period for the primary periodic task and the periodic task will match once every four primary periods. The following table lists the possible combinations of pri­mary periodic task and periodic task periods.
Primary period Valid task periods for periodic tasks
500 µs 1 ms, 2 ms, 3 ms, 4 ms, 5 ms, 8 ms, 10 ms, 15 ms, 20 ms, 25 ms, 30 ms, 40 ms,
50 ms, 60 ms, 75 ms, or 100 ms
1 ms 1 ms, 2 ms, 3 ms, 4 ms, 5 ms, 8 ms, 10 ms, 15 ms, 20 ms, 25 ms, 30 ms, 40 ms,
50 ms, 60 ms, 75 ms, or 100 ms
2 ms 2 ms, 4 ms, 8 ms, 10 ms, 20 ms, 30 ms, 40 ms, 50 ms, 60 ms, or 100 ms
4 ms 4 ms, 8 ms, 20 ms, 40 ms, 60 ms, or 100 ms
2-6
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 51
2 Motion Control Configuration and Principles
2-3-2 Example of Task Operations for Motion Control
Motion control instructions can be used in the primary periodic task or in a priority-16 periodic task. This section provides examples of task operations.
Using Motion Control Instructions in the Primary Periodic Task
If high-speed motion control is required, place the motion control instructions (FB) in the primary peri­odic task.
Slave A
IN
Primary period Primary period
Primary
periodic task
1
Loading Data
The input data from the EtherCAT slaves (slave A) is loaded during the I/O refresh (IO).
2
Instruction Execution
The motion control instructions (FB) are executed based on the data that was loaded during user program execution (UPG). The output variables of the motion control instructions are refreshed at this point.
UPG
IO MC UPG
FB
Execution of motion control instructions
Servo
Execution command
IO MC
FB
2-3 Motion Control Principles
2
2-3-2 Example of Task Operations for Motion Control
3
Command Generation
Motion processing according to the motion control instructions (FB) that were executed is per­formed during motion control (MC) immediately after user program execution in the primary periodic task. During this processing, execution commands for the Servo Drives are generated.
4
Sending Commands
The execution commands that were generated are sent to the Servo Drive during the I/O refresh (IO) in the next period.
Additional Information
All instructions from inputs to execution command outputs to the Servo Drive are processed quickly in this task. We recommend placing all motion control instructions in the primary periodic task.
NJ-series CPU Unit Motion Control User’s Manual (W507)
2-7
Page 52
2 Motion Control Configuration and Principles
Using Motion Control Instructions in a Priority-16 Periodic Task
If high speed motion control is not required and/or your user program is too large, place motion control instructions in a priority-16 periodic task.
z Timing of Processing
Motion control processing (MC) for the motion control instructions (FB) that are executed in the same task period as the priority-16 periodic task are performed at the same time. Therefore, pro­cessing for multiple axes can be simultaneously executed or stopped.
Primary
periodic task
Priority-16
periodic task
Primary
periodic task
Priority-16
periodic task
Slave A
IN
Primary period
UPG
IO MC
Execution of motion control instructions
Slave A
IN
IO MC
UPG
IO MC
UPG
FB
Task period (primary period × 3)
IO MC
UPG
Primary period
UPG
UPG
IO MC
UPG
IO MC
UPG
FB
UPG
IO MC
UPG
IO MC
Servo
Execution command
UPG
IO MC
Servo
Execution command
UPG
IO MC
Execution of motion control instructions
Task period (primary period × 3)
1
Loading Data
The input data from the EtherCAT slaves (slave A) is loaded during the I/O refresh (IO).
2
Instruction Execution
The motion control instructions (FB) are executed based on the data that was loaded during user program execution (UPG) in the priority-16 periodic task. The output variables of the motion control instructions are refreshed at this point.
3
Command Generation
Motion control instructions (FB) are executed in the task period of the priority-16 periodic task according to the motion control instructions (FB) that were executed. Motion processing is per­formed during motion control processing (MC) in the next primary periodic task after the peri­odic task. During this processing, execution commands for the Servo Drives are generated.
4
Sending Commands
The execution commands that were generated are sent to the Servo Drive during the I/O refresh (IO) in the next period.
2-8
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 53
2 Motion Control Configuration and Principles
z Axis Variable Update Timing
Axis Variables are system-defined variables for some of the axis parameters and for the monitor information, such as the actual position and error information for the axes controlled by the MC Function Module. If you access an Axis Variable during the priority-16 periodic task, the values of the variable that were read at the start of the periodic task are used. Also, the values of an Axis Variable are not written when a motion control instruction (FB) is exe­cuted. They are written in motion control processing (MC) at the start of the next periodic task.
I/O
OUT
Primary period
Primary
periodic task
Priority-16
periodic task
UPG
IO MC
Values of Axis Variable are read
*1
UPG
IO MC
UPG
Execution of motion control instructions
Task period (primary period × 3)
UPG
FB
UPG
IO MC
UPG
IO MC
*3
*2
*1 The values of an Axis Variable are read at the start of user program execution for the periodic task.
*2 The values of an Axis Variable are not written when a motion control instruction (FB) is executed in the periodic
task.
*3 The values are written during this motion control processing (MC).
Servo
Execution command
UPG
IO MC
2-3 Motion Control Principles
2
2-3-2 Example of Task Operations for Motion Control
Precautions for Correct UsePrecautions for Correct Use
When motion control instructions are placed in a periodic task, the response time of the Servo
Drive will increase if the task period of the periodic task is lengthened.
Make sure that all axes can be stopped safely for emergency stops, including emergency stops commanded from external devices.
The execution timing of motion control instructions in a priority-16 periodic task is not the same as the execution timing for I/O control. Design the user program to allow for this.
Additional Information
For information on Axis Variables, refer to 3-1-3 Introduction to Axis Variables.
NJ-series CPU Unit Motion Control User’s Manual (W507)
2-9
Page 54
2 Motion Control Configuration and Principles
Using Motion Control Instructions in Two Different Types of Tasks
If you have processes that require high-speed motion control and processes that do not require high­speed motion control for the same axis, you can place the motion control instructions (FB) both in the primary periodic task and in a priority-16 periodic task.
If motion control instructions (FB) are executed in both tasks within the period of the priority-16 periodic task, the MC Function Module will perform motion processing for instructions in the primary periodic task first.
For example, the MC_MoveAbsolute instruction is executed in the priority-16 periodic task. Then, the MC_MoveRelative is executed for the same axis in the primary periodic task. The operation for this is shown below.
The MC Function Module will execute MC_MoveRelative first. MC_MoveAbsolute is executed with multi-execution of instructions.
Servo
Primary period
Execution command for MC_MoveRelative
Primary
periodic task
Priority-16
periodic task
The values of output variables for a motion control instruction and the values of system-defined vari­ables for motion control will change during the I/O refresh of the task that executed the instruction. Therefore, you may notice different behavior depending on the task if you use motion control instruc­tions for the same axis in different tasks. Make sure that you thoroughly understand the processes of each task before you start to develop your user program.
UPG
IO MC
UPG
FB1
Task period (primary period × 3)
UPG
IO MC
FB2 FB2 FB2 FB2
FB2: MC_MoveRelative
FB1: MC_MoveAbsolute
UPG
IO MC
UPG
IO MC
The instruction is buffered for multi-execution of instructions.
UPG
IO MC
Precautions for Correct UsePrecautions for Correct Use
If you include motion control instructions for the same axis in both the primary periodic task
and the priority-16 periodic task, pay close attention to the following when you develop your user program: the execution order of the motion control instructions, the timing of updates for system-defined variables for motion control, and the output timing of command values.
If you use system-defined variables for motion control for the same axis in multiple tasks, pay close attention to the differences in timing for updating system-defined variables for motion control when you develop your user program.
2-10
Additional Information
For information on multi-execution of instructions, refer to 9-5-7 Multi-execution of Motion Control Instructions (Buffer Mode).
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 55
2 Motion Control Configuration and Principles
2-4 EtherCAT Communications and
Motion Control
The MC Function Module controls Servo Drive and encoder input slaves through the PDO communica­tions of the EtherCAT Master Function Module in the CPU Unit. This section describes EtherCAT com­munications and other items related to the MC Function Module.
2-4-1 CAN Application Protocol over EtherCAT (CoE)
The MC Function Module exchanges data with the slaves on EtherCAT using the CAN application pro­tocol over EtherCAT (CoE). With CoE, the parameters and control information held by the slaves are specified according to data specifications of the object dictionary (OD). To communicate the data between the Controller (communications master) and slaves, two methods are used: process data objects (PDOs), which periodically exchange data in realtime, and service data objects (SDOs), which exchange data when required.
2-4 EtherCAT Communications and Motion
Control
2
2-4-1 CAN Application Protocol over EtherCAT (CoE)
The MC Function Module uses PDO communications for commands to refresh I/O data, such as data for Servomotor position control, on a fixed control period. It uses SDO communications for commands to read and write data at specified times, such as for parameter transfers.
Controller
(communications master)
PDO communications
SDO communications
EtherCAT
communications lines
Executed periodically.
Output data
Input data
Write data
Read data
Executed for requests.
Slaves
NJ-series CPU Unit Motion Control User’s Manual (W507)
2-11
Page 56
2 Motion Control Configuration and Principles
2-4-2 Relationship between EtherCAT Master Function Module and MC
Function Module
The NJ-series CPU Unit can perform sequence control and motion control through connections to EtherCAT slaves.
z Sequence Control
I/O ports for configuration slaves are automatically created when you create the EtherCAT Config-
uration in EtherCAT Edit Tab Page.
Perform sequence control through instructions other than motion control instructions.
z Motion Control
I/O ports for configuration slaves are automatically created when you create the EtherCAT Config-
uration in EtherCAT Edit Tab Page.
Create Axis Variables in Motion Control Setup View and assign the EtherCAT slaves for which motion control is performed.
Perform motion control through motion control instructions.
There are two types of EtherCAT slaves that can be assigned to Axis Variables: Servo Drive slaves and encoder input terminal slaves.
Sequence
control
Motion control
User program in PLC Function Module
Instructions
other than
motion control
instructions
User-created function block
Motion control instructions
Motion control instructions
Executed
Executed
Executed
Ex-
ecuted
Ex-
ecuted
Axis Variables
CPU Unit
Variables
MC Function Module
Profile processing Synchronization
processing
Other processing
Task period
Task period
EtherCAT
Master
Function
Module
I/O ports
EtherCAT
EtherCAT
CJ-series Units
Basic I/O
Units
Special Units
EtherCAT
slaves
Servo Drive or encoder input terminal EtherCAT slaves
Additional Information
Commands are not sent directly through PDO communications to an EtherCAT slave that is
assigned to an Axis Variable for instructions other than motion control instructions. However, the status of such an EtherCAT slave can be accessed indirectly through the Axis Variables.
You can use SDO communications to read and write the objects of EtherCAT slaves that are assigned to axes variables. However, do not use SDO communications to write objects that are mapped to PDO communications. If you do, the operation of the slaves will depend on slave specifications. For OMRON slaves, SDO communications will result in errors.
If Servo Drive and encoder input terminal EtherCAT slaves are not assigned to axes variables, you must execute sequence control for them in the same way as for general-purpose Ether­CAT slaves.
2-12
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 57
2 Motion Control Configuration and Principles
2-4-3 Relationship between Process Data Communications Cycle and
Motion Control Period
The PLC Function Module sends motion control commands to the MC Function Module when motion control instructions are executed in the user program. The MC Function Module then performs motion control processing based on those commands and sends the results of processing as commands to the EtherCAT’s Servo Drive.
This type of data exchange is updated as shown in the following processing period.
Primary period = Motion control period = Process data communications cycle for EtherCAT communications
CPU Unit
Basic I/O Units,
Special I/O Units,
and CPU Bus Units
Execution of user program in PLC Function Module
Sequence control period (primary periodic task period or periodic task period)
Slaves
2-4 EtherCAT Communications and Motion
Control
2
2-4-3 Relationship between Process Data Communications Cycle and Motion Control Period
Sequence control period
(primary periodic task)
Motion control processing by MC Function Module
Motion control period
= Primary periodic
task period
EtherCAT
Communications cycle (EtherCAT data communi­cations cycle = Primary periodic task period)
Processing in slave
Data refresh
period in slave
(depends on
the slave)
NJ-series CPU Unit Motion Control User’s Manual (W507)
2-13
Page 58
2 Motion Control Configuration and Principles
2-14
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 59
Configuring Axes and Axes Groups
This section describes the concept of axes and axes groups, the settings for axes that are required for the MC test run function to operate on the Sysmac Studio, and the instructions for creating and configuring axes and axes groups using the Sysmac Stu­dio.
3-1 Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
3-1-1 Introduction to Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
3-1-2 Introduction to Axis Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
3-1-3 Introduction to Axis Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
3-1-4 Specifying an Axis in the User Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
3-2 Axis Setting Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
3-2-1 Axis Configuration Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
3-2-2 Setting Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
3-3 Axes Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
3-3-1 Introduction to Axes Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
3-3-2 Introduction to Axes Group Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
3-3-3 Introduction to Axes Group Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19
3-3-4 Specifying an Axes Group in the User Program . . . . . . . . . . . . . . . . . . . . . . 3-21
3-4 Setting Procedures for Axes Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
3-4-1 Setting Procedure for an Axes Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
3-4-2 Setting Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
3
NJ-series CPU Unit Motion Control User’s Manual (W507)
3-1
Page 60
3 Configuring Axes and Axes Groups
3-1 Axes
This section describes the axes that are used in a MC Function Module.
3-1-1 Introduction to Axes
In a motion control system, the targets of motion control are called axes. An axis can be an actual Servo Drive or encoder connected using EtherCAT or it can be a virtual Servo Drive or encoder within the MC Function Module.
The MC Function Module supports the axis types that are given in the following table.
Axis type Description
Servo axis
Virtual servo axis These are virtual axes that exist only inside the MC Function Module. They
Encoder axis
Virtual encoder axis These axes are used virtually for encoder operation. A virtual encoder axis
*1
These are the axes used by the EtherCAT slave Servo Drives assigned to actual Servo Drives. One Servomotor is used as one axis.
are not used by actual Servo Drives. For example, they are used as master axes for synchronizing control.
An encoder axis uses an EtherCAT slave encoder input terminal Encoder axes are assigned to actual encoder input terminals. If one encoder input terminal contains two encoder inputs, the individual encoder inputs will act as one axis.
is used temporarily in place of an encoder axis when there is no physical encoder.
*3
. They are
*2
.
*1 The applicable Servo Drives are the OMRON G5-series Servo Drives with Built-in EtherCAT Communications.
*2 The applicable Encoder Input Terminals are the OMRON GX-series GX-EC0211/EC0241 Encoder I/O Termi-
nals.
*3 Virtual encoder axes are used in combination with motion control instructions that update the actual position of
the virtual encoder axis. Counting cannot be used with versions of the MC Function Module that do not support these instructions.
The following elements are related to the axes of the MC Function Module. These elements exist for each axis. The NJ501-1300 has axis parameters for 16 axes, the NJ501-1400 has axis parameters for 32 axes, and the NJ501-1500 has axis parameters for 64 axes.
Configuration element Description Page
Axis parameters The axis parameters set the maximum velocity, jogging, homing,
and other items for the axes operations controlled by the MC Func­tion Module. Use the Sysmac Studio to set the axis parameters.
Axis Variables Axis Variables are system-defined variables for the actual position,
error information, and other monitor information for axes controlled by the MC Function Module. Axis Variables are created when you add an axis from the Multiview Explorer of the Sysmac Studio. The names of the Axis Variables (called the Axis Variable names) are set here.
Specifying axes in the user program
In the user program, motion control is implemented with motion con­trol instructions. Motion control instructions that perform single-axis control are used to create axis commands. To control an axis with axis commands, specify the Axis Variable name of the system­defined variable or the Axis Variable name that was set with the Sys­mac Studio for the Axis in-out variable of the instruction.
3-3
3-5
3-7
3-2
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 61
3-1-2 Introduction to Axis Parameters
z Axis Parameters
Classification Parameter name
Axis Basic Settings
Unit Conversion Settings
Operation Settings Maximum Velocity
Other Operation Settings
Limit Settings Software Limits
Position Count Settings
Servo Drive Settings
Axis Number
Axis Use
Axis Type
Node Address (input devices and output devices)
Unit of Display
Command Pulse Count Per Motor Rotation
Work Travel Distance Per Motor Rotation
Maximum Jog Velocity
Maximum Acceleration
Maximum Deceleration
Acceleration/Deceleration Over
Operation Selection at Reversing
Velocity Warning Value
Acceleration Warning Value
Deceleration Warning Value
Positive Torque Warning Value
Negative Torque Warning Value
Actual Velocity Filter Time Constant
In-position Range
In-position Check Time
Zero Position Range
Immediate Stop Input Stop Method
Limit Input Stop Method
Drive Error Reset Monitoring Time
Maximum Positive Torque Limit
Maximum Negative Torque Limit
Positive Software Limit
Negative Software Limit
Following Error Over Value
Following Error Warning Value
Count Mode
Modulo Maximum Position Setting Value
Modulo Minimum Position Setting Value
Encoder Type
Modulo Maximum Position Setting Value
Modulo Minimum Position Setting Value
3 Configuring Axes and Axes Groups
3-1 Axes
3
3-1-2 Introduction to Axis Parameters
NJ-series CPU Unit Motion Control User’s Manual (W507)
3-3
Page 62
3 Configuring Axes and Axes Groups
Classification Parameter name
Homing Settings Homing Method
Home Input Signal
Homing Start Direction
Home Input Detection Direction
Operation Selection at Positive Limit Input
Operation Selection at Negative Limit Input
Homing Velocity
Homing Approach Velocity
Homing Acceleration
Homing Deceleration
Homing Jerk
Home Input Mask Distance
Home Offset
Homing Holding Time
Homing Compensation Value
Homing Compensation Velocity
Refer to 5-2 Axis Parameters for details on axis parameters.
z Settings Required to Use Axes
The following settings must be made to use the axes that are created with the Sysmac Studio.
Classification Parameter name Setting Page
Axis Basic Settings
Axis Number Axis numbers are automatically set in the order
that the axes are created.
Axis Use Select Used axis.
Axis Type Select the type of axis to control.
Node Address (input devices and output devices)
Specify the node address of the EtherCAT slave device that is assigned to the axis. The Node Address parameter cannot be selected if the Axis Type parameter is set to use a virtual axis.
5-5
z Required Settings to Perform a Servo Drive Test Run from the Sysmac Studio
Make the following settings to operate an EtherCAT-connected Servo Drive using the MC test run function of the Sysmac Studio.
Classification Parameter name Setting Page
Axis Basic Set­tings
Axis Number Axis numbers are set in order from the lowest
number.
Axis Use Select Used axis.
Axis Type Select Servo axis.
Node Address (input devices and output devices)
Specify the node address of the EtherCAT slave device that is assigned to the axis. The Node Address parameter cannot be selected if the Axis Type parameter is set to use a virtual axis.
5-5
3-4
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 63
3 Configuring Axes and Axes Groups
Classification Parameter name Setting Page
Unit Conversion Settings
Position Count Settings
Limit Settings Software Limits Set this parameter according to the device speci-
* For example, if the encoder resolution is 10,000 pulses/rotation, set 10,000.
Precautions for Correct UsePrecautions for Correct Use
Unit of Display Select the display unit (mm, degrees, etc.). 5-8
Command Pulse Count Per Motor Rotation
Work Travel Distance Per Motor Rotation
Count Mode Set this parameter according to the machine
Set the number of command pulses per motor rotation according to the encoder resolution.
Set the workpiece travel distance per motor rota­tion according to the machine specifications.
specifications.
fications.
*
5-13
5-13
3-1 Axes
Select the appropriate values based on the machine’s operating conditions for parameters
such as the maximum velocity, maximum acceleration/deceleration, or stop settings when the motor is actually operated.
OMRON G5-series Servo Drives can be set to specific node addresses by using the rotary switches on the front panels. If the rotary switches are set to 00, the node address will be determined by the settings made in the EtherCAT Editor of the Sysmac Studio. If the rotary switches are set to 00 for all connected Servo Drives, errors will not occur even if the Servo Drive’s connection position is changed. Set the node addresses on the rotary switches to assign specific Servo Drives for each machine control.
3-1-3 Introduction to Axis Variables
Axis Variables are system-defined variables for some of the axis parameters and for the monitor infor­mation, such as the actual position and error information, for the axes controlled by the MC Function Module. When you create axes with the Sysmac Studio, Axis Variables are registered in the variable table in the order that the axes are created. Axis variables are structures with a data type of _sAXIS_REF.
z Axis Variables
Each Axis Variable in the MC Function Module has two variable names: The Axis Variable name in the system-defined variables and the Axis Variable name that is assigned when the axis is added on the Sysmac Studio. The Axis Variable names in the system-defined variables are _MC_AX[0] to _MC_AX[63]. When you add axes on the Sysmac Studio, the MC_Axis000 to MC_Axis063 are set by default for _MC_AX[0] to _MC_AX[63]. The numbers are assigned in the order that the axes are added. You can change each of these Axis Variables as required from the Sysmac Studio. You can use either the Axis Variables for the system-defined variables or the Axis Variables that are added on the Sys­mac Studio to specify the Axis Variables in the user program.
Axis Variable name in the system-
defined variables (AT specification
in global variable table)*
_MC_AX[0] MC_Axis000 Axis 0
_MC_AX[1] MC_Axis001 Axis 1 .
. .
_MC_AX[63] MC_Axis063 Axis 63
Default Axis Variable name when
axis is added on the Sysmac Studio
. . .
Axis number example
. . .
3
3-1-3 Introduction to Axis Variables
* An error will occur if you change the names in the AT column in the global variable table on the Sysmac Studio.
NJ-series CPU Unit Motion Control User’s Manual (W507)
3-5
Page 64
3 Configuring Axes and Axes Groups
z Examples of Axis Variable Levels and Changing Axis Variable Names
_MC_AX[0] Axis Variable
_MC_AX[0].Status Level that indicates the axis status
_MC_AX[0].Status.Ready Variable that indicates that the axis is ready for operation
_MC_AX[0].Status.Disabled Variable that indicates when the axis is disabled .
. .
_MC_AX[0].Details Level that indicates the axis control status
_MC_AX[0].Details.Idle Variable that indicates when the axis is idle
_MC_AX[0].Details.InPosWaiting Variable that indicates in-position waiting .
. .
_MC_AX[0].Cmd Level that indicates the axis command values
_MC_AX[0].Cmd.Pos Variable that indicates the command current position
_MC_AX[0].Cmd.Vel Variable that indicates the command current velocity
_MC_AX[0].Cmd.AccDec Variable that indicates the command current acceleration/decelera-
. . .
_MC_AX[0].Act Level that indicates the axis current values
_MC_AX[0].Act.Pos Variable that indicates the actual current position
_MC_AX[0].Act.Vel Variable that indicates the actual current velocity
_MC_AX[0].Act.Trq Variable that indicates the actual current torque .
. .
_MC_AX[0].Cfg Level that indicates the axis basic settings
_MC_AX[0].Cfg.AxNo Variable that indicates the axis number
_MC_AX[0].Cfg.AxEnable Variable that indicates when the axis is enabled
_MC_AX[0].Cfg.AxType Variable that indicates the axis type .
. .
_MC_AX[0].Scale.Units Variable that indicates the display unit
_MC_AX[1] Axis Variable
. . .
tion rate in the axis monitor
3-6
Example: If MC_Axis000 is changed to MyAxis1, then either MyAxis1.Act.Pos or
_MC_AX[0].Act.Pos can be used as the variable that indicates the actual current posi­tion.
Refer to Axis Variables on page 6-19 for details on Axis Variables.
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 65
3 Configuring Axes and Axes Groups
3-1-4 Specifying an Axis in the User Program
In the user program, an Axis Variable name is specified for the in-out variable Axis in motion control instructions. In the following example, the Axis Variable name for the axis that was added for the sys­tem-defined Axis Variable name of _MC_AX[0] has been changed to MyAxis1 in the Sysmac Studio.
In-out variable Axis
Specify an Axis
Variable name.
MyAxis1
ServoOn
MC_Power_instance
MC_Power
Axis Axis
Enable Status
Busy
Error
ErrorID
MyAxis1
MyAxis1OnStatus
MyAxis1OnBusy
MyAxis1OnError
MyAxis1OnErrorID
You can also use the _MC_AX[0] system-defined variable in place of MyAxis1.
Refer to 6-2 Motion Control Instructions for details on motion control instructions.
Refer to the instruction descriptions in the NJ-series Motion Control Instructions Reference Manual (Cat. No. W508) for details on motion control instructions.
3-1 Axes
3
3-1-4 Specifying an Axis in the User Program
NJ-series CPU Unit Motion Control User’s Manual (W507)
3-7
Page 66
3 Configuring Axes and Axes Groups
3-2 Axis Setting Procedure
This section gives the procedures to set servo axes that are newly created with the Sysmac Studio.
3-2-1 Axis Configuration Procedure
START
Create a project.
Create the EtherCAT Network Configuration.
Add axes.
Assign the axes.
Set the axis parameters.
Go online and synchronize the data.
Transfer the project to the Controller.
END
3-2-2 Setting Procedure
This section describes how to set an axis.
Starting the Sysmac Studio
1
Start the Sysmac Studio and click the New Project Button.
2
Set the project properties and click the Create Button.
3-8
A new project is displayed.
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 67
3 Configuring Axes and Axes Groups
3-2 Axis Setting Procedure
Creating the EtherCAT Network Configuration
There are two methods to create an EtherCAT Network Configuration: online and offline.
z Online Method
1
Double-click EtherCAT in the Multiview Explorer.
The EtherCAT Edit Tab Page is displayed.
2
Select Online from the Controller Menu. The Sysmac Studio goes online with the Controller.
3
Right-click the Master Icon in the EtherCAT Tab Page and select Compare and Merge with Actual Network Configuration from the menu.
3
3-2-2 Setting Procedure
When obtaining the information is completed, the physical slave configuration of the EtherCAT slaves is displayed. Right-click the displayed physical configuration and select Apply actual
network configuration.
NJ-series CPU Unit Motion Control User’s Manual (W507)
3-9
Page 68
3 Configuring Axes and Axes Groups
z Offline Method
1
Double-click EtherCAT in the Multiview Explorer.
The EtherCAT Edit Tab Page is displayed.
2
Right-click the slave to connect and select Insert from the menu.
3-10
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 69
The slave is inserted on the display.
3 Configuring Axes and Axes Groups
3-2 Axis Setting Procedure
3
3-2-2 Setting Procedure
3
Insert the remaining slaves.
NJ-series CPU Unit Motion Control User’s Manual (W507)
3-11
Page 70
3 Configuring Axes and Axes Groups
Adding Axes
1
Right-click Axis Settings in the Multiview Explorer and select Axis Settings from the Add Menu.
An axis is added to the Multiview Explorer. The default name for the new axis is MC_Axis000.
z Copying an Axis
You can also add an axis by copying the axis settings for an existing axis.
3-12
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 71
Assigning an Axis
1
Right-click an axis in the Multiview Explorer and select Edit from the menu.
The Axis Basic Settings are displayed in the Axis Parameter Settings Tab Page.
3 Configuring Axes and Axes Groups
3-2 Axis Setting Procedure
3
3-2-2 Setting Procedure
2
Select Servo axis in the Axis type Box.
NJ-series CPU Unit Motion Control User’s Manual (W507)
3-13
Page 72
3 Configuring Axes and Axes Groups
3
Select the Servo Drive to use in the Input Device Box.
This setting allows you to use the EtherCAT slave Servo Drive as an axis.
Setting Axis Parameters
1
Click each of the icons in the Axis Parameter Settings Tab Page.
The settings for each icon are displayed on the Axis Parameter Settings Tab Page.
3-14
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 73
3 Configuring Axes and Axes Groups
Right-click Axis Settings in the Multiview Explorer and select Axis Setting Table to enable set- ting the axes parameters for all axes at the same time.
3-2 Axis Setting Procedure
3
3-2-2 Setting Procedure
Precautions for Correct UsePrecautions for Correct Use
When making operation settings such as the display unit, electronic gear (unit conversion for­mula), maximum velocity, or maximum acceleration/deceleration, be sure to use appropriate val­ues for the operating conditions of the device.
Additional Information
Changing Axis Variable Names in the User Program
Perform the following two procedures to change Axis Variable names that are already used.
Change the Axis Variable name in the variable table in the variable declarations.
Change the Axis Variable name in the user program.
Even if you change the Axis Variable names in the variable table, the Axis Variable names in the user program do not change. An error will occur if you use a variable name that is not declared in the variable table, in the user program. Always change the names in both places.
NJ-series CPU Unit Motion Control User’s Manual (W507)
3-15
Page 74
3 Configuring Axes and Axes Groups
Downloading to the CPU Unit
Use the Synchronization menu command of the Sysmac Studio to download the project to the CPU Unit.
1
Select Online from the Controller Menu. The Sysmac Studio goes online with the Controller.
2
Select Synchronization from the Controller Menu and then click the Transfer to Controller Button.
Additional Information
Introduction to Servo Drive Settings
The MC Function Module connects to OMRON G5-series Servo Drives with built-in EtherCAT communications.
Compatible Models
The applicable model numbers are R88D-KN@@@-ECT. The R88D-KN@@@-ECT-R Servo Drives support only Position Control Mode (Cyclic Syn- chronous Position Control Mode). Therefore, any functions that use Velocity Control Mode (Cyclic Synchronous Velocity Control Mode) or Torque Control Mode (Cyclic Synchronous Torque Control Mode) cannot be used.
Servo Drive Settings
The MC Function Module uses some of the input signals and functions of the Servo Drives. Servo Drive signal wiring and object setting are required to use the MC Function Module properly. Refer to A-1 Connecting the Servo Drive for specific settings.
3-16
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 75
3-3 Axes Groups
This section describes the axes groups of the MC Function Module.
3 Configuring Axes and Axes Groups
3-3-1 Introduction to Axes Groups
Use axes groups to perform complex operations on multiple axes, such as linear or circular interpola­tion. An axes group consists of multiple axes. Use the Sysmac Studio to set Axes Group Variables to enable execution of axes group motion control instructions or to enable access of the status of the axes group. The MC Function Module can handle up to 32 groups. The specifications for axes groups are shown in the following table.
Item Specification
Number of axes groups 32 groups max.
Number of composition axes 4 axes max. per axes group
The following elements are related to the axes groups of the MC Function Module.
Configuration element Description Page
Axes group parameters The axes group parameters set the maximum interpolation veloc-
ity, maximum interpolation acceleration/deceleration, and other items for the axes groups controlled by the MC Function Module. Use the Sysmac Studio to set the axes group parameters.
Axes Group Variable Axes Group Variables are system-defined variables that include a
portion of the axes group parameters as well as the command interpolation velocity, error information, and other monitor informa­tion for the axes groups controlled by the MC Function Module. Axes Group Variables are created when you add an axes group from the Multiview Explorer of the Sysmac Studio. The names of the Axes Group Variables (called the Axes Group Variable names) are set here.
Specifying axes groups in the user program
In the user program, motion control is implemented with motion control instructions. Motion control instructions that perform multi­axis coordinated control are used to create axes group commands. To control an axes group with axes group commands, specify the axes group variable name of the system-defined variable or the axes group variable name that was set with the Sysmac Studio for the AxesGroup in-out variable of the instruction.
3-3 Axes Groups
3
3-3-1 Introduction to Axes Groups
3-18
3-19
3-21
NJ-series CPU Unit Motion Control User’s Manual (W507)
3-17
Page 76
3 Configuring Axes and Axes Groups
3-3-2 Introduction to Axes Group Parameters
z Axes Group Parameters
Classification Parameter name
Axes Group Basic Set­tings
Axes Group Operation Settings
Axes Group Number
Axes Group Use
Composition
Composition Axes
Maximum Interpolation Velocity
Maximum Interpolation Acceleration
Maximum Interpolation Deceleration
Interpolation Acceleration/Deceleration Over
Interpolation Velocity Warning Value
Interpolation Acceleration Warning Value
Interpolation Deceleration Warning Value
Axes Group Stop Method
Correction Allowance Ratio
Refer to 5-3 Axes Group Parameters for details on axes group parameters.
z Settings Required to Use an Axes Group
The following settings must be made to use the axes groups that are created with the Sysmac Stu­dio.
Classification Parameter name Setting Page
Axes Group Basic Settings
Precautions for Correct UsePrecautions for Correct Use
Set appropriate values for the maximum interpolation velocity, stop method, and other items based on the operating conditions.
Axes Group Number
Axes Group Use Select Use.
Composition Select the axis composition to control.
Composition Axes This parameter sets the axes to assign to the axes
Axes group numbers are automatically set in the order that the axes groups are created.
group.
5-21
3-18
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 77
3 Configuring Axes and Axes Groups
3-3-3 Introduction to Axes Group Variables
Axes Group Variables are system-defined variables for the setting information and the monitoring infor­mation, such as the actual position and error information, for the axes groups controlled by the MC Function Module. When you create axes groups with the Sysmac Studio, Axes Group Variables are reg­istered in the variable table in the order that the axes groups are created. Axes Group Variables are structures with a data type of _sGROUP_REF.
z Axes Group Variable Names
Each Axes Group Variable in the MC Function Module has two variable names: The Axes Group Variable name in the system-defined variables and the Axes Group Variable that is assigned when the axes group is added on the Sysmac Studio. The Axes Group Variable names in the system­defined variables are _MC_GRP[0] to _MC_GRP[31]. When you add axes groups on the Sysmac Studio, MC_Group000 to MC_Group031 are set by default for _MC_GRP[0] to _MC_GRP[31]. The numbers are assigned in the order that the axes are added. You can change each of these Axes Group Variable names as required from the Sysmac Studio. You can use either the Axes Group Variable names for the system-defined variables or the Axes Group Variable names that are set on the Sysmac Studio to specify the Axes Group Variables in the
user program.
Axes Group Variable name in the
system-defined variables (AT speci-
fication in global variable table)*
_MC_GRP[0] MC_Group000 Axes group 0
_MC_GRP[1] MC_Group001 Axes group 1 .
. .
_MC_GRP[31] MC_Group031 Axes group 31
Default Axes Group Variable name when
axes group is added on Sysmac Studio
. . .
Axes group number
example
. . .
3-3 Axes Groups
3
3-3-3 Introduction to Axes Group Variables
* An error will occur if you change the names in the AT column in the global variable table on the Sysmac Studio.
NJ-series CPU Unit Motion Control User’s Manual (W507)
3-19
Page 78
3 Configuring Axes and Axes Groups
z Examples of Axes Group Variable Levels and Changing Axes Group Variable
Names
_MC_GRP[0] Axes Group Variables
_MC_GRP[0].Status Level that indicates the axes group status
. . .
_MC_GRP[0].Cmd Level that indicates the axes group command values
_MC_GRP[0].Cmd.Vel Variable that indicates the command interpolation velocity
_MC_GRP[0].Cmd.AccDec Variable that indicates the command interpolation accelera-
. . .
_MC_GRP[0].Cfg Level that indicates the axes group basic settings
_MC_GRP[0].Cfg.GrNo Variable that indicates the axes group number
_MC_GRP[0].Cfg.GrEnable Variable that indicates when the axes group is enabled
_MC_GRP[0].Kinematics Level that indicates the kinematics transformation settings
_MC_GRP[0].Kinematics.GrType Variable that indicates the axis composition
_MC_GRP[0].Kinematics.Axis[0] Variable that indicates the axis A0 composition axis .
. .
_MC_GRP[0].Kinematics.Axis[3] Variable that indicates the axis A3 composition axis
_MC_GRP[1] Axes Group Variable
. . .
tion/deceleration rate
Example: If MC_Group000 is changed to MyGroup1, then either MyGroup1.Cmd.Vel or
_MC_GRP[0].Cmd.Vel can be used as the variable that indicates the command inter-
polation velocity.
Refer to Axes Group Variables on page 6-25 for details on Axes Group Variables.
3-20
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 79
3 Configuring Axes and Axes Groups
3-3-4 Specifying an Axes Group in the User Program
In the user program, an axes group variable name is specified for the in-out variable AxesGroup in motion control instructions. In the following example, the Axes Group Variable name for the axes group that was added for the system-defined Axes Group Variable name of _MC_GRP[0] has been changed to MyGroup1 in the Sysmac Studio.
In-out variable AxesGroup
Specify an Axes Group Variable name.
MovLStart
MyGroup1
MC_MoveLinear_instance
MC_MoveLinear
AxesGroup AxesGroup
Execute
Position
Velocity
Acceleration
Deceleration
Jerk
CoordSystem
BufferMode
TransitionMode
MoveMode
CommandAborted
Done
Busy
Active
Error
ErrorID
MyGroup1
MyGroup1OnDone
MyGroup1OnBusy
MyGroup1OnActive
MyGroup1OnCA
MyGroup1OnError
MyGroup1OnErrorID
3-3 Axes Groups
3
3-3-4 Specifying an Axes Group in the User Program
You can also use the _MC_GRP[0] system-defined variable in place of MyGroup1.
Refer to 6-2 Motion Control Instructions for details on motion control instructions.
Refer to the instruction descriptions in the NJ-series Motion Control Instructions Reference Manual (Cat. No. W508) for details on motion control instructions.
NJ-series CPU Unit Motion Control User’s Manual (W507)
3-21
Page 80
3 Configuring Axes and Axes Groups
3-4 Setting Procedures for Axes Groups
This section gives the procedures to use the Sysmac Studio to set up an axes group. No configuration is required if you are not going to use any axes group command instructions, such as linear interpola­tion or circular interpolation.
3-4-1 Setting Procedure for an Axes Group
START
Start the Sysmac Studio.
Add an axes group.
Set the axes group parameters.
Go online and synchronize the data.
Transfer the project to the Controller.
END
3-4-2 Setting Procedure
This section gives the procedures to use the Sysmac Studio to set up an axes group in a project that already contains the axes.
Starting the Sysmac Studio
1
Start the Sysmac Studio and open the project.
3-22
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 81
3 Configuring Axes and Axes Groups
Adding an Axes Group
1
Right-click Axes Group Settings in the Multiview Explorer and select Axes Group Settings from the Add Menu.
An axes group is added to the Multiview Explorer. The default name for the new axes group is MC_Group000.
3-4 Setting Procedures for Axes Groups
3
3-4-2 Setting Procedure
z Copying an Axes Group
You can also create an axes group by copying an axes group from a project.
NJ-series CPU Unit Motion Control User’s Manual (W507)
3-23
Page 82
3 Configuring Axes and Axes Groups
Setting Axes Group Parameters
1
Right-click an axes group in the Multiview Explorer and select Edit from the menu.
The Axes Group Basic Settings are displayed in the Axes Group Parameter Settings Tab Page.
3-24
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 83
3 Configuring Axes and Axes Groups
2
Select Used axes group in the Axes group use Box.
3
Select the composition of the axes group in the Composition Box. A 2-axis composition is selected in the following example.
3-4 Setting Procedures for Axes Groups
3
3-4-2 Setting Procedure
4
Assign the axis to use in the Logical axes Box.
NJ-series CPU Unit Motion Control User’s Manual (W507)
3-25
Page 84
3 Configuring Axes and Axes Groups
5
Click the bottom icon. The Axes Group Operation Settings Tab Page is displayed.
Set appropriate values for the settings based on the operating conditions of the device.
Additional Information
Changing Axes Group Variable Names in the User Program
Perform the following two procedures to change Axes Group Variable names that are already used.
Change the Axes Group Variable name in the variable table in the variable declarations.
Change the Axes Group Variable name in the user program.
Even if you change the Axes Group Variable names in the variable table, the Axes Group Vari­able names in the user program do not change. An error will occur if you use a variable name that is not declared in the variable table, in the user program. Always change the names in both places.
3-26
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 85
3 Configuring Axes and Axes Groups
Downloading to the CPU Unit
Use the Synchronization menu command of the Sysmac Studio to download the project to the CPU Unit.
1
Select Online from the Controller Menu. The Sysmac Studio goes online with the Controller.
2
Select Synchronization from the Controller Menu and then click the Transfer to Controller Button.
3-4 Setting Procedures for Axes Groups
3
3-4-2 Setting Procedure
NJ-series CPU Unit Motion Control User’s Manual (W507)
3-27
Page 86
3 Configuring Axes and Axes Groups
3-28
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 87
Checking Wiring from the Sysmac Studio
This section describes the MC Test Run operations of the Sysmac Studio. You can use the MC Test Run to monitor sensor signals, check Servomotor wiring, and more, all without any programming.
4-1 Functions of the Sysmac Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
4-1-1 MC Test Run Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
4-1-2 Application Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4
4-1-3 Axis Parameter Setting Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
4-1-4 Starting the MC Test Run Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
4-2 Monitoring Sensor Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7
4-3 Checking Motor Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8
4-3-1 Turning ON the Servo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8
4-3-2 Jogging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8
4-3-3 Homing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
4-3-4 Absolute Positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
4-3-5 Relative Positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
4
NJ-series CPU Unit Motion Control User’s Manual (W507)
4-1
Page 88
4 Checking Wiring from the Sysmac Studio
4-1 Functions of the Sysmac Studio
This section describes how to use the MC test run function to check wiring and basic settings. You can use the MC test run function in the Sysmac Studio to check wiring without any programming.
4-1-1 MC Test Run Function
The MC test run operation supports the following functions.
Category
Axis operation Deceleration
Function Description Setting/monitor item
stop
Servo ON/OFF
Resetting errors
Jogging Jogging is performed in the positive or negative
Absolute posi­tioning
Relative posi­tioning
Homing Homing is performed using the homing parame-
A deceleration stop is performed during the MC Test Run.
The Servo is turned ON and OFF. ---
The errors in the MC Function Module are reset.
direction.
Absolute positioning is performed.
Relative positioning is performed. Travel Distance
ter settings.
*
---
---
Target Velocity
Acceleration/Deceleration
Target Position
Target Velocity
Acceleration/Deceleration
Jerk
Target Velocity
Acceleration/Deceleration
Jerk
Homing Parameters
4-2
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 89
4 Checking Wiring from the Sysmac Studio
Category
Monitoring Error list The errors in the MC Function Module are mon-
Function Description Setting/monitor item
itored.
Axis status The status of the axes is monitored. Axis Ready-to-execute
Actual posi­tion monitor
Actual velocity monitor
Servo Drive status
Input signals The status of the input signals are monitored. Positive Limit Input
The actual position is monitored. Command and Actual Cur-
The actual velocity is monitored. Command and Actual Cur-
The status of the Servo Drive is monitored. Servo ON/OFF
MC Common Errors
Axis Errors
Axes Group Errors
Standstill
Discrete Motion
Continuous Motion
Homing
Stopping
Home Defined
In Home Position
rent Positions
rent Velocities
Servo Ready
Main Power
Negative Limit Input
Immediate Stop Input
Home Proximity Input
Home Input
External Latch Inputs 1 to 2
4-1 Functions of the Sysmac Studio
4
4-1-1 MC Test Run Function
* When the Count Mode of the axis is set to Rotary Mode, positioning is performed toward the target position in the
positive direction. For details, refer to the MC_MoveAbsolute (Absolute Positioning) instruction in the NJ-series Motion Control Instructions Reference Manual (Cat. No. W508).
Note This MC Test Run is used for an OMRON G5-series Servo Drive with built-in EtherCAT communications. Do
not use it with servo drives from any other manufacturer.
NJ-series CPU Unit Motion Control User’s Manual (W507)
4-3
Page 90
4 Checking Wiring from the Sysmac Studio
4-1-2 Application Procedure
Before you perform an MC Test Run, check the following two items.
Are the Sysmac Studio and Controller connected and are they online?
Is the MC Test Run Mode currently in use from any other copy of the Sysmac Studio?
After you have confirmed these two items, perform the following operations as instructed.
START
Setup
Starting the MC test run function
Checking wiring
Checking motor operation
Checking electronic gear settings
Confirming homing
Create the EtherCAT slave configuration, add axes, assign the axes, and set the axis parameters.
Start the MC test run function.
Confirm sensor wiring.
Use jogging to check the direction of the motor.
Perform relative positioning to check the travel distance.
Perform homing to check the homing operation.
Section 3 Configuring Axes and Axes Groups
Section 4 Checking Wiring from the Sysmac Studio
Precautions for Correct UsePrecautions for Correct Use
When one of the following operations is performed for a command from the Sysmac Studio,
the Servomotor will operate at the set velocity: Servo ON, jogging, relative positioning, abso­lute positioning, or homing. Always confirm that it is safe for the Servomotor to operate before executing any of these operations.
When operating the Controller from the Sysmac Studio, always install external emergency cir­cuits so that the Servomotor can be stopped safely whenever necessary. The Sysmac Studio may not be able to send commands under some circumstances, e.g., if an error occurs in the computer.
Set the EtherCAT communications and establish communications before you attempt to per­form operation from the Sysmac Studio.
4-4
Additional Information
You can perform the following operations to end the MC test run function at any time.
Select MC Test Run
Stop from the Controller Menu of the Sysmac Studio.
Right-click the axis in the Multiview Explorer of the Sysmac Studio and select Stop MC Test Run from the menu.
Close the MC Test Run Tab Page on the Sysmac Studio.
Exit the Sysmac Studio.
Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for specific procedures.
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 91
4 Checking Wiring from the Sysmac Studio
4-1-3 Axis Parameter Setting Example
Set the following axis parameters before you execute the MC Test Run Mode in the Sysmac Studio. The following setting example is for a one-axis device.
Servomotor
Encoder resolution: 20 bits/rotation
Encoder Output Pulse Count per Motor Rotation
20 bits = 1,048,576
10 mm
Ball screw
Ball screw pitch: 10 mm
1 rotation
Parameter name Setting
Axis Variable Name
Axis Number
Axis1
*2
1
*1
Axis Use Used axis
Axis Type Servo axis
Node Address (input device)
*3
1
Unit of Display µm
Command Pulse Count Per Motor Rotation
Work Travel Distance Per Motor Rotation
Maximum Velocity
Maximum Jog Velocity
Maximum Acceleration
Maximum Deceleration
1,048,576
10,000
500,000
50,000
5,000,000
5,000,000
*4
*4
*5
*6
*7
*7
Software Limits Immediate stop for command position
Positive Software Limit
Negative Software Limit
500,000
0
*8
*8
Count Mode Linear Mode
4-1 Functions of the Sysmac Studio
4
4-1-3 Axis Parameter Setting Example
*1 If there is more than one axis, a different variable name is set for each axis.
*2 If there is more than one axis, a different value is set for each axis.
*3 Set the same node address as for the Servo Drive.
If there is more than one axis, a different value is set for each axis.
*4 The position command unit will be 1 µm. *5 The maximum velocity will be 3,000 r/min = 30 m/min = 0.5 m/s = 500,000 µm/s. *6 The maximum jog velocity will be 10% of the maximum velocity, i.e., 0.05 m/s = 50,000 µm/s.
*7 The maximum acceleration and the maximum deceleration will be 5 m/s
The acceleration time to the maximum velocity (3,000 r/min) will be 0.1 s.
*8 Set a value that is within the movable range of the device.
The positive software limit is set to 50 cm = 500,000 µm.
NJ-series CPU Unit Motion Control User’s Manual (W507)
2
.
4-5
Page 92
4 Checking Wiring from the Sysmac Studio
4-1-4 Starting the MC Test Run Function
The MC Test Run Mode is started from the Sysmac Studio.
1
Start the Sysmac Studio and open a project in which the axis settings are completed.
2
Select Online from the Controller Menu. The Sysmac Studio goes online with the Controller.
3
Select MC Test Run − Start from the Controller Menu.
When the following caution dialog box appears, read the message carefully. After you confirm safety, click the OK Button.
The MC Test Run Tab Page is displayed.
4-6
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 93
4 Checking Wiring from the Sysmac Studio
4-2 Monitoring Sensor Signals
You can use the input signal display to check sensor signal wiring.
1
Select the axis to check on the MC Test Run Tab Page.
2
Check to see if the signals turn ON and OFF properly on the monitor screen by turning ON and OFF the sensor connected to each input signal.
4-2 Monitoring Sensor Signals
4
NJ-series CPU Unit Motion Control User’s Manual (W507)
4-7
Page 94
4 Checking Wiring from the Sysmac Studio
4-3 Checking Motor Operation
Use the functions of the MC Test Run to check motor operation.
4-3-1 Turning ON the Servo
You can use the Servo ON Button to turn the Servo ON and OFF.
1
Select the axis for which to turn ON the Servo.
2
Click the Servo ON Button to turn ON the Servo.
3
Click the Servo OFF Button to turn OFF the Servo.
Precautions for Correct UsePrecautions for Correct Use
When one of the following operations is performed for a command from the Sysmac Studio,
the Servomotor will operate at the set velocity: Servo ON, jogging, relative positioning, abso­lute positioning, or homing. Always confirm that it is safe for the Servomotor to operate before executing any of these operations.
When you operate the Controller from the Sysmac Studio, always install external emergency circuits so that the Servomotor can be stopped safely whenever necessary. The Sysmac Stu­dio may not be able to send commands under some circumstances, e.g., if an error occurs in the computer.
Set the EtherCAT communications and establish communications before you attempt to per­form operation from the Sysmac Studio.
4-3-2 Jogging
1
Select the axis to jog on the Jogging Tab Page of the MC Test Run Tab Page.
2
Click the Servo ON Button to turn ON the Servo.
4-8
3
Enter the target velocity, acceleration rate, and deceleration rate, and then press the Apply But­ton.
4
Click the or Button.
The motor will operate in either the positive or negative direction while one of these buttons is clicked. Check to see if the motor operates in the set direction.
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 95
4-3-3 Homing
1
Set the homing parameters in the Homing Settings on the Axis Parameter Settings Tab Page.
2
Click the Homing Tab on the MC Test Run Tab Page.
4 Checking Wiring from the Sysmac Studio
The following dialog box is displayed.
3
Select the axis to home.
4-3 Checking Motor Operation
4
4-3-3 Homing
4
Click the Servo ON Button to turn ON the Servo.
5
Click the Apply homing parameters Button.
6
Click the Button.
Check to see if the homing operation agrees with the settings.
Additional Information
When you click the Homing Settings Button, the Homing Settings are displayed on the Axis
Parameter Settings Tab Page. Set the homing parameters.
If the homing parameters were set in advance, click the Apply homing parameters Button to apply those settings.
NJ-series CPU Unit Motion Control User’s Manual (W507)
4-9
Page 96
4 Checking Wiring from the Sysmac Studio
4-3-4 Absolute Positioning
1
Click the Absolute positioning Tab on the MC Test Run Tab Page.
The following dialog box will appear.
2
Select the axis to perform absolute positioning.
3
Click the Servo ON Button to turn ON the Servo.
4
Enter the target position, target velocity, acceleration rate, deceleration rate, and jerk, and then click the Apply Button.
5
Click the Button. Absolute positioning will start.
Check to see if positioning agrees with the settings.
4-10
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 97
4-3-5 Relative Positioning
1
Click the Relative positioning Tab on the MC Test Run Tab Page.
The following dialog box will appear.
4 Checking Wiring from the Sysmac Studio
4-3 Checking Motor Operation
2
Select the axis to perform relative positioning.
3
Click the Servo ON Button to turn ON the Servo.
4
Enter the target travel distance, target velocity, acceleration rate, deceleration rate, and jerk, and then click the Apply Button.
5
Click the Button. Relative positioning will start.
Check to see if the travel distance agrees with the settings.
4
4-3-5 Relative Positioning
NJ-series CPU Unit Motion Control User’s Manual (W507)
4-11
Page 98
4 Checking Wiring from the Sysmac Studio
4-12
NJ-series CPU Unit Motion Control User’s Manual (W507)
Page 99
Motion Control Parameters
This section explains about axis parameters and axes group parameters used for motion control.
5-1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
5-2 Axis Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
5-2-1 Axis Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
5-2-2 Axis Basic Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5
5-2-3 Unit Conversion Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
5-2-4 Operation Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11
5-2-5 Other Operation Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12
5-2-6 Limit Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13
5-2-7 Position Count Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13
5-2-8 Servo Drive Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15
5-2-9 Homing Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-16
5-2-10 Axis Parameter Setting Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-17
5-3 Axes Group Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20
5-3-1 Axes Group Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20
5-3-2 Axes Group Basic Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-21
5-3-3 Axes Group Operation Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-22
5-3-4 Enabling an Axes Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-23
5
NJ-series CPU Unit Motion Control User’s Manual (W507)
5-1
Page 100
5 Motion Control Parameters
5-1 Introduction
You can use motion control instructions to perform single-axis operations and multi-axis operations on axes groups with the NJ-series CPU Unit’s MC Function Module. Axis and axes group parameters are used to set these operations. Axis parameters must be set, but axes group parameters are not required if you do not use multi-axis operations for axes groups.
These parameters are called motion control parameter settings (MC parameter settings).
Sysmac Studio
Transferred
ID211
0123 4567
9
8
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
COM
DC24
V
7mA
AD042
10 1112 13 14 15
MACH
No
x10
x10
CPU Unit
RUN ERC ERH
B1 A1
8
7
9
6
0
.
5
1
4
2
3
1
8
7
9
6
0
5
1
4
2
3
0
Transferred
Non-volatile memory
MC common parameter settings
*1
Axis parameter settings
Axes group parameter settings
• After the setting are downloaded
• When power is turned ON
Main memory
MC common parameter settings
*1
Axis parameter settings
Axes group parameter settings
Temporary changes to some parameters
Accessing some parameters as
User program
MC_Write instruction
Data movement or other instructions
variables
*1 There are no MC Common Parameter Settings for the current version of the MC Function Module.
*2 Use the Synchronization menu command of the Sysmac Studio to upload and download the project.
z Data Flow for Setting MC Parameters
Download your MC Parameter Settings to the CPU Unit using the Sysmac Studio to save those
settings in the CPU Unit's non-volatile memory.
Saved settings are applied to the main memory after you download them or when the power is turned ON.
If there are no problems with the saved settings, the MC Function Module executes control based on the settings in the main memory.
The settings of some of the parameters can be accessed as system-defined variables for motion control.
You can upload and download MC parameter settings regardless of the CPU Unit’s mode or the status of the MC Function Module.
When you start the download process, all axes in motion will stop immediately and the Servo will turn OFF.
5-2
z Overwriting Parameters with the MC_Write (Write MC Setting) Instruction
You can use the MC_Write (Write MC Setting) motion control instruction to change the settings of
some parameters in the main memory while the user program is running.
If the specified setting value is outside the allowed range, the output variable Error from the instruction changes to TRUE and the parameter setting is not changed.
Parameter settings become valid in either of the following two situations.
The axis or axes group is stopped and you execute an instruction for an axis command or
axes group command.
You set the Buffer Mode Selection for the instruction to Aborting and execute more than one instruction.
NJ-series CPU Unit Motion Control User’s Manual (W507)
Loading...