Omron NY532-1500 User Manual

Omron NY532-1500 User Manual

Ny-series ipc machine controller industrial panel pc / industrial box pc
Hide thumbs Also See for NY532-1500:
Table of Contents

Advertisement

Industrial PC Platform
NY-series
IPC Machine Controller
Industrial Panel PC / Industrial Box PC
Motion Control
User's Manual
NY532-1500
NY532-1400
NY532-1300
NY532-5400
NY512-1500
NY512-1400
NY512-1300
Industrial Panel PC
Industrial Box PC
W559-E1-03

Advertisement

Table of Contents
loading

Summary of Contents for Omron NY532-1500

  • Page 1 Industrial PC Platform NY-series IPC Machine Controller Industrial Panel PC / Industrial Box PC Motion Control User’s Manual NY532-1500 NY532-1400 NY532-1300 NY532-5400 NY512-1500 NY512-1400 NY512-1300 Industrial Panel PC Industrial Box PC W559-E1-03...
  • Page 2: Ny532

    No patent liability is assumed with respect to the use of the information contained herein. Moreover, because OMRON is constantly striving to improve its high-quality products, the information contained in this manual is subject to change without notice. Every precaution has been taken in the preparation of this manual. Neverthe- less, OMRON assumes no responsibility for errors or omissions.
  • Page 3: Introduction

    Introduction Introduction Thank you for purchasing an NY-series IPC Machine Controller Industrial Panel PC / Industrial Box PC. This manual provides a collective term of Industrial Panel PC and Industrial Box PC which are applica- ble products as the NY-series Industrial PC. This manual also provides the range of devices that are directly controlled by the Controller functions embedded the Real-Time OS in the NY-series Industrial PC as the Controller.
  • Page 4: Relevant Manuals

    Relevant Manuals Relevant Manuals he following provides the relevant manuals for NY-series Controller. Read all of the manuals that are relevant to your system configuration and application before you use NY-series Controller. Most operations are performed from the Sysmac Studio Automation Software. Refer to the Sysmac Stu- dio Version 1 Operation Manual (Cat.
  • Page 5 Relevant Manuals *1 Refer to the NY-series Industrial Panel PC / Industrial Box PC Setup User’s Manual (Cat. No. W568) for how to set up and how to use the utilities on Windows. *2 Refer to the NY-series Troubleshooting Manual (Cat. No. W564) for the error management concepts and an overview of the error items.
  • Page 6: Manual Structure

    Manual Structure Manual Structure Page Structure The following page structure is used in this manual. Level 1 heading 4 Installation and Wiring Level 2 heading Mounting Units Level 3 heading Level 2 heading Gives the current headings. Level 3 heading 4-3-1 Connecting Controller Components The Units that make up an NJ-series Controller can be connected simply by pressing the Units together...
  • Page 7 Manual Structure 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.
  • Page 8 Manual Structure NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 9: Sections In This Manual

    Sections in this Manual Sections in this Manual Introduction to the Motion Control Sample Programming Function Module Motion Control Configuration and Troubleshooting Principles Configuring Axes Appendices and Axes Groups Checking Wiring from Index the Sysmac Studio Motion Control Parameters Motion Control Programming Manual Operation Homing Motion Control Functions...
  • Page 10 Sections in this Manual NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 11: Table Of Contents

    CONTENTS CONTENTS Introduction....................... 1 Relevant Manuals ..................... 2 Manual Structure ...................... 4 Sections in this Manual.................... 7 Terms and Conditions Agreement ................ 14 Safety Precautions ....................16 Precautions for Safe Use ..................17 Precautions for Correct Use .................. 18 Regulations and Standards ................... 19 Versions........................
  • Page 12 CONTENTS 3-1-2 Introduction to Axis Parameters ....................3-3 3-1-3 Introduction to Axis Variables...................... 3-7 3-1-4 Specifying an Axis in the User Program..................3-9 Axis Setting Procedure ......................3-10 3-2-1 Axis Configuration Procedure ....................3-10 3-2-2 Setting Procedure ........................3-10 Axes Groups .......................... 3-19 3-3-1 Introduction to Axes Groups......................
  • Page 13 CONTENTS State Transitions........................6-4 6-3-1 Status of the Motion Control Function Module................6-4 6-3-2 Axis States ..........................6-5 6-3-3 Axes Group States........................6-7 Execution and Status of Motion Control Instructions............6-9 6-4-1 Basic Rules for Execution of Instructions ................... 6-9 6-4-2 Execution Timing Charts......................6-11 6-4-3...
  • Page 14 CONTENTS 9-1-6 Stopping ............................9-6 9-1-7 Override Factors ........................9-11 Single-axis Synchronized Control ..................9-12 9-2-1 Overview of Synchronized Control.................... 9-12 9-2-2 Gear Operation ......................... 9-12 9-2-3 Positioning Gear Operation....................... 9-13 9-2-4 Cam Operation.......................... 9-14 9-2-5 Cam Tables ..........................9-15 9-2-6 Synchronous Positioning......................
  • Page 15 CONTENTS 10-2-1 Monitoring EtherCAT Communications and Turning ON Servos ..........10-3 10-2-2 Interlocking Axis Operation with Master Control Instructions ........... 10-5 10-2-3 Error Monitoring and Error Resetting for Single-axis Operation and Synchronized Operation. 10-7 10-2-4 Error Monitoring and Error Resetting for Multi-axes Coordinated Operation......10-9 10-2-5 Monitoring for Instruction Errors .....................
  • Page 16: Terms And Conditions Agreement

    Omron’s exclusive warranty is that the Products will be free from defects in materials and workman- ship for a period of twelve months from the date of sale by Omron (or such other period expressed in writing by Omron). Omron disclaims all other warranties, express or implied.
  • Page 17 Disclaimers Performance Data Data presented in Omron Company websites, catalogs and other materials is provided as a guide for the user in determining suitability and does not constitute a warranty. It may represent the result of Omron’s test conditions, and the user must correlate it to actual application requirements. Actual perfor- mance is subject to the Omron’s Warranty and Limitations of Liability.
  • Page 18: Safety Precautions

    Safety Precautions Safety Precautions Refer to the following manuals for safety precautions. • NY-series Industrial Box PC Hardware User’s Manual (Cat. No. W556) • NY-series Industrial Panel PC Hardware User’s Manual (Cat. No. W557) • NY-series Industrial Panel PC / Industrial Box PC Software User’s Manual (Cat. No. W558) NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 19: Precautions For Safe Use

    Precautions for Safe Use Precautions for Safe Use Refer to the following manuals for precautions for safe use. • NY-series Industrial Box PC Hardware User’s Manual (Cat. No. W556) • NY-series Industrial Panel PC Hardware User’s Manual (Cat. No. W557) •...
  • Page 20: Precautions For Correct Use

    Precautions for Correct Use Precautions for Correct Use Refer to the following manuals for precautions for correct use. • NY-series Industrial Box PC Hardware User’s Manual (Cat. No. W556) • NY-series Industrial Panel PC Hardware User’s Manual (Cat. No. W557) •...
  • Page 21: Regulations And Standards

    Concepts  EMC Directive OMRON devices that comply with EU 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.
  • Page 22: Versions

    Versions Versions Hardware revisions and unit versions are used to manage the hardware and software in NY-series Con- trollers and EtherCAT slaves. The hardware revision or unit version is updated each time there is a change in hardware or software specifications. Even when two Units or EtherCAT slaves have the same model number, they will have functional or performance differences if they have different hard- ware revisions or unit versions.
  • Page 23 Versions  Changing Information Displayed in Production Information Dialog Box Click the Show Detail or Show Outline Button at the lower right of the Production Information Dia- log Box. The view will change between the production information details and outline. Outline View Detail View The information that is displayed is different for the Outline View and Detail View.
  • Page 24: Related Manuals

    Related Manuals Related Manuals The following are the manuals related to this manual. Use these manuals for reference. Manual name Cat. No. Model numbers Application Description NY-series W557 NY532- Learning the basic An introduction to the entire NY-series sys- IPC Machine Controller specifications of the tem is provided along with the following infor- Industrial Panel PC Hardware...
  • Page 25 Related Manuals Manual name Cat. No. Model numbers Application Description NY-series W562 NY532- Using the built-in Eth- Information on the built-in EtherCAT port is IPC Machine Controller erCAT port in an NY- provided. NY512- Industrial Panel PC / series Industrial PC. This manual provides an introduction and Industrial Box PC Built-in Eth- provides information on the configuration,...
  • Page 26 Related Manuals Manual name Cat. No. Model numbers Application Description GX-series EtherCAT Slave W488 GX-ID Learning how to use Describes the hardware, setup methods, and Units User’s Manual the EtherCAT remote functions of the EtherCAT remote I/O termi- GX-OD I/O terminals. nals.
  • Page 27: Revision History

    Revision History Revision History A manual revision code appears as a suffix to the catalog number on the front and back covers of the manual. W559-E1-03 Cat. No. Revision code Revision code Date Revised content September 2016 Original production April 2017 Corrected mistakes.
  • Page 28 Revision History NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 29: Introduction To The Motion Control Function Module

    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 .
  • Page 30: Features

    S-curve for acceleration and deceleration. Data Transmission Using EtherCAT Communications The MC Function Module can be combined with OMRON 1S-series Servo Drives with built-in EtherCAT communications or G5-series Servo Drives with built-in EtherCAT communications to enable exchange of all control information with high-speed data communications.
  • Page 31: System Configuration

    1 Introduction to the Motion Control Function Module 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, Encoder Input Terminals, and NX-series Position Interface Units.
  • Page 32: Basic Flow Of Operation

    1 Introduction to the Motion Control Function Module Basic Flow of Operation This section provides the basic procedure to perform motion control with the MC Function Module. START Sysmac Studio Version 1 Operation Manual (Cat. No. W504) Setup Create a project. NY-series Industrial Panel PC / Industrial Box Create the EtherCAT Network Configuration.
  • Page 33 1 Introduction to the Motion Control Function Module Section 6 Motion Control Pro- Programming Write a program to perform jogging. gramming Section 7 Manual Operation Jog the axes with the user program. Manual operation Section 8 Homing Define the homes of the Servomotor axes to Homing control.
  • Page 34: Specifications

    1 Introduction to the Motion Control Function Module 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 NY-series Controller. Refer to the NY-series Industrial Panel PC Hardware User’s Manual (Cat. No. W557) or NY-series Industrial Box PC Hardware User’s Manual (Cat.
  • Page 35: Function Specifications

    1 Introduction to the Motion Control Function Module 1-4-3 Function Specifications The following table describes the functions that are supported for connections to OMRON control devices. Item Description Controllable Servo Drives OMRON 1S-series Servo Drives with built-in EtherCAT communications or G5-series Servo Drives with built-in...
  • Page 36 1 Introduction to the Motion Control Function Module Item Description Single axes Single-axis posi- Absolute positioning Positioning is performed for a target position that is speci- tion control fied with an absolute value. Relative positioning Positioning is performed for a specified travel distance from the command current position.
  • Page 37 1 Introduction to the Motion Control Function Module Item Description Single axes Auxiliary functions Resetting axis errors Axes errors are cleared. for single-axis con- Homing A motor is operated and the limit signals, home proximity trol signal, and home signal are used to define home. Homing with parameters The parameters are specified, the motor is operated, and the limit signals, home proximity signal, and home signal...
  • Page 38 Absolute encoder support You can use an OMRON 1S-series Servomotor or G5- series Servomotor with an Absolute Encoder to eliminate the need to perform homing at startup. Input signal logic inversion You can inverse the logic of immediate stop input signal, positive limit input signal, negative limit input signal, or home proximity input signal.
  • Page 39 Cam data can be overwritten from the user program. *6 Application is possible when you use an absolute external scale for an OMRON G5-series Linear Motor Type Servo Drive with built-in EtherCAT communications.
  • Page 40 1 Introduction to the Motion Control Function Module 1-12 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 41: Motion Control Configuration And Principles

    Motion Control Configuration and Principles This section outlines the internal structure of the Controller functions and describes the configuration and principles of the MC Function Module. 2-1 Internal Configuration of the Controller Functions ....2-2 2-2 Motion Control Configuration .
  • Page 42: Internal Configuration Of The Controller Functions

    2 Motion Control Configuration and Principles Internal Configuration of the Controller Functions This section provides an overview of the internal mechanisms of the NY-series Controller. The Control- ler functions have the following software configuration. The Motion Control Function Module is a soft- ware module that performs motion control.
  • Page 43: Motion Control Configuration

    2 Motion Control Configuration and Principles 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.
  • Page 44: Motion Control Principles

    2 Motion Control Configuration and Principles Motion Control Principles This section provides information on the Controller function tasks and how they relate to motion control. 2-3-1 Controller Function Tasks Tasks are attributes of programs that determine the execution conditions and sequence of the pro- grams.
  • Page 45 2 Motion Control Configuration and Principles Precautions for Correct Use Precautions 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.
  • Page 46 2 Motion Control Configuration and Principles  Operation of the Primary Periodic Task Task period (= primary period) Task execution time I/O refresh Control processing User program Refresh execution executed. Processing Processing Contents Output data processing • Output refresh data is created for Output Units that execute I/O refreshing. •...
  • Page 47 2 Motion Control Configuration and Principles  Operation of a Priority-16 Periodic Task You can refresh I/O in the priority-16 periodic task. Task period Task execution time Task processing time Task processing time I/O refresh Control Control processing processing * The CPU Unit will temporarily interrupt the execution of a task in order to execute a task with a higher execution priority.
  • Page 48: Example Of Task Operations For Motion Control

    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, in a priority-5 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.
  • Page 49 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.  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.
  • Page 50 2 Motion Control Configuration and Principles  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.
  • Page 51 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.
  • Page 52: Ethercat Communications And Motion Control

    2 Motion Control Configuration and Principles EtherCAT Communications and Motion Control The MC Function Module controls Servo Drives, counters, and NX-series Position Interface Units through the PDO communications of the EtherCAT Master Function Module embedded in the Real- Time OS of the Industrial PC. This section describes EtherCAT communications and other items related to the MC Function Module.
  • Page 53: Relationship Between Ethercat Master Function Module And Mc Function Module

    Position Interface Units 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 oper- ation of the slaves will depend on slave specifications. For OMRON slaves, SDO communica- tions will result in errors.
  • Page 54: Relationship Between Process Data Communications Cycle And Motion Control Period

    2 Motion Control Configuration and Principles CPU Unit User program in PLC Function Module Instructions Executed other than motion control instructions EtherCAT Executed Sequence User-created EtherCAT control function block slaves Executed Exe- Task period EtherCAT EtherCAT cuted Motion control EtherCAT slaves MC Function Module Master instructions...
  • Page 55: Configuring Axes And Axes Groups

    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.
  • Page 56: Axes

    3 Configuring Axes and Axes Groups 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 other device or encoder connected using EtherCAT or it can be a virtual Servo Drive or encoder within the MC Function Module.
  • Page 57: Introduction To Axis Parameters

    3 Configuring Axes and Axes Groups The following elements are related to the axes of the MC Function Module. The number of elements provided is the same as the maximum number of controlled axes for each model. The maximum number of controlled axes varies depending on the model. Refer to 1-4-3 Func- tion Specifications on page 1-7 for details.
  • Page 58 3 Configuring Axes and Axes Groups Classification Parameter name Operation Set- Maximum Velocity tings Start Velocity 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...
  • Page 59 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...
  • Page 60 • OMRON 1S-series Servo Drives and 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 Sys- mac Studio.
  • Page 61: Introduction To Axis Variables

    3 Configuring Axes and Axes Groups 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.
  • Page 62 3 Configuring Axes and Axes Groups Examples of Axis Variable Levels and Changing Axis Variable Names In the descriptions below, _MC_AX[0] is used as an example. The same information applies to the other variables. _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...
  • Page 63: Specifying An Axis In The User Program

    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.
  • Page 64: Axis Setting Procedure

    3 Configuring Axes and Axes Groups 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.
  • Page 65 3 Configuring Axes and Axes Groups A new project is displayed. Creating the EtherCAT Network Configuration There are two methods to create an EtherCAT Network Configuration: online and offline.  Online Method Double-click EtherCAT in the Multiview Explorer. The EtherCAT Tab Page is displayed. Select Online from the Controller Menu.
  • Page 66 3 Configuring Axes and Axes Groups  Offline Method Double-click EtherCAT in the Multiview Explorer. The EtherCAT Tab Page is displayed. Right-click the slave to connect and select Insert from the menu. 3-12 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 67 3 Configuring Axes and Axes Groups The slave is inserted on the display. Insert the remaining slaves. 3-13 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 68 3 Configuring Axes and Axes Groups Adding Axes Right-click Axis Settings in the Multiview Explorer and select Motion Control Axis from the Add Menu. An axis is added to the Multiview Explorer. The default name for the new axis is MC_Axis000. ...
  • Page 69 3 Configuring Axes and Axes Groups Assigning an Axis 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. Select Servo axis in the Axis type Box. 3-15 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 70 3 Configuring Axes and Axes Groups Select the Servo Drive to use. This setting allows you to use a Servo Drive as an axis. Setting Axis Parameters 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-16 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 71 3 Configuring Axes and Axes Groups Right-click Axis Settings in the Multiview Explorer and select Axis Setting Table to enable setting the axes parameters for all axes at the same time. Precautions for Correct Use Precautions 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.
  • Page 72 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 1S-series Servo Drives with built-in EtherCAT communications, G5-series Servo Drives with built-in EtherCAT communications, or NX-series Pulse Output Units. Connectable Servo Drive Models You can connect the R88D-1SN-ECT, R88D-KN-ECT and R88D-KN-...
  • Page 73: Axes Groups

    3 Configuring Axes and Axes Groups Axes Groups This section describes the axes groups of the MC Function Module. 3-3-1 Introduction to Axes Groups Use axes groups to perform complex operations on multiple axes, such as linear or circular interpola- tion.
  • Page 74: Introduction To Axes Group Parameters

    3 Configuring Axes and Axes Groups 3-3-2 Introduction to Axes Group Parameters  Axes Group Parameters Classification Parameter name Axes Group Basic Set- Axes Group Number tings Axes Group Use Composition Composition Axes Axes Group Operation Maximum Interpolation Velocity Settings Maximum Interpolation Acceleration Maximum Interpolation Deceleration Interpolation Acceleration/Deceleration Over...
  • Page 75: Introduction To Axes Group Variables

    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.
  • Page 76 3 Configuring Axes and Axes Groups Examples of Axes Group Variable Levels and Changing Axes Group Variable Names In the descriptions below, _MC_GRP[0] is used as an example. The same information applies to the other axes group variables. _MC_GRP[0] Axes Group Variables _MC_GRP[0].Status Level that indicates the axes group status _MC_GRP[0].Cmd...
  • Page 77: Specifying An Axes Group In The User Program

    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.
  • Page 78: Setting Procedures For Axes Groups

    3 Configuring Axes and Axes Groups 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.
  • Page 79 3 Configuring Axes and Axes Groups Adding an Axes Group 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.
  • Page 80 3 Configuring Axes and Axes Groups Setting Axes Group Parameters 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. Select Used axes group in the Axes group use Box. 3-26 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 81 3 Configuring Axes and Axes Groups Select the composition of the axes group in the Composition Box. A 2-axis composition is selected in the following example. Assign the axis to use in the Logical axes Box. Click the bottom icon. The Axes Group Operation Settings Display is displayed. Set appropriate values for the settings based on the operating conditions of the device.
  • Page 82 3 Configuring Axes and Axes Groups 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. •...
  • Page 83 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 motor wiring, and more, all without any programming. 4-1 Functions of the Sysmac Studio ....... . . 4-2 4-1-1 MC Test Run Function .
  • Page 84: Functions Of The Sysmac Studio

    4 Checking Wiring from the Sysmac Studio 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.
  • Page 85 For details, refer to the MC_MoveAbsolute (Absolute Positioning) instruction in the NY-series Motion Control Instructions Reference Manual (Cat. No. W561). Note You can use MC Test Runs for OMRON 1S-series Servo Drives, G5-series Servo Drives, or NX-series Pulse Output Units. Do not use it with servo drives from any other manufacturer.
  • Page 86: Application Procedure

    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.
  • Page 87: Axis Parameter Setting Example

    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 1 rotation 10 mm Ball screw...
  • Page 88: Starting The Mc Test Run Function

    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. Start the Sysmac Studio and open a project in which the axis settings are completed. Select Online from the Controller Menu.
  • Page 89: Monitoring Sensor Signals

    4 Checking Wiring from the Sysmac Studio Monitoring Sensor Signals You can use the input signal display to check sensor signal wiring. Select the axis to check on the MC Test Run Tab Page. 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.
  • Page 90: Checking Motor Operation

    4 Checking Wiring from the Sysmac Studio 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. Select the axis for which to turn ON the Servo.
  • Page 91: Homing

    4 Checking Wiring from the Sysmac Studio Click the 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. 4-3-3 Homing Set the homing parameters in the Homing Settings on the Axis Parameter Settings Tab Page.
  • Page 92: Absolute Positioning

    4 Checking Wiring from the Sysmac Studio 4-3-4 Absolute Positioning Click the Absolute positioning Tab on the MC Test Run Tab Page. The following dialog box will appear. Select the axis to perform absolute positioning. Click the Servo ON Button to turn ON the Servo. Enter the target position, target velocity, acceleration rate, deceleration rate, and jerk, and then click the Apply Button.
  • Page 93: Relative Positioning

    4 Checking Wiring from the Sysmac Studio 4-3-5 Relative Positioning Click the Relative positioning Tab on the MC Test Run Tab Page. The following dialog box will appear. Select the axis to perform relative positioning. Click the Servo ON Button to turn ON the Servo. Enter the target travel distance, target velocity, acceleration rate, deceleration rate, and jerk, and then click the Apply Button.
  • Page 94 4 Checking Wiring from the Sysmac Studio 4-12 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 95: Motion Control Parameters

    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 .
  • Page 96: Introduction

    5 Motion Control Parameters Introduction You can use motion control instructions to perform single-axis operations and multi-axes operations on axes groups with the NY-series Controller’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-axes operations for axes groups.
  • Page 97 5 Motion Control Parameters Version Information If an NY-series Controller with unit version 1.14 or later and Sysmac Studio version 1.17 or higher are combined, commands to the I/O devices can continuously be sent even when the download process is in progress. For the NY-series Controller with unit version 1.12 or earlier, sending commands to the I/O devices is stopped when the download process is executed.
  • Page 98 5 Motion Control Parameters • MC_ChangeAxisUse (Changing Axis Use) instruction • MC_WriteAxisParameter (Write Axis Parameters) instruction • Refer to the NX-series Position Interface Units User’s Manual (Cat. No. W524) for information on using the NX-series Position Interface Units. NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 99: Axis Parameters

    5 Motion Control Parameters Axis Parameters The axis parameters set the maximum velocity, jerk, homing, and other items for the axes controlled by the MC Function Module. The number of axis parameters provided is the same as the maximum number of controlled axes for each model.
  • Page 100 5 Motion Control Parameters Temporary changes Reading Classification Parameter name Page Applicable variables Support instruction Other Opera- Immediate Stop Input Stop Method MC_WriteAx- P. 5-21 tion Settings isParameter Limit Input Stop Method Drive Error Reset Monitoring Time Maximum Positive Torque Limit Maximum Negative Torque Limit Immediate Stop Input Logic Inversion Positive Limit Input Logic Inversion...
  • Page 101: Axis Basic Settings

    5 Motion Control Parameters Refer to 3-2 Axis Setting Procedure for details on how to set axis parameters. For details on instructions including the MC_Write (Write MC Setting) instruction, refer to the NY-series Motion Control Instructions Reference Manual (Cat. No. W561). Refer to 6-6 System-defined Variables for Motion Control for information on system-defined variables for motion control.
  • Page 102 5 Motion Control Parameters Axis Numbers The number that you can set for axis numbers is the maximum number of controlled axes. The number of real axes that you can change to used axes is the maximum number of used real axes. Item NY52-5...
  • Page 103 01 to 99 Node address switch setting *1 The value set from the Sysmac Studio will be used for all non-OMRON slaves, regardless of any setting at the slave. NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 104: Unit Conversion Settings

    5 Motion Control Parameters 5-2-3 Unit Conversion Settings These parameters set position units. Parameter name Function Setting range Default Unit of Display Set the unit for command positions. 0 to 5 pulse μm degree inch Command Pulse Set the number of pulses per motor rotation 1 to 4,294,967,295 10,000 Count Per Motor...
  • Page 105 5 Motion Control Parameters Precautions for Correct Use Precautions for Correct Use • Set to use the reducer if you use the Count Mode to Rotary Mode. When you set not to use the reducer, the number of pulses for one cycle of the ring counter may not be an expected integer because of a calculation error for one cycle of the ring counter when converted to pulses.
  • Page 106 5 Motion Control Parameters Conditions to Use Reducers When you set to use the reducer, the following condition must be met to use the unit conversion settings. • The result of the following calculation must be equal to or between 0.000000001 and 4,294,967,295: Work travel distance per rotation ×...
  • Page 107 5 Motion Control Parameters In this example, an OMRON 1S-series Servomotor with a 23-bit absolute encoder is used. Mechanically, the reduction ratio of the reducer is 1/5 and the workpiece moves 10 mm for every rotation of the ball screw.
  • Page 108 5 Motion Control Parameters In this example, an OMRON 1S-series Servomotor with a 23-bit absolute encoder is used. Mechanically, the reduction ratio of the reducer is 3/5 and the workpiece moves 10 mm for every rotation of the ball screw.
  • Page 109 5 Motion Control Parameters In this example 1, an OMRON 1S-series Servomotor with a 23-bit absolute encoder is used. Mechanically, the reduction ratio of the reducer is 3/5 and the workpiece moves 360 degree for every rotation of the turntable.
  • Page 110 5 Motion Control Parameters In this example 2, an OMRON 1S-series Servomotor with a 23-bit absolute encoder is used. Mechanically, the reduction ratio of the reducer is 3/5 and the conveyor moves 80 mm for every rota- tion of the pulley. The travel distance per conveyor rotation is 360 mm.
  • Page 111: Operation Settings

    5 Motion Control Parameters 5-2-4 Operation Settings These parameters set items for axis operation, such as the maximum velocity and maximum accelera- tion/deceleration rate. Set them according to the specifications of the device you are controlling. Parameter name Function Setting range Default Maximum Velocity 400,000,000...
  • Page 112 5 Motion Control Parameters Parameter name Function Setting range Default Negative Torque Set the torque command value at which to 0 to 1,000 output a negative torque warning. No negative Warning Value torque warning is output if 0 is set. (Unit: %) Actual Velocity Fil- Set the time period to calculate the average 0 to 100...
  • Page 113 5 Motion Control Parameters The Maximum Velocity is set to 200 based on a calculation for the conditions (maximum speed: 6,000 r/min, reduction ratio: 1/5, ball screw pitch: 10 mm; 6,000 r/min × 1/5 × 10 mm = 12,000 mm/min = 200 mm/s). The default setting of 400,000,000 would exceed the maximum speed of the motor, so you must change the setting.
  • Page 114 5 Motion Control Parameters Velocity Instruction Instruction Instruction executed. executed. executed. Start velocity Time The start velocity is also used if the velocity is changed by the MC_SetOverride instruction. If the target velocity is greater than the start velocity, acceleration/deceleration are performed at the specified accel- eration/deceleration rates.
  • Page 115: Other Operation Settings

    *2 This parameter is set for devices, such as NX-series Digital Input Units, for which the logic of the input signals cannot be set. For devices, such as OMRON 1S-series Servo Drives, for which you can set the input signal logic, set this parameter to not reverse the signal.
  • Page 116: Limit Settings

    *2 The settings are as follows when you use an OMRON G5-series Servomotor/Servo Drive with an absolute external scale for fully-closed control, or when you use an OMRON G5-series Linear Motor Type Servomo- tor/Servo Drive with built-in EtherCAT communications.
  • Page 117 5 Motion Control Parameters Count Modes The Count Mode is the feed mode for the axis. Select the count mode for the command positions for each axis. There are two Count Modes: Linear Mode, which has a finite axis feed range and Rotary Mode, which has an infinite axis feed range.
  • Page 118: Servo Drive Settings

    0: Switched on by Servo OFF 1: Ready to switched on by Servo OFF *1 The default range is all DINT integers. You can use the default range with OMRON 1S-series Servo Drives or G5-series Servo Drives. Refer to the NX-series Position Interface Units User’s Manual (Cat. No. W524) for information on using the NX- series Position Interface Units.
  • Page 119: Homing Settings

    Value. The modulo minimum position setting value must be set to 0. *3 If you set this parameter to 1, the Servo Ready (Switched on) status of OMRON G5-series Servo Drives can- not be used. To use the Servo Ready (Switched on) status, set this parameter to 0. Refer to A-5 PDS State Transition for details on the PDS state transition.
  • Page 120: 5-2-10 Axis Parameter Setting Example

    *3 This setting can be used for an OMRON 1S-series Servo Drive or G5-series Servo Drive. The input allocated to latch 1 for the Servo Drive is used as the external home input. In the default setting of the OMRON 1S-series Servo Drives or G5-series Servo Drives, the external latch input 1 is allocated to latch 1.
  • Page 121 5 Motion Control Parameters Settings Parameter name Axis 1 Axis 2 Axis Variable Names Axis1 Axis2 Axis Number Enabled Axes Used axis Used axis Axis Type Servo axis Servo axis Input Device/Output Device μm Unit of Display μm Command Pulse Count Per Motor 1,048,576 1,048,576 Rotation...
  • Page 122 5 Motion Control Parameters Settings Parameter name Axis 1 Axis 2 Axis Variable Name Axis1 Axis2 Axis Number Enabled Axes Used axis Used axis Axis Type Servo axis Encoder axis Input Device/Output Device Unit of Display μm μm Command Pulse Count Per Motor Rota- 1,048,576 1,048,576 tion...
  • Page 123: Axes Group Parameters

    5 Motion Control Parameters Axes Group Parameters Use the axes group parameters to set axes group operations related to axes groups that the MC Func- tion Module controls, such as the axis configuration, maximum interpolation velocity, and axes group stopping method. The axes group parameters are provided for each axes group. The number of axes groups depends on the model.
  • Page 124: Axes Group Basic Settings

    5 Motion Control Parameters 5-3-2 Axes Group Basic Settings Set whether to use the axes group. If you are going to use the axes group, set the axis configuration and the axes to use. Parameter name Function Setting range Default Axes Group Number Set the logical number of the axes group.
  • Page 125 5 Motion Control Parameters Composition Axes The axes that are in an axes group are called composition axes. To make it easier to reuse program- ming with interpolation instructions for axes groups commands, logical axes (axis A0 to axis A3) are used instead of axis numbers (axis 0 to axis 63).
  • Page 126: Axes Group Operation Settings

    5 Motion Control Parameters 5-3-3 Axes Group Operation Settings These parameters set items for axes group operation, such as the maximum interpolation velocity and axes group stopping method. Set them according to the specifications of the device you are controlling. Refer to the NX-series Position Interface Units User’s Manual (Cat.
  • Page 127 5 Motion Control Parameters Parameter name Function Setting range Default Interpolation Decel- Set the percentage of the maximum interpo- 0 to 100 eration Warning lation deceleration rate at which to output an Value interpolation deceleration warning. No inter- polation deceleration warning is output if 0 is set.
  • Page 128: Enabling An Axes Group

    5 Motion Control Parameters 5-3-4 Enabling an Axes Group Specify the number of the axes group to enable in the MC_GroupEnable (Enable Axes Group) instruc- tion to enable operation instructions for an axes group in the user program. An instruction error occurs if you execute a motion control instruction for an axes group that is not enabled.
  • Page 129: Motion Control Programming

    Motion Control Programming This section provides the specifications of a motion control program and the operation procedures that are required up through actual program development. 6-1 Introduction ..........6-2 6-2 Motion Control Instructions .
  • Page 130: Introduction

    6 Motion Control Programming Introduction The NY-series Controller can perform both sequence control and motion control. Write motion control instructions into the user program to perform motion control with EtherCAT slave Servo Drives, NX-series Position Interface Units, and other devices. Programs that contain motion control instructions are called motion control programs.
  • Page 131: Motion Control Instructions

    6 Motion Control Programming Motion Control Instructions Motion control instructions are used in the user program to execute motion controls for an NY-series Controller. These instructions are defined as function blocks (FBs). The motion control instructions of ® the MC Function Module are based on the technical specifications of function blocks for PLCopen ®...
  • Page 132: State Transitions

    6 Motion Control Programming State Transitions The states of axes and axes groups and state transitions caused by the execution of instructions are ® based on the technical specifications of function blocks for PLCopen motion control. This section pro- vides an overall description of the MC Function Module, states, and state transitions. 6-3-1 Status of the Motion Control Function Module The overall states of the MC Function Module are described in the following table.
  • Page 133: Axis States

    6 Motion Control Programming 6-3-2 Axis States The operation of an axis when motion control instructions are executed for it is shown in the following figure. Motion control instructions are executed in sequence and axes enter one of the states listed in the following table.
  • Page 134 6 Motion Control Programming State name Definition Stopped In this state, the Servo is ON for the axis and the axis is stopped. Discrete Motion In this state, positioning is performed for the specified target position. This includes when waiting the in-position status and when the velocity is 0 because the override factor was set to 0 during a discrete motion.
  • Page 135: Axes Group States

    6 Motion Control Programming 6-3-3 Axes Group States The operation of an axes group when motion control instructions are executed for it is shown in the fol- lowing figure. Moving Moving MC_GroupStop Deceleration Stopping Stopping MC_GroupImmediateStop Error Deceleration Stopping ErrorStop MC_GroupEnable Standby Axes Group Disabled...
  • Page 136 6 Motion Control Programming State name Definition Standby In this state, no instructions for axes group commands are executing. (This is independent of the Servo ON/OFF status of the composition axes in the axes group) Moving In this state, positioning is performed for the specified target position due to a motion instruction for an axes group command.
  • Page 137: Execution And Status Of Motion Control Instructions

    6 Motion Control Programming Execution and Status of Motion Control Instructions Variables that represent the execution status of instructions and variables that are used to execute motion control instructions are defined in the MC Function Module. There are two input variables that you use to execute motion control instruction functions: Execute and Enable.
  • Page 138 6 Motion Control Programming Item Rule There are two output variables that represent an error when a problem occurs during the Error processing execution of an instruction instance. These outputs are defined as follows: • Error: The output variable Error changes to TRUE to indicate that an error occurred during the execution of the instruction instance.
  • Page 139: Execution Timing Charts

    6 Motion Control Programming *3 If the condition expressions or set values for ST Structure instructions do not match, the instructions in that statement are not executed. For details, refer to the NY-series Motion Control Instructions Reference Manual (Cat. No. W561). *4 Refer to the NY-series Motion Control Instructions Reference Manual (Cat.
  • Page 140 6 Motion Control Programming Timing Charts for Execute-type Instructions • The following timing chart shows the operation of the instruction when it is completed while the input variable Execute is TRUE. The following timing chart is for when an error does not occur through when Execute changes to FALSE.
  • Page 141 6 Motion Control Programming • The following timing chart is for when the input variable Execute is TRUE for only one period and an error occurs for the instruction. The output variable Error will remain TRUE. Execute Busy Done CommandAborted Error Timing Charts for Enable-type Instructions •...
  • Page 142: Timing Chart For Re-Execution Of Motion Control Instructions

    6 Motion Control Programming 6-4-3 Timing Chart for Re-execution of Motion Control Instructions If the values of the input variables to the same instance are changed while the motion control instruction is under execution and Execute is changed to TRUE, FALSE, and then back to TRUE again, operation will follow the new values.
  • Page 143: Timing Chart For Multi-Execution Of Motion Control Instructions

    6 Motion Control Programming 6-4-4 Timing Chart for Multi-execution of Motion Control Instructions Another instance can be executed for an axis during axis motion. Set the input variable BufferMode to specify when to start operation. The following figure shows an example in which BufferMode (Buffer Mode Selection) is set to aborting when MC_MoveAbsolute (Absolute Positioning) instructions are executed with multi-execution of instructions.
  • Page 144: Positions

    6 Motion Control Programming Positions This section describes the positions that are used in motion control programming. 6-5-1 Types of Positions The MC Function Modules uses the following two types of positions. Type of position Definition Command position This is the position that the MC Function Module outputs to control an axis. Actual position The actual position as input from the Servo Drive or encoder input.
  • Page 145: Valid Positions For Each Axis Type

    6 Motion Control Programming 6-5-2 Valid Positions for Each Axis Type The following table lists the valid positions for each axis type. Types of positions Axis type Command position Actual position Servo axis Applicable Applicable Virtual servo axis Applicable Applicable Encoder axis Cannot be used.
  • Page 146: System-Defined Variables For Motion Control

    6 Motion Control Programming System-defined Variables for Motion Control This section describes the variables of the MC Function Module. 6-6-1 Overview of System-defined Variables for Motion Control The NY-series Controller is compliant with the IEC 61131-3 standard. Parameter settings, status information, and other data are handled as variables in the user program in the NY-series Controller.
  • Page 147 6 Motion Control Programming  Axes Group Variables Use these variables to handle multiple axes as a single group. You can use either the system-defined variables or the variables that are set on the Sysmac Studio to specify the Axes Group Variables in the user program. You can change any of the Axes Group Variables that you create on the Sysmac Studio.
  • Page 148 6 Motion Control Programming Data Types Used for System-defined Variables for Motion Control System-defined variables for motion control use both basic data types and derivative data types.  Basic Data Types Category Data type Size Range of values Notation Boolean BOOL TRUE or FALSE TRUE or FALSE...
  • Page 149: System For System-Defined Variables For Motion Control

    6 Motion Control Programming  Derivative Data Types Type Description Enumerated data types This data type uses one item from a prepared name list as its value. Variables with this data type start with “_e.” Structure data type This data type consists of multiple data types placed together into a single layered structure.
  • Page 150: Tables Of System-Defined Variables For Motion Control

    6 Motion Control Programming Update Timing of System-defined Variables for Motion Control The system-defined variables for motion control are updated every primary task period. 6-6-3 Tables of System-defined Variables for Motion Control This section provides tables that describe the system-defined variables for motion control. MC Common Variable The variable name _MC_COM is used for the MC Common Variable.
  • Page 151 6 Motion Control Programming Axis Variables _MC_AX[0-63] are the Axis Variables in the system-defined variables. The data type is _sAXIS_REF, which is a structure variable. Variable name Data type Meaning Function _MC_AX[0-63] _sAXIS_REF Axis Variable Status _sAXIS_REF_STA Axis Status Ready BOOL Axis Ready-to-execute TRUE when preparations for axis execution are finished and the axis is stopped.
  • Page 152 6 Motion Control Programming Variable name Data type Meaning Function Details _sAXIS_REF_DET Axis Control Status Gives the control status of the command. Idle BOOL Idle TRUE when processing is not currently performed for the command value, except when waiting for in-position state.
  • Page 153 6 Motion Control Programming Variable name Data type Meaning Function _sAXIS_REF_CM- Axis Command Values D_DATA LREAL Command Current Contains the current value of the command posi- Position tion. (Unit: command units) When the Servo is OFF and the mode is not posi- tion control mode, this variable contains the actual current position.
  • Page 154 6 Motion Control Programming Variable name Data type Meaning Function MFaultLvl _sMC_REF_EVENT Axis Minor Fault Active BOOL Axis Minor Fault TRUE while there is an axis minor fault. Occurrence Code WORD Axis Minor Fault Code Contains the code for an axis minor fault. The upper four digits of the event code have the same value.
  • Page 155 Z-phase detection digital input. You may not be able to map a PDO to this signal for servo drives from other man- ufacturers. Refer to the manual for the connected servo drive for details. *6 You cannot map this signal to a PDO for an OMRON G5-series Linear Motor Type Servo Drive with built-in EtherCAT communications.
  • Page 156 6 Motion Control Programming  Relationship between Axis Variables and Axis Types Axis Variables are enabled or disabled according to the axis type. Disabled members are FALSE or 0. Also, the following table shows which members are enabled for each axis type. Virtual Virtual Servo...
  • Page 157 6 Motion Control Programming Virtual Virtual Servo Encoder Variable name Data type Meaning servo encoder axis axis axis axis _sAXIS_REF_CMD_DATA Axis Command Values LREAL Command Current Enabled Enabled Position LREAL Command Current Enabled Enabled Velocity AccDec LREAL Command Current Enabled Enabled Acceleration/Decelera- tion...
  • Page 158 6 Motion Control Programming Axes Group Variables _MC_GRP[0-31] are the system-defined Axes Group Variables. The data type is _sGROUP_REF, which is a structure variable. Also, in the descriptions of functions, _MC_AX[*] is used as an example. Variable name Data type Meaning Function _MC_GRP[0-31]...
  • Page 159 6 Motion Control Programming Variable name Data type Meaning Function _sGROUP_REF_CMD_ Axes Group Command DATA Values LREAL Command Contains the current value of the command Interpolation Velocity interpolation velocity. The interpolation veloc- ity is calculated from the difference with the interpolation command current position.
  • Page 160 6 Motion Control Programming Variable name Data type Meaning Function Kinematics _sGROUP_REF_KIM Kinematics Contains the definition of the kinematic con- Transformation versions for the axes group. Settings GrpType _eMC_TYPE Composition Gives the axis composition of multi-axes coor- dinated control. 0: _mcXY (two axes) 1: _mcXYZ (three axes) 2: _mcXYZU (four axes) Axis[0]...
  • Page 161: Cam Tables And Cam Data Variables

    6 Motion Control Programming Cam Tables and Cam Data Variables The MC Function Module uses the cam profile curves that you create on the Cam Editor of the Sysmac Studio as cam tables. The cam table data is handled as cam data variables in the user program in the NY-series Controller.
  • Page 162 6 Motion Control Programming • Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504-E1-10 or later) for infor- mation on creating and transferring the cam definition variable in the Sysmac Studio. • For details on the MC_GenerateCamTable (Generate Cam Table) instruction and MC_Save- CamTable instruction, refer to the NY-series Motion Control Instructions Reference Manual (Cat.
  • Page 163 6 Motion Control Programming Transfer Cam Table [Controller to File]: Uploads the cam table from the Controller and saves it in a CSV file. Transfer Cam Table [File to Controller]: Downloads the cam table from a CSV file to the Controller. Save/Export Edit Spreadsheet...
  • Page 164 6 Motion Control Programming The cam profile names that are set on the Sysmac Studio are used as the cam table names. Specifying Cam Tables in the User Program In the user program, the cam table name is specified for the in-out variable CamTable in motion control instructions.
  • Page 165: Programming Motion Controls

    6 Motion Control Programming Programming Motion Controls Place motion control instructions in the user program of the NY-series Controller to perform motion con- trol. Programs that contain motion control instructions are called motion control programs. Precautions for Correct Use Precautions for Correct Use •...
  • Page 166 6 Motion Control Programming Editing the Program Right-click a section in the new program and select Edit from the menu. The Program Edit Tab Page is displayed. Select the required instructions from the Toolbox and enter the program. Refer to the NY-series Industrial Panel PC / Industrial Box PC Software User’s Manual (Cat. No. W558) for details on programming.
  • Page 167: Creating Cam Tables

    6 Motion Control Programming Creating Cam Tables This section will explain how to use the Cam Editor of the Sysmac Studio to create a cam table. Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for details on the Cam Editor. Adding a Cam Profile Right-click Cam Data Settings in the Multiview Explorer and select CamProfile from the Add Menu.
  • Page 168 6 Motion Control Programming Editing the Cam Profile Right-click the cam profile in the Multiview Explorer and select Edit from the menu. The Cam Profile Edit Tab Page is displayed. Make the settings and enter the cam profile. Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for specific proce- dures.
  • Page 169: Manual Operation

    This section describes manual operation when the MC Function Module is used together with an OMRON 1S-series Servo Drive. 7-1 Outline ............7-2 7-2 Turning ON the Servo .
  • Page 170: Outline

    7 Manual Operation Outline This section describes how to combine the MC Function Module and OMRON 1S-series Servo Drives together and use motion control instructions from the user program to perform manual operations. The motion control instructions for manual operation are MC_Power and MC_MoveJog. MC_Power changes the Servo Drive to the Servo ON state and MC_MoveJog performs jogging.
  • Page 171: Turning On The Servo

    User’s Manual (Cat. No. W524) for details. Additional Information If an OMRON 1S-series Servomotor or G5-series Servomotor with an absolute encoder is used, or if an OMRON G5-series Linear Motor Type Servomotor/Servo Drive with built-in EtherCAT communications is used with an absolute external scale, home is defined when the Enable input variable to the MC_Power instruction changes to TRUE.
  • Page 172: Setting Axis Parameters

    7 Manual Operation Downloading Axis Parameters and the User Program Download the axis parameters and user program to the NY-series Controller. Use the Synchro- nization menu command of the Sysmac Studio to download the project to the NY-series Control- ler. For details, refer to 3-2-2 Setting Procedure.
  • Page 173: Jogging

    7 Manual Operation Jogging Use the motion control instruction MC_MoveJog for jogging. Instance name Body name MC_MoveJog_instance In-out variable MC_MoveJog Axis1 Axis Axis Axis1 PositiveEnable Busy NegativeEnable CommandAborted Velocity Error Acceleration ErrorID Deceleration Input variables Output variables Specify the axis to jog with the Axis in-out variable. Change the PositiveEnable input variable to TRUE to start the axis with the specified positive Velocity (Target Velocity) and Acceleration (Acceleration Rate).
  • Page 174: Setting Axis Parameters

    7 Manual Operation 7-3-2 Setting Axis Parameters Set the following axis parameters if you want to jog when home is not defined. The following setting example is for a one-axis device. Servomotor Encoder resolution: 23 bits/rotation 1 rotation 10 mm Ball screw Ball screw pitch: 10 mm Encoder output pulses per motor rotation...
  • Page 175: Programming Example

    7 Manual Operation 7-3-4 Programming Example The following programming example jogs an axis named Axis1 in the positive direction for the value of bit A and in the negative direction for the value of bit B. MC_MoveJog_instance MC_MoveJog Axis1 Axis Axis PositiveEnable Busy...
  • Page 176 7 Manual Operation NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 177: Homing

    Homing This section describes homing. 8-1 Outline ............8-2 8-2 Homing Procedure .
  • Page 178: Outline

    NX-series Position Interface Units User’s Manual (Cat. No. W524) for details. Additional Information If an OMRON 1S-series Servomotor or G5-series Servomotor with an absolute encoder is used, or if an OMRON G5-series Linear Motor Type Servomotor/Servo Drive with built-in EtherCAT communications is used with an absolute external scale, home is defined when the Enable input variable to the MC_Power instruction changes to TRUE.
  • Page 179 8 Homing The MC_MoveZeroPosition (High-speed Home) instruction is also provided to perform positioning to home as defined for the previously described method. Name Description High-speed Homing The axis returns to home using an absolute position of 0 as the target position. The MC Function Module can operate the motor even when home is undefined (excluding MC_MoveZeroPosition).
  • Page 180 8 Homing Precautions for Correct Use Precautions for Correct Use • For a virtual axis, home is always defined with a zero position preset. The setting of the Hom- ing Method axis parameter is ignored. • The positive drive prohibit input (POT), negative drive prohibit input (NOT), and home proxim- ity input (DEC) of the Servo Drive are used by the MC Function Module as the positive limit input, negative limit input, and home proximity input.
  • Page 181: Homing Procedure

    8 Homing Homing Procedure This section describes the procedure to perform homing. Adding and Setting an Axis Add and set an axis from the Sysmac Studio. Setting Axis Parameters Set the homing method with the homing parameters. Writing the User Program Create the user program from the Sysmac Studio.
  • Page 182 8 Homing Parameter name Description Home Input Mask Distance Set the home input feeding distance when you set the Homing Opera- tion Mode to the proximity reverse turn/home input mask distance. (Unit: command units) Home Offset Preset the actual position for the value that is set after homing. (Unit: command units) Homing Holding Time Set the holding time when you set the Homing Operation Mode to the...
  • Page 183 Manual (Cat. No. W561). Additional Information You cannot map the Z-phase input to a PDO for an OMRON G5-series Linear Motor Type Servo Drive with built-in EtherCAT communications. Therefore, if you use the No Home Proximity Input/Holding Home Input Homing Operation Mode, which can use a Z-phase input mapped to a PDO, do not select the Z-phase input for the home input signal.
  • Page 184 8 Homing Homing Start Direction Select the direction (positive or negative) in which the axis starts moving when homing is started. If homing starts while the home proximity signal is ON in a Homing Operation Mode that includes reversal operation for a proximity reverse turn, the axis starts motion in the direction opposite to the home input detection direction (regardless of the setting of the homing start direction).
  • Page 185 8 Homing • An error occurs and the axis stops if the axis is set to reverse direction, and the limit signal in the home input detection direction turns ON when traveling at the homing approach velocity. However, if the Homing Operation Mode is 13 (no home proximity input/holding home input), which does not use proximity signals, no error will occur and the axis will not stop.
  • Page 186 8 Homing Homing Jerk Set the homing jerk in command units per seconds cubed (command units/s ). If the homing jerk is set to 0, acceleration and deceleration are performed without jerk. Home Input Mask Distance Set the home input mask distance in command units when you set Homing Operation Mode 9 (proxim- ity reverse turn/home input mask distance).
  • Page 187 8 Homing Homing Holding Time Set the holding time when you set homing operation mode 12 (proximity reverse turn/holding time). This is the time from when the home proximity input signal (i.e., from when deceleration starts) until home is defined. Home input detection direction Home proximity input signal...
  • Page 188: Monitoring The Homing Operation

    8 Homing 8-2-2 Monitoring the Homing Operation You can read Axis Variables in the user program to monitor the homing status and the input signal sta- tus. Data Variable name Meaning Function type _MC_AX[0-63].Status.Homing BOOL Homing TRUE when homing for the MC_Home or MC_HomeWithParameter instruction.
  • Page 189: Homing Operation

    8 Homing Homing Operation Select the home definition method based on the configuration of the positioning system and its pur- pose. There are 10 Homing Operation Modes supported by the MC Function Module. You can also fine- tune the home that is detected with a homing compensation value. Additional Information •...
  • Page 190: Homing With An Absolute Encoder

    Industrial Box PC Software User’s Manual (Cat. No. W558) for details on the shutdown pro- cessing of the Industrial PC. • If you use an absolute encoder of an OMRON G5-series Servo Drive, connect an absolute encoder backup battery to the Servo Drive.
  • Page 191: Outline Of Function

    8 Homing Additional Information If you use an OMRON G5-series Linear Motor Type Servomotor/Servo Drive with built-in Ether- CAT communications, you can set the absolute encoder home position. If you use a Linear Motor Type, observe the following points when reading this section.
  • Page 192: Setting Procedure

    8 Homing Applicable Servomotors The following table lists the Servomotors that use the absolute encoder home setting. Manufacturer Series Servo Drive Servomotor OMRON 1S Series R88D-1SN-ECT R88M-1S R88M-1T R88M-1C G5 Series R88D-KN-ECT R88M-KS R88M-KT R88M-KC R88D-KN-ECT-L R88L-EC Precautions for Correct Use Precautions for Correct Use You cannot use this absolute encoder for an NX-series Pulse Output Unit.
  • Page 193 Precautions for Correct Use Precautions for Correct Use After the absolute encoder is set up, the power supply to the OMRON 1S-series Servo Drive or G5-series Servo Drive must be cycled. When setup processing for the absolute encoder is com- pleted, an Absolute Value Clear Error (A27.1) will occur in the Servo Drive.
  • Page 194: High-Speed Homing

    8 Homing High-speed Homing This function performs quick positioning to the home. Home is defined in advance. Use the MC_MoveZeroPosition (High-speed Homing) instruction and specify the target velocity, acceleration rate, deceleration rate, and jerk. If you execute this instruction when home is not defined an instruction error will occur.
  • Page 195: Motion Control Functions

    This section describes the motion control functions that are used when connected to OMRON 1S-series Servo Drives with built-in EtherCAT communications. 9-1 Single-axis Position Control ........9-3 9-1-1 Outline of Operation .
  • Page 196 9 Motion Control Functions 9-6 Multi-axes Coordinated Control ........9-51 9-6-1 Outline of Operation .
  • Page 197: Single-Axis Position Control

    9 Motion Control Functions Single-axis Position Control The MC Function Module can be connected to OMRON 1S-series Servo Drives with built-in EtherCAT communications or G5-series Servo Drives with built-in EtherCAT communications to implement posi- tion control, velocity control, and torque control. This section describes positioning operation for single axes.
  • Page 198: Absolute Positioning

    9 Motion Control Functions 9-1-2 Absolute Positioning Absolute positioning specifies the absolute coordinates of the target position in relation to home. You can perform positioning, such as shortest way positioning on a rotary table, by setting the Count Mode to Rotary Mode and specifying the operation direction. Velocity Target velocity...
  • Page 199: Interrupt Feeding

    9 Motion Control Functions 9-1-4 Interrupt Feeding Interrupt feeding feeds the axis at the specified velocity and for the specified distance from the actual position when a trigger signal occurs. You can also select to output an error if the trigger signal does not occur within the specified travel dis- tance when you specify either absolute or relative positioning.
  • Page 200: Cyclic Synchronous Positioning

    Precautions for Correct Use Precautions for Correct Use The immediate stop input for the OMRON 1S-series Servo Drive or G5-series Servo Drive also causes an error and executes stop processes in the Servo Drive itself. NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 201 • You must set up the Servo Drive in order to use the input signals from the Servo Drive. An OMRON 1S-series Servo Drive with built-in EtherCAT communications or G5-series Servo Drive with built-in EtherCAT communications has an immediate stop input and limit input assigned in its default settings.
  • Page 202 9 Motion Control Functions Additional Information When the input variable Enable to the MC_Power (Servo ON) instruction changes to FALSE, the MC Function Module immediately stops the command value and turns OFF the Servo. When the Servo is turned OFF, the Servo Drive will operate according to the settings in the Servo Drive. Stopping Due to Errors or Other Problems ...
  • Page 203 9 Motion Control Functions Precautions for Correct Use Precautions for Correct Use • If an error that results in deceleration to a stop occurs during execution of a synchronous movement instruction that has a Deceleration input variable, the axis decelerates to a stop at the deceleration rate given by Deceleration.
  • Page 204 9 Motion Control Functions • Immediate Stop and Error Reset Velocity The actual position when the cause of the immediate stop occurred is used as the command position. Inertia will take the axis past this position, but it will return to the actual position when the cause of the immediate stop occurred and stop there.
  • Page 205: Override Factors

    9 Motion Control Functions 9-1-7 Override Factors You can use the MC_SetOverride instruction to set override factors for the motion of the axes that are currently in motion. The velocity override factor is set as a percentage of the target velocity. It can be set between 0% and 500%.
  • Page 206: Single-Axis Synchronized Control

    9 Motion Control Functions Single-axis Synchronized Control This section describes the operation of synchronized control for single axes. 9-2-1 Overview of Synchronized Control Synchronous control synchronizes the position of a slave axis with the position of a master axis. The command position or actual position of any axis can be specified for the master axis.
  • Page 207: Positioning Gear Operation

    9 Motion Control Functions 9-2-3 Positioning Gear Operation This function specifies the gear ratio between the master axis and the slave axis and starts operation. Positioning gear operation allows you to set the positions of the master and slave axes at which to start synchronization.
  • Page 208: Cam Operation

    9 Motion Control Functions 9-2-4 Cam Operation Cam operation synchronizes the position of the slave axis with the master axis according to a cam table. Start cam operation with the MC_CamIn (Start Cam Operation) instruction. End cam operation with the MC_CamOut (End Cam Operation) instruction or the MC_Stop instruction. Create a cam table using the Cam Editor in the Sysmac Studio and download it to the NY-series Controller.
  • Page 209: Cam Tables

    9 Motion Control Functions 9-2-5 Cam Tables This section describes the cam tables that are used for cam operation. Cam Table Terminology Term Description cam operation An operation that takes one master axis and one slave axis and follows the cam pro- file curve to derive the displacement of the slave axis from the phase of the master axis.
  • Page 210 9 Motion Control Functions Term Description cam table start position The absolute position of the master axis that corresponds to the cam start point (phase = 0). master following dis- The master start distance where the slave axis starts cam operation represented as tance either an absolute position or relative position.
  • Page 211 9 Motion Control Functions Cam Tables The MC Function Module defines a single element of data consisting of the phase of the master axis and the displacement of the slave axis as one cam data. A cam table is defined as the combination of multiple sets of cam data.
  • Page 212 9 Motion Control Functions Cam Table Specifications Item Description Maximum number of cam data per 65,535 points cam table Maximum size of all cam data 1,048,560 points Maximum number of cam tables 640 tables Switching cam operation You can switch to a different cam operation by executing a motion control instruction Changing cam data Cam data can be edited from the user program.
  • Page 213 9 Motion Control Functions Switching Cam Tables You can switch cam tables by re-executing the cam operation instruction during cam operation. After switching, cam operation will be performed with the cam table you specified for re-execution of the instruction. The EndOfProfile and Index output variables from the MC_CamIn instruction are output according to the new cam table.
  • Page 214 9 Motion Control Functions Updating Cam Table Properties The MC Function Module must identify the cam end point of the cam table. If an overwrite is performed from the user program during cam operation and the number of valid cam data changes, you must update the number of valid cam data to the latest value.
  • Page 215 9 Motion Control Functions Generate Cam Table You can generate the cam table by executing the MC_GenerateCamTable (Generate Cam Table) instruction. The MC_GenerateCamTable instruction calculates the cam data using the values specified for Cam- Property (Cam Properties) and CamNodes (Cam Nodes), and rewrites the cam data variable specified for the CamTable (Cam Table) in-out variable.
  • Page 216 9 Motion Control Functions By using the HMI, etc. to set the values for the MC_GenerateCamTable instruction, you can create the cam data variable and adjust the cam operation without using the Sysmac Studio. The following is the procedure used to adjust the cam operation. Create a user program, in advance, that includes the following processing.
  • Page 217: Synchronous Positioning

    9 Motion Control Functions 9-2-6 Synchronous Positioning This function performs positioning using a trapezoidal curve while synchronizing the specified slave axis to the specified master axis. This is a type of electronic cam, but it does not use cam tables created in the Cam Editor.
  • Page 218: Combining Axes

    9 Motion Control Functions 9-2-7 Combining Axes The sum or difference of two positions can be used as the command position for the slave axis. Opera- tion starts when the MC_CombineAxes instruction is executed. Use the MC_Stop instruction to stop axes in motion.
  • Page 219: Master Axis Phase Shift

    9 Motion Control Functions 9-2-8 Master Axis Phase Shift The phase of the master axis as viewed from the slave axis can be shifted for the current instruction. The shift amount as viewed from the slave axis is a relative amount. During synchronization, the slave axis will synchronize to the relative distance of the master axis.
  • Page 220 9 Motion Control Functions For details on slave axis position compensation, refer to the MC_SyncOffsetPosition (Cyclic Synchro- nous Position Offset Compensation) instruction in the NY-series Motion Control Instructions Reference Manual (Cat. No. W561). 9-26 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 221: Single-Axis Velocity Control

    9 Motion Control Functions Single-axis Velocity Control This section describes the operation of velocity control for single axes. Refer to the NX-series Position Interface Units User’s Manual (Cat. No. W524) for the differences when you use NX-series Pulse Output Units. 9-3-1 Velocity Control Velocity control is used to constantly move an axis at the specified velocity.
  • Page 222: Cyclic Synchronous Velocity Control

    9 Motion Control Functions 9-3-2 Cyclic Synchronous Velocity Control The control mode of the Servo Drive is set to Velocity Control Mode and a command speed is output every control period. To stop an axis, use the MC_Stop instruction or execute another motion control instruction.
  • Page 223: Single-Axis Torque Control

    9 Motion Control Functions Single-axis Torque Control Torque control continuously applies the specified amount of torque. You can use TorqueRamp to spec- ify the rate of change of the torque until the Torque (Target Torque) is reached. To stop an axis, use the MC_Stop instruction or execute another motion instruction.
  • Page 224: Common Functions For Single-Axis Control

    9 Motion Control Functions Common Functions for Single-axis Control This section describes the common functions used for single-axis control. Refer to the NX-series Position Interface Units User’s Manual (Cat. No. W524) for the differences when you use NX-series Pulse Output Units. 9-5-1 Positions Types of Positions...
  • Page 225 9 Motion Control Functions Axis Parameters That Are Related to Positions Parameter name Function Setting range Default In-position Range Set the in-position width. (Unit: command Non-negative long units) reals In-position Check Set the in-position check time in millisec- 0 to 10,000 Time onds.
  • Page 226: Velocity

    9 Motion Control Functions 9-5-2 Velocity Types of Velocities The following two types of axis velocities are used in the MC Function Module. Velocity type Definition Command velocity This is the velocity that the MC Function Module outputs to control an axis. Actual velocity This is the velocity calculated in the MC Function Module based on the actual posi- tion input from the Servo Drive or encoder input.
  • Page 227: Acceleration And Deceleration

    9 Motion Control Functions Monitoring Velocities You can read Axis Variables in the user program to monitor velocities. Variable name Data type Meaning Function _MC_AX[0-63].Cmd.Vel LREAL Command Current This is the current value of the command Velocity velocity. A plus sign is added during travel in the positive direction, and a minus sign is added during travel in the negative direction.
  • Page 228 9 Motion Control Functions *1 Blending is not changed to Buffered. Refer to 9-5-7 Multi-execution of Motion Control Instructions (Buffer Mode) for details. *2 The axis does not stop with an error when Blending is used for operation. Refer to 9-5-7 Multi-execution of Motion Control Instructions (Buffer Mode) for details.
  • Page 229: Jerk

    9 Motion Control Functions Example of Acceleration/Deceleration Operation Velocity Maximum velocity (2) Target velocity after velocity change (1) Target velocity at startup Time When Starting For Velocity Changes When Decelerating Ta1: Actual acceleration time Ta2: Actual acceleration time Td: Actual deceleration time Acceleration rate Acceleration rate D: Deceleration rate...
  • Page 230: Specifying The Operation Direction

    9 Motion Control Functions Example: Acceleration of 25,000 mm/s , Acceleration Time of 0.1 s, and a Jerk Application Rate of 50% Jerk = 25,000/(0.1 × 0.5/2) = 1,000,000 (mm/s Velocity Target velocity at startup Time Acceleration rate Acceleration rate at startup Time Jerk...
  • Page 231 9 Motion Control Functions Example for Shortest Way The following example illustrates when positioning is performed towards a target position of −20 when the command current position is 50. Modulo maximum position setting value: 100 Command current position: Target position: Target position: −20 −20...
  • Page 232 9 Motion Control Functions Example for Negative Direction The following example illustrates when positioning is performed towards a target position of −20 when the command current position is 50. Modulo maximum position setting value: 100 Command current position: Target position: Target position: −20 −20...
  • Page 233 9 Motion Control Functions Precautions for Correct Use Precautions for Correct Use Observe the following precautions on the operation direction of the previous operation. • If the MC_Home or MC_HomeWithParameter instruction exceeds the point where the home input was detected and reverses operation, the opposite direction of the home input detection direction is used.
  • Page 234: Re-Executing Motion Control Instructions

    9 Motion Control Functions 9-5-6 Re-executing Motion Control Instructions This section describes how to modify input variables of the same instance of a motion control instruc- tion during operation of a single axis and re-execute that instruction. The input variables Position (Tar- get Position), Distance (Travel Distance), Velocity (Target Velocity), Acceleration (Acceleration Rate), Deceleration (Deceleration Rate), and Torque (Target Torque) and sometimes other input variables can be changed by re-execution.
  • Page 235 9 Motion Control Functions  Triangular Control Patterns The triangular control shown in the figure below may result if the travel distance is shortened due to a change in the target position. No Reverse Turn Velocity ↓Command re-executed. ↑Initial command ↑New command Executed.↑...
  • Page 236 9 Motion Control Functions Changing the Travel Distance Even if you change the travel distance and re-execute the MC_MoveRelative (Relative Positioning) instruction, positioning is performed for the new travel distance in reference to the position where the motion first started. However, if the instruction is executed again just before positioning is completed, it may be executed as a new instruction rather than as a re-execution of the same instruction.
  • Page 237 9 Motion Control Functions  Patterns Where Deceleration Rate Decreases Trapezoidal Control or Triangular Control Deceleration-exceed Control If the command position is exceeded Velocity Velocity at the reduced deceleration rate, a ↓Instruction re-executed switch is made to deceleration- Decreased deceleration exceed control.
  • Page 238 9 Motion Control Functions  Timing Charts Variables Axis1PosSet1 Axis1PosSet2 Axis1Pos 1000 2000 Input Parameter Axis1Execute Output Parameters Axis1Done Axis1Busy Axis1Active Precautions for Correct Use Precautions for Correct Use For input variables that are not changed, always use the same values as before re-execution of the instruction.
  • Page 239: Multi-Execution Of Motion Control Instructions (Buffer Mode)

    9 Motion Control Functions 9-5-7 Multi-execution of Motion Control Instructions (Buffer Mode) ® You can execute another motion control instruction while an axis is moving. In the PLCopen technical specifications, this functionality is defined as Buffer Mode, but in the MC Function Module this is some- times referred to as multi-execution of instructions.
  • Page 240 9 Motion Control Functions Aborting This is the default mode. No buffering is performed in this mode. The current command is aborted and the new instruction is executed. Aborting Mode can be used for multi-execution of instructions for motion control instructions for both single-axis control and synchronized control. ...
  • Page 241 9 Motion Control Functions Blending The buffered instruction remains in the buffer until the target position of the current instruction is reached. The buffered instruction is executed after the current instruction’s target position is reached. However, motion does not stop at this time. Operation transitions to the next instruction at the velocity specified with the BufferMode (Buffer Mode Selection) input variable.
  • Page 242 9 Motion Control Functions Use Rapid Acceleration/Deceleration BufferMode Is Set to Blending Previous Velocity Buffered instruction Current instruction Transit velocity used. Stopping at the target position is not possible for the deceleration rate of the buffered instruction. Rapid deceleration is therefore used to stop at the Current instruction target position.
  • Page 243 9 Motion Control Functions When the Direction of Operation Does Not Change Cases Resulting in Acceleration The transit velocity is Multi-execution the command velocity of of instruction the current instruction Velocity Current instruction Buffered instruction Time Cases Resulting in Deceleration Multi-execution of instruction Velocity...
  • Page 244 9 Motion Control Functions  Blending Next (Next Velocity) Operation is performed using the target position of the current instruction and the target velocity of the buffered instruction. The transit velocity is the command Cases Resulting in Acceleration velocity of the buffered command Multi-execution of instruction Velocity Current instruction...
  • Page 245: Multi-Axes Coordinated Control

    9 Motion Control Functions Multi-axes Coordinated Control This section describes the operation of multi-axes coordinated control. With the MC Function Module, you can set an axes group in advance from the Sysmac Studio to perform interpolation control for mul- tiple axes. 9-6-1 Outline of Operation Multi-axes coordinated control performs a motion with multiple related axes together as a single group...
  • Page 246 9 Motion Control Functions Enabling and Disabling Axes Groups To enable an axes group, specify the axes group for the MC_GroupEnable (Enable Axes Group) instruction. An instruction error will occur if you try to execute an axes group instruction when the axes group is still disabled.
  • Page 247 9 Motion Control Functions Reading Axes Group Positions You can use the MC_GroupReadPosition (Read Axes Group Position) instruction to read the command current positions and the actual current positions of an axes group. For details on reading the axis positions for an axes group, refer to the MC_GroupReadPosition (Read Axes Group Position) instruction in the NY-series Motion Control Instructions Reference Manual (Cat.
  • Page 248: Linear Interpolation

    9 Motion Control Functions 9-6-2 Linear Interpolation Linear interpolation is used to move 2 to 4 of the logical axes A0 to A3 in a straight line between a start point and an end point. Either absolute or relative positioning is possible. You can specify the interpola- tion velocity, interpolation acceleration, interpolation deceleration, and jerk.
  • Page 249: Circular Interpolation

    9 Motion Control Functions 9-6-3 Circular Interpolation Circular interpolation is used to move two of the logical axes A0 to A3 in a circular motion on a 2D plane. Either absolute or relative positioning is possible. You can specify the circular interpolation mode, path direction, interpolation velocity, interpolation acceleration, interpolation deceleration, and combined jerk for the two axes.
  • Page 250: Stopping Under Multi-Axes Coordinated Control

    9 Motion Control Functions 9-6-5 Stopping Under Multi-axes Coordinated Control Multi-axes coordinated control of axes groups will stop when you execute certain motion control instruc- tions in the user program or when an error or some other problem occurs. Stopping with Motion Control Instructions Use the MC_GroupStop or MC_GroupImmediateStop instruction to stop axes group operation.
  • Page 251: Overrides For Multi-Axes Coordinated Control

    9 Motion Control Functions Additional Information • If you execute the MC_GroupDisable (Disable Axes Group) instruction during axes group operation, the axes in the group will decelerate to a stop at their maximum deceleration rates. • If you execute the MC_Stop instruction while an axes group is in operation, an error will occur for the axes and axes group and the axes group operation will decelerate to a stop with inter- polation.
  • Page 252 9 Motion Control Functions  Overrides for the MC_MoveLinear (Linear Interpolation) Instruction An example of a time chart for using the Set Override Factors instruction for the MC_MoveLinear (Linear Interpolation) instruction is given below. Previous Instruction: MC_MoveLinear Execute Busy Active Done CommandAborted Current Instruction...
  • Page 253: Common Functions For Multi-Axes Coordinated Control

    9 Motion Control Functions Common Functions for Multi-axes Coordinated Control This section describes the common functions for multi-axes coordinated control. 9-7-1 Velocity Under Multi-axes Coordinated Control To specify the velocity for multi-axes coordinated control, specify the interpolation velocity on the path. The unit is the same as for single axes, command units/s.
  • Page 254: Acceleration And Deceleration Under Multi-Axes Coordinated Control

    9 Motion Control Functions Monitoring Velocities You can read Axes Group Variables from the user program to monitor the interpolation velocity. Variable name Data type Meaning Function _MC_GRP[0-31].Cmd.Vel LREAL Command Interpo- This is the current value of the com- lation Velocity mand interpolation velocity.
  • Page 255: Jerk For Multi-Axes Coordinated Control

    9 Motion Control Functions *2 The axis does not stop with an error when Blending is used for operation. Refer to 9-5-7 Multi-execution of Motion Control Instructions (Buffer Mode) for details. Specifying an Interpolation Acceleration and Interpolation Deceleration for an Axes Group The interpolation acceleration and interpolation deceleration rates used in an actual positioning motion are specified by the Acceleration (Acceleration Rate) and Deceleration (Deceleration Rate) input vari- ables to the motion control instruction.
  • Page 256: Re-Executing Motion Control Instructions For Multi-Axes Coordinated Control

    9 Motion Control Functions Interpolation velocity Time Acceleration rate Time Deceleration rate Jerk Time Vt: Specified interpolation velocity, At: Specified acceleration rate, Dt: Specified deceleration rate, Jt: Specified jerk 9-7-4 Re-executing Motion Control Instructions for Multi-axes Coordinated Control If you re-execute a linear interpolation or circular interpolation instruction, an instruction error will occur. Busy Active Done...
  • Page 257: Multi-Execution (Buffer Mode) Of Motion Control Instructions For Multi-Axes Coordinated Control

    9 Motion Control Functions 9-7-5 Multi-execution (Buffer Mode) of Motion Control Instructions for Multi-axes Coordinated Control You can perform multi-execution for multi-axes coordinated control in axes groups the same way as you can for axis operations. You can perform path control for multiple continuous lines and/or arcs if you use Buffer Mode under multi-axes coordinated control.
  • Page 258 9 Motion Control Functions Multi-execution for axes groups is done so that the interpolation velocity remains continuous between instructions. If continuous operation is performed with an instruction with a travel distance of 0, the velocity changes for the axes will not be continuous. Example: Interpolation Velocity and Velocities of Axes for Two-axis Cartesian Coordinates Y coordinate...
  • Page 259 9 Motion Control Functions • Use rapid acceleration/deceleration. • Minor fault stop Precautions for Correct Use Precautions for Correct Use For an NY-series Controller, Blending is not changed to Buffered even if you select Use rapid acceleration/deceleration. (Blending is changed to Buffered.) In this case, the maximum acceler- ation/deceleration rate is used and the blending operation is continued.
  • Page 260 9 Motion Control Functions  Blending Next (Next Velocity) Operation is performed using the target position of the current instruction and the target velocity of the buffered instruction. Cases Resulting in Acceleration The transit velocity is the command velocity of the buffered command Multi-execution of instruction Velocity Current instruction...
  • Page 261 9 Motion Control Functions  Transition Disabled (0: _mcTMNone) No processing is performed to connect the two positions. TransitionMode = _mcTMNone and BufferMode = _mcBuffered The axis moves to position End1, stops, and then moves to position End2. Y coordinate End2 Multi-execution of instruction Start1...
  • Page 262 9 Motion Control Functions TransitionMode = _mcTMNone and BufferMode = _mcBlending The axis moves to position End1, and then moves to position End2. Y coordinate End2 Multi-execution of instruction Start1 End1/ Start2 X coordinate Operation Pattern for X Axis Coordinates Velocity Start1 End1...
  • Page 263 9 Motion Control Functions TransitionMode = _mcTMNone and BufferMode = _mcAborting The axis moves from End1’ (multi-execution of instruction) to End2. Y coordinate End2 Multi-execution of instruction End1 Start1 End1’/ Start2 X coordinate Operation Pattern for X Axis Coordinates Velocity End1’...
  • Page 264 9 Motion Control Functions Additional Information The path linear velocity is constant if the following two conditions are met. • The target velocities of the current instruction and the buffered instruction are the same. • The deceleration rate of the current instruction and the acceleration rate of the buffered instruction are the same.
  • Page 265: Other Functions

    9 Motion Control Functions Other Functions This section describes other functions of the MC Function Module. Refer to the NX-series Position Interface Units User’s Manual (Cat. No. W524) for the differences when you use NX-series Pulse Output Units. 9-8-1 Changing the Current Position The command current position of a Servo axis can be changed to a specified value.
  • Page 266: Torque Limit

    Drive, you can also specify variables in the user program to use as a trigger. Use the MC_AbortTrigger (Disable External Latch) instruction to abort latching. You can use latching only with a Servo Drive that support latching (touch probe), such as the OMRON 1S-series Servo Drives, or a GX-EC0211/EC0241 Encoder Input Terminal.
  • Page 267: Zone Monitoring

    9 Motion Control Functions  Rotary Mode • The FirstPosition can be less than, equal to, or greater than the LastPosition. If the FirstPosition is greater than the LastPosition, the setting will straddle the modulo minimum position setting value. • An instruction error will occur if a position beyond the upper and lower limits of the ring counter is specified.
  • Page 268: Software Limits

    9 Motion Control Functions 9-8-5 Software Limits Actual positions can be monitored in the MC Function Module software. This function is separate from the hardware-based limit input signals. Set the range to monitor by setting the software limits in the Positive Software Limit and Negative Software Limit axis parameters.
  • Page 269: Following Error Monitoring

    9 Motion Control Functions • When the Actual Position Is outside the Software Limits Motion is allowed only toward the software limit range. As long as the motion is toward the range, the target position does not need to be within the software limit range. Precautions for Correct Use Precautions for Correct Use Do not execute an instruction for an axis command for a target position that is outside of the soft-...
  • Page 270: Following Error Counter Reset

    9 Motion Control Functions Refer to the NX-series Position Interface Units User’s Manual (Cat. No. W524) for the differences when you use NX-series Pulse Output Units. 9-8-7 Following Error Counter Reset Resetting the following error counter resets the following error to 0. Use the MC_ResetFollowingError instruction in the user program to reset the following error counter.
  • Page 271: In-Position Check

    9 Motion Control Functions Refer to the NX-series Position Interface Units User’s Manual (Cat. No. W524) for the differences when you use NX-series Pulse Output Units. 9-8-9 In-position Check You can check to see if the actual current position has reached the specified range for the target posi- tion during positioning or homing.
  • Page 272 9 Motion Control Functions Additional Information The value set from the Sysmac Studio is restored if power to the Industrial PC is cycled or the user program is downloaded with the Synchronization menu command of the Sysmac Studio. Use the MC_Write (Write MC Setting) and MC_WriteAxisParameter (Write Axis Parameters) instructions only when you need to temporarily change the in-position check time.
  • Page 273: 9-8-10 Changing Axis Use

    9 Motion Control Functions 9-8-10 Changing Axis Use You can use the MC_ChangeAxisUse (Change Axis Use) instruction to temporarily change the setting of the Axis Use axis parameter. To change an axis in this way, it must be set as a Used axis or as an Unused axis (changeable to used axis) in the Axis Use axis parameter.
  • Page 274: 9-8-12 Displaying 3D Motion Monitor For User Coordinate System

    9 Motion Control Functions 9-8-12 Displaying 3D Motion Monitor for User Coordinate System In the case that coordinate systems (such as SCARA robot and vertical articulated robot) other than orthogonal coordinate system are implemented by user programs, this function can be used to display the path of robot hands, etc.
  • Page 275 9 Motion Control Functions Each member is assigned a user-defined variable. The followings are the examples. Name Data type Description 3D_position _sMC_POSITION_REF User-defined variable for 3D display MCS_Cmd_TransX LREAL User-defined variable that indicates the X-axis position of the command current position gen- erated by a user program MCS_Cmd_TransY LREAL...
  • Page 276 9 Motion Control Functions 9-82 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 277: Sample Programming

    Sample Programming 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. 10-1 Overview of Sample Programming ....... 10-2 10-1-1 Devices .
  • Page 278: Overview Of Sample Programming

    10 Sample Programming 10-1 Overview of Sample Programming This section provides information that applies to all of the sample programming. Precautions for Correct Use Precautions for Correct Use • The sample programming that is provided includes only programming that uses the MC Func- tion Module.
  • Page 279: Basic Programming Samples

    10 Sample Programming 10-2 Basic Programming Samples This section provides programming samples for the basic functions of the MC Function Module. Precautions for Correct Use Precautions for Correct Use • When you use these programming samples for reference, be sure to add programming for suitable interlocks that suit the operating conditions of the devices.
  • Page 280 10 Sample Programming Ladder Diagram Check if the Servo Drive is ready when StartPg is TRUE. Lock0 StartPg MC_Axis000.DrvStatus.Ready If the Servo Drive is ready, turn ON the Servo for axis 0. MC_Power Pwr_Status MC_Axis000 Axis Axis Lock0 Enable Status Busy Pwr_Bsy Error...
  • Page 281: Interlocking Axis Operation With Master Control Instructions

    10 Sample Programming 10-2-2 Interlocking Axis Operation with Master Control Instructions You can place the MC_Power (Power Servo) instruction between the MC (Master Control Start) and MCR (Master Control End) instructions in ladder diagrams to interlock axis operation. When Mc_On is FALSE in this sample, the MC_Power (Power Servo) instruction between the MC and MCR instructions is disabled to turn OFF the Servo.
  • Page 282 10 Sample Programming Ladder Diagram When Mc_On is TRUE, master control is started. Mc_On MCNo Check if the Servo Drive is ready when StartPg is TRUE. Lock0 StartPg MC_Axis000.DrvStatus.Ready If the Servo Drive is ready, turn ON the Servo for axis 0. MC_Power Pwr_Status MC_Axis000...
  • Page 283: Error Monitoring And Error Resetting For Single-Axis Operation And Synchronized Operation

    10 Sample Programming 10-2-3 Error Monitoring and Error Resetting for Single-axis Operation and Synchronized Operation You can monitor error status by monitoring the status of Axis Minor Fault Occurrence in the Axis Vari- able. If a minor fault level error occurs in this sample, the Enable input variable for the MC_Power instruction changes to FALSE to turn OFF the Servo.
  • Page 284 10 Sample Programming If ResetON is TRUE (i.e., when the external button is ON) and the command current velocity is zero, the error is reset. RESET MC_Reset Reset_D MC_Axis000.Status.ErrorStop MC_Axis000 Axis Axis Execute Done Reset_Bsy Busy ResetON MC_Axis000.Details.Idle Reset_Fail Failure Reset_Err Error Reset_ErrID...
  • Page 285: Error Monitoring And Error Resetting For Multi-Axes Coordinated Operation

    10 Sample Programming 10-2-4 Error Monitoring and Error Resetting for Multi-axes Coordinated Operation You can monitor error status by monitoring the status of Axis Minor Fault Occurrence in the Axis Vari- ables and Axes Group Minor Fault Occurrence in the Axes Group Variable. If a minor fault level error occurs in this sample, the Execute input variable for the MC_GroupDisable (Disable Axes Group) instruction changes to TRUE to disable the axes group.
  • Page 286 10 Sample Programming Ladder Diagram Check if the Servo Drive for axis 0 is ready when StartPg is TRUE. StartPg MC_Axis000.DrvStatus.Ready Lock1 Check if the Servo Drive for axis 1 is ready when StartPg is TRUE. StartPg MC_Axis001.DrvStatus.Ready Lock2 If the Servo Drive for axis 0 is ready, turn ON the Servo for axis 0. PWR1 MC_Power MC_Axis000...
  • Page 287 10 Sample Programming If the Servo is ON for axis 1 and home is not defined, the MC_Home instruction is executed. MC_Home Pwr2_Status MC_Axis001.Details.Homed Hm2_D MC_Axis001 Axis Axis Execute Done Hm2_Bsy Busy Hm2_Ca CommandAborted Hm2_Err Error Hm2_ErrID ErrorID The status of the axes group and the status of home for axis 0 and axis 1 are checked. MC_Group000.Status.Disabled Hm1_D Hm2_D...
  • Page 288 10 Sample Programming ST Programming // Check that the Servo Drive is ready when StartPg is TRUE and turn ON the Servo for axis 0. // If the Servo Drive is not ready, turn OFF the Servo for axis 0. IF (StartPg =TRUE) AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN Pwr1_En:=TRUE;...
  • Page 289 10 Sample Programming Busy => Pwr1_Bsy, Error => Pwr1_Err, ErrorID => Pwr1_ErrID //MC_Power2 PWR2( Axis := MC_Axis001, Enable := Pwr2_En, Status => Pwr2_Status, Busy => Pwr2_Bsy, Error => Pwr2_Err, ErrorID => Pwr2_ErrID // MC_Home1 HM1( Axis := MC_Axis000, Execute := Hm1_Ex, Done =>...
  • Page 290 10 Sample Programming Failure => Grp_Reset_Fai, Error => Grp_Reset_Err, ErrorID => Grp_Reset_ErrID 10-14 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 291: 10-2-5 Monitoring For Instruction Errors

    10 Sample Programming 10-2-5 Monitoring for Instruction Errors In this sample, further processing is not performed if there is an error when the MC_Power (Power Servo) instruction is executed. Whether further processing is possible is indicated by the UpgOn vari- able.
  • Page 292 10 Sample Programming ST Programming // If the Servo Drive is ready when StartPg is TRUE, turn ON the Servo for axis 0. // If the Servo Drive is not ready, turn OFF the Servo for axis 0. IF (StartPg=TRUE) AND (MC_Axis000.DrvStatus.Ready=TRUE) THEN Pwr_En:=TRUE;...
  • Page 293: 10-2-6 Checking To See If Errors Are Reset

    10 Sample Programming 10-2-6 Checking to See If Errors Are Reset In this sample, the MC_Reset (Reset Axis Error) instruction is executed if an external button turns ON while there is a minor fault level error. Further normal processing is not executed until the Done output variable from the MC_Reset instruction changes to TRUE.
  • Page 294 10 Sample Programming ST Programming // If the external button is ON (i.e., if ResetOn changes to TRUE) while there is a minor fault level error, // the MC_Reset (Reset Axis Error) instruction is executed. IF (MC_Axis000.MFaultLvl.Active=TRUE) AND (ResetOn=TRUE) THEN Reset_Ex := TRUE;...
  • Page 295: 10-2-7 Stopping Axes During Single-Axis Operation

    10 Sample Programming 10-2-7 Stopping Axes during Single-axis Operation In this sample, the MC_Stop instruction is executed to decelerate to a stop if an external button turns ON during execution of the MC_MoveAbsolute (Absolute Positioning) instruction. If there is a minor fault level error, the CommandAborted output variable from the MC_Stop instruction changes to TRUE.
  • Page 296 10 Sample Programming If a minor fault level error occurs for axis 0, the error handler for the device (FaultHandler) is executed. Program the FaultHandler according to the device. MC_Axis000.MFaultLvl.Active FaultHandler FaultHandler If the Servo is ON for axis 0 and home is not defined, the MC_Home instruction is executed for axis 0. MC_Home Hm_D MC_Axis000...
  • Page 297 10 Sample Programming ST Programming // If the input parameters for absolute positioning and stopping are not set, the target values and other parameters are set. IF InitFlag=FALSE THEN // The input parameters for the MC_MoveAbsolute (Absolute Positioning) instruction are set. Mv_Abs_Pos := LREAL#10000.0;...
  • Page 298 10 Sample Programming Enable := Pwr_En, Status => Pwr_Status, Busy => Pwr_Bsy, Error => Pwr_Err, ErrorID => Pwr_ErrID //MC_Home Axis := MC_Axis000, Execute := Hm_Ex, Done => Hm_D, Busy => Hm_Bsy, CommandAborted => Hm_Ca, Error => Hm_Err, ErrorID => Hm_ErrID //MC_MoveAbsolute MV_ABS( Axis...
  • Page 299: 10-2-8 Stopping An Axes Group In Coordinated Motion

    10 Sample Programming 10-2-8 Stopping an Axes Group in Coordinated Motion In this sample, the MC_GroupStop instruction is executed to decelerate to a stop if an external button turns ON during execution of the MC_MoveLinearAbsolute (Absolute Linear Interpolation) instruction. If there is a minor fault level error, the CommandAborted output variable from the MC_GroupStop instruc- tion changes to TRUE.
  • Page 300 10 Sample Programming Ladder Diagram Check if the Servo Drive for axis 0 is ready when StartPg is TRUE. Lock0 StartPg MC_Axis000.DrvStatus.Ready Check if the Servo Drive for axis 1 is ready when StartPg is TRUE. Lock1 StartPg MC_Axis001.DrvStatus.Ready If the Servo Drive for axis 0 is ready, turn ON the Servo for axis 0. PWR1 MC_Power Pwr1_Status...
  • Page 301 10 Sample Programming After home is defined for axis 0 and axis 1, the axes group is enabled. GRP_EN MC_GroupEnable Grp_En_D MC_Group000 AxesGroup AxesGroup Hm1_D Hm2_D Execute Done MC_Group000.Status.Disabled Busy Grp_En_Bsy CommandAborted Grp_En_Ca Error Grp_En_Err ErrorID Grp_En_ErrID The input parameters for the MC_MoveLinearAbsolute and MC_GroupStop instructions are set. // Parameters for MC_MoveLinearAbsolute InitFlag Mv_Lin_Abs_Pos [0]...
  • Page 302 10 Sample Programming ST Programming // If the input parameters for absolute linear interpolation and stopping the axes group are not set, the target values and other parameters are set. IF InitFlag=FALSE THEN // The input parameters for the MC_MoveLinearAbsolute (Absolute Linear Interpolation) instruction are set. Mv_Lin_Abs_Pos[0] := LREAL#3000.0;...
  • Page 303 10 Sample Programming // If home is defined for axis 0 and axis 1 and the axes group is disabled, the axes group is enabled. IF (MC_Group000.Status.Disabled=TRUE) AND (Hm1_D=TRUE) AND (Hm2_D=TRUE) THEN Grp_En_Ex:= TRUE; END_IF; // If the axes group is enabled, absolute linear interpolation is executed. IF MC_Group000.Status.Ready=TRUE THEN Mv_Lin_Abs_Ex:=TRUE;...
  • Page 304 10 Sample Programming //MC_GroupEnable GRP_EN( AxesGroup := MC_Group000, Execute := Grp_En_Ex, Done => Grp_En_D, Busy => Grp_En_Bsy, CommandAborted => Grp_En_Ca, Error => Grp_En_Err, ErrorID => Grp_En_ErrID //MC_MoveLinearAbsolute MV_LIN_ABS( AxesGroup := MC_Group000, Execute := Mv_Lin_Abs_Ex, Position := Mv_Lin_Abs_Pos, Velocity := Mv_Lin_Abs_Vel, Acceleration := Mv_Lin_Abs_Acc, Deceleration...
  • Page 305: 10-2-9 Homing And Absolute Positioning

    10 Sample Programming 10-2-9 Homing and Absolute Positioning In this sample, the starting point for homing is assumed to be where the home proximity input is ON. The Homing Method is set to home proximity input OFF. After homing is completed to define home, absolute positioning is executed.
  • Page 306 10 Sample Programming Variable name Data type Default Comment Mv_Abs_Ex BOOL FALSE This variable is used to execute the MC_Move- Absolute (Absolute Positioning) instruction. It is used in ST programming. Timing Chart  Ladder Diagram Pwr_Status HM.Execute HM_D Hm_Bsy MV_ABS.Execute Mv_Abs_D Mv_Abs_Bsy Mv_Abs_Act...
  • Page 307 10 Sample Programming Ladder Diagram Check if the Servo Drive for axis 0 is ready when StartPg is TRUE. Lock0 StartPg MC_Axis000.DrvStatus.Ready If the Servo Drive for axis 0 is ready, turn ON the Servo for axis 0. MC_Power Pwr_Status MC_Axis000 Axis Axis...
  • Page 308 10 Sample Programming ST Programming // If the input parameters for absolute positioning are not set, the target values and other parameters are set. IF InitFlag=FALSE THEN // The input parameters for the MC_MoveAbsolute (Absolute Positioning) instruction are set. Mv_Abs_Pos := LREAL#50000.0;...
  • Page 309 10 Sample Programming //MC_MoveAbsolute MV_ABS( Axis := MC_Axis000, Execute := Mv_Abs_Ex, Position := Mv_Abs_Pos, Velocity := Mv_Abs_Vel, Acceleration := Mv_Abs_Acc, Deceleration := Mv_Abs_Dec, Direction := Mv_Abs_Dir, Done => Mv_Abs_D, Busy => Mv_Abs_Bsy, Active => Mv_Abs_Act, CommandAborted => Mv_Abs_Ca, Error => Mv_Abs_Err, ErrorID =>...
  • Page 310: 10-2-10 Changing The Target Position By Re-Execution Of An Instruction

    10 Sample Programming 10-2-10 Changing the Target Position by Re-execution of an Instruction This sample starts absolute positioning to a target position of 1000 and then uses the same instance of the absolute positioning instruction to change the target position to 2000. Main Variables Used in the Programming Samples Variable name Data type...
  • Page 311 10 Sample Programming Timing Chart  Ladder Diagram Pwr_Status Hm_D Hm_Bsy Mv_Abs_Ex Mv_Abs_D Mv_Abs_Bsy Mv_Abs_Act ReExeSw Command position Time Command velocity Time 10-35 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 312 10 Sample Programming  ST Programming Pwr_Status Hm_Ex Hm_D Hm_Bsy Mv_Abs_Ex Mv_Abs_D Mv_Abs_Bsy Mv_Abs_Act ReExeSw Command position Time Command velocity Time 10-36 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 313 10 Sample Programming Ladder Diagram Check if the Servo Drive for axis 0 is ready when StartPg is TRUE. Lock0 StartPg MC_Axis000.DrvStatus.Ready If the Servo Drive for axis 0 is ready, turn ON the Servo for axis 0. MC_Power Pwr_Status MC_Axis000 Axis Axis...
  • Page 314 10 Sample Programming ST Programming // If the input parameters for absolute positioning are not set, the target values and other parameters are set. IF InitFlag = FALSE THEN // Parameters for MC_MoveAbsolute Mv_Abs_Pos := LREAL#1000.0; Mv_Abs_Vel := LREAL#500.0; Mv_Abs_Acc := LREAL#500.0;...
  • Page 315 10 Sample Programming //MC_Home Axis := MC_Axis000, Execute := Hm_Ex, Done => Hm_D, Busy => Hm_Bsy, CommandAborted => Hm_Ca, Error => Hm_Err, ErrorID => Hm_ErrID //MC_MoveAbsolute MV_ABS( Axis := MC_Axis000, Execute := Mv_Abs_Ex, Position := Mv_Abs_Pos, Velocity := Mv_Abs_Vel, Acceleration := Mv_Abs_Acc, Deceleration := Mv_Abs_Dec,...
  • Page 316: 10-2-11 Interrupt Feeding

    10 Sample Programming 10-2-11 Interrupt Feeding This sample performs interrupt feeding when an interrupt occurs during velocity control. One of the fol- lowing is specified for the Direction variable when velocity control is performed in Rotary Mode. • _mcPositiveDirection • _mcNegativeDirection •...
  • Page 317 10 Sample Programming Variable name Data type Default Comment Mv_Feed_Ex BOOL FALSE This variable is used to execute the MC_MoveFeed (Interrupt Feeding) instruc- tion. It is used in ST programming. InitFlag BOOL FALSE TRUE if the input parameters are set for the MC_MoveFeed instruction.
  • Page 318 10 Sample Programming If homing is completed, interrupt feeding is executed. MV_FEED MC_MoveFeed Axis Axis MC_Axis000 MvFeed_TrigRef TriggerInput TriggerInput Mv_Feed_D Hm_D Mv_Feed_TrigVar TriggerVariable TriggerVariable Execute Done WindowOnly InFeed Mv_Feed_InFeed FirstPosition Busy Mv_Feed_Bsy LastPosition Active Mv_Feed_Act ReferenceType CommandAborted Mv_Feed_Ca Mv_Feed_Pos Position Error Mv_Feed_Err Mv_Feed_Vel...
  • Page 319 10 Sample Programming // If the Servo is ON for axis 0 and home is not defined, the MC_Home instruction is executed. IF (Pwr_Status=TRUE) AND (MC_Axis000.Details.Homed=FALSE) THEN Hm_Ex:=TRUE; END_IF; // If homing is defined, interrupt feeding is executed. IF Hm_D=TRUE THEN Mv_Feed_Ex:=TRUE;...
  • Page 320: 10-2-12 Changing The Cam Table By Re-Execution Of An Instruction

    10 Sample Programming 10-2-12 Changing the Cam Table by Re-execution of an Instruction This sample changes the cam table during cam motion. CamProfile0 is used when the command posi- tion for axis 0 is 5000 or less and CamProfile1 is used when it is over 5000. Main Variables Used in the Programming Samples Variable name Data type...
  • Page 321 10 Sample Programming Timing Chart  Ladder Diagram Command current position of axis 0 5000.0 CamTable1 CamTable0 CamTable1 MV_ABS Mv_Abs_Act CAMIN CAMIN.Execute Camin_Bsy Camin_Act Camin_InCam0 Camin_InCam1 Camin_InSync CamProfile0 CamProfile1  ST Programming Command current position of axis 0 5000.0 CamTable1 CamTable0 CamTable1 MV_ABS...
  • Page 322 10 Sample Programming Ladder Diagram To change from one cam table to another, two instances of the MC_CamIn (Start Cam Operation) instruction with the same instance name are used. A different output parameter is assigned to the InCam (Cam Motion) output vari- able from each instance.
  • Page 323 10 Sample Programming If the Servo is ON for axis 0 and home is not defined, the MC_Home instruction is executed. MC_Home Hm1_D Pwr1_Status MC_Axis000.Details.Homed MC_Axis000 Axis Axis Execute Done Hm1_Bsy Busy Hm1_Ca CommandAborted Hm1_Err Error Hm1_ErrID ErrorID If the Servo is ON for axis 1 and home is not defined, the MC_Home instruction is executed. MC_Home Pwr2_Status MC_Axis001.Details.Homed Hm2_D...
  • Page 324 10 Sample Programming CAMIN MC_CamIn MC_Axis000 Master Master MC_Axis001 Slave Slave Lock3 CamIn_InCam0 CamProfile0 CamTable CamTable Execute InCam BOOL#TRUE Periodic InSync CamIn_InSync _eMC_START_MODE#_mcAbsolutePosition StartMode EndOfProfile CamIn_Eop LREAL#1.0 StartPosition Index CamIn_Index LREAL#1.0 MasterStartDistance Busy CamIn_Bsy LREAL#1.0 MasterScaling Active CamIn_Act LREAL#1.0 SlaveScaling CommandAborted CamIn_Ca LREAL#0.0...
  • Page 325 10 Sample Programming ST Programming // If the input parameters for absolute positioning and starting cam operation are not set, the target values and other parameters are set. IF InitFlag=FALSE THEN // The input parameters for the MC_MoveAbsolute (Absolute Positioning) instruction are set. Mv_Abs_Pos := LREAL#10000.0;...
  • Page 326 10 Sample Programming Hm2_Ex:=TRUE; END_IF; // If homing is completed for axis 0, absolute positioning is executed. IF Hm1_D=TRUE THEN Mv_Abs_Ex := TRUE; END_IF; // If the command position for axis 0 is 5000 or less, CamTable0 is changed to TRUE and CamTable1 is changed to FALSE.
  • Page 327 10 Sample Programming Error => Camin_Err, ErrorID => Camin_ErrID END_IF; IF CamTable1=TRUE THEN CAMIN( Master := MC_Axis000, Slave := MC_Axis001, CamTable := CamProfile1, Execute := Camin_Ex, Periodic := Camin_EM, StartMode := Camin_StMode, StartPosition := Camin_StPos, MasterStartDistance := Camin_MStDis, MasterScaling := Camin_MSc, SlaveScaling := Camin_SSc, MasterOffset...
  • Page 328 10 Sample Programming // MC_Home for axis 1 HM2( Axis := MC_Axis001, Execute := Hm2_Ex, Done => Hm2_D, Busy => Hm2_Bsy, CommandAborted => Hm2_Ca, Error => Hm2_Err, ErrorID => Hm2_ErrID //MC_MoveAbsolute MV_ABS( Axis := MC_Axis000, Execute := Mv_Abs_Ex, Position := Mv_Abs_Pos, Velocity := Mv_Abs_Vel, Acceleration...
  • Page 329: 10-2-13 Using A Cam Profile Curve To Correct The Sync Position

    10 Sample Programming 10-2-13 Using a Cam Profile Curve to Correct the Sync Position This sample uses a cam profile curve to correct a slave axis in a gear motion. The slave axis for gear motion is MC_Axis001, a virtual Servo axis, and the slave axis for cam motion is MC_Axis002, also a virtual Servo axis.
  • Page 330 10 Sample Programming Variable name Data type Default Comment StartPg BOOL FALSE When StartPg is TRUE, the Servo is turned ON if EtherCAT process data communica- tions are active and normal. Gearin_Ex BOOL FALSE This variable is used to execute the MC_GearIn (Start Gear Operation) instruc- tion.
  • Page 331 10 Sample Programming Timing Chart  Ladder Diagram Vel_InVel GEARIN GEARIN.Execute Gearin_InGear Gearin_Bsy Gearin_Act CAMIN CAMIN.Execute Camin_InCam Camin_InSync Camin_Bsy Camin_Act COMBINE COMBINE.Execute Combine_Bsy Combine_Act Position MC_Axis000 MC_Axis001 MC_Axis002 MC_Axis003 Time 10-55 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 332 10 Sample Programming  ST Programming Vel_InVel GEARIN Gearin_Ex Gearin_InGear Gearin_Bsy Gearin_Act CAMIN Camin_Ex Camin_InCam Camin_InSync Camin_Bsy Camin_Act COMBINE Combine_Ex Combine_Bsy Combine_Act Position MC_Axis000 MC_Axis001 MC_Axis002 MC_Axis003 Time 10-56 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 333 10 Sample Programming Ladder Diagram Check if the Servo Drive for axis 0 is ready when StartPg is TRUE. Lock0 StartPg MC_Axis000.DrvStatus.Ready Check if the Servo Drive for axis 3 is ready when StartPg is TRUE. Lock3 StartPg MC_Axis003.DrvStatus.Ready If the Servo Drive for axis 0 is ready, turn ON the Servo for axis 0. PWR1 MC_Power MC_Axis000...
  • Page 334 10 Sample Programming If the Servo is ON for axis 3 and home is not defined, the MC_Home instruction is executed. MC_Home Pwr4_Status MC_Axis003.Details.Homed Hm4_D MC_Axis003 Axis Axis Execute Done Hm4_Bsy Busy Hm4_Ca CommandAborted Hm4_Err Error Hm4_ErrID ErrorID If homing is completed for axis 0, velocity control is executed. MC_MoveVelocity Vel_InVel Hm1_D...
  • Page 335 10 Sample Programming If both gear and cam operation are in progress, the Combine Axes instruction is executed. COMBINE MC_CombineAxes MC_Axis001 Master Master MC_Axis002 Auxiliary Auxiliary Combine_InComb Gearin_Act Camin_Act MC_Axis003 Slave Slave Execute InCombination Combine_Bsy _eMC_COMBINE_MODE#_mcAddAxes CombineMode Busy Combine_Act RatioNumeratorMaster Active Combine_Ca RatioDenominatorMaster...
  • Page 336 10 Sample Programming // If the Servo Drive is ready when StartPg is TRUE, turn ON the Servo for axis 3. IF (StartPg=TRUE) AND (MC_Axis003.DrvStatus.Ready=TRUE) THEN Pwr4_En:=TRUE; ELSE Pwr4_En:=FALSE; END_IF; // If a minor fault level error occurs for axis 0 to axis 3, the error handler for the device (FaultHandler) is executed. // Program the FaultHandler according to the device.
  • Page 337 10 Sample Programming Axis := MC_Axis003, Enable := Pwr4_En, Status => Pwr4_Status, Busy => Pwr4_Bsy, Error => Pwr4_Err, ErrorID => Pwr4_ErrID // MC_Home for axis 0 HM1( Axis := MC_Axis000, Execute := Hm1_Ex, Done => Hm1_D, Busy => Hm1_Bsy, CommandAborted =>...
  • Page 338 10 Sample Programming Index => Camin_Index, Busy => Camin_Bsy, Active => Camin_Act, CommandAborted => Camin_Ca, Error => Camin_Err, ErrorID => Camin_ErrID //MC_GearIn GEARIN( Master := MC_Axis000, Slave := MC_Axis001, Execute := Gearin_Ex, RatioNumerator := Gearin_RatN, RatioDenominator := Gearin_RatD, ReferenceType := Gearin_RefTyp, Acceleration := Gearin_Acc, Deceleration...
  • Page 339: 10-2-14 Shifting The Phase Of A Master Axis In Cam Motion

    10 Sample Programming 10-2-14 Shifting the Phase of a Master Axis in Cam Motion This sample synchronizes a slave axis in cam motion with a master axis in velocity control. If StartOn is TRUE, the phase of the master axis is shifted with the MC_Phasing (Shift Master Axis Phase) instruc- tion.
  • Page 340 10 Sample Programming Timing Chart  Ladder Diagram StartOn MC_Phasing PHASING.Execute Phasing_Bsy Phasing_Act Phasing_D MC_MoveVelocity VEL.Execute Vel_InVel MC_CamIn CAMIN.Execute Camin_InCam Camin_InSync Camin_Bsy Command velocity MC_Axis000 MC_Axis001 Time 10-64 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 341 10 Sample Programming  ST Programming StartOn MC_Phasing Phasing_Ex Phasing_Bsy Phasing_Act Phasing_D MC_MoveVelocity Vel_Ex Vel_InVel MC_CamIn Camin_Ex Camin_InCam Camin_InSync Camin_Bsy Command velocity MC_Axis000 MC_Axis001 Time 10-65 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 342 10 Sample Programming Ladder Diagram Check if the Servo Drive for axis 0 is ready when StartPg is TRUE. Lock0 StartPg MC_Axis000.DrvStatus.Ready Check if the Servo Drive for axis 1 is ready when StartPg is TRUE. Lock1 StartPg MC_Axis001.DrvStatus.Ready If the Servo Drive for axis 0 is ready, turn ON the Servo for axis 0. PWR1 MC_Power MC_Axis000...
  • Page 343 10 Sample Programming If the Servo is ON for axis 1 and home is not defined, the MC_Home instruction is executed. MC_Home Hm2_D Pwr1_Status MC_Axis001.Details.Homed MC_Axis001 Axis Axis Execute Done Hm2_Bsy Busy Hm2_Ca CommandAborted Hm2_Err Error Hm2_ErrID ErrorID If homing is completed for axis 0, velocity control is executed. MC_MoveVelocity Vel_InVel Hm1_D...
  • Page 344 10 Sample Programming ST Programming // If the input parameters for the motion instructions are not set, the target values and other parameters are set. IF InitFlag=FALSE THEN // The input parameters for the MC_MoveVelocity (Velocity Control) instruction are set. Vel_Vel := LREAL#1000.0;...
  • Page 345 10 Sample Programming END_IF; // If homing is completed for axis 0, velocity control is executed. IF Hm1_D=TRUE THEN Vel_Ex:=TRUE; END_IF; // When axis 0 reaches the target velocity and the home is defined for axis 1, cam operation is executed. (Vel_InVel=TRUE) AND (MC_Axis001.Details.Homed=TRUE) THEN Camin_Ex := TRUE;...
  • Page 346 10 Sample Programming Execute := Vel_Ex, Velocity := Vel_Vel, Acceleration := Vel_Acc, Deceleration := Vel_Dec, Direction := Vel_Dir, InVelocity => Vel_Invel, Busy => Vel_Bsy, Active => Vel_Act, CommandAborted => Vel_Ca, Error => Vel_Err, ErrorID => Vel_ErrID //MC_Phasing PHASING( Master := MC_Axis000, Slave := MC_Axis001, Execute...
  • Page 347: 10-2-15 Changing The Actual Position During Velocity Control

    10 Sample Programming 10-2-15 Changing the Actual Position during Velocity Control This sample changes the absolute values of the command current position and the actual current posi- tion for an axis in velocity control. Precautions for Correct Use Precautions for Correct Use •...
  • Page 348 10 Sample Programming Timing Chart  Ladder Diagram MC_Power Pwr_Status MC_MoveVelocity VEL.Execute Ve_InVel Vel_Bsy MC_SetPosition SET_POS.Execute Set_Pos_D Set_Pos_Bsy MC_Axis000 Command current velocity Command current position Actual current position Time 10-72 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 349 10 Sample Programming  ST Programming MC_MoveVelocity Vel_Ex Ve_InVel Vel_Bsy MC_SetPosition Set_Pos_Ex Set_Pos_D Set_Pos_Bsy MC_Axis000 Command current velocity Command current position Actual current position Time 10-73 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 350 10 Sample Programming Ladder Diagram Check if the Servo Drive for axis 0 is ready when StartPg is TRUE. Lock0 StartPg MC_Axis000.DrvStatus.Ready If the Servo Drive for axis 0 is ready, turn ON the Servo for axis 0. MC_Power MC_Axis000 Axis Axis Pwr_Status...
  • Page 351 10 Sample Programming ST Programming // If the input parameters for the instructions are not set, the target values and other parameters are set. IF InitFlag=FALSE THEN // The input parameters for the MC_MoveVelocity (Velocity Control) instruction are set. Vel_Vel := LREAL#36.0;...
  • Page 352 10 Sample Programming Deceleration := Vel_Dec, Jerk := Vel_Jrk, InVelocity => Vel_InVel, Busy => Vel_Bsy, Active => Vel_Act, CommandAborted => Vel_Ca, Error => Vel_Err, ErrorID => Vel_ErrID //MC_SetPosition SET_POS( Axis := MC_Axis000, Execute := Set_Pos_Ex, Position := Set_Pos_Pos, Done => Set_Pos_D, Busy =>...
  • Page 353: 10-2-16 Changing A Cam Data Variable And Saving The Cam Table

    10 Sample Programming 10-2-16 Changing a Cam Data Variable and Saving the Cam Table This sample uses the user program to change a cam data variable that was created on Cam Editor of the Sysmac Studio. The displacements for phases of 0° to 180° are multiplied by 2 and the displace- ments for phases of 181°...
  • Page 354 10 Sample Programming Timing Chart  Ladder Diagram Write_Camdata WriteDone SaveCamtable _MC_COM.Status.CamTableBusy SV_CAM Sv_Cam_Ex Sv_Cam_Bsy Sv_Cam_D CAMIN Camin_Ex Camin_Bsy Camin_Act Camin_InCam Camin_InSync  ST Programming Write_Camdata WriteDone SaveCamtable _MC_COM.Status.CamTableBusy SV_CAM Sv_Cam_Ex Sv_Cam_Bsy Sv_Cam_D CAMIN Camin_Ex Camin_Bsy Camin_Act Camin_InCam Camin_InSync 10-78 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 355 10 Sample Programming Ladder Diagram Check if the Servo Drive for axis 0 is ready when StartPg is TRUE. Lock0 StartPg MC_Axis000.DrvStatus.Ready Check if the Servo Drive for axis 1 is ready when StartPg is TRUE. Lock1 StartPg MC_Axis001.DrvStatus.Ready If the Servo Drive for axis 0 is ready, turn ON the Servo for axis 0. PWR1 MC_Power MC_Axis000...
  • Page 356 10 Sample Programming If the Servo is ON for axis 1 and home is not defined, the MC_Home instruction is executed. MC_Home Pwr1_Status MC_Axis001.Details.Homed Hm2_D MC_Axis001 Axis Axis Execute Done Hm2_Bsy Busy Hm2_Ca CommandAborted Hm2_Err Error Hm2_ErrID ErrorID If WriteCamData is TRUE and a cam table file is not being saved, the values in the cam data variable are changed. The displacements for phases from 0°...
  • Page 357 10 Sample Programming One second after a Cannot Execute Save Cam Table error occurs, Sv_Ca_TimeUp is changed to TRUE. When Sv_Ca_TimeUp changes to TRUE, Sv_Cam_Ex changes to FALSE. Sv_Ca_TON Sv_Ca_TimeUp Sv_Cam_Disable T#1s Sv_Ca_CountLoad changes to TRUE for one period when the cam table is saved. If Sv_Ca_CountLoad is TRUE, the retry counter is reset.
  • Page 358 10 Sample Programming ST Programming // If the input parameters for the instructions are not set, the target values and other parameters are set. IF InitFlag=FALSE THEN // The input parameters for the MC_MoveVelocity (Velocity Control) instruction are set. Vel_Vel := LREAL#1000.0;...
  • Page 359 10 Sample Programming IF (Pwr2_Status=TRUE) AND (MC_Axis001.Details.Homed=FALSE) THEN Hm2_Ex:=TRUE; END_IF; // If WriteCamData is TRUE and a cam table file is not being saved, the values in the cam data variable are changed. // The displacements for phases of 0° to 180° are multiplied by 2 and the displacements for phases of 181° to 360° are multiplied by 0.5.
  • Page 360 10 Sample Programming := T#1s , => Sv_Ca_TimeUp // Sv_Ca_CountLoad is changed to TRUE for one period when the cam table is saved. // If Sv_Ca_CountLoad changes to TRUE, the retry counter is reset. R_TRIG1(SaveCamtable, Sv_Ca_CountLoad); // If a Cannot Execute Save Cam Table error occurs three times, Sv_Ca_CountUP is changed to TRUE. // If Sv_Ca_CountUP changes to TRUE, Sv_Cam_Disable is changed to FALSE.
  • Page 361: 10-2-17 Temporarily Changing Axis Parameters

    10 Sample Programming // MC_Power for axis 0 PWR1( Axis := MC_Axis000, Enable := Pwr1_En, Status => Pwr1_Status, Busy => Pwr1_Bsy, Error => Pwr1_Err, ErrorID => Pwr1_ErrID // MC_Power for axis 1 PWR2( Axis := MC_Axis001, Enable := Pwr2_En, Status =>...
  • Page 362 10 Sample Programming Main Variables Used in the Programming Samples Variable name Data type Default Comment MC_Axis000 _sAXIS_REF This is the Axis Variable for axis 0. InitFlag BOOL FALSE This variable indicates the status of parameter settings. FALSE while parameters are changed. TRUE after the changes to the parameters are completed.
  • Page 363 10 Sample Programming If changing the setting of the Positive Software Limit is completed, the setting of the Negative Software Limit is changed. WRITE3 MC_Write MC_Axis000 Target Target Write3_D Write2_D Write3_Sv SettingValue SettingValue Execute Done Write3_Pn Write3_Bsy ParameterNumber Busy Write3_Ca CommandAborted Write3_Err Error...
  • Page 364 10 Sample Programming WRITE2( Target := MC_Axis000, SettingValue := Write2_Sv, Execute := Write2_Ex, ParameterNumber := Write2_Pn, Done => Write2_D, Busy => Write2_Bsy, CommandAborted => Write2_Ca, Error => Write2_Err, ErrorID => Write2_ErrID WRITE3( Target := MC_Axis000, SettingValue := Write3_Sv, Execute := Write3_Ex, ParameterNumber := Write3_Pn, Done...
  • Page 365: 10-2-18 Updating The Cam Table End Point Index

    10 Sample Programming 10-2-18 Updating the Cam Table End Point Index This sample increases the valid number of data points by 10 in a cam table with a maximum number of data points of 110 and a valid number of data points of 100. It also updates the end point index. Main Variables Used in the Programming Samples Variable name Data type...
  • Page 366 10 Sample Programming If the changes to the cam data variable are completed, the Set Cam Table Properties instruction is executed. SET_CAM MC_SetCamTableProperty WriteDone Set_Cam_D CamProfile0 CamProfile0 CamTable CamTable Execute Done Set_Cam_Epi EndPointIndex Set_Cam_Mdn MaxDataNumber Set_Cam_B Busy Set_Cam_Ca CommandAborted Set_Cam_Err Error Set_Cam_ErrID ErrorID...
  • Page 367: Troubleshooting

    Troubleshooting 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. 11-1 Overview of Errors ..........11-2 11-1-1 How to Check for Errors .
  • Page 368: 11-1 Overview Of Errors

    11 Troubleshooting 11-1 Overview of Errors You manage all of the errors that occur on the NY-series Controller as events. The same methods are used for all events. This allows you to see what errors have occurred and find corrections for them with the same methods for the entire range of errors that is managed (i.e., CPU Unit, NX-series Slave Termi- nals, and EtherCAT slaves).
  • Page 369: 11-1-1 How To Check For Errors

    11 Troubleshooting 11-1-1 How to Check for Errors You can check to see if an error has occurred with the following methods. Checking method What you can check Troubleshooter of the Sysmac Studio You can check for current Controller errors, a log of past Controller errors, error sources, error causes, and corrections.
  • Page 370 11 Troubleshooting Checking with System-defined Variables You can use the error status variables in the system-defined variables and the system-defined variables for motion control to check for errors that have occurred in the Motion Control Function Module.  Error Status Variables You can check for errors in each function module of the NY-series Controller with error status vari- ables.
  • Page 371: 11-1-2 Errors Related To The Motion Control Function Module

    11 Troubleshooting 11-1-2 Errors Related to the Motion Control Function Module This section describes the errors that are related to the Motion Control Function Module. Sources of Errors Related to the Motion Control Function Module Errors can occur internally in the Motion Control Function Module, or they can occur in EtherCAT com- munications, which are used to connect to the Servo Drives and other slaves.
  • Page 372 11 Troubleshooting Classifications There are the following three sources of errors in the Motion Control Function Module. Classification Description MC Common Errors If an error is detected in the common portion of the Motion Control Function Mod- ule, the corresponding bit in the MC Common Error Status variable shows the error.
  • Page 373 11 Troubleshooting MC Function Module Errors by Source The following tables list the errors in each event level that can occur for each source.  MC Common Errors Level Error name Major fault • None Partial fault • Motion Control Parameter Setting Error •...
  • Page 374 11 Troubleshooting  Axis Errors Level Error name Major fault • None Partial fault • None Minor fault • Cam Table Data Error during Cam • Home Proximity/Homing Direction Motion Limit Input Detected • Immediate Stop Instruction Executed • Home Input/Homing Opposite Direc- tion Limit Input Detected •...
  • Page 375 *2 When an error occurs in slave communications, home becomes undefined for the axis. Servo Drive Errors This section describes the notification that is provided for errors that occur in OMRON 1S-series Servo Drives and G5-series Servo Drives. There is a difference between the timing of when the Motion Control Function Module detects the error in the Servo Drive and when the error code is obtained from the Servo Drive.
  • Page 376 Errors Related to NX Units Error and error code notifications are provided for errors that occur for OMRON NX-series Position Interface Units in the same way as they are for OMRON 1S-series Servo Drives and G5-series Servo Drives. However, NX-series Position Interface Units do not have an object that corresponds to object 603F hex (Error Code), so 0000 hex is given for the Slave Error Code Report (94220000 hex) in the attached information.
  • Page 377: 11-2 Error Causes And Remedies

    11 Troubleshooting 11-2 Error Causes and Remedies This section describes remedial actions to take when problems occur the first time you use the MC Function Module or after starting operation. 11-2-1 Preliminary Check Items If an error occurs, check the items below to investigate the problem. Category Item to check Installation conditions...
  • Page 378: 11-2-2 Problems And Countermeasures

    This section describes troubleshooting when the MC Function Module is used in combination with an OMRON 1S-series Servo Drive or G5-series Servo Drive. If an unexpected operation is performed, data such as parameter settings or cam data may not have been transferred properly to the NY-series Controller from the Sysmac Studio.
  • Page 379 11 Troubleshooting Problem Cause Item to check Countermeasure Homing cannot be per- Error Check the nature of the If there is an error, follow formed. error. troubleshooting proce- dures for it. Incorrect wiring of the Check the axis input infor- Wire all connections cor- home proximity input.
  • Page 380 11 Troubleshooting Problem Cause Item to check Countermeasure Unstable motor rotation Incorrect wiring of Servo- Check the wiring of the Wire all connections cor- motor power line/encoder motor power line and rectly. line, missing phase, etc. encoder line. Load torque variation due Check the machine.
  • Page 381 11 Troubleshooting Problem Cause Item to check Countermeasure Operation cannot be The in-position range of Increase the in-position started, positioning is not the Servo Drive is too nar- range. completed, or positioning row, and thus the current takes too much time to position does not enter the complete.
  • Page 382 11 Troubleshooting Problem Cause Item to check Countermeasure Position shift The home position was Refer to The position of Refer to The position of already shifted before home defined with hom- home defined with hom- positioning. ing changes occasionally. ing changes occasionally. Malfunction due to noise Check if a welder, inverter, Isolate the Controller from...
  • Page 383: Appendices

    Appendices This section describes settings and connection methods for OMRON 1S-series Servo Drive objects and G5-series Servo Drive objects. A-1 Connecting the 1S-series Servo Drive ......A-2 A-1-1 Wiring the Servo Drive .
  • Page 384: Connecting The 1S-Series Servo Drive

    • External latch trigger signals (latch input 1 and latch input 2)  Assigning Positive Limit Inputs, Negative Limit Inputs, and Home Proximity Input The default settings of the input signals of an OMRON 1S-series Servo Drive are listed in the follow- ing table. Signal name...
  • Page 385  Trigger Signal Assignments for External Latches The input signals in the following table are assigned to external latch trigger signals by default for the OMRON 1S-series Servo Drive. Settings for the TriggerInput (Trigger Input Condition) input variable of the MC_TouchProbe instruction...
  • Page 386 Appendices PDO Mapping This section describes mapping PDOs to control servo axes from the MC Function Module. To use motion control functions, you must map the objects that are required for those functions to PDOs. The PDO map is a list of required objects that is prepared in advance. You select the PDOs to use in the Edit PDO Map Settings Window of the EtherCAT Tab Page in the Sysmac Studio.
  • Page 387 Appendices Additional Information • If you use the recommended OMRON Servo Drives (R88D-1SN-ECT), then it is not nec- essary to change the default PDO map on the Sysmac Studio. Relationships between MC Function Module and Process Data The functions of the MC Function Module are related to the information in the process data objects.
  • Page 388 Appendices  Output Settings (Controller to Servo Drive) The input settings apply to the command data that is sent from the MC Function Module to the Servo Drive. The default settings in the Sysmac Studio are listed in the following table. (Required objects are marked with a star.) Function name Process data...
  • Page 389 • If you change the settings, make sure that the desired operations are performed for the MC Function Module and process data settings. • If you are not using an OMRON 1S-series Servo Drive with built-in EtherCAT communications or G5-series Servo Drive with built-in EtherCAT communications, always set the Modes of Operation (6060 hex).
  • Page 390 *2 If you set 6061 hex (Modes of Operation Display), also set 6060 hex (Modes of Operation). Normal operation is not possible if only one of these two is set. *3 Map 3010-87 hex (Reference Position for CSP) to a PDO when you use an OMRON 1S-series Servomotor/ Servo Drive.
  • Page 391 Shows the status of the signal that is used for external latch input 1. input 1 (Digital inputs) For an OMRON 1S-series Servo Drive, set Bit 17: External latch input 1 of 60FD hex-00: Digital inputs. External latch 60FD hex-00.18 Shows the status of the signal that is used for external latch input 2.
  • Page 392 Appendices Object Settings The OMRON 1S-series Servo Drive settings required to use the control functions of the MC Function Module are listed in the following table. Consult the manual for your Servo Drive and set all related objects for the Servo Drive functions that you are going to use.
  • Page 393: Connecting The G5-Series Servo Drive

    Unit version 1.1 or later Additional Information • You can also use unit versions of the OMRON G5-series Servo Drives with built-in EtherCAT communications other than the recommended unit versions. The functions that you can use depend on the specifications of the Servo Drive. Set the functions to use and the object dictio- nary on Sysmac Studio.
  • Page 394 • External latch trigger signals (latch input 1 and latch input 2)  Assigning Positive Limit Inputs, Negative Limit Inputs, and Home Proximity Input The default settings of the input signals of an OMRON G5-series Servo Drive are listed in the follow- ing table. Signal name...
  • Page 395 Appendices Backlash Compensation The MC Function Module does not perform backlash compensation. If you require backlash compensation, use the compensation function of the Servo Drive. The objects that must be set on the Servo Drive are listed in the following table. Index Name Description...
  • Page 396 Value (60BC hex), and Digital Inputs (60FD hex) Additional Information • If you use the recommended OMRON Servo Drives (R88D-KN-ECT, version 2.1 or later, or R88D-KN-ECT-L, unit version 1.1 or later), then it is not necessary to change the default PDO map on the Sysmac Studio.
  • Page 397 Sysmac Studio. Additional Information If you use the recommended OMRON Servo Drives (R88D-KN-ECT, version 2.1 or later, or R88D-KN-ECT-L, unit version 1.1 or later), then it is not necessary to change the default relationships between MC Function Module functions and the PDOs on the Sysmac Studio.
  • Page 398 Precautions for Correct Use Precautions for Correct Use • Some functions may not be supported if you a connect unit versions of the OMRON G5-series Servo Drives with built-in EtherCAT communications other than the recommended unit ver- sions. Refer to the manual for the connected servo drive for details.
  • Page 399 Appendices  Input Settings (Servo Drive to Controller) This is the status data from the Servo Drive to the MC Function Module. The default settings in the Sysmac Studio are listed in the following table. (Required objects are marked with a star.) Function name Process data Description...
  • Page 400 OMRON G5-series Servo Drive, you need to map Reference Position for CSP. • Set the primary period to 1 ms when you use Reference Position for CSP for an OMRON G5- series Servo Drive. Also, set the electronic gear ratio to 1:1.
  • Page 401 60FD hex-00.25 (Digital This signal is used for the immediate stop input. inputs) Set Bit 25: Immediate Stop Input of 60FD hex-00: Digital inputs for an OMRON G5-series Servo Drive. Encoder Phase Z 60FD hex-00.16 (Digital Shows the status of detecting the Z-phase input.
  • Page 402 *3 CST is the Cyclic Synchronous Torque Control Mode of the Servo Drive. Object Settings The OMRON G5-series Servo Drive settings required to use the control functions of the MC Function Module are listed in the following table. Consult the manual for your Servo Drive and set all related objects for the Servo Drive functions that you are going to use.
  • Page 403 *2 OMRON G5-series Linear Motor Type Servo Drives with built-in EtherCAT communications do not support this object. *3 Select a value according to the type of external scale to use when you use fully-closed control with an OMRON G5-series Servomotor/Servo Drive, or when you use an OMRON G5-series Linear Motor Type Servomo- tor/Servo Drive with built-in EtherCAT communications.
  • Page 404: Connecting To Encoder Input Terminals

    • Only the OMRON GX-EC0211/EC0241 can be used for encoder axes of EtherCAT slaves. • Unit version 1.0 of the OMRON GX-EC0211/EC0241 can also be used for encoder axes, but they are not Sysmac devices. When you use unit version 1.0, do not set the node address switches to 00.
  • Page 405 Appendices There are two counter channels, and there are two external latches for each channel. Wire the input signals that are required for your application. Refer to the GX-series EtherCAT Slave Units User’s Manual (Cat. No. W488) for input signal wiring methods.
  • Page 406 Appendices Relationships between MC Function Module and Process Data The functions of the MC Function Module are related to the information in the process data objects. Depending on the EtherCAT slave configuration and functions that are used by the MC Function Mod- ule, you sometimes must change the relationships between the MC Function Module and the PDOs.
  • Page 407 Appendices  Input Settings (Servo Drive to Controller) This is the status data from the Encoder Input Terminal to the MC Function Module. The default set- tings in the Sysmac Studio are listed in the following table. (Required objects are marked with a star.) Process data Function name...
  • Page 408 Appendices Parameter Meaning Set value Modulo Maximum Posi- Set the modulo maximum position that is set This setting must agree with the maxi- tion Setting Value on the Servo Drive or the Encoder Input Ter- mum value that is set for the ring minal.
  • Page 409 Appendices The maximum value of the ring counter for the Encoder Input Terminal is set on the EtherCAT Tab Page in the Sysmac Studio. The setting is as follows: Index Object name Set value 0x4003 Max Count Setting (maxi- Set this parameter to the same value as the Modulo Maximum mum value of the ring Position Setting Value in the Servo Drive Settings of the axis counter)
  • Page 410: Connecting To Nx Units

    Appendices Connecting to NX Units Refer to the NX-series Position Interface Units User’s Manual (Cat. No. W524) for information on con- necting to the NX-series Position Interface Units. A-28 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 411: Pds State Transition

    Appendices PDS State Transition The PDS state transition is defined in CiA402 drive profile. Use the Controlword (6040 hex) process data to command PDS state transitions. To check actual PDS states, use the Statusword (6041 hex) process data. The following diagram shows the state transition defined in CiA402 drive profile. Each box indicates a state, while numbers indicate the state control commands.
  • Page 412: A-5-1 Pds State Control Method

    Appendices A-5-1 PDS State Control Method This section describes the relationship between the setting values of the PDS State Control Method axis parameter and the PDS states.  When PDS State Control Method Is Set to 0 The following operation is performed when PDS State Control Method is set to 0: Switched on by Servo OFF.
  • Page 413: A-5-2 Main Circuit Power Supply Off Detection

    Precautions for Correct Use Precautions for Correct Use You cannot select the Do not detect option when you use an OMRON 1S-series Servo Drive or G5-series Servo Drive. A Servo Main Circuit Power OFF error will occur if you select the Do not detect option and turn off the main power supply to Servo Drive when the Servo is ON.
  • Page 414: Terminology

    Appendices Terminology This appendix provides definitions of terms related to motion control. A-6-1 NY-series Controller Term Description main memory The memory inside the Controller that is used by the Controller to execute the RTOS and user program. periodic task Tasks for which user program execution and I/O refreshing are performed each period.
  • Page 415: A-6-2 Motion Control

    Appendices A-6-2 Motion Control Term Description used real axis Axis of which axis type is set to Servo Axis or Encoder Axis and axis use is set to Used Axis. used virtual axis Axis of which axis type is set to Virtual Servo Axis or Virtual Encoder Axis and axis use is set to Used Axis.
  • Page 416: A-6-3 Ethercat Communications

    Appendices Term Description zero position The position that is based on home and is treated as the zero position in the user program. This is the same position as home if the home position is not changed. following error The difference between the command current position and actual current position. There is a following error only in position control mode.
  • Page 417: Version Information

    Appendices Version Information This section describes the functions that are supported for each unit version. Refer to the NY-series Industrial Panel PC / Industrial Box PC Software User’s Manual (Cat. No. W558) for the relationship between the unit versions of NY-series Controllers and the Sysmac Studio versions. Refer to the NY- series Motion Control Instructions Reference Manual (Cat.
  • Page 418 Appendices A-36 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 419 Index Index-1 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 420 Index Index axes groups ..............3-19 enabling and disabling ........... 9-52 introduction ............3-19 aborting .............. 9-46, 9-63 specifying in user program ......3-19, 3-23 absolute encoder Axis Basic Settings ..........5-6, 6-26 Absolute Encoder Origin Position Offset ....8-15 Axis Command Values ..........6-25 applicable Servomotors .........
  • Page 421 Index cam data index ............9-16 deceleration rate cam data variables ..........6-33, 9-15 changing ..............9-42 cam end point ............. 9-15 deceleration stop of command value ......9-9 cam operation ............ 9-14, 9-15 Deceleration Stopping ........6-23, 6-30 cam profile curves ..........6-33, 9-15 Deceleration Warning Value ........
  • Page 422 Index Home Input Detection Direction ......5-24, 8-8 Home Input Mask Distance ........5-25, 8-10 Home Input Signal ..........5-24, 8-7 Main Power ..............6-24 Home Offset ............5-25, 8-10 major fault ..............11-6 Home Proximity Input ..........6-24 manual operation ............7-2 Homing ................ 6-23 master axis ..............
  • Page 423 Index _MC_AX[0-63].Details.InPosWaiting _MC_AX[0-63].Status.Ready (In-position Waiting) ..........6-24 (Axis Ready-to-execute) ........... 6-23 _MC_AX[0-63].Details.VelLimit _MC_AX[0-63].Status.Standstill (Standstill) ....6-23 (Command Velocity Saturation) ....... 6-24 _MC_AX[0-63].Status.Stopping _MC_AX[0-63].Dir.Nega (Negative Direction) ..... 6-24 (Deceleration Stopping) ..........6-23 _MC_AX[0-63].Status.Synchronized _MC_AX[0-63].Dir.Posi (Positive Direction) ....6-24 (Synchronized Motion) ..........6-23 _MC_AX[0-63].DrvStatus.CSP (Cyclic Synchronous Position (CSP) Control Mode) 6-24 _MC_AX_ErrSta (MC Error Status) ......
  • Page 424 Index _MC_GRP[0-31].Status.ErrorStop Operation Selection at Reversing ........ 5-16 (Error Deceleration Stopping) ........6-30 Operation Settings ............5-16 _MC_GRP[0-31].Status.Moving (Moving) ....6-30 original cam data ............9-15 _MC_GRP[0-31].Status.Ready (Ready to Execute) ..6-30 Other Operation Settings ..........5-20 _MC_GRP[0-31].Status.Standby (Standby) ....6-30 overrides .............9-11, 9-57 _MC_GRP[0-31].Status.Stopping (Deceleration Stopping) ..........
  • Page 425 Index stop priorities ............... 9-10 virtual encoder axis ..........3-2, 5-7 Stopping ................ 9-6 virtual servo axis ............ 3-2, 5-7 stopping due to errors or other problems ...... 9-8, 9-56 immediate stop input ..........9-6 limit inputs ............... 9-7 Work Travel Distance Per Motor Rotation .... 5-9, 6-26 MC_GroupImmediateStop instruction ....
  • Page 426 Index Index-8 NY-series Industrial Panel PC / Industrial Box PC Motion Control User’s Manual (W559)
  • Page 428 The Netherlands Hoffman Estates, IL 60169 U.S.A. Tel: (31)2356-81-300/Fax: (31)2356-81-388 Tel: (1) 847-843-7900/Fax: (1) 847-843-7787 © OMRON Corporation 2016-2017 All Rights Reserved. OMRON (CHINA) CO., LTD. OMRON ASIA PACIFIC PTE. LTD. In the interest of product improvement, Room 2211, Bank of China Tower, No.

Table of Contents