LS ELECTRIC XGT Series User Manual

LS ELECTRIC XGT Series User Manual

Xgi cpu module
Hide thumbs Also See for XGT Series:
Table of Contents

Advertisement

Quick Links

Programmable Logic Control
XGI CPU Module
XGT Series
XGI-CPUZ3
XGI-CPUZ5
XGI-CPUZ7

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the XGT Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for LS ELECTRIC XGT Series

  • Page 1 Programmable Logic Control XGI CPU Module XGT Series XGI-CPUZ3 XGI-CPUZ5 XGI-CPUZ7...
  • Page 2 Safety Instruction Before using the product … For your safety and effective operation, please read the safety instructions thoroughly before using the product. ► Safety Instructions should always be observed in order to prevent accident or risk with the safe and proper use the product.
  • Page 3 안전을 위한 주의 사항 Safety Instructions when designing Warning  Please, install protection circuit on the exterior of PLC to protect the whole control system from any error in external power or PLC module. Any abnormal output or operation may cause serious problem in safety of the whole system.
  • Page 4 Safety Instruction Safety Instructions when designing Caution I/O signal or communication line shall be wired at least 100mm away from a  high-voltage cable or power line. If not, it may cause abnormal output or operation. Safety Instructions when designing Caution ...
  • Page 5 안전을 위한 주의 사항 Safety Instructions when wiring Warning Prior to wiring, be sure that power of PLC and external power is turned off. If not,  electric shock or damage on the product may be caused. Before PLC system is powered on, be sure that all the covers of the terminal are ...
  • Page 6 Safety Instruction Safety Instructions for test-operation or repair Warning  Don’t touch the terminal when powered. Electric shock or abnormal operation may occur.  Prior to cleaning or tightening the terminal screws, let all the external power off including PLC power. If not, electric shock or abnormal operation may occur. ...
  • Page 7: Revision History

    Revision history Revision History Version Date Chapter Remark 1. First edition V1.0 ’22.07...
  • Page 8 About user’s manual Thank you for purchasing PLC of LS ELECTRIC Co., Ltd. Before use, make sure to carefully read and understand the User’s Manual about the functions, performances, installation and programming of the product you purchased in order for correct use and importantly, let the end user and maintenance administrator to be provided with the User’s Manual.
  • Page 9 Table of content ◎ Table of contents ◎ 목 차 Part 1 CPU CHAPTER 1.OVERVIEW .....................................1-1 1.1 How to use ......................................1-1 1.2 Features ........................................1-3 1.3 Terminology ......................................1-7 CHAPTER 2 SYSTEM CONFIGURATION ...............................2-1 2.1 XGI-CPUZ System Configuration..............................2-1 2.1.1 XGI-CPUZ System Configuration ....................................... 2-1 2.1.2 XGI Series Configuration method......................................
  • Page 10 Table of content 4.2.1 Task control ............................................... 4-3 4.2.2 Motion command execution ........................................4-7 4.3 Parameter Setting ....................................4-8 5.3.1 Basic parameter ............................................4-8 5.3.2 Local Ethernet Parameter ........................................4-12 4.4 Run mode......................................4-18 4.4.1 Run mode ..............................................4-18 4.4 2 Stop Mode ..............................................4-19 4.4.3 Operation mode Change ........................................
  • Page 11 Table of content 5.11 Changing Module during Operation ............................5-27 5.12 I/O No. Allocation Method ................................5-28 5.13 Program Modification during Operation ........................... 5-28 CHAPTER 6 BUILT-IN COMMUNICATION FUNCTION........................6-1 6.1 List of built-in communication support services .........................6-1 6.1.1 List of built-in communication support services ................................6-1 6.2 built-in Communication Function ..............................6-2 6.2.1 Local Ethernet Parameter Settings .....................................
  • Page 12 Table of content 7.2.1 File open................................................7-16 7.2.2 File Close ................................................ 7-18 7.2.3 File Write ................................................. 7-19 7.2.4 File Read ................................................. 7-22 7.2.5 File Seek ................................................. 7-24 7.2.6 File Copy ................................................. 7-26 7.2.7 File Remove ..............................................7-28 7.2.8 File Rename ..............................................7-29 7.2.9 Directory Create ............................................
  • Page 13 Table of content 8.7.5 PID control(Variable monitor and Trend monitor) ..............................8-36 8.7.6 How to use the Auto-tuning ........................................8-41 8.7.7 Example 2 Program ..........................................8-43 8.7.8 Cascade operation ............................................ 8-44 8.8 PID Simulation ....................................8-45 8.8.1 PID control example program(Simulation) .................................. 8-45 CHAPTER 9 WEB SERVICE FUNCTION ..............................9-1 9.1 Web server function ....................................9-1 9.1.1 Features ................................................
  • Page 14 Table of content 10.3.11 8 point TR output module(isolated contact point) ............................. 10-23 10.4 Digital I/O hybrid module specification ........................... 10-24 10.4.1 32 point (DC Input · Transistor Output) I/O hybrid module ........................10-24 10.5 Event Input Module Specification ............................. 10-25 10.5.1 Event Input Module (Source/Sink type) ................................
  • Page 15 15.1.2 Control Panel ............................................. 15-2 15.1.3 Cable ................................................15-4 15.2 Requirement to Conform to the Low-Voltage Directive ......................15-5 15.2.1 Standards applicable to XGT series ..................................... 15-5 15.2.2 Selection of XGT Series PLC ......................................15-5 CHAPTER 16 TROUBLESHOOTING ..............................16-1 16.1 Basic Procedure of Troubleshooting ............................
  • Page 16 Table of content Part 2 Motion CHAPTER 1 MOTION CONTROL OPERATION ...........................1-1 1.1 Motion Specifications ..................................1-1 1.2 Motion control operation structure ..............................1-2 1.3 Motion control structure..................................1-3 1.3 MOTION PARAMETER ..................................1-4 1.3.1 Master .................................................. 1-4 1.3.2 Slave ..................................................1-8 1.3.3 Axis parameter ............................................. 1-12 1.3.4 Axis groups parameter ..........................................
  • Page 17 Table of content 2.1.4 BufferMode input ............................................2-7 2.1.5 Changes in Parameters during Execution of Motion Function Block ......................2-7 2.1.6 Group Operation Route Change Settings ..................................2-8 2.1.7 Motion Function Block Errors ......................................2-10 2.2 Motion Function Block ..................................2-11 2.3 Setting Range by Product ................................
  • Page 18 Table of content 2.6.2 Remove group axis (MC_AddAxisToGroup) ................................2-91 2.6.3 Removes all axes from the group (MC_UngroupAllAxes) ..........................2-92 2.6.4 Group Enable (MC_GroupEnable)....................................2-93 2.6.5 Group Disable (MC_GroupDisable)....................................2-94 2.6.6 Group homing operation (MC_GroupHome) ................................2-95 2.6.7 Group current position setting (MC_GroupSetPosition) ............................2-96 2.6.8 Group immediate stop (MC_GroupStop) ..................................
  • Page 19 Table of content 2.7.26 Read inverter status 2 (LS_InverterStatus2) ................................ 2-161 2.7.27 Speed control operation (CSV mode) (LS_SyncMoveVelocity) ....................... 2-162 2.7.28 Read CAM table master position (LS_ReadCamTableMasterPos) ....................... 2-163 2.7.29 OnOff CAM Operation (LS_OnOffCam) ................................. 2-165 2.7.30 RotaryKnife cam profile generation (LS_RotaryKnifeCamGen) ....................... 2-168 2.7.31 Cross sealer cam profile generation (LS_CrossSealCamGen) ........................
  • Page 20 Table of content 2.9.11 M Code operation completed (NC_McodeComplete) ............................ 2-223 2.9.12 S Code operation completed (NC_ScodeComplete)............................2-224 2.9.13 T Code operation completed (NC_TcodeComplete) ............................2-225 2.9.14 Read NC parameter(MC_ReadParameter) ................................. 2-226 2.9.15 Write NC parameter(NC_WriteParameter) ................................2-236 2.9.16 Reverse operation(NC_RetraceMove) ................................... 2-237 2.9.17 Block skip(NC_BlockSkip) ......................................
  • Page 21 Table of content 3.3.4 EtherCAT Communication Diagnostics function ..............................3-103 3.3.5 Cable Duplication function ......................................... 3-108 3.3.6 Replace Function during Connection ..................................3-109 3.3. 7 Position Control Range Expansion ..................................... 3-111 3.3.8 Connection function less than set number ................................3-112 3.3.9 Node switch operation mode setting ...................................
  • Page 22 Table of content 4.2.1 NC program ..............................................4-9 4.2.2 NC Program Configuration ........................................4-10 4.2.3 Data ................................................... 4-13 4.2.4 NC program write ............................................4-14 4.3 NC Commands ....................................4-16 4.3.1 Basic Format of the NC Position Command ................................4-16 4.3.2 NC command list ............................................4-18 4.3.3 NC command description ........................................
  • Page 23 Table of content 5.4.3 Synchronous operation .......................................... 5-33 5.4.4 CAM Operation ............................................5-35 5.4.5 Axis groups process ..........................................5-37 5.4.6 Axis groups operation example......................................5-39 CHAPTER 6 ETHERCAT DIAGNOSIS ..............................6-1 CHAPTER 7 THIRD-PARTY ETHERCAT SLAVE CONNECTION ....................7-1 7.1 How to use EtherCAT ..................................7-1 7.2 ESC(EtherCAT Slave Controller ) Resistor ............................7-8 APPENDIX 1 FLAG LIST ..................................
  • Page 24 Chapter 1 Overview Part 1 CPU basic and built-in functions Describes the contents of CPU basic and built-in function’s programming , operating and monitoring. Chapter 1.Overview 1.1 How to use This User’s Manual provides the information for the specification , performance and operation method of each product required to use a PLC system configured by XGI- CPUZ series CPU modules.
  • Page 25 Chapter 1 Overview Classification Item Content Describes motion standards, parameters and EtherCAT communication Chapter 1 Motion control operation standards. Chapter 2 Function block Describes the contents of each function block. Describe representative functions of motion control (Coordinate & Chapter 3 Motion control function Linear Interpolation, Circular Interpolation &...
  • Page 26: Chapter 1 Overview

    Chapter 1 Overview 1.2 Features XGI- CPUZ system have the following features. (1)Compact size Innovative and compact size compared to performance, it is easy to install in a narrow space. (2) High speed processing 1) XGI-CPUZ • Sequence instruction: 6.5 ns •...
  • Page 27 Chapter 1 Overview d) Various multi-axis group operations are available. - Circular interpolation, linear interpolation, helical interpolation, group home return / group position change e) Switching control is possible while operating. - Switching control between position/speed, switching control between position/torque, switching control between speed/torque f) Cam Control is available.
  • Page 28 Chapter 1 Overview (4) Convenience to use analog data Analog module enforced the precision and stability and provides the convenience as below. • Program simplification by providing analog data dedicated ‘U ‘ device • Setting without memory map of special module is available by providing parameter setting method. (5) System configuration Various convenient functions are provided to meet the demands of users.
  • Page 29 Chapter 1 Overview (8) User’s convenience Various functions are provided for user’s convenience. • Module Changing Wizard function (User’s tool is unnecessary.) • System Diagnosis function • Skip I/O function • Fault Mask function • Various Operation History Notes 1. What is EtherCAT? EtherCAT, Open Industrial Ethernet Solution, is developed by Beckhoff at 2002 and at 2003, November EtherCAT Technology Group (ETG-http://www.ethercat.org) is organized and it opens its technology.
  • Page 30 Chapter 1 Overview 1.3 Terminology Describes the terms used in the user's manual Terminology Definition Remarks Ex)CPU Module, A device like I/O board assembled to insert in a motherboard or base as a Module Power standardized factor having the regular function to configure the system. module, module etc A single module or or group of module or that perform an independent...
  • Page 31 Chapter 1 Overview Terminology Definition Remarks RAPIEnet Real-time Automation Protocols for Industrial Ethernet As an abbreviation of Real Time Clock, it is collectively referred as a universal IC with a function of clock. It is a function to set the predetermined execution time of the program and Watchdog timer to generate an alarm when the processing is not completed within the (Watchdog Timer)
  • Page 32 Chapter 1 Overview Terminology Definition Remarks Current flows into PLC input terminal from switch when input signal turns on. input Sink input Curren impedance Switch − Common Current flows from the PLC input terminal to the switch when input signal turns on.
  • Page 33 Chapter 1 Overview 1.4 Licensing information regarding open-source software The XGI-CPUZ contain software components that are licensed open-source software. You can check the license documentation at solution square(https://sol.ls-electric.com). If you need the source code of these open-source software, please request it from solution square. 1-10...
  • Page 34: Chapter 2 System Configuration

    Chapter 2 System Configuration Chapter 2 System Configuration XGI-CPUZ has various products suitable for basic, special, communication and network system configuration. This chapter describes the configuration method of each system and its features. 2.1 XGI-CPUZ System Configuration 2.1.1 XGI-CPUZ System Configuration XG5000 Programming &...
  • Page 35 Chapter 2 System Configuration 2.1.2 XGI Series Configuration method XGI- CPUZ series configuration is as follows. CPU Module USB, XG5000 CD or USB memory Ethernet Cable X G P - P A F1 Power module Main base(XGB-E□□□) (XGP-P□□□) X G K - C P U H X G K - C P U H Extension cable(XGC-E□□□) I/O module...
  • Page 36: Product List

    Chapter 2 System Configuration 2.2 Product List The product configuration of XGI-CPUZ series is as below. Product Type Content Note • CPU module(max. I/O points : 6,144, Program capacity: 10MB, NC Program: XGI-CPUZ7 10MB) • CPU module(max. I/O points : 6,144, Program capacity: 4MB, NC Program: CPU Module XGI-CPUZ5 5MB)
  • Page 37 Chapter 2 System Configuration Product Type Content Note • for 4 module installation XGB-M04A • for 6 module installation XGB-M06A • for 8 module installation Main base XGB-M08A • for 10 module installation XGB-M10A • for 12 module installation XGB-M12A •...
  • Page 38 Chapter 2 System Configuration Product Type Content Remarks • Voltage input: 8 channel (DC1~5V/0~5V/0~10V/−10 ~ +10) XGF-AV8A • Current input: 8 channel (DC 4 ~ 20mA / 0 ~ 20mA) XGF-AC8A • Voltage/current input: 8 channel XGF-AD8A • Voltage/current input: 4 channel, isolation between channels XGF-AD4S Analog input module •...
  • Page 39 Chapter 2 System Configuration Remark Product Type Content • Pulse output(Open Collector), 4 axes XGF-PO4H • Pulse output(Open Collector), 4 axes XGF-PO4H • Pulse output(Open Collector), 3 axes XGF-PO3H • Pulse output(Open Collector), 2 axes XGF-PO2H • Pulse output(Open Collector), 1 axes XGF-PO1H •...
  • Page 40 Chapter 2 System Configuration Product Type Content Remarks • Fast Ethernet(optical), Master XGL-EFMFB • 100/10 Mbps supported • Fast Ethernet(electric), Master XGL-EFMTB • 100/10 Mbps supported FEnet I/F module (Optical/electric) • Fast Ethernet Switch module(optical) XGL-ESHFB • Fast Ethernet Switch module(electric) XGL-EH5T •...
  • Page 41 Chapter 2 System Configuration Notes For the further information about active coupler, optical converter, repeater and block type remote module, which are network devices, refer to the user’s manual of network.
  • Page 42: Basic System

    Chapter 2 System Configuration 2.3 Basic system 2.3.1 Configuration method of Basic System The features of Basic system consisted by connecting the main base and expanded base by a cable are as follows. Classification XGI-CPUZ7 XGI-CPUZ5 XGI-CPUZ3 Maximum number of 7 stages extension stages Maximum No.
  • Page 43 Chapter 2 System Configuration 2.3.2 Max. Configuration of Basic System Slot no: 0.0.0 0.1.0 0.2.0 0.3.0 0.4.0 0.5.0 0.6.0 0.7.0 System Main base Power configuration (Base 0.0.16 0.1.15 0.2.15 0.3.15 0.4.15 0.5.15 0.6.15 0.7.15 example number:0) - XGI-CPUZ7 Extension - 8 slot base Slot no: cable - When installing 16...
  • Page 44 Chapter 2 System Configuration 2.3.3 Terminating resistor connection When an extension base is connected, a terminating resistor must installed for the system reliability on the extension connector (OUT) of the last extension base. When using only the main base, it is not necessary to install a terminating resistor. (1) Structure (2) Installation position Slot no:...
  • Page 45 Chapter 2 System Configuration 2.3.4 Module selection when configuring basic system When configuring basic system, you must consider about size of each module’s Data Refresh area Data refresh area is used for data transmission between CPU and modules in XGI CPU system. Data Refresh area is allocated to CPU memory, irrespective of module’s operation.
  • Page 46 Chapter 2 System Configuration (Unit: WORD) Product Type Refresh size Product Type Refresh size XGF-PN8A XGL-FMEA XGF-PN8B XGL-C22B XGF-M16M XGL-C42B XGF-M32E XGL-CH2B Communication XGL-EIMT Position control module module XGL-EIMH XGL-EIMF XGL-ES4T XGL-BIPT XGL-EIPT (2) Size of each module’s Data Refresh area 1) Limit of Data Refresh area’s size Sum of Data Refresh area’s size installed in system ≤...
  • Page 47: Network System

    Chapter 2 System Configuration 2.4 Network system XGI-CPUZ provides various network systems for easy system configuration. This provides Ethernet (FEnet) and Cnet for communication between PLC and upper system or between PLCs and provides a Profibus-DP, DeviceNet, Rnet etc. as lower control network system.
  • Page 48: Remote I/O System

    Chapter 2 System Configuration 2.4.3 Remote I/O System This is the network system to control I/O module installed at far distance. Network system such as Profibus-DP, DeviceNet, Rnet, Cnet Smart i/O module series are applied. (1) I/O System Application by Network Type Smart I/O modules are classified as follows.
  • Page 49: General Specifications

    Chapter 3 CPU Module Chapter 3 Specifications of CPU module 3.1 General Specifications The general specifications of the XGT series are as follows. Relevant Item Specifications specifications Operating ambient 0 ~ 55 °C temperature Storage temperature −25 ~ +70 °C...
  • Page 50: Chapter 3 Cpu Module

    Chapter 3 CPU Module Notes 1) IEC (International Electrotechnical Commission) : An international nongovernmental organization which promotes internationally cooperated standardization in electric/electronic field, publishes international standards and manages applicable estimation system related with. 2) Pollution degree : An index indicating pollution degree of the operating environment which decides insulation performance of the devices.
  • Page 51: Performance Specification

    Chapter 3 CPU Module 3.2 Performance Specification The general specifications of the CPU modules are as follows. Item XGI-CPUZ7 XGI-CPUZ5 XGI-CPUZ3 Note Main task/Cycle Task: fixed period and cyclic operation Operation Method Initialization task:Only once at the time of entering the RUN Main Task Time: 1ms ~ 1,000ms (1ms unit setting) Control cycle Cycle Task Time : Multiple setting of main task(2~4,000ms)
  • Page 52 Chapter 3 CPU Module Item XGI-CPUZ7 XGI-CPUZ5 XGI-CPUZ3 Note FLASH area 4 MB, 64 block Control by R device Occupying 20 Byte of No restriction on points Timer automatic variable area Time range: 0.001~ 4,294,967.295sec(1,193hour) per point Occupying 20 Byte of No restriction on points Counter automatic variable area...
  • Page 53 Chapter 3 CPU Module Item XGI-CPUZ7 XGI-CPUZ5 XGI-CPUZ3 Note Protocol EtherCAT Support CoE(CANopen over EtherCAT), FoE(File Access over EtherCAT) specification Physical layer 100BASE-TX Communication 100Mbps speed Topology Daisy Chain Communication Cat. 5 STP(Shielded Twisted-pair) cable cable Commu Synchronous Jitter Less than 1 ㎲ nication between slaves Constant period...
  • Page 54 Service UDP not supported Third-party protocol support(MODBUS TCP server) FTP server NTP client Web Server Socket service (LS electric and third-party client service correspondence) Socket function block Project password Security TLS support: Loader service, Web Server, FTP server Screen display Character Display Internal consumption current 1.3A...
  • Page 55: Name Of Each Part And Function

    Chapter 3 CPU Module 3.3 Name of each part and function Each part’s function and name of XGI-CPUZ is as follows. Name Usage Indicates the operation status and parameter settings of the CPU module in text. ①  The menu is displayed according to the operation of the switch for display. ...
  • Page 56 Chapter 3 CPU Module Indicates the error/warning of the CPU module and the status that requires confirmation.  Error - On(Red): indicates the case of an error that cannot be operated - Off: Indicates ‘no error’  Check ② - On(Green): ...
  • Page 57 Chapter 3 CPU Module Name Usage Set the operational mode of CPU module. STOP → RUN: execute program operation  ④ RUN → STOP: stop program operation  RUN/STOP/Reset Switch Move the switch to the right to perform a reset operation. Move right →...
  • Page 58: Program Instruction

    Chapter 4 Program Configuration and Operation Method Chapter 4 Program Configuration and Operation Method 4.1 Program Instruction 4.1.1 Program operation methods XGI-CPUZ CPU is executed as a task program. There are three types of tasks: main task, cycle task and initialization task. The main task is the task that completes the action within the cycle set by the user.
  • Page 59: Operation Processing During Momentary Power Failure

    Chapter 4 Program Configuration and Operation Method 4.1.2 Operation Processing during Momentary Power Failure The CPU module detects Momentary Power Failure when the voltage of input Power Module supplied to the power module is lower than the nominal value. If CPU module detects a momentary power failure, it carries out the operation processing as follows.
  • Page 60: Program Execution

    Chapter 4 Program Configuration and Operation Method 4.2 Program Execution 4.2.1 Task control (1) Overall task operation The task is composed of the main task and cycle task. The main task performs I/O refresh and processes program as well as motion control motion according to the processing of the program during the control period.
  • Page 61 Chapter 4 Program Configuration and Operation Method 2) Execution time of main task > Main task period - If the execution time of main task exceeds the main task period, a warning occurs. - If the main task execution time exceeds the ‘main task period error’ time set in the basic parameter, a ‘main task period error’...
  • Page 62 Chapter 4 Program Configuration and Operation Method 2) Execution time of cycle task > cyclical task period - If the execution time of main task exceeds the main task period, a warning occurs. - If the cycle task execution time exceeds the ‘main task period error’ time set in the basic parameter, a ‘main task period error’occurs.
  • Page 63 Chapter 4 Program Configuration and Operation Method 4.2.2 Motion command execution (1) Execution of motion commands in the main task Execution of motion instruction of the main task is shown in the figure below. The input value or system variable of the EtherCAT slave is updated by the I/O refresh operation of the main task.
  • Page 64: Parameter Setting

    Chapter 4 Program Configuration and Operation Method 4.3 Parameter Setting 5.3.1 Basic parameter (1) Basic operation setting Basic Operation Settings Setting range Initial value Main Task Time 1 ~ 1000 [unit: ms] Basic motion setting Cycle Task Time 2 ~ 4000 [unit: ms] Period error of main task 2 ~ 2000 [unit: ms] 10ms...
  • Page 65 Chapter 4 Program Configuration and Operation Method (2) Retain area group setting Retain area group setting Setting range Initial value Release M area 1 %MW0 Release, setting ~ %MW524287 Retain area group %MW0 ~ %MW524287 M area 2 Release setting (Start area and End area setting) M area 3 Release...
  • Page 66 Chapter 4 Program Configuration and Operation Method (3) Error operation settings Error operation settings Setting range Initial value Continue running when a fuse error Enable occurs Continue running when a I/O Disable module error occurs Continue running when a Special Disable Error operation module error occurs...
  • Page 67 Chapter 4 Program Configuration and Operation Method (4) Other settings Other settings Setting range Initial value Overwrite with recent history Overwrite with recent SOE history SOE history Keep original history history Print Wi-Fi password from Built-in Built-in UI settings Disable, Enable Disable Memory card Allow project update/backup/compare...
  • Page 68 Chapter 4 Program Configuration and Operation Method 5.3.2 Local Ethernet Parameter (1) Basic settings Standard settings Setting range Initial value IP Address 1~223.0~255.0~255.0~254 192,168,250,110 IP Setting Subnet mask 0~255.0~255.0~255.0~255 255.255.255.0 Gateway 1~223.0~255.0~255.0~255 192.168.250.1 Enable Use a dedicated Communication Disable, Enable server Use a dedicated 2 ~ 255s...
  • Page 69 Chapter 4 Program Configuration and Operation Method Standard settings Setting range Initial value Bit read start address %IX0.0.0 Bit write start address %QX0.0.0 Basic Start address setting by area settings Word read start address %MW0 Modbus server settings Word write start address %MW100 Read area settings(FC20) Record...
  • Page 70 Chapter 4 Program Configuration and Operation Method (2) Security setting Security setting Setting range Initial value User of allow access list Disable, Enable Disable Start : 0.0.0.0 ~ 255.255.255.255 IP Address End: 0.0.0.1 ~ 255.255.255.255 (Must be greater than start range) User firewall Start: 0~65535 User of allow...
  • Page 71 Chapter 4 Program Configuration and Operation Method (3) Time synchronized setting Time synchronization Setting range Initial value Disable, Enable Disable Enable NTP time synchronization Disable, Enable Disable Behavior when initializing NTP Time 1~223.0~255.0~255.0~254 IP Address NTP server synchronization setting 0~65535 Port number 1min, 3min, 5min, 10min, 30min, 1h, 3h, 30min...
  • Page 72 Chapter 4 Program Configuration and Operation Method (4) FTP setting Setting range Initial value Disable, Enable Disable Enable FTP server Disable, Enable Disable Using secure protocol(FTPS) LSUSER Up to 8 alphanumeric/characters. User ID FTP server Up to 16 alphanumeric/characters 0000 setting Password /special characters...
  • Page 73 Chapter 4 Program Configuration and Operation Method (5) Web server setting Web server Setting range Initial value Disable, Enable Disable Use a web server Disable Disable, Enable Use secure protocol(HTTPS) Administrator password User 1 password Web server alphanumeric/characters User 2 password /special characters User 3 password User 4 password...
  • Page 74: Run Mode

    Chapter 4 Program Configuration and Operation Method 4.4 Run mode CPU module operation status are RUN mode and STOP mode. 4.4.1 Run mode It is executed program operation normally. RUN mode first scan start Data area initialized Check program right and wrong so to decide to execution it or not.
  • Page 75: Stop Mode

    Chapter 4 Program Configuration and Operation Method 4.4 2 Stop Mode It is the mode in Stop status without program operation. Program transfer is available only in remote STOP mode via XG5000. (1) Process after mode changed Remove the output image area and execute output refresh. Therefore, every output data are changed to off state. (2) Operation process 1) Execute I/O refresh.
  • Page 76: Operation Mode Change

    Chapter 4 Program Configuration and Operation Method 4.4.3 Operation mode Change (1) Operation Mode Change Method Run mode can be changed as follows. 1) Mode change by the mode key of the CPU module 2) By connecting the programming tool (XG5000) to communication port of CPU 3) By changing the operation mode of other CPU module connected to network by XG5000 connected to communication port of CPU 4) By using XG5000, HMI, computer link module connected to network.
  • Page 77: Program Memory

    Chapter 4 Program Configuration and Operation Method 4.5 Memory The CPU module contains two types of memory that can be used by a user. It is a data memory that provides a program memory to store user programs written to build the system and a device area to store data during operation. 4.5.1 Program memory The storage capacity and data area type of the program memory are as follows.
  • Page 78 Chapter 4 Program Configuration and Operation Method 4.5.2 Data memory The storage capacity and data area type of the data memory are as follows. Capacity Item XGI-CPUZ7 XGI-CPUZ5 XGI-CPUZ3 Total data memory area 72MB(73,765KB) 69MB(70,693KB) 68MB(69,157KB) System area: I/O information table Forcible I/O table 2,388KB 2,388KB...
  • Page 79 Chapter 4 Program Configuration and Operation Method Notes 1) K, L, N, R devices are basically retain 2) K, L and N devices can be deleted in the memory deletion window of PLC deletion, an online menu of XG5000. 3) For more information, refer to the Online section of the XG 5000 user’s manual. 4) Automatic variables (A) ,Retain setting data of M devices and R, W devices are backed up in the flash memory area.
  • Page 80 Chapter 4 Program Configuration and Operation Method For the maintenance or reset (clear) of the retain area data according to the PLC operation, refer to the following table. When operating in stop mode Classification Restart mode Retain M area retain R area Maintaining the Maintaining the...
  • Page 81: Menu Configuration

    Chapter 5 Functions of CPU Module Chapter 5 CPU Module Functions Basic functions for CPU module are explained. 5.1 Built-In Display 5.1.1 Features XGI-CPUZ CPU has a 0.96-inch character display and setting operation keys You can use the display to check PLC information and diagnostic information.
  • Page 82 Chapter 5 Functions of CPU Module (1) Booting screen This is the screen output during PLC booting. After PLC booting is completed, it automatically switches to the status output screen. (2) Status output screen This is the screen to output the current operation mode of PLC and the currently occurring error/warning code. Press the key to switch to the menu output screen.
  • Page 83 Chapter 5 Functions of CPU Module Display Menu 1.Mode 1.Module Exchange 2.D.CLR 1.D.CLR 2.Overall D.CLR 3.PBM Exchange 2.General 1.PLC Info 1.PLC Type 2.Version 3.PLC Mode 4.Mode Switch 5.PLC Status 6.Connection Status 7.Last PLC Mode Change 8.Forced Input 9.Forced Output 10.Skip I/O 11.Fault Mask 12.Disable RST/Overall RST 13.Disable D.CLR/Overall D.CLR...
  • Page 84 Chapter 5 Functions of CPU Module (4) Main menu This is the screen that is output when changing the page to the menu output screen by pressing the key on the status output screen. The currently selected item can be changed by using the key and can be entered into the detailed menu screen by pressing the key or switch to the previous status output screen by...
  • Page 85 Chapter 5 Functions of CPU Module 5.1.3 Menu detail description (1) Mode...
  • Page 86 Chapter 5 Functions of CPU Module Menu Description The ‘Module Exchange’ menu provides a function to exchange the installed module during PLC operation. Module Exchange If the module is arbitrarily replaced without using the corresponding function, there is a risk of malfunction of the entire system.Refer to ‘5.11 Changing Module during Operation’...
  • Page 87 Chapter 5 Functions of CPU Module Menu Description Outputs basic information related to PLC. The output information is as follows.  PLC Type  PLC Version  PLC Mode  Mode Switch  PLC Status  Connection Status  Last PLC Mode Change ...
  • Page 88 Chapter 5 Functions of CPU Module Menu Description Outputs Ethernet connection information The output item is as follows.  IP Address  Ethernet MAC Address  Subnet Mask  Gateway Outputs Wi-Fi connection information. The output item is as follows. <AP Mode>...
  • Page 89 Chapter 5 Functions of CPU Module (5) Memory Card Menu Description It executes PLC backup function. The available menus are as follows.  PLC Backup: This is a function to back up the project running in PLC in the form of a file. ...
  • Page 90: Self-Diagnosis Function

    Chapter 5 Functions of CPU Module 5.2 Self-diagnosis function The self-diagnostic is the function that the CPU module diagnoses any trouble of the PLC system. It detects any trouble when turning on the PLC system or any trouble is found during the operation, avoid the system from malfunctioning and taking preventive measures.
  • Page 91 Chapter 5 Functions of CPU Module 5.2.2 PBM(Power Backup Module) Check function This is a function to check the status of the power supply module for backup. EDLC (Electric Double Layer Capacitor) is mounted in PBM. EDLC has a variable capacity depending on the surrounding environment, but in the XGI-CPUZ system, it has an optimized design and can be used for more than 10 years at an ambient temperature of 55℃.
  • Page 92 Chapter 5 Functions of CPU Module 5.2.3 Error History Save Function CPU module has the function that records the error history and analyzes the cause of the error to take a proper action you can check error occurs. (Refer to Appendix 2 Error Information and measurement) It saves each error code to the flag area.
  • Page 93 Chapter 5 Functions of CPU Module 4) Error detection by external device error This is to detect the error of external control device by PLC user program. In case of critical error, the system stops but in case of minor error error, the system indicates the error state only and continues to operate. Notes 1) When critical error occurs and detects, the fault number is saved into the flag(_ANNUM_ER).
  • Page 94 Chapter 5 Functions of CPU Module 5.3 Clock CPU module has a built-in clock device (RTC). RTC continues the clock action with backup supply even in case of power off or Momentary Power Failure. In addition, it operates as an NTP client using NTP (Network Time Protocol), requests time information from the NTP server located on the LAN and corrects the time information with the collected time information according to the set conditions.
  • Page 95 Chapter 5 Functions of CPU Module 5.3.2 Read by RTC Read Flag The flag can be monitored as shown in the table below.(Friday, April 22, 2022 9:47:38) Variable Data type Memory allocation Example Contents name _RTC_TIME[0] %FB52 16#22 Current Time(year) _RTC_TIME[1] %FB53 16#04...
  • Page 96 Chapter 5 Functions of CPU Module 5.3.3 RTC Data Modification by Program It is available for the user to set the RTC value programs. This function is used when setting the time manually through external Digit switch or making the system that corrects the time periodically through network. In the ‘RTC-SET’...
  • Page 97 Chapter 5 Functions of CPU Module 5.3.4 Weekday Expression Method and Time error numbers Wednesda Sunday Monday Tuesday Thursday Friday Saturday The RTC’s error may be different depending on usual temperature. Time tolerance according to temperature per day was indicated on the table as below. Operation temperature Max error (second/day) Normal case(second/day)
  • Page 98: Remote Functions

    Chapter 5 Functions of CPU Module 5.4 Remote Functions The CPU module must set the ‘RUN/STOP/RST’ switch mounted on the module to the STOP position. (1) Type of remote operation 1) Operated by connecting XG5000 through USB or Ethernet port mounted in CPU module. 2) It is possible to operate other PLCs connected to the PLC network while XG5000 is connected to the CPU module.
  • Page 99: Forced I/O On/Off Function

    Chapter 5 Functions of CPU Module 5.5 Forced I/O On/Off Function The forced I/O function is used to turn On/Off I/O areas by force regardless of the results of program execution. 5.5.1 Force I/O setup Method Click ‘Forced I/O setup’ in online mode. To set Forced I/O, enable the correspond contact point and select setting value check box of data.
  • Page 100 Chapter 5 Functions of CPU Module 5.5.2 Forced On/Off Execution Point and Execution Method (1) Forced Input Input replaces the data of contact point set as forced On/Off from the data read in input module at the time of input refresh with the forced setting data and updates the input image area.
  • Page 101 Chapter 5 Functions of CPU Module 5.6 Direct I/O Operation By refreshing I/O contact by means of ‘DIREC_IN, DIREC_OUT’ function, it can be conveniently used when directly reading the state of input contact while a program is being executed to use operation or directly outputting operation results to input contacts. Notes 1) For further information of DIREC_IN, DIREC_OUT function, please refer to XGI Instruction manual.
  • Page 102: Saving Operation History

    Chapter 5 Functions of CPU Module 5.7 Saving Operation History There are 4 types of operation history; error history, mode conversion history, power down history and system history. The occurrence time, frequency, operating details of each event are saved in the memory and you can conveniently monitor the data through XG5000.
  • Page 103 Chapter 5 Functions of CPU Module Notes 1) The saved information will not be deleted before selecting the menu from XG5000 to delete. 2) If the index number saved is over 100, select Read All to check previous history. 5-23...
  • Page 104: External Device Error Diagnosis

    Chapter 5 Functions of CPU Module 5.8 External Device Error Diagnosis This is the flag provided so that the user can detect the error of external device and realize the stop and warning of system easily. By using this flag, it enables to indicate the error of external device without preparing the complicated program and monitor the error position without XG5000 or source program.
  • Page 105 Chapter 5 Functions of CPU Module 5.9 Fault Mask Function (1) Purpose and Operation Overview 1) Fault Mask is the function to continue the program execution even if the module error occurring during operation. The module assigned as Fault Mask shall be operated normally before error occurs. 2) If the error occurs in the module where the Fault Mask is set, the corresponding module stops the operation but the whole system continues the operation.
  • Page 106: I/O Module Skip

    Chapter 5 Functions of CPU Module 5.10 I/O Module Skip (1) Purpose andOperation Overview I/O module skip function is a function to exclude a designated module from operation during operation. For the assigned module, it is disabled to update I/O data or diagnose the error from the assigned moment. It is allowed to use only in case of temporary operation excluding the error module.
  • Page 107: Changing Module During Operation

    Chapter 5 Functions of CPU Module 5.11 Changing Module during Operation XGI system enables to change the module during operation. But, as the change of module during operation may occur the abnormal operation of whole system, special attention should be taken. Just follow the procedure assigned in this user’s manual. (1) Notices in Using •Not allowed to change the base and power module.
  • Page 108: I/O No. Allocation Method

    Chapter 5 Functions of CPU Module 5.12 I/O No. Allocation Method The allocation of I/O No. is to give the to the I/O terminal of each module in order to read the data from input module and print the data to output module when performing the operation. The I/O number allocation is related with base number, slot position and module type.
  • Page 109 Chapter 6 Built-in Communication Function Chapter 6 Built-in Communication Function XGI-CPUZ supports built-in communication function using Ethernet Port and Wi-Fi Dongle (USB Host installed separately), and this chapter describes support service information for each medium and detailed functions for each service. 6.1 List of built-in communication support services 6.1.1 List of built-in communication support services Supported by device...
  • Page 110: Chapter 6 Local Ethernet Function

    Chapter 6 Local Ethernet Function 6.2 built-in Communication Function 6.2.1 Local Ethernet Parameter Settings Make a new in project. Then user can see Local Ethernet Parameters as shown below figure. If user selects Local Ethernet Parameter item, Local Ethernet Parameter setting window will be displayed. To use Local Ethernet function, user should set the parameters.
  • Page 111 Chapter 6 Built-in Communication Function (1) TCP/IP setting Classification Content Set the IP address to be assigned to the CPU module as a server. IP address * Precautions: There can be a communications disruption if you set more than 2 servers as a same IP address.
  • Page 112 Chapter 6 Local Ethernet Function 6.2.2 XG5000 Connection After finishing Local Ethernet Parameter settings, download the settings to the CPU module, then user can connect to XG5000. Program read/write is possible faster than remote 1st stage connection using the existing Enet module. Select XG5000 connection setting and select the following options for connection option setting.
  • Page 113 Chapter 6 Built-in Communication Function The default connection port is set to 2002, and in general, you do not need to modify the port number. Use this only when port forwarding using a router or when changing the XG5000 port number by using the custom port number function. *Note 1) TLS Ethernet XG5000 connection is supported for security enhancement, check [Use TLS] for use time, the The default connection port is set to 2002, and in general, you do not need to modify the port number.
  • Page 114 Chapter 6 Local Ethernet Function 6.2.3 Dedicated communication server(XGT, Modbus TCP) XGI-CPUZ can perform Ethernet server function without a Enet I/F module through the built-in communication function. The client to connection request setting consists of a smart server that internally determines and processes the XGT server and Modbus TCP server.
  • Page 115 Chapter 6 Built-in Communication Function Below is an example of how to set up Modbus. Notes 1) Built-in communication TCP server function can transmit RST packet according to network environment with TCP/IP protocol. So the user devices connecting to CPU module should have RST packet process. 2) Connection to user devices can be disconnected for retransmission time-out.
  • Page 116: Ntp Client

    Chapter 6 Local Ethernet Function 6.2.4 NTP client CPUZ supports NTP (Network Time Protocol), which connects to the NTP (Network Time Protocol) server to get the time and synchronize it. The NTP is the protocol used for synchronizing the time of the CPU connected through the network. (1) NTP Client Parameter Setting You can set as follows in ‘Time Synchronization’...
  • Page 117 Chapter 6 Built-in Communication Function Notes (1) When the parameter setting is completed, the PLC periodically reads the time value from the NTP server. (2) The NTP server IP address is initially set as follows. Port 211.233.84.186 211.233.40.78 178.63.135.195 104.131.51.97 (3) If you want to use other SNTP servers, change the IP address and port No.
  • Page 118 Chapter 6 Local Ethernet Function 3) Executes by following the path below. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer 4) Change the value of ‘Enabled’ to ‘1’ in the folder. 5) Executes by following the path below. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config 6) Change the value of ‘AnnounceFlags’ to ‘5’ in the folder. 7) Reboot the computer.
  • Page 119 Chapter 6 Built-in Communication Function d) Choose the inbound rules. e) Select the new rule in the top right. f) Select the port and click Next button. g) Select UDP(U) and Special local port(S). Input ‘123’ and click Next button. 6-11...
  • Page 120 Chapter 6 Local Ethernet Function h) Select Allow connections(A) and click Next button. i) Select the checkbox to meet your security policy, and click Next button. j) Input the server name(anything) and description and click Finish button. 6-12...
  • Page 121 Chapter 6 Built-in Communication Function 9) Select the [Start] button to Executed it. 10) Enter ‘CMD’ and click OK. (Administrator) 11) In the command window, Input ‘net stop w32time’ and press Enter key. And then, also input ‘net start w32time’ and press Enter key.
  • Page 122 Chapter 6 Local Ethernet Function 6.2.5 FTP(S) Server File transfer protocol (FTP, File Transfer Protocol) and FTPS (FTP over SSL/TLS secured channel) for security enhancement are supported so that files can be uploaded/downloaded from a remote location to the memory card area through the local Ethernet port.
  • Page 123 Chapter 6 Built-in Communication Function Notes 1) If the user ID and password are not set separately, the default ID and password will be set. - Default setting ID: LSIS - Default password: 0000 2) Rules to use the user ID and password - You can enter the user ID and password that are composed of alphabetical characters and numbers but special characters are not available.
  • Page 124 Chapter 6 Local Ethernet Function b) Enter the FTP command in command prompt to start the FTP session. c) Enter the ‘open [IP address]’to access to the FTP server - You can enter the FTP [IP address] in the command prompt instead of using the open command. d) Enter the user ID and password to access to the FTP server.
  • Page 125 Chapter 6 Built-in Communication Function e) When login is completed successfully, the message will be displayed; “User name accepted.” [Login success screen] 6-17...
  • Page 126 Chapter 6 Local Ethernet Function [Login fail screen] f) In case you access to the FTP server through windows command prompts, you cannot see the progress status of file download. Accordingly, you can check the current progress of file download by activating the HASH function. 6-18...
  • Page 127 Chapter 6 Built-in Communication Function g) You can view the directories and file lists that exist in the drive currently through the ‘DIR’ command. h) You can go into the lower folder through the ‘cd [Folder name]’command. - If you execute the ‘DIR’ command again after going into the lower folder, only the files ahasnd folder lists that exist in the lower folder will be displayed.
  • Page 128 Chapter 6 Local Ethernet Function i) Designate the directory path of the FTP client side that will download the file through the ‘lcd’ command. 6-20...
  • Page 129 Chapter 6 Built-in Communication Function j) Select the file to be imported through the ‘get’ command and download it. At this time, the file is located in the sub- group folder in DATALOG. k) When the HASH function is activated and deactivated, the transmission status is shown in as below. 6-21...
  • Page 130 Chapter 6 Local Ethernet Function If the HASH function is enabled, the transmission status is displayed as continuous HASH as shown below. 6-22...
  • Page 131 Chapter 6 Built-in Communication Function 2) FTP server command list The Windows FTP supports the following commands. You can check the further commands through ‘?’ commands. There is a function that is not supported in order to protect the data log file. So, refer to the following list.
  • Page 132 Chapter 6 Local Ethernet Function Notes (1) ASCII and Binary commands should be used separately according to the file extension. If you transmit the file with a wrong mode, the file will not work properly. a) File extension names using ASCII: html, htm, txt, cgi, pl, php, phtml, php3, sql, c, ph, py etc b) File extensions for using Binary: gif, jpg, swf, png, exe, asf, wmv, zip, rar, gzip, tar, gz etc...
  • Page 133 Chapter 6 Built-in Communication Function Notes If you turn off the Windows Firewall, you may be exposed to various external intrusions. Therefore, it is recommended to register an exception rule for the Windows Firewall. 2) Registration of exceptional rules The following shows how to register an exception rule for the Windows Firewall. a) Execute the control panel.
  • Page 134 Chapter 6 Local Ethernet Function Notes For registering exceptional rules, refer to the window manual. 6-26...
  • Page 135 Chapter 6 Built-in Communication Function (4) Improvement of FTP speed The built-in FTP server does not send the next packet until it receives a response if it does not immediately respond to the data packet it has sent. However, windows is usually supposed to send the response after waiting until 2 packets are received or after 200ms, instead of responding all when receiving the data packet.
  • Page 136 Chapter 6 Local Ethernet Function 5) If there are several register folders, select one by one and find the folder where the current PC’s IP address is set in the right register value. 6) Click with the right mouse button on the right screen of the relevant folder and select New] [DWORD(32bit) value]. 7) Enter the value name as shown below.
  • Page 137 Chapter 6 Built-in Communication Function 6.2.6 Web Server(HTTP(S)) XGI-CPUZ series provides web server function. For details on the function, refer to “Part 1, Chapter 9 Web Server Function”. 6-29...
  • Page 138: Socket Service

    Chapter 6 Local Ethernet Function 6.2.7 Socket Service XGI-CPUZ series provides special commands that can be written in LD and ST languages to implement TCP/IP and UDP communication directly within the user program. For details on the function, refer to the “Socket Command” section of XGI Instructions and Programing user manual.
  • Page 139 Chapter 6 Built-in Communication Function After pressing the Settings button, the detailed setting screen as shown below appears. You can activate the function by checking [Use TLS]. 2) FTP Server Security Connection Function It supports FTPS Server function with Transport Layer Security (TLS) encryption protocol added to existing FTP, and the function is set as follows.
  • Page 140 Chapter 6 Local Ethernet Function 3) Web Server Security Connection Function The HTTP service supports HTTPS function with Transport Layer Security (TLS) encryption protocol added, and the function can be set as follows. Activate the function by checking Use security protocol (HTTPS) on the local Ethernet parameter setting screen of XG5000.
  • Page 141 Chapter 6 Built-in Communication Function (2) Access allowed list setting function This is a function that allows access only for external connections that meet the conditions specified by the user. This function is used by checking the access allowed list in the security setting of the XG5000's local Ethernet parameter setting screen. This function can create up to 16 access-allowed lists for IP, port, and MAC.
  • Page 142 Chapter 6 Local Ethernet Function 6-34...
  • Page 143 Chapter 6 Built-in Communication Function (3) Service Port Setting(custom port) This function can be used when it is necessary to change the port of the network service provided by the product according to the usage environment. When setting the function, you can check the list of services provided by default and change the port. At this time, if there is no content in the list, the service provides the service with the default port value.
  • Page 144 Chapter 6 Local Ethernet Function 6.2.9 Ping Test XGI-CPUZ series provides ping test function for connection diagnosis on the network connected by Ethernet or Wi-Fi device, and uses the function in the following way. (1) Ping Test Procedure 1) After connecting through XG5000, click System Diagnosis as shown below. 2) Click on System Diagnostics to display the current system configuration as shown below.
  • Page 145 Chapter 6 Built-in Communication Function 3) If you click “Ping Test” from the menu that appears when you click the right mouse button, the Ping Test window below is created. After entering a value in the basic setting item, start the test with “Start”. ...
  • Page 146: Packet Capture

    Chapter 6 Local Ethernet Function 6.2.10 Packet capture XGI-CPUZ series provides packet capture function for Ethernet devices. PCAP data collected through this function can be analyzed using a 3rd party program such as Wireshark. ※ The function is available when SD memory is installed. (1) Packet capture procedure After connecting through XG5000, click packet capture as shown below.
  • Page 147 Chapter 6 Built-in Communication Function After setting according to the contents below, start packet capture for Ethernet device through “Start Monitoring”.  Monitoring Setting  Monitoring Time: enter the time in seconds to perform packet capture operation.  Monitoring Settings  Capture Size: specifies the maximum data size when capturing packets. If the maximum size is exceeded during packet capture, data up to the maximum capture size *2 can be saved.
  • Page 148 Chapter 6 Local Ethernet Function After running the 3rd party program wireshark, open the created file with File Open and check the collected data. 6-40...
  • Page 149 Chapter 6 Built-in Communication Function 6.2.11 Local Ethernet Diagnostics information Provides local Ethernet diagnostic information to monitor local Ethernet settings, dedicated communication connections, and communication status. (1) Diagnostic information monitoring sequence 1) Click the System Diagnosis as shown in the left figure after access through XG5000. 6-41...
  • Page 150 Chapter 6 Local Ethernet Function 2) Click on System Diagnostics to display the current system configuration as shown below. Put the mouse on the figure of the module and click the right mouse button. 3) If you click the loca1l Etnernet diagnostic information among the menus that occur when clicking the right mouse button, the local Etnernet diagnostic information window will be created as shown below.
  • Page 151: Operation Mode

    Chapter 6 Built-in Communication Function 6.3 Wi-Fi Device Setting XGI-CPUZ is equipped with a Wi-Fi module (refer to the bottom of the supported device, sold separately) in the USB Host port, so that the built-in communication service(XG5000 connection, FTP, Web Server etc.) provided by the PLC can be configured and used in a wireless environment.
  • Page 152 Chapter 6 Local Ethernet Function Vendor Model name Iptime N150L TP link TL-WN725N v2.0 6.3.2 Wi-Fi module Setting ※ When Wi-Fi is installed for the first time, it operates in Host AP mode. (1) Setting Program Execution Select “USB” or “Built-in Eth./Wi-Fi” as the connection option and method of XG5000 and connect to PLC Click [Toolbar] ...
  • Page 153 Chapter 6 Built-in Communication Function (3) AP mode setting In this mode, the Wi-Fi module installed in XGI-CPUZ operates as an access point, and wireless connection is possible from an external device with the set SSID and password information. When setting AP mode, the effective area is as follows, and information can be checked by pressing the “AP information load”...
  • Page 154 Chapter 6 Local Ethernet Function (4) Station mode setting The Wi-Fi device operates in Station mode to connect to other devices, and is connected to the SSID (AP). You need to change to “Station mode” for Station mode operation. In addition, a separate password may be required depending on the AP to be accessed, and only access to 2.5GHz devices is supported.
  • Page 155 Chapter 7 SD Memory Service Function Chapter 7 SD Memory Services 7.1 SD Memory service function XGI-CPUZ has built-in memory card service function. This chapter describes the specification and usage of the service function. 7.1.1 Features If you use the memory card service function, you can perform project operation functions (project backup, history backup, project compare, project update, boot operation) using a memory card rather than direct connection of XG5000.
  • Page 156 Chapter 7 SD Memory Service Function (2) Backup target data The data that can be backed up to the memory card by the backup function are as follows. Item Data Common File version,CPU type,OS version,password information Basic parameter,IO parameter,Communication parameter(※),Local Ethernet parameter,Special Data...
  • Page 157 Chapter 7 SD Memory Service Function The detailed contents of error code is as follows. Error code* Error Name Description 0x00 No error 0x01 File access fail An error occurred while accessing the file. 0x0A No file It is the case that read prohibition setting is set from PLC. This is when the function is executed without a memory card 0x0C No Memory card...
  • Page 158 Chapter 7 SD Memory Service Function (4) Related status information You can check the information should be by using the READ_PLC_INFO command. Information related to history backup function is as follows. Structure name: _MemCard _MemCard structure details Member name Description Data type Note SDFuncAct...
  • Page 159 Chapter 7 SD Memory Service Function 7.1.4 Project Compare function The project comparison function compares the project file (*.xsp) stored in the memory card with the project stored in the PLC. The comparison result is saved as a comparison result file in the memory card and can be checked using a PC. (1) Operation Method In the menu of the built-in display 5.
  • Page 160 Chapter 7 SD Memory Service Function  SDFuncCmpResult: Project operation function PLC compare result - As a result of the PLC compare function, it displays On in case of a match.  SDFuncErrCode: Project operation function error code - Displays an error code when an error occurs. The error code is cleared to 0 when the function starts and is updated after the function completes.
  • Page 161 Chapter 7 SD Memory Service Function 7.1.5 Project Updated function The project update function refers to the function to read the project data stored in the memory card and apply it to the PLC system. At this time, the files required for update should be saved in memory card in advance using XG5000's memory card export function or PLC project backup function.
  • Page 162 Chapter 7 SD Memory Service Function The detailed contents of error code is as follows. Error code Error Name Error occurrence status 0x00 No error 0x01 File access fail An error occurred while accessing the file. 0x02 File damage If the head and foot of the project file are damaged. 0x03 Version error In case of unsupported project file version.
  • Page 163 Chapter 7 SD Memory Service Function 7.1.6 Boot operation function Boot operation function refers to a function that starts operation with the project data stored in the memory card rather than the program stored in the PLC when the PLC power is turned on. At this time, the project file (*.xsp) for boot operation should be saved in the memory card in advance using the XG5000 export function or project backup function.
  • Page 164 Chapter 7 SD Memory Service Function The detailed contents of error code is as follows. Error code Error Name Error occurrence status 0x00 No error 0x01 File access fail An error occurred while accessing the file 0x02 File damage If the head and foot of the project file are damaged 0x03 Version error In case of unsupported project file version...
  • Page 165: Memory Card Folder Structure

    Chapter 7 SD Memory Service Function 7.1.8 Memory Card Folder Structure The folder structure related to the memory card function and the contents of the files stored in each folder are as follows. 1) Root : This is the memory card root folder. 2) XGI-CPUZ : As file command ,the top-level folder for project management functions, files are not saved.
  • Page 166 Chapter 7 SD Memory Service Function 7.1.9 Memory Card Service function This is the function to manage the memory card installed in the CPU (1) Operation Method When the memory card is installed in the memory card SLOT of PLC, the following operations are executed. 1) Memory card mount 2) File system check(FAT16 or FAT32) 3) Memory card capacity check(1GB~512GB)
  • Page 167 Chapter 7 SD Memory Service Function  Detach: Force removal of memory card - Displays On when a memory card is detached from the PLC.  VolTot : Memory card capacity - Displays the capacity of the memory card  VolTot : Memory card usable capacity - Displays the remaining available capacity of the memory card.
  • Page 168 Chapter 7 SD Memory Service Function Member name Description Data type Note SDFuncDone Project operation function complete BOOL SDFuncCmpResult Project operation function PLC compare result BOOL SDFuncErrCode Project operation function error code WORD (2) Memory card error code list Error Error Name Error occurrence content code...
  • Page 169 Chapter 7 SD Memory Service Function 7.1.11 Precaution when using memory card The precautions to be taken when using a memory card are as follows. (1) Power Off during memory card writing 1) If the power is cut off or the PLC is reset while reading/writing to the memory card, the file system of the memory card may be damaged.
  • Page 170: File Commands

    Chapter 7 SD Memory Service Function 7.2 File Commands Notes Only English is supported for file names and directory names in the file command. If you use any other character, be careful as a command error (file name or directory name is not valid) will occur. 7.2.1 File open Function Block FILE_OPEN...
  • Page 171 Chapter 7 SD Memory Service Function STAT Error status Normal (No error) Failed to access the memory card. The file does not exist. (If Mode is 2 and there are no files in the Inst folder or no memory card is installed) The file open mode setting is incorrect.
  • Page 172 Chapter 7 SD Memory Service Function 7.2.2 File Close Function Block FILE_CLOSE BOOL DONE BOOL BUSY DWORD FileID BOOL STAT USINT Input BOOL Set programs to run in the rising Edge. DWORD FileID ID of the file that is opened. Output BOOL Done...
  • Page 173: File Write

    Chapter 7 SD Memory Service Function 7.2.3 File Write Function Block FILE_WRITE DONE BOOL BOOL BUSY DWORD BOOL FileID WrittenSize WriteAddr ANY_PTR UINT Size STAT USINT UINT Input BOOL Set programs to run in the rising Edge. DWORD FileID ID of the file that is opened. ANY_PTR WriteAddr Address of data to be written.
  • Page 174 Chapter 7 SD Memory Service Function ■ Program example (1) LD FILE_WRITE %MX0 DONE DONE FileID FileID BUSY BUSY WriteAddr WriteAddr WrittenSize WrittenSize Size Size STAT STAT (a) The output value, FileID must be entered after FILE_OPEN is normally executed. (b) If the execution condition (%MX0) is On, the FILE_WRITE function is executed.
  • Page 175 Chapter 7 SD Memory Service Function (b) As the Size is 10 but WriteAddr is a data type, write the set value of %MD100. (c) As they are DWORD data, WrittenSize displays 4 and STAT outputs 0. (2) ST INST_FILE_WRITE(REQ:=%MX0, FileID:=FileID, WriteAddr:=WriteAddr, Size:=Size, DONE=>DONE, BUSY=>BUSY, WrittenSize=>WrittenSize, STAT=>STAT) 7-21...
  • Page 176 Chapter 7 SD Memory Service Function 7.2.4 File Read Function Block FILE_READ DONE BOOL BOOL DWORD BUSY BOOL FileID ReadAddr ReadSize UINT ANY_NUM Size UINT STAT USINT Input BOOL Set programs to run in the rising Edge. DWORD FileID ID of the file that is opened. ANY_NUM ReadAddr It is the starting address of data to read.
  • Page 177 Chapter 7 SD Memory Service Function ■ Program example (1) LD FILE_READ %MX0 DONE DONE FileID FileID BUSY BUSY ReadAddr ReadAddr ReadSize ReadSize Size Size STAT STAT (a) The output value, FileID must be entered after FILE_OPEN is normally executed. (b) If the execution condition (%MX0) is On, the FILE_READ function is executed.
  • Page 178 Chapter 7 SD Memory Service Function 7.2.5 File Seek Function Block FILE_SEEK DONE BOOL BOOL BUSY DWORD BOOL FileID RESULT Offset DWORD DINT STAT Origin USINT BYTE Input BOOL Set programs to run in the rising Edge. DWORD FileID ID of the file that is opened. DINT Offset A position from origin to offset...
  • Page 179 Chapter 7 SD Memory Service Function ■ Program example (1) LD FILE_SEEK %MX0 DONE DONE FileID FileID BUSY BUSY Offset Offset RESULT RESULT Origin Origin STAT STAT (a) The output value, FileID must be entered after FILE_OPEN is normally executed. (b) If the execution condition (%MX0) is On, the FILE_SEEK function is executed.
  • Page 180 Chapter 7 SD Memory Service Function 7.2.6 File Copy Function Block FILE_COPY BOOL BOOL DONE BUSY STRING SrcFileName BOOL STRING DstFileName STAT USINT BOOL OverWrite Input BOOL Set programs to run in the rising Edge. STRING SrcFileName The name of the original file to be copied. STRING DstFileName This is the name of the file to be created after copying.
  • Page 181 Chapter 7 SD Memory Service Function ■ Program example (1) LD FILE_COPY %MX0 DONE SrcFileName SrcFileName BUSY BUSY DstFileName DstFileName STAT STAT OverWrite OverWrite (a) If the execution condition (%MX0) is On, the FILE_COPY function is executed. (b) If the memory card is installed normally, the saved file File Name SrcFileName = ‘ABC.bin’ is copied to DstFileName = ‘def.bin’.
  • Page 182 Chapter 7 SD Memory Service Function 7.2.7 File Remove Function Block FILE_REMOVE BOOL DONE BOOL STRING BUSY FileName BOOL STAT USINT Input BOOL Set programs to run in the rising Edge. STRING FileName The file name to delete. Output BOOL DONE Indicate the state of motion function block completion.
  • Page 183: File Rename

    Chapter 7 SD Memory Service Function 7.2.8 File Rename Function Block FILE_RENAME BOOL BOOL DONE STRING BUSY BOOL FileName STRING NewName STAT USINT OverWrite BOOL Input BOOL Set programs to run in the rising Edge. STRING FileName Source file or directory name. STRING NewName The file or directory name to change.
  • Page 184 Chapter 7 SD Memory Service Function ■ Program example (1) LD - FileName = ‘ABC.bin’, NewName = ‘DEF.bin’, OverWrite= FALSE FILE_RENAME %MX0 DONE FileName FileName BUSY BUSY STAT STAT NewName NewName OverWrite OverWrite (a) If the execution condition (%MX0) is On, the FILE_RENAME function is executed. (b) If the memory card is installed normally, the saved file FileName = ‘ABC.bin’...
  • Page 185 Chapter 7 SD Memory Service Function 7.2.9 Directory Create Function Block DIR_CREATE BOOL BOOL DONE BUSY STRING DirName BOOL STAT USINT Input BOOL Set programs to run in the rising Edge. STRING DirName The directory name to create. Output BOOL DONE Indicate the state of motion function block completion.
  • Page 186 Chapter 7 SD Memory Service Function If you want to create an additional directory under the ABC after creating the directory, you can create it by entering DirName as shown below.  DirName = ‘ABC/TEST’ (c) According to the status of memory card or files, STAT displays an error. If normal operation, 0 is output. (2) ST INST_DIR_CREATE(REQ:=%MX0, DirName:=DirName, BUSY=>BUSY, STAT=>STAT);...
  • Page 187 Chapter 7 SD Memory Service Function 7.2.10 Directory Remove Function Block DIR_REMOVE BOOL BOOL DONE BUSY STRING DirName BOOL STAT USINT Input BOOL Set programs to run in the rising Edge. STRING DirName The directory name to delete. Output BOOL DONE Indicate the state of motion function block completion.
  • Page 188 Chapter 7 SD Memory Service Function (b) If the memory card is installed the created Name name’ DirName = ‘ABC’ is deleted. (c) If another file or directory exists under the ‘ABC’ directory, error 3 is displayed in STAT. (d) If the ‘def’ directory is saved under the ‘ABC’ directory, you can delete it by entering the DirName as shown below. ...
  • Page 189 Chapter 7 SD Memory Service Function 7.2.11 PLC Data Backup Function Block SD_BACKUP BOOL BOOL DONE BUSY STRING DirName BOOL STAT USINT Input BOOL Set programs to run in the rising Edge. STRING DirName The directory name to save. Output BOOL DONE Indicate the state of motion function block completion.
  • Page 190 Chapter 7 SD Memory Service Function (b) If the memory card is installed normally the created directory name’ DirName = ‘ABC’ backup the data. (c) According to the status of memory card or files, STAT displays an error. If normal operation, 0 is output. (2) ST INST_SD_BACKUP(REQ:=%MX0, DirName:=DirName, BUSY=>BUSY, STAT=>STAT);...
  • Page 191: Pid Control

    Chapter 8 Built-in PID Function Chapter 8 Built-in PID Function This chapter describes the XGI Series CPU built-in PID function. 8.1 Characteristics The features of PID function built-in XGI CPU are as follows (1) Accuracy Control is available. (2) It is executed at the cycle of the main task or cycle task including the control program, and is calculated for each set T_s. (3) A total of 256 PID loops can be controlled with 32 loops in each of 8 blocks.
  • Page 192: Pid Control Operation

    Chapter 8 Built-in PID Function 8.3 PID Control Operation 8.3.1 Terms Below are the terms used to describe the PID control operation. SV : The target value which the control object value should reach T_s (Ts) : Sampling time (Control cycle)[100µs unit] K_p (Kp) : Proportional coefficient, T_i (Ti)
  • Page 193 Chapter 8 Built-in PID Function 8.3.3 P control MV in P control consists only of the proportional term operation MV_p. The proportional term operates by multiplying the error by the proportional coefficient. The proportional coefficient must be set by the user according to the system, and the larger it is set, the more sensitive it is to errors.
  • Page 194 Chapter 8 Built-in PID Function 8.3.4 PI control PI (Proportional-Integral) control is calculated as the sum of the proportional and integral terms. To reduce the offset, the shortcoming of = Kp × E the proportional term, PI control uses the integrated error. MV_i = �...
  • Page 195 Chapter 8 Built-in PID Function 8.3.5 PID control PID control reduces vibration during PI control by adding the derivative effect to PI control. The derivative effect operates only when the system state changes, regardless of the system error value. When the PV measurement signal at the system sensor is not clean or mixed with noise, however, an undesired derivative effect is created and causes an unstable operation of the heater or pump.
  • Page 196 Chapter 8 Built-in PID Function 8.4 PID Commands 8.4.1 PID loop States The PID loop has 5 states: PIDSTOP, AUTOTUNE, PIDRUN, PIDCAS, and PIDPAUSE. (1) PIDSTOP is a state in which the output (MV) it represented by MV_min, internal states are initialized, and user settings are maintained. Under this condition, it is impossible to enter into PIDPAUSE.
  • Page 197: Pid Function Block

    Chapter 8 Built-in PID Function 8.4.2 PID Function Block The PID command group includes 4 instructions: PIDRUN, PIDCAS, PIDINIT, and PIDPRMT. All operations of the PID function are executed by the PIDRUN or PIDCAS command. The PIDINIT and PIDPRMT instructions are used together with the PIDRUN or PIDCAS instructions on the ladder program and are used for convenience.
  • Page 198 Chapter 8 Built-in PID Function Cascade PID operation is executed by combining the two corresponding loops in the block. The block number of master and slave loops should be same. Cascade PID operation PIDCAS DONE BOOL BOOL UINT BLOCK MST_STAT WORD UINT LOOP_MST...
  • Page 199 Chapter 8 Built-in PID Function (Example, 16#000C is displayed when dPV_AL and dMV_AL occur simultaneously.) Notes Cascade calculation The master loop inputs its MV into SV of the slave loop during operation, while the slave loop executes its operation using the SV value input through the master loop.
  • Page 200 Chapter 8 Built-in PID Function It initializes setting and status of applicable PID loop. At the moment, the initialized area is the setting and state of the designated block and loop all the 0 is inputted to every setting of the loop(bit is off). PID Initialization PIDINIT DONE...
  • Page 201 Chapter 8 Built-in PID Function PIDPRMT changes the settings of PIDRUN including SV, T_s, K_p, T_i and T_d to user-defined values. . PID parameter Change Input BOOL Request the execution of function block. UINT BLOCK It can be set in the range of 0 to 7 as a block number. UINT LOOP It can be set in the range of 0 to 31 as a loop number.
  • Page 202: Pid Flag Configuration

    Chapter 8 Built-in PID Function 8.5 PID Flag Configuration. This is the flag configuration required for the built-in PID operation. Symbol K device value Data type Contents Note _PID[B]_[L]MAN %KX[ 0 + (16800×B) + L] PID output select (0:Auto, 1:Manual) PID monitor _PID[B]_[L]PAUSE %KX[ 32 + (16800×B) + L]...
  • Page 203 Chapter 8 Built-in PID Function _PID[B]_[L]ERR %KD[ 21 + ( 525×B) + (16×L)] DINT PID Control Error Value _PID[B]_[L]MV_p %KD[ 22 + ( 525×B) + (16×L)] REAL PID P component of the MV _PID[B]_[L]MV_i %KD[ 23 + ( 525×B) + (16×L)] REAL PID I component of the MV _PID[B]_[L]MV_d...
  • Page 204: Common Bit Area

    Chapter 8 Built-in PID Function 8.5.1 Common bit area The common bit area is the part that contain all bit data for the 32 loops. All information 32 loops have for a signal item is combined to take the form of 32bit double word and the nth bit provides information on the nth loop. Symbol K device area (B:block,L:loop) Data type Contents...
  • Page 205 Chapter 8 Built-in PID Function returning to RUN after PAUSE operation Initial value: Off(PAUSE cancelled) (3) _PID[B]_[L]REV (PID REVerse operation) - Setting area K device area: %KX[64+(16800×B)+L] Data unit: BIT This allows you to set the control system as Forward system or Reverse system. 1) Forward: This is an operation to control the current value as the target value while the current value is smaller than the target value.
  • Page 206 Chapter 8 Built-in PID Function (6) _PID[B]_[L]P_on_PV (PID P on PV) - Setting area K device area: %KX[160+(16800×B)+L] Data unit: BIT If the corresponding bit is On, the P control operation of the PID loop is used as the PV value. operation is calculated with error (SV-PV) or PV.
  • Page 207: Individual Data Area

    Chapter 8 Built-in PID Function 8.5. 2 Individual data area The individual data area of block B and loop L is %KW[24+1050B+32L] ~ %KW[55+1050B+32L]. (1) _PID[B]_[L]SV (PID Set-point value) - Setting area K device area: %KW[24+(1050×B)+(32× L)] Data unit : INT [ -32768 ~ 32767 ] This is the SV setting part of the corresponding loop.
  • Page 208 Chapter 8 Built-in PID Function (5) _PID[B]_[L]T_d (PID derivative time gain) - Setting area K device area: %KD[15+(525×B)+(16× L)] Data unit: Set the derivative time constant (T_d) of the loop as REAL [-3.40282347e+38 ~ -1.17549435e-38, 0, 1.17549435e-38 ~ 3.40282347e+38]. As T_d is multiplied into the D (derivative) term, the T_d increase,the derivative effect increase. If the setting value of _PID[B]_[L] T_d is 0, D control is not performed and it can be set in the range of short real number (REAL).
  • Page 209 Chapter 8 Built-in PID Function (11) _PID[B]_[L] status (PID State) - Setting disable K device area: %KW[37+(1050×B)+(32× L)] Data unit:WORD [h00 ~ hff] or BIT This displays state or error status of the corresponding loop. As the address %KW[37+(1050×B)+(32×L)] each of the 16 bits has its own meaning.
  • Page 210 Chapter 8 Built-in PID Function Notes Bumpless Change Over When the PID controller returns to the automatic output mode after switching to the manual output mode, the control system increases the output again from 0. This causes a MOD changing impact to the system. In other words, when a certain output is applied to the system in manual mode, and when it is switched to automatic mode, the output rises from 0 again.
  • Page 211 Chapter 8 Built-in PID Function Notes Deadband It is used to eliminate detailed output changes due to small state changes as PV approaches SV during system control. When a value is entered in DB_W during PID control, a deadband is formed in SV as much as the DB_W value up/down.
  • Page 212 Chapter 8 Built-in PID Function Notes Transient and Steady States 1) Transient State :In a transitional state where the control system starts control and finds the desired control state, instantaneous output change may occur. Also, vibration and overshoot may occur as the integral value stabilizes. 2)Steady States : When the control system passes the transient state and reaches the desired state, the vibration is extinguished and residual deviation may occur, and there is little change in the output value.
  • Page 213 Chapter 8 Built-in PID Function 8.6 Additional Functions of PID Command This section describes additional functions that can be conveniently used in combination with the PID command. 8.6.1 Various PID-based control methods Commonly used among PID controls are P control control, PI control, PD control and PID control. When a certain feature (mostly stabilization) is required, ID control,I control or D control is control is often used though they are somehow more complicated.
  • Page 214 Chapter 8 Built-in PID Function 8.6.4 Operation and function of cascade PDCAS performs cascade PID control through sequential operation of two PID loops. Generally, cascade PID control when used for temperature control through chemical process or fuel control; time, the here are called master loop and slave loop. As an example of temperature control through fuel flow, in case of a single loop PID control, the fuel valve is opened and closed to control the fuel flow and consequently control the temperature of the heating furnace.
  • Page 215 Chapter 8 Built-in PID Function user Cascade loop SV_mst SV_slv = MV_mst PV_mst Master loop MV_slv Slave PV_slv thermom loop eter Heating fuel valve flowmeter furnace Notes Cascade system’s auto-tuning The auto-tuning of the cascade system is performed in the order of performing the slave loop first and then performing the master loop.
  • Page 216: Hardware Configuration

    Chapter 8 Built-in PID Function 8.7 How to Use Built-in PID Control Function This section describes how to use built-in PID control function. For detailed description of the functions of the CPU, specific modules and XG5000, refer to the corresponding manuals 8.7.1 hardware Configuration The example system has a configuration as shown below.
  • Page 217 Chapter 8 Built-in PID Function signal in the range of 0~5V and transmitted to the driver. The following figure is the setting screen of XGF-DV4A in XG5000. (4) Sensor and Driver Along with the analog output module and analog input module, the sensor and driver respectively function as the media to transfer the state of the control object to the controller and transfer the controller output to the control object.
  • Page 218 Chapter 8 Built-in PID Function 8.7.2 PID control Function flow chart Program writing MV output method Manual Auto Manual operation (ON) Auto (Off) setting setting Forward/Reverse setting Manual output value SV (target value) setting PV, MV change limit setting MV upper limit, lower limit value setting Output the set manual Deadband setting...
  • Page 219 Chapter 8 Built-in PID Function 8.7.3 How to set parameters through PID monitor Initial value set to 0 before auto auto-tuning Additional parameters to be set during auto- tuning (Caution :To write the set parameter values to PLC, the monitor must be in the disabled state.) * Other parameter setting methods.
  • Page 220: Program Example1

    Chapter 8 Built-in PID Function 8.7.4 Program example1 (1) LD Program The following figure is an example of a program that performs PID control using A/D conversion module and D/A conversion module. 7-30...
  • Page 221 Chapter 8 Built-in PID Function 7-31...
  • Page 222 Chapter 8 Built-in PID Function 7-32...
  • Page 223 Chapter 8 Built-in PID Function 7-33...
  • Page 224 Chapter 8 Built-in PID Function (2) Analog I/O module and variable registration method 1) Analog I/O module registration method To use analog input and output modules, you need to register them in the project and set them appropriately. First, install the module, connect it, and then use the [I/O synchronization ] function of the the [Online]→[System Diagnosis]→[I/O information ] menu to register the module.
  • Page 225 Chapter 8 Built-in PID Function Among these, select the variables necessary to execute the user program and register them as local variables. 7-35...
  • Page 226 Chapter 8 Built-in PID Function 8.7.5 PID control(Variable monitor and Trend monitor) (1) Register parameter in variable monitor Control settings is performed by registering PID variables in the [Variable Monitoring Window]. Clicking the right button of the mouse in [Variable Monitoring Window] and then selecting [Register in Variable/Command] and then cabn see [Variable Select] window.
  • Page 227 Chapter 8 Built-in PID Function (2) SV Calculation In order to set SV, the PV value of the system desired by the user should be determined. example, in order to maintain the water level at 250mm, the PV value for 250mm should be determined. This value can be determined through numerical analysis of the system but it will be more exactly determined by experimenting with the reaction of the object.
  • Page 228 Chapter 8 Built-in PID Function (4) Observation of Control States Using the Trend Monitor Execute the [Trend monitor] of the monitor functions of XG5000. The trend monitor can be properly arranged by allowing its docking. Data to be observed are registered through the [Trend setting]. 7-38...
  • Page 229 Chapter 8 Built-in PID Function [Set the monitoring period] to 200ms and select the [trend graph] tab at the bottom to register the variables you want to monitor such as SV and PV of block 0 and loop 0. (5) Program Execution (Here an example is given to show how to find a parameter manually or auto-tuning method , refer to chapter 8.7.6) When the contact (% MX0) is On, the system starts up.
  • Page 230 Chapter 8 Built-in PID Function Set as follows: K_p = 20, T_i = 100 Because the T_i value is too large, the steady state offset lasts long and there occurs a slight overshoot. Set as follows: K_p = 10, T_i = 1. Because T_i is too small, PV fluctuates slowly.
  • Page 231 Chapter 8 Built-in PID Function 8.7.6 How to use the Auto-tuning Basically, it operates normally when the PV of the system before auto-tuning is smaller than the AT_SV value in forward control. In the case of Reverse control, on the contrary, it operates normally when the PV value of the system before auto- auto-tuning is greater than the AT_SV value.
  • Page 232 Chapter 8 Built-in PID Function The graph above is a water level waveform obtained by setting the _PID[B]_[L]HYS_val setting too small. If th e square waveform 3 does not appear clearly on the MV as above, the correct AT operation cannot be guara nteed.
  • Page 233 Chapter 8 Built-in PID Function 8.7.7 Example 2 Program The following figure is a program when changing main PID constant value and SV value setting part in the pr ogram. When PIDPRMT contact (%MX01) is turned on, user-specified U_SV, U_Ts, U_Kp, U_Ti, U_Td values are ent ered as PID parameters, and you can use the monitor window as described in chapter 8.7.3 above.
  • Page 234: Cascade Operation

    Chapter 8 Built-in PID Function 8.7.8 Cascade operation The above user program is a cascade configuration based on the block diagram below. user Cascade loop SV_mst MV_mst Master PV_mst loop(0) SV_slv AD_mst MV_slv Slave PV_slv thermon loop(1) eter AD_slv Heating fuel valve flowmeter...
  • Page 235 Chapter 8 Built-in PID Function 8.8 PID Simulation In order to check the function of PID, the system must be configured. However, by using the simulator function of XG5000, you can check the functions of various PID parameters without configuring the system. Through this, you can check the operation of PID control.
  • Page 236 Chapter 8 Built-in PID Function Set the control period to 500ms(5000). Next, set the Kp (proportional coefficient) value to 0.6 and then operate PIDRUN. You can see that the system (PV) did not reach the target value (SV) and a certain residual deviation occurred. Set the Ti (its integral and coefficient value to 4 to remove residual deviation.
  • Page 237 Chapter 8 Built-in PID Function Although the arrival time was faster than before, the system was initially unstable In order to stabilize the initial unstable system, the Td (differential coefficient) value was set to 0.00008. As a result, the system appears to be stable.
  • Page 238: Web Server Function

    Chapter 9 Web server function Chapter 9 Web service function 9.1 Web server function 9.1.1 Features XGI-CPUZ series provides web server function. Users can access the web server inside the PLC with a web browser without installing additional software, and read or write PLC information. The web server can be accessed and used by multiple users at the same time, and it provides functions to monitor basic information of PLC, diagnostic information such as error history and mode conversion history, and monitor and control PLC flag/device data.
  • Page 239 Chapter 9 Web server function You can remotely download files stored in the memory card from the PLC using a web browser or upload files stored in the PC to the memory card. 5) User page Web Server Users can create their own web pages to monitor or control PLC status. A memory card is required to use user web pages.
  • Page 240 Function admin user guest Login/logout Web server login/logout function Language selection Korean/English language conversion LS ELECTRIC homepage, SSQ Link output Supported and connection [Start screen] Web server Web Server version information output PLC information PLC basic Information output LED status...
  • Page 241: How To Use Web Server

    Chapter 9 Web server function 9.1.2 How to use Web Server (1) Web Server setting Before using the web server function, you need to set the web server in XG5000. 1) Enable the ‘web server use setting’ of [XG5000]  [Local Ethernet Parameter]  [Web Server] 2) When using a secure protocol (HTTPS), enable the ‘Use secure protocol (HTTPS)’...
  • Page 242: Dash Board Configuration

    Chapter 9 Web server function 9.1.3 Dash Board Configuration (1) Start screen Menu Description This is the function to log in to the web server. Enter the account information set in XG5000 and Login click the button to log in to the web server. Outputs the PLC information.
  • Page 243 Chapter 9 Web server function (2) Main dashboard Menu Description Outputs important information for PLC operation in the form of a dashboard. Click the button of each item to move to the detailed menu. The output dashboard item is as follows. ...
  • Page 244 Chapter 9 Web server function (3) System information 1) General information Menu Description Outputs important information for PLC operation in the form of a dashboard. Click the button of each item to move to the detailed menu. The output dashboard item is as follows. ...
  • Page 245 Chapter 9 Web server function 2) Task information Menu Description Outputs user program task cycle information in operation to PLC. You can update the task cycle information displayed on the screen by using the button Task information at the top right of the screen.
  • Page 246 Chapter 9 Web server function (4) I/O Information 1) Base Menu Description Outputs the I/O information expanded to the Base. The output item is as follows. Base connection  Mounted base information information  Mounting module information...
  • Page 247 Chapter 9 Web server function 2) EtherCAT Menu Description EtherCAT network connection status is output in tree format. EtherCAT network slave addition EtherCAT Network and deletion can be set with XG5000. The output items are as follows. Connection  Mounted slave information 9-10...
  • Page 248 Chapter 9 Web server function (5) PLC History 1) Operation Information history Menu Description The mode conversion history of PLC outputs 100 items in the order of the most recent. If you click the button on the right side of the screen, the mode conversion history is Mode change log saved in .csv format.
  • Page 249 Chapter 9 Web server function 2) Error history Menu Description The error of PLC outputs 100 items in the order of the most recent. If you click the button on the right side of the screen, the error history is saved in .csv format. You can Error Log update the error history displayed on the screen with the latest information by using the button...
  • Page 250 Chapter 9 Web server function 3) Motion error history Menu Description The motion error history of PLC outputs 100 items in the order of the most recent. If you click the button on the right side of the screen, the motion error history is saved Motion error history in .csv format.
  • Page 251 Chapter 9 Web server function (6) Monitor 1) Flag/Device monitor Menu Description This is a function to monitor flag/device information of user program operating in PLC. The motion error history of PLC outputs 100 items in the order of the most recent. You can update the flag/device monitor value displayed on the screen with the latest information by using Flag/Device Monitor...
  • Page 252 Chapter 9 Web server function 2) Motion status monitor Menu Description Outputs motion status information. You can update the motion status information displayed on the screen with the latest information by using the button Motion status monitor on the right side of the screen. You can edit the axis number to be output to the motion status monitor and the item to be monitored by using the button on the left side of the screen.
  • Page 253 Chapter 9 Web server function 3) EtherCAT Diagnostic information Menu Description Output EtherCAT diagnostic information You can update the EtherCAT Diagnosis information displayed on the screen with the latest information by using the button on the right side of the screen. You can change the output format in EtherCAT diagnostic ‘Monitor value display method’...
  • Page 254 Chapter 9 Web server function 4) Ethernet status monitor Menu Description Outputs Ethernet status information. You can update the Ethernet status information displayed on the screen with the latest information by using the button on the right side of the screen. The items output in EtherNet status Ethernet status monitor monitor are as follows.
  • Page 255 Chapter 9 Web server function (6) File browser Menu Description This is a function that can access the memory card installed in the PLC to upload and download files/folders. You can delete files/folders stored in the memory card using the button the left side of the screen.
  • Page 256 Chapter 9 Web server function (7) User page Menu Description In addition to the dashboard menu, a user-defined web page is output. The user page file is saved in the memory card, and the user page can be accessed only when the memory card is installed in the PLC.
  • Page 257: Chapter 10 I/O Module

    Chapter 10 I/O Module Chapter 10 I/O Module 10.1 Cautions for Selecting Module Here describes the notices when selecting digital I/O module used for XGI series. (1) For the type of digital input, there are two types such as current sink input and current source input. For DC input module, as the wiring method of external input power varies according to such input type, consider the specification of input connecting device when selecting.
  • Page 258 Chapter 10 I/O Module (7) Relay life of Relay output module is shown as below. Max. life of Relay used in Relay output module is shown as below. AC 125V Resistive load DC 30V Resistive load AC 250V Resistive load Open/close current(A) (8) XGK terminal block is not allowed to use solder less terminal attached with sleeve.
  • Page 259 Chapter 10 I/O Module 10.2 Digital Input Module Specification 10.2.1 8 point DC24V Input Module(Source/Sink type) Type DC input module Specifications XGI-D21A Input point 8 points Insulation method Photo coupler insulation Rated input voltage DC24V About 4 ㎃ Rated input current Operation voltage range DC20.4~28.8V (within ripple rate 5%) Input Derating...
  • Page 260 Chapter 10 I/O Module 10.2.2 16 point DC24V Input Module(Source/Sink type) Type DC input module Specifications XGI-D22A Input point 16 points Insulation method Photo coupler insulation Rated input voltage DC24V About 4 ㎃ Rated input current Operation voltage range DC20.4~28.8V (within ripple rate 5%) Input Derating None On voltage / On current...
  • Page 261 Chapter 10 I/O Module 10.2.3 16 point DC24V Input Module(Source type) Type DC input module Specifications XGI-D22B Input point 16 points Insulation method Photo coupler insulation Rated input voltage DC24V About 4 ㎃ Rated input current Operation voltage range DC20.4~28.8V (within ripple rate 5%) Input Derating None On voltage / On current...
  • Page 262 Chapter 10 I/O Module 10.2.4 32 point DC24V Input Module(Source/Sink type) Type DC input module Specifications XGI-D24A Input point 32 points Insulation method Photo coupler insulation Rated input voltage DC24V About 4 ㎃ Rated input current Operation voltage range DC20.4~28.8V (within ripple rate 5%) Input Derating Refer to the below Derating diagram.
  • Page 263 Chapter 10 I/O Module 10.2.5 32 point DC24V Input Module(Source type) Type DC input module Specifications XGI-D24B Input point 32 points Insulation method Photo coupler insulation Rated input voltage DC24V About 4 ㎃ Rated input current Operation voltage range DC20.4~28.8V (within ripple rate 5%) Input Derating Refer to the below Derating diagram.
  • Page 264 Chapter 10 I/O Module 10.2.6 64 point DC24V Input Module(Source/Sink type) Type DC input module Specifications XGI-D28A Input point 64 points Insulation method Photo coupler insulation Rated input voltage DC24V About 4 ㎃ Rated input current Operation voltage range DC20.4~28.8V (within ripple rate 5%) Input Derating Refer to the below Derating diagram.
  • Page 265 Chapter 10 I/O Module 10.2.7 64 point DC24V Input Module(Source type) Type DC input module Specifications XGI-D28B Input point 64 points Insulation method Photo coupler insulation Rated input voltage DC24V About 4 ㎃ Rated input current Operation voltage range DC20.4~28.8V (within ripple rate 5%) Input Derating Refer to the below Derating diagram.
  • Page 266: Point Ac110V Input Module

    Chapter 10 I/O Module 10.2.8 16 point AC110V Input Module Type AC Input module Specifications XGI-A12A Input point 16 points Insulation method Photo coupler insulation Rated input voltage AC100-120V(+10/-15%) 50/60㎐(±3㎐) (distortion rate < 5%) About 8 ㎃ (AC100,60㎐) , About 7 ㎃ (AC100,50㎐) Rated input current Inrush current Max.
  • Page 267: Point Ac220V Input Module

    Chapter 10 I/O Module 10.2.9 8 point AC220V Input Module AC Input Module Model name XGI-A21A Specifications Input point 8 points Insulation method Photo coupler insulation Rated input voltage AC100-240V(+10/-15%) 50/60㎐(±3㎐) (distortion rate < 5%) About 17 ㎃ (AC200,60㎐) , About 14 ㎃ (AC200,50㎐) Rated input current Inrush current Max.
  • Page 268 Chapter 10 I/O Module 10.2.10 8 point AC220V Input Module(Isolated contact point) AC Input Module Model name XGI-A21C Specifications Input point 8 points Insulation method Photo coupler insulation Rated input voltage AC100-240V(+10/-15%) 50/60㎐(±3㎐) (distortion rate < 5%) About 17 ㎃ (AC200,60㎐) , About 14 ㎃ (AC200,50㎐) Rated input current Inrush current Max.
  • Page 269 Chapter 10 I/O Module 10.3 Digital output module specification 10.3.1 8 point relay output module Type Relay output module Specifications XGQ-RY1A Output point 8 points Insulation method Relay insulation Rated load voltage/current DC24V 2A(resistive load) / AC220V 2A(COS = 1) Min.load voltage/current DC5V 1mA Max.
  • Page 270: Point Relay Output Module

    Chapter 10 I/O Module 10.3.2 16 point relay output module Type Relay output module Specifications XGQ-RY2A Output point 16 points Insulation method Relay insulation Rated load voltage/current DC24V 2A(resistive load) / AC220V 2A(COS = 1) Min.load voltage/current DC5V 1mA Max. load voltage/current AC250V 2A, DC125V 2A Off leakage current 0.1mA (AC220V, 60Hz)
  • Page 271 Chapter 10 I/O Module 10.3.3 16 point Relay Output Module (Surge Killer Type) Type Relay output module Specifications XGQ-RY2B Output point 16 points Insulation method Relay insulation Rated load voltage/current DC24V 2A(resistive load) / AC220V 2A(COS = 1) Min.load voltage/current DC5V 1mA Max.
  • Page 272: Point Triac Output Module

    Chapter 10 I/O Module 10.3.4 16 point Triac output module Type Triac output module Specifications XGQ-SS2A Output point 16 points Insulation method Photo coupler insulation Rated load voltage AC 100-240V (50 / 60 Hz) Max. load voltage AC 264V Max. load current 0.6A / 1 point 4A / 1COM Min.
  • Page 273 Chapter 10 I/O Module 10.3.5 16 point transistor output module(Sink type) Type Transistor output module Specifications XGQ-TR2A Output point 16 points Insulation method Photo coupler insulation Rated load voltage DC 12V / 24V Load voltage range DC 12.2~ 26.4V Max. load current 0.5A / 1 point, 4A / 1COM Off leakage current 0.1mA or less...
  • Page 274 Chapter 10 I/O Module 10.3.6 32 point transistor output module(Sink type) Type Transistor output module Specifications XGQ-TR4A Output point 32 points Insulation method Photo coupler insulation Rated load voltage DC 12V / 24V Load voltage range DC 12.2~ 26.4V Max. load current 0.1A / 1 point, 2A / 1COM Off leakage current 0.1mA or less...
  • Page 275 Chapter 10 I/O Module 10.3.7 64 point transistor output module(Sink type) Type TR output module Specifications XGQ-TR8A Output point 64 points Insulation method Photo coupler insulation Rated load voltage DC 12V / 24V Load voltage range DC 12.2~ 26.4V Max. load current 0.1A / 1 point, 2A / 1COM Off leakage current 0.1mA or less...
  • Page 276 Chapter 10 I/O Module 10.3.8 16 point TR output module(Source type) Type TR output module Specifications XGQ-TR2B Output point 16 points Insulation method Photo coupler insulation Rated load voltage DC 12V / 24V Load voltage range DC 12.2~ 26.4V Max. load current 0.5A / 1 point, 4A / 1COM Off leakage current 0.1mA or less...
  • Page 277 Chapter 10 I/O Module 10.3.9 32 point TR output module(Source type) Type TR output module Specifications XGQ-TR4B Output point 32 points Insulation method Photo coupler insulation Rated load voltage DC 12V / 24V Load voltage range DC 12.2~ 26.4V Max. load current 0.1A / 1 point, 2A / 1COM Off leakage current 0.1mA or less...
  • Page 278 Chapter 10 I/O Module 10.3.10 64 point TR output module(Source type) Type TR output module Specifications XGQ-TR8B Output point 64 points Insulation method Photo coupler insulation Rated load voltage DC 12V / 24V Load voltage range DC 12.2~ 26.4V Max. load current 0.1A / 1 point, 2A / 1COM Off leakage current 0.1mA or less...
  • Page 279 Chapter 10 I/O Module 10.3.11 8 point TR output module(isolated contact point) Type TR output module Specifications XGQ-TR1C Output point 8 points Insulation method Photo coupler insulation Rated load voltage DC 12V / 24V Load voltage range DC 12.2~ 26.4V Max.
  • Page 280 Chapter 10 I/O Module 10.4 Digital I/O hybrid module specification 10.4.1 32 point (DC Input · Transistor Output) I/O hybrid module XGH-DT4A Input Output Input point 16 points Output point 16 points Insulation method Photocoupler isolation Insulation method Photocoupler isolation Rated input voltage DC 24V Rated load voltage...
  • Page 281 Chapter 10 I/O Module 10.5 Event Input Module Specification 10.5.1 Event Input Module (Source/Sink type) Item XGF-SOEA Input point 32 point/COM Insulation method Photo coupler insulation Memory si z e 1Mbit Records 1Mbit event information (300 event information per XGF-SOEA module) Event time Internal time:PLC time, External time : External time server time Internal time :1ms (precision : ±2ms)
  • Page 282 10.6.1 Module accessible to Smart Link From digital I/O modules used for XGT Series, the modules accessible to Smart Link are as follows. 32 point modules need a Connector(40 Pin x 1), 64 point modules need 2 connectors(40 Pin x 2)
  • Page 283 Chapter 10 I/O Module 10.6.3 Smart Link Mapping Table ❶ : Module using 1ea Cable , ❷ : Module using 2ea Cable XGT PLC (Digital I/O Module) LS Smart Link Mapping Table Cable Description Sets ❶ ❶ ❷ ❷ ❶ ❶...
  • Page 284 Chapter 10 I/O Module 10.6.5 Smart Link Connection Diagram (1) XGI-D24A/B 1) Applicable Smart Link Product name Cable Length of Cable C40HF-05PB-1B 0.5m C40HF-10PB-1B TG7-1H40S C40HF-15PB-1B 1.5m C40HF-20PB-1B Terminal C40HF-30PB-1B block C40HF-05PB-1B 0.5m Board C40HF-10PB-1B TG7-1H40CA C40HF-15PB-1B 1.5m (20Pin1Common assembled) C40HF-20PB-1B C40HF-30PB-1B 2) Connection diagram (XGI-D24A/B)
  • Page 285 Chapter 10 I/O Module b) TG7-1H40CA Common Contacts set1 Common Contacts set2 10-29...
  • Page 286 Chapter 10 I/O Module (2) XGI-D28A/B 1) Applicable Smart Link Product name Cable Length of Cable C40HF-05PB-1B 0.5m C40HF-10PB-1B TG7-1H40S C40HF-15PB-1B 1.5m C40HF-20PB-1B Terminal C40HF-30PB-1B block C40HF-05PB-1B 0.5m Board C40HF-10PB-1B TG7-1H40CA C40HF-15PB-1B 1.5m (20Pin1Common assembled) C40HF-20PB-1B C40HF-30PB-1B 2) Connection diagram (XGI-D28A/B) a) TG7-1H40S 10-30...
  • Page 287 Chapter 10 I/O Module b) TG7-1H40CA Common Contacts set1 Common Contacts set2 10-31...
  • Page 288 Chapter 10 I/O Module (3) XGQ-TR4A/8A 1) Applicable Smart Link Product name Cable Length of Cable C40HF-05PB-1B 0.5m C40HF-10PB-1B TG7-1H40S C40HF-15PB-1B 1.5m C40HF-20PB-1B Terminal C40HF-30PB-1B block C40HF-05PB-1B 0.5m Board C40HF-10PB-1B TG7-1H40CA C40HF-15PB-1B 1.5m (20Pin1Common assembled) C40HF-20PB-1B C40HF-30PB-1B C40HF-05PB-1 0.5m C40HF-10PB-1 Relay R32C-NS5A-40P C40HF-15PB-1...
  • Page 289 Chapter 10 I/O Module b) TG7-1H40CA Common Contacts set1 Common Contacts set2 R32C-NS5A-40P 10-33...
  • Page 290 Chapter 10 I/O Module (4) XGQ-TR4B/8B 1) Applicable Smart Link Product name Cable Length of Cable C40HF-05PB-1B 0.5m C40HF-10PB-1B TG7-1H40S C40HF-15PB-1B 1.5m C40HF-20PB-1B C40HF-30PB-1B Terminal board C40HF-05PB-1B 0.5m C40HF-10PB-1B TG7-1H40CA C40HF-15PB-1B 1.5m (20Pin1Common assembled) C40HF-20PB-1B C40HF-30PB-1B C40HF-05PB-XGP1 0.5m C40HF-10PB-XGP1 Relay R32C-PS5A-40P C40HF-20PB-XGP1 board...
  • Page 291 Chapter 10 I/O Module b) TG7-1H40CA Common Contacts set1 Common Contacts set2 c) R32C-PS5A-40P 10-35...
  • Page 292 Chapter 10 I/O Module (5) XGF-SOEA 1) Applicable Smart Link Product name Cable Length of Cable C40HF-05PB-1B 0.5m C40HF-10PB-1B TG7-1H40S C40HF-15PB-1B 1.5m C40HF-20PB-1B Terminal C40HF-30PB-1B block C40HF-05PB-1B 0.5m Board C40HF-10PB-1B TG7-1H40CA C40HF-15PB-1B 1.5m (20Pin1Common assembled) C40HF-20PB-1B C40HF-30PB-1B 2) Connection diagram (XGF-SOEA) a) TG7-1H40S 10-36...
  • Page 293 Chapter 10 I/O Module b) TG7-1H40CA Common Contacts set1 Common Contacts set2 10-37...
  • Page 294 Chapter 10 I/O Module 10.6.6 Smart Link Specifications and Dimensions (1) TG7-1H40S 1) Specifications Rated voltage AC, DC 125V Rated current Withstanding Voltage 600V 1min 100MΩ (DC 500V) Insulation resistor 1.25㎟ /MAX Cable T/B screw M3 X 10L 1.2N • m(12Kgf • cm) Screw torque Case Modified PPO(Noryl)(UL 94V-0)
  • Page 295 Chapter 10 I/O Module (2) TG7-1H40CA 1) Specifications Rated voltage 125V AC / 24V DC Rated current Common 10A (Total) 100MΩ (DC 500V) Insulation resistor Withstand voltage AC500V 1min AWG22-16 (MAX / 1.5 ㎟) Wire Terminal Screw M3 X 10L 1.2N •...
  • Page 296 Chapter 10 I/O Module (3) R32C-N(P)S5A-40P 1) Specifications A) Relay board Case Modified PPO Protective cover Polycarbonate Epoxy 1.6t / 2oz AWG22-16 (MAX / 1.5 ㎟) Wire Terminal Screw M3 X 8L 1.2N • m(12Kgf • cm) Screw torque Ambient temperature -10℃...
  • Page 297: Chapter 11 Power Module

    Chapter 11 Power Module Chapter 11 Power Module Here describes the selection method, type and specification of power module. 11.1 Selection Method Power Module selection of power module is determined by the current that input Power Module voltage and power module should supply to the system, that is, the sum of current consumption of digital I/O module, special module and communication module that Current Consumption installed on a same base with the power module.
  • Page 298 Chapter 11 Power Module Current Current Product Type Product Type consumption consumption XGL-PMEB Motion control XGF-M32E Pnet I/F XGL-PSEA Thermo couple input XGF-TC4S XGL-PSRA XGF-RD4/8A RTD input XGL-DSEB XGF-RD4S Dnet I/F XGL-DMEB XGB-M12A Rnet I/F XGL-RMEB XGB-M10A Fnet XGL-FMEA Main base XGB-M08A BACnet/IP XGL-BIPT...
  • Page 299: Specifications

    Chapter 11 Power Module 11.2 Specifications Item XGP-ACF1 XGP-ACF2 XGP-AC23 XGP-AC14 XGP-AC24 XGP-DC42 Rated input voltage AC110/220V AC220V AC110V AC220V DC24V AC170V ~ AC85V~ AC170V ~ Input voltage range AC85V ~ AC264V AC264V AC132V AC240V 50 / 60 Hz (47 ~ 63 Hz) Input frequency 80APeak or less 80APeak or...
  • Page 300: Part Names

    Chapter 11 Power Module 11.3 Part names Here describes the names of each part and its purpose of Power module. ① ② ③ ④ ⑤ ⑥ ⑦ Name Usage Power LED DC5V power display LED ▶ XGP-ACF2, XGP-AC23 XGP-AC14, XGP-AC24 does not provide Power supply to the module required for DC24V in output module DC24V, 24G terminal DC24V.
  • Page 301 Chapter 11 Power Module 11.4 Example of Current Consumption/Power Calculations It describes which power module should be used for the XGT system with the following module. Number of Voltage system Type Model name installation CPU Module XGI-CPUH 0.96A Main base 12 slot XGB-B12M 0.23A Input module...
  • Page 302 Chapter 12 Base and Extension Cable Chapter 12 Base and Extension Cable 12.1 Specifications 12.1.1 Main base The basic base mounts the power module, CPU module, I/O module, special module, and communication module. Type XGB-M12A XGB-M10A XGB-M08A XGB-M06A XGB-M04A Item No.
  • Page 303 Chapter 12 Base and Extension Cable 12.1.3 Extension cable Type XGC-E041 XGC-E061 XGC-E121 XGC-E301 XGC-E501 XGC-E102 XGC-E152 Item Length(m) Weight(kg) 0.15 0.16 0.22 0.39 0.62 Notes If using a combination with extension cable, it should not be longer than 15m. 12-2...
  • Page 304 Chapter 12 Base and Extension Cable 12.2 Part Names 12.2.1 Main base Guide hole to attach to the Power module Module attachment b Hole to attach the base to Connector to attach a Connector to attach the panel a power module I/O module module Extension...
  • Page 305: Chapter 13 Installation And Wiring

    Chapter 13 Installation and Wiring Chapter 13 Installation and Wiring 13.1 Installation 13.1.1 Installation Environment This equipment has a high reliability regardless the installation environment. However, to guarantee the reliability and stability, make sure to keep the following cautions. (1) Environment Condition 1) Install in a control panel resisting to moisture and vibration.
  • Page 306 Chapter 13 Installation and Wiring The following shows the calculation of PLC system’s power consumption requiring heat protective design. 4) Power Consumption block diagram of the PLC system Power Comm Comm Output Input Special AC Power (100V unicatio unicatio DC5V 240V) Constant voltage...
  • Page 307: Handling Precautions

    Chapter 13 Installation and Wiring • W = W Calculate the heats according to the entire power consumption (W) and review the temperature increase within the control panel. The calculation of temperature rise within the control panel is displayed as follows. T = W / UA [C] W : Total current consumption of PLC system(the value obtained on the above) A : surface area of control panel [m...
  • Page 308 Chapter 13 Installation and Wiring 5) Wiring • In case of wiring IO with high voltage line or power line, induced noise may cause error. • No cable should not be arranged front of I/O operation display (LED)(I/O display may be hidden, hindering the interpretation) •...
  • Page 309 Chapter 13 Installation and Wiring (2) Cautions for installing the base It describes the cautions when installing the PLC on the control panel and others. 1) A proper distance between the top of a module and structure/parts should be secured to facilitate ventilation and module replacement.
  • Page 310 Chapter 13 Installation and Wiring 6) Please do not install it to the direction as presented below. 7) To avoid any influence of radiating noise or heat, please install the PLC and other devices (relay, electronic contact) with a spacing secured as presented below. 100mm or higher 100mm or higher 13-6...
  • Page 311 Chapter 13 Installation and Wiring 50mm or higher 50mm or higher 13-7...
  • Page 312: Attachment/Detachment Of Module

    Chapter 13 Installation and Wiring 13.1.3 Attachment/Detachment of Module It describes how to attach or detach a module on the base. (1) module mounting • Please insert the fixation projection on the bottom of a module to the hole of module installation of the base. •...
  • Page 313 Chapter 13 Installation and Wiring (2) Detachment of module • Please unscrew the fixation screw on the top of a module. • Please press the hook for module installation with a module held by both hands. • Please pull the bottom of a module toward the top while pressing the hook. •...
  • Page 314: Wiring Precautions

    Chapter 13 Installation and Wiring 13.2 Wiring It describes the important information about wiring when using the system. 13.2.1 Wiring Precautions 1) The length of connecting cable between CPU and EtherCAT Slave device shall be as short as possible. 2) Use a separate cable from AC power for the signal line connected to the CPU and EtherCAT slave device, and make sure that it is not affected by surges or induced noise from the AC side.
  • Page 315 Chapter 13 Installation and Wiring 3) Isolate the PLC power, I/O devices and power devices as follows. Power Main power PLC power Constant voltage AC220V transformer Input/output power Main circuit device 4) In case of using a DC24V output of Power Module ...
  • Page 316: I/O Module Wiring

    Chapter 13 Installation and Wiring Notes 1) Isolate the grounding (E1) of lightning surge absorber from the grounding (E2) of the PLC. 2) Select a lightning surge absorber type so that the max. Voltage may not the specified allowable voltage of the absorber.
  • Page 317: Cable Specification For Wiring

    Chapter 13 Installation and Wiring 3) If the exclusive grounding is not possible, use the common grounding as presented in B) of the figure below. Other Other Other device device device Type 3 Grounding Type 3 Grounding A) Exclusive grounding: best B) common grounding: good C) common grounding: defective 4) Use the grounding cable more than 2 mm...
  • Page 318: Chapter 14 Maintenance And Repair

    Chapter 14 Maintenance and Repair Chapter 14 Maintenance and Repair Be sure to perform daily and periodic maintenance and inspection in order to maintain the PLC best conditions. 14.1 Maintenance and Inspection The PLC Products mainly consist of semiconductor devices and its service life is semi-permanent. However, periodic inspection is requested for ambient environment may cause damage to the devices.
  • Page 319: Daily Inspection

    Chapter 14 Maintenance and Repair 14.2 Daily inspection The following table shows the inspection and items which are to be checked daily. Check Items Check Points Judgment Action Retighten Base attachment state Check the screws. Screws should not be loose. Screws.
  • Page 320: Periodic Inspection

    Chapter 14 Maintenance and Repair 14.3 Periodic Inspection Check the following items once or twice every six months, and perform corrective actions as needed. Check Items Checking Methods Judgment Action Ambient 0 ~ 55 C Adjust to general operating temperature Measured with a standard (Internal atmospher...
  • Page 321: Requirements For Conformance To Emc Directive

    Chapter 15 Compliance with EMC Specifications Chapter 15 Compliance with EMC Specifications 15.1 Requirements for Conformance to EMC Directive The EMC Directive specifies the products must 'be so constructed that they do not cause excessive electromagnetic interference (emissions) 'and 'are not unduly affected by electromagnetic interference (immunity)'. The applicable products are requested to meet these requirements.
  • Page 322: Control Panel

    Chapter 15 Compliance with EMC Specifications 15.1.2 Control Panel The PLC is an open type device (device installed to another device) and must be installed in a control panel. This is because an accident such as electric shock does not occur when a person comes into contact with the product (XGT PLC), and the noise generated in the PLC has the effect of attenuating the control panel.
  • Page 323 Chapter 15 Compliance with EMC Specifications (2) Connection of power and earth wires Earthing and power supply wires for the PLC system must be connected as described below. 1) Earth the control panel with a thick wire so that a low impedance connection to ground can be ensured even at high frequencies.
  • Page 324 (2) How to fix the cable in the panel When fixing the extension cable of the XGT series to the metal control panel, keep the extension cable at least 1 cm so that the extension cable does not directly contact the metal plate.
  • Page 325: Requirement To Conform To The Low-Voltage Directive

    The low-voltage directive requires each device that operates with the power supply ranging from 50V to 1000VAC and 75V to 1500VDC to satisfy the safety requirements. Cautions and installation and wiring of the series PLC XGT series to conform to the low-voltage directive are described in this section.
  • Page 326 Chapter 15 Compliance with EMC Specifications 15-6...
  • Page 327: Chapter 16 Troubleshooting

    Chapter 16 Troubleshooting Chapter 16 Troubleshooting The following explains contents, diagnosis and corrective actions for various errors that can occur during system operation. 16.1 Basic Procedure of Troubleshooting System reliability not only depends on reliable equipment but also on short downtimes in the event of fault. To start the system promptly, it is more important to find the trouble occurring cause promptly and take the necessary action.
  • Page 328 Chapter 16 Troubleshooting 16.2 Troubleshooting This section explains the procedure for determining the cause of troubles as well as the errors and corrective actions. Trouble PLC Power (PWR) LED is Off Action method when Power LED is OFF Err. LED turn On Action method when Error LED is On.
  • Page 329: Action When Power Led Is Off

    Chapter 16 Troubleshooting 16.2.1 Action when Power LED is OFF Here describes the action procedure when Power LED is OFF while supplying the power or during operation. Power LED is OFF Supply the power. Is the power supplying? Is Power LED ON? Is the power voltage within the Is the incoming voltage within allowable voltage rage?
  • Page 330: Action When Err Led Is Blinking

    Chapter 16 Troubleshooting 16.2. 2 Action when ERR LED is blinking Here describes the action procedure when ERROR LED is blinking in case of power supply, or when operation starts, or during operation. Is ERR LED blinking? Connect XG5000 and check the error code contents.
  • Page 331 Chapter 16 Troubleshooting 16.2.3 Action when Run, Stop LED is OFF Here describes the action procedure when RUN, STOP LED is OFF in case of power supply, when operation starts or during operation. RUN, STOP LED is OFF Power module OFF → ON Is RUN, STOP LED OFF ? Complete Please...
  • Page 332: Action When I/O Module Does Not Work Normally

    Chapter 16 Troubleshooting 16.2.4 Action when I/O Module does not work normally Here describes the action procedure when I/O Module does not work normally during operation, as shown on the program example below. I/O modules are not correctly reading and/or controlling field devices Is Output module output to SOL1 LED Measure SOL1 terminal voltage...
  • Page 333 Chapter 16 Troubleshooting Continue Are the Input module LEDs for SWITCH1 and SWITCH2 On? Measure the terminal voltage of Measure the terminal voltage of SWITCH 1, 2 by the tester. SWITCH 1, 2 by the tester. Are the module screw Do the inputs work as expected? Do the inputs work as expected? terminals tightened?
  • Page 334 Chapter 16 Troubleshooting 16.2.5 Action when PROGRAM WRITE does not work Here describes the action procedure when PROGRAM WRITE does not work in CPU Module. Program Write does not work Turn the RUN/STOP switch to STOP and execute Writing Is the Run/Stop switch set to STOP Program.
  • Page 335: Questionnaire For Troubleshooting

    Chapter 16 Troubleshooting 16.3 Questionnaire for Troubleshooting If the trouble occurs when using XGK series, fill in the following questionnaire and then contact customer’s service center by phone or FAX.  For errors relating to special or communication modules, use the questionnaire included in the User’s manual of the module. 1.
  • Page 336 Chapter 16 Troubleshooting 16.4 Cases Here describes the trouble type and measures for each circuit. 16.4.1 Input Circuit Error Type and Corrective Actions Here describes the trouble examples of input circuit and its measures. Symptom Causes Measures  Connect the proper resistance and capacity so that Leakage current of external device Input signal (Such as a drive by proximity switch)
  • Page 337 Chapter 16 Troubleshooting 16.4.2 Output Circuit Error Type and Corrective Actions Here describes the trouble examples of output circuit and its measures. Symptom Causes Measures Load is half-wave rectified inside (in some  Connect registers of tens to hundreds KΩ across the Over voltage cases, it is true of a solenoid) load in parallel.
  • Page 338 Chapter 16 Troubleshooting Output circuit troubles and corrective actions (continued). Symptom Causes Measures  Over current at off state Insert a small L/R magnetic contact and drive the The load off response time The large solenoid current fluidic load (L/R is load using the same contact.
  • Page 339: Chapter 1 Motion Control Operation

    Chapter 1 Motion Control Operation Part 2 Motion Control Describes the contents of Motion’s programming, operating and monitoring. Chapter 1 Motion Control Operation This chapter describes structure, parameter and device of motion controller. 1.1 Motion Specifications Classification XGI-CPUZ7 XGI-CPUZ5 XGI-CPUZ3 Real/Virtual Axes Up to 32 axis Up to 16 axis...
  • Page 340 Chapter 1 Motion Control Operation 1.2 Motion control operation structure This picture describes process of program and data saved in the motion controller. XGI-CPUZ...
  • Page 341 Chapter 1 Motion Control Operation 1.3 Motion control structure In motion control, 32 slaves (servo drive and inverter) among up to 64 slaves connected through the EtherCAT network can be assigned to real axes to perform axis control, and 4 axes are provided exclusively for virtual axes. Among 32 axes, you can control the axes that are not connected to the slave by setting them as virtual axes, In addition to the input and output modules installed in the PLC, it is possible to control up to 64 EtherCAT I/O (including servo drives and inverters assigned to axes).
  • Page 342: Motion Parameter

    Chapter 1 Motion Control Operation 1.3 Motion Parameter 1.3.1 Master (1) General information It sets the master functions related to the EtherCAT slave connection when connecting to the network. The items for master setting are as follows. Item Contents Setting range Initial value Specify whether to check the revision Slave Revision...
  • Page 343 Chapter 1 Motion Control Operation is found, the network configuration mismatch error (error code: 0x0F1F) occurs and the communication connection process is terminated. When the slave revision check criterion is to‘0:Do not check’, if the slave that is incompatible with the Revision of the slave parameter is connected, it may not operate normally.
  • Page 344 Chapter 1 Motion Control Operation - 1: Do not check connection order Regardless of the connection order, it is an operation mode that connects to the slave setting of the station number that matches the value set in the node switch. Slave moved by node switch setting must use the same slave. - 2: Unused node switch This is an operation mode that does not use node switched.
  • Page 345 Chapter 1 Motion Control Operation (2) PDO variable information It shows the information on the memory allocation of PDO data of the registered slave. If you want to register the variable name and use it in the program, you can register the variable to be used in the program by selecting "Register Variable".
  • Page 346 Chapter 1 Motion Control Operation 1.3.2 Slave (1) General information Check the information of EtherCAT slave to be used for network connection. It can be identified on the Slave Information tab displayed after executing ‘Open’ of each slave connected to the sub-trees of [EtherCAT parameters]-[Slave] on the XG5000 project tree.
  • Page 347 Chapter 1 Motion Control Operation c) Vendor The vendor name of the selected slave is automatically displayed. The user cannot change it arbitrarily. d) Version The Revision information of the selected slave is displayed automatically. The user cannot change it arbitrarily. e) Serial number The serial number of the selected slave is displayed.
  • Page 348 Chapter 1 Motion Control Operation The synchronous data allocated here is automatically assigned to I/O devices and it can be registered as I/O variables and referred in the user program. For example, the ‘Controlworld’ object of RxPDO synchronous data of L7N servo drive connected to the slave 1 is registered as I/O flag Rx1_1_0_ControlWord (%QW64).
  • Page 349 Chapter 1 Motion Control Operation Notes The configuration of the transition follows the below EtherCAT state transition diagram. (5) Online service This is a function that supports downloading firmware from PLC to the slave in bootloader state using the FoE (File Access over EtherCAT) function.
  • Page 350: Axis Parameter

    Chapter 1 Motion Control Operation 1.3.3 Axis parameter (1) Axis/Slave connection There are two types of axes that can be controlled by the controller; a real axis and a virtual axis. The actual axis is the axis allocated to the actual EtherCAT slave, and the virtual axis is arbitrarily generated and controlled within the controller. The slave registered as the EtherCAT slave can be assigned as the axis that can be controlled by the controller.
  • Page 351 Chapter 1 Motion Control Operation Gear ratio(Machine) load. 1~65535 Specify the operation method in case Operation mode of 0: Deceleration stop 0: Deceleration operation direction is reversed in the input the reverse rotation 1: Immediate stop stop conditions of newly executed command. Set whether to use the used function by Position Control 0: Unused...
  • Page 352 Chapter 1 Motion Control Operation f) Emergency stop deceleration Deceleration in the event of a sudden stop sets the deceleration for situations where a sudden stop needs to be made while operating the axis due to internal or external factors. Conditions for a emergency stop are as follows. In case the software upper limit/lower limit is detected.
  • Page 353 Chapter 1 Motion Control Operation If the 「unit」setting is ‘0: pulse’, this parameter is invalid. [Example] When the machine which is moved by ball screw is connected to the encoder with gear, the setting of the encoder unit / Encoder Pulses per rotation / Encoder Travel per rotation is as follows. ·...
  • Page 354 Chapter 1 Motion Control Operation 0: Deceleration stop 1: Immediate stop j) Position Control Range Expansion Set whether to use the used function by expanding a controllable position range when controlling positions. An error occurs when a position exceeds the position control range after conversing the unit position set to LREAL into the pulse unit when specifying the target position in motion control commands.
  • Page 355 Chapter 1 Motion Control Operation 2) Extended parameter The following explains extended parameter of operation parameter Item Contents Setting range Initial value S/W upper limit 2147483647 pls Set the range of software limit function Long real(LREAL) S/W low limit -2147483648 pls Set repeated position range value in case Infinite running repeat Long real (LREAL)
  • Page 356 Chapter 1 Motion Control Operation Jog low speed deceleration / jerk which is referred in jog positive number 10000 pls/s JOG acceleration operation command 100000 pls/s 0 or Long JOG deceleration real(LREAL) positive 100000 pls/s number JOG Jerk 0 pls/s Set the value to compensate backlash of 0 or Long Backlash compensation...
  • Page 357 Chapter 1 Motion Control Operation c) Infinite running repeat It sets whether to enable or disable 'Infinite running repeat'. If this parameter is set to ‘1: Allow’, the command position and current position display are automatically updated periodically within the range set in the infinite length repeat position. You must set it to ‘0: Disable’ when you are not using the infinite running repeat operation function.
  • Page 358 Chapter 1 Motion Control Operation In the following situations, the error in tracking error is not examined. In case the「Tracking error over-range value」is 0  In case of the operation in homing or torque control  g) Current position compensation amount Current position compensation amount is a parameter unit used to display the current position value as the command position when the servo motor’s current position value is not displayed as a fixed value but changed slightly depending on personal setting of the user application and the servo drive.
  • Page 359 Chapter 1 Motion Control Operation ③ Current position compensation amount = 100 pls If the current position value is within ±100 of command position after the end of operation, it is displayed as the command position value. h) Current speed filter time constant Set the time to calculate movement average of the current speed.
  • Page 360 Chapter 1 Motion Control Operation ① Current speed filter time constant = 0 ms ② Current speed filter time constant = 50 ms ③ Current speed filter time constant = 100 ms i) Error reset monitoring time Set the monitoring time in case of resetting error that occurs in servo drive If the error which occurred in the servo drive within the error reset monitoring time(unit: ms), error reset monitoring is terminated and error reset time out error of servo drive (error code: 0x1070) is occurred.
  • Page 361 Chapter 1 Motion Control Operation ‘0: Not detect’ If it is under the speed control even when the software limit function is activated, software limit is not detected. ‘1: Detect’ If it is under the speed control even when the software limit function is activated, software limit is detected. Even when the parameter value is set to '1: detect', if the software upper limit/lower limit is set to the initial value (upper limit:2,147,483,647, lower limit:-2,147,483,648) or the same value, software limit is not detected.
  • Page 362 Chapter 1 Motion Control Operation Move 1m to the right GEAR Change of (Forward Direction) direction Backlash Move 1m to the left Occurence (Reverse Direction) Movement including backlash compensation Backlash The backlash compensation amount can be set to the pulse unit from 0 to 65535. If the ‘Unit’ parameter value is not ‘0: pulse’, Please set a range as follows: 0 ≤...
  • Page 363 Chapter 1 Motion Control Operation The Feed Forward Gain of Set the feed forward gain value that the spindle the Spindle Positioning 0 ~ 100 % axis uses when controlling position. Mode a) Select the Spindle Encoder The spindle axis is basically operated by speed control. But there are some cases where the position control op eration such as the orientation operation is needed according to NC operation.
  • Page 364 Chapter 1 Motion Control Operation c) Spindle EtherCAT encoder position variable/address If the ‘spindle encoder selection’ parameter is set to ‘4: EtherCAT ENC’, the position value of the encoder read f rom the EtherCAT slave sets the saved variable/address. You can specify the input variable (I) and direct variabl e (M).
  • Page 365 Chapter 1 Motion Control Operation 4) NC Spindle homing setting Explain about the NC spindle homing setting of axis parameters. Item Contents Setting range Initial value 0: Servo drive supported 33:Reverse direction, Z Set the homing operation method that is phase How to conduct the 0: Servo drive...
  • Page 366 Chapter 1 Motion Control Operation Set the Z phase position as the homing after executing the homing operation on the NC function module o f a controller and starting forward operation. When executing the NC_Home command, execute the homing operation with parameters, zero navigation speed of the homing operation and acceleration/deceleration of t he homing operation.
  • Page 367 Chapter 1 Motion Control Operation Orientation offset When the M19 Orientation command is executed on the NC program, set the target position value of the Orient ation operation. After starting operation in the direction set to the ‘Orientation direction’ parameter, stop it at the p osition set to the ‘Orientation offset’.
  • Page 368 Chapter 1 Motion Control Operation 1.3.4 Axis groups parameter (1) Basic setting Basic setting item is explained as follows. Item Contents Setting range Initial value Configuration axis Refer to Axis Support Range Set the axis which form axis group. None 01~10 by Product Type Interpolation...
  • Page 369 Chapter 1 Motion Control Operation Coordinate Set the parameters of the machine depending system on the type of coordinate system. parameter (a) XYZ XYZ is a robot where the axis set in 「axis setting 1」in X-axis, the axis set in 「axis setting2」in Y-axis, and the axis set in 「axis setting 3」in Z-axis make a one-to-one correspondence and move in Cartesian coordinate.
  • Page 370 Chapter 1 Motion Control Operation (d) T-Gantry/R The T-Gantry robot does not need the parameter setting of a separate mechanism. (3)Tool setting Tool setting item is explained as follows. Item Contents Setting range Initial value X-axis offset Set the X axis offset at the end(tool) of robot Long real(LREAL) Y-axis offset Set the Y axis offset at the end(tool) of robot...
  • Page 371 Chapter 1 Motion Control Operation Cylinder Parameter Value Z Axis Radius Workspace parameter1 Radius(mm) Workspace parameter2 Z min(mm) Workspace parameter3 Z max(mm) X Axis Delta Parameter Value Z Axis YAxis Workspace parameter1 Zu(mm) Workspace parameter2 Hcy(mm) Workspace parameter3 Hco(mm) Workspace parameter4 Rcy(mm) Workspace parameter5 Rco(mm)
  • Page 372 Chapter 1 Motion Control Operation to PCS origin. Set Y-axis move distance from MCS origin Y axis movement Long real(LREAL) 0 mm to PCS origin. Set Z-axis move distance from MCS origin Z axis movement Long real(LREAL) 0 mm to PCS origin. X axis rotation Set X-axis rotation value of PCS.
  • Page 373: Ethercat Communication

    Chapter 1 Motion Control Operation 1.4 EtherCAT Communication The communication of EtherCAT(Ethernet for Control Automation Technology) is explained here. 1.4.1 What is EtherCAT? EtherCAT is a high-performance industrial network system which uses Real-Time Ethernet based on the Ethernet developed by Beckhoff Company in Germany.
  • Page 374 Chapter 1 Motion Control Operation 1.4.3 EtherCAT Status The state and motion between states of EtherCAT communication are shown in the figure below. Init (PI) (IP) Pre-Operational (SI) (OI) (PS) (SP) (OP) Safe-Operational (SO) (OS) Operational The communication between the master-slave of EtherCAT communication begins from the Initial state and progresses to the Operational state.
  • Page 375 Chapter 1 Motion Control Operation 1.4.4 EtherCAT Process Data Objective(PDO) The synchronous data communication in EtherCAT communication of motion controller occurs through process data object (PDO). TxPDO which is transmitted from the slave to motion controller, and RxPDO which is transmitted from motion controller to the slave. In RxPDO and TxPDO, data which are going to be synchronous communication can be put together to be set as the example of the figure below shows among the data defined in the Object Dictionary.
  • Page 376 Chapter 1 Motion Control Operation 1.4.5 MultiFrame setting function In EtherCAT communication, “frame” refers to a data set transmitted once per cycle when exchanging data between master and slave during communication. In the figure below, the buffer moving along the yellow line, that is, a set of contiguous blocks is a frame. Master Slave1 Slave2...
  • Page 377 Chapter 1 Motion Control Operation 1.4.6 EtherCAT Communication Specification Item Specifications Communication protocol EtherCAT Support specification CoE(CANopen over EtherCAT) Physical layer 100BASE-TX Communication speed 100Mbps Topology Daisy Chain Communication cable Cat. 5 STP(Shielded Twisted-pair) cable Number of maximum 64(Able to mapping Max. 32 drive to motion axis) slave Communication period 1ms ~ 20ms (According to main task period)
  • Page 378 Chapter 1 Motion Control Operation (2) using Branches EtherCAT Master EtherCAT Slave EtherCAT Slave EtherCAT Slave Junction Slave EtherCAT EtherCAT Slave EtherCAT Slave EtherCAT Slave (3) Cable Duplication Configuration EtherCAT Slave EtherCAT Slave EtherCAT Slave EtherCAT Master Junction Slave EtherCAT 2) Cautions 1) When connecting to EtherCAT slaves, be careful of not connecting to In/Out in reverse.
  • Page 379 Chapter 1 Motion Control Operation 1.4.8 EtherCAT network Setting 1) Set Network in the Project Tree (1) To add slaves on the EtherCAT network, select “Add Items - Add Slaves” by clicking on the right mouse button over slaves in the project tree.
  • Page 380 Chapter 1 Motion Control Operation (2) Double-click in the EtherCAT Network Screen. (3) Confirm a slave name in the slave information window and click the confirm button. (4) When adding other slaves, click the “...” button in the slave information window. (5) Confirm if a slave is correctly added in the network view screen.
  • Page 381 Chapter 1 Motion Control Operation 1.4.9 CiA 402 Operation Mode Support The CiA402 profile is a profile of drives and motion controllers in the Can open specification. XGI-CPUZ supports the CiA402 profile that supports operation modes such as CSP/CSV/CST/Homing/Velocity. To use operation modes, slaves should support the corresponding operation mode and the corresponding essential PDO should be included in the operation mode that you want to use in the slave PDO setting.
  • Page 382 Chapter 1 Motion Control Operation In EtherCAT slave setting, whether to use DC of slave, PDO setting, start command setting, etc. can be performed. For details, refer to Chapter 5 Program Configuration and Operation Method (5.3.3) EtherCAT Parameter. 1.4.11 EtherCAT Slave setting The EtherCAT Slave Setting consists of General Information,PDO Setting,SDO Parameter,Start Command and On-line Service.
  • Page 383 Chapter 1 Motion Control Operation 1.4.12 EtherCAT Error Status information When an error occurs during EtherCAT connection in XGI-CPUZ, the status variable is updated. It also provides detailed error information by giving error information variables. The value of the error status information variable can be checked using the READ_PLC_INFO function block.
  • Page 384 Chapter 1 Motion Control Operation 1.4.13 EtherCAT master Status information XGI-CPUZ provides status information variables for EtherCAT status diagnosis The value of the error status information variable can be checked using the READ_PLC_INFO function block. For details, refer to the _ECAT_Master structure in 2.10.1 Reading PLC status information (READ_PLC_INFO).
  • Page 385 Chapter 1 Motion Control Operation Variable Description The count increases if there are errors in frame formats such as Preamble, SFD and InValidFrameCounterA/B/C/D CRC. The whole bit sequence corresponds to the damaged frame. Errors can occur in frames. The count increases if individual symbols are not valid. RxErrorCounterA/B/C/D It can occur both internal and external frame.
  • Page 386: Chapter 2 Motion Function Block

    Chapter2 Motion Function Block Chapter 2 Motion Function Block It describes the function block for motion used for motion control and the file command used for the memory card. 2.1 Common Elements of Motion Function Blocks 2.1.1 Axis status Each axis in the motion controller is changed to the relevant state depending on the situation and command. The changing structure of each situation is shown in the figure below.
  • Page 387 Chapter2 Motion Function Block Axis status Description Disabled state indicates the state in which no command is given to a single axis, and no error occurs. In case there is no motion controller at the time of first operation, each axis begins in the disabled state.
  • Page 388 Chapter2 Motion Function Block 2.1.2 Groups status Each group in motion controller is changed to the relevant state depending on the situation and command. :The changing structure of each state is shown in the figure below. MC_GroupHalt GroupMoving MC_GroupStop Error GroupStopping Error GroupHoming...
  • Page 389 Chapter2 Motion Function Block 2.1.3 Basic I/O Variable (1) Edge operation motion function block Execute Busy Active Done Error CommandAborted Variable Description This is an input to run the relevant function block in Edge operation(OffOn) function Execute block. (Figure a state) This is an output to indicate the relevant motion function block is currently running ((= not completed), and it indicates the output of motion function block can be changed.
  • Page 390 Chapter2 Motion Function Block (2) Motion function block for level motion Enable Busy Vaild Error (d) (e) (f) (g) Variable Description This runs motion function block in the rising Edge (Figure a state), and stops it in the falling Edge Enable (Figure b state).
  • Page 391 Chapter2 Motion Function Block Notes note1) 1. Axis input Each motion function block can be specified by Axis input to the axis which is subject to the relevant command. Motion controller can control 1~32 real/virtual axes and 33~36 virtual axes, and 1001~1002 encoders can be used as main axis depending on motion function block.
  • Page 392 Chapter2 Motion Function Block 2.1.4 BufferMode input This is an input which can specify whether to wait until the existing command is completed or to cancel the existing motion function block and execute the command in case the axis is already running other motion function block when running motion function block in a certain axis.
  • Page 393 Chapter2 Motion Function Block 2.1.6 Group Operation Route Change Settings When the axis group of the current motion controller is executing a command, other command can be issued to the relevant axis group. At this point, the path, which the next command will achieve, can specify how the existing command will be connected to the existing path.
  • Page 394 Chapter2 Motion Function Block <In case BufferMode is specified as “Buffered”> XXXX’. The Figure in the left shows that motion function block ② is executed in the setting of ‘Blending XXXX’ while The Figure below shows that the case when running BufferMode of motion function block in the setting of ‘Blending motion function block ①...
  • Page 395 Chapter2 Motion Function Block 2.1.7 Motion Function Block Errors Errors occurring in ErrorID variable of motion function block are as follows. STAT Contents Description In case motion function block is normally executed, “O” is displayed on 0x0000 Normal operation ErrorID. The motion function block is not executed in the version of current motion The current motion controller does not 0x0005...
  • Page 396 Chapter2 Motion Function Block 2.2 Motion Function Block Operation Module O/S XG5000 Name Details condition Single-axis motion command MC_Power Servo On/Off Level V1.0 V4.20 MC_Home Return to homing Edge V1.0 V4.20 MC_Stop Immediate stop Edge V1.0 V4.20 MC_Halt Stop Edge V1.0 V4.20 MC_MoveAbsolute...
  • Page 397 Chapter2 Motion Function Block Operation Module O/S XG5000 Name Details condition Absolute positioning linear V1.0 V4.20 37 MC_MoveLinearAbsolute Edge interpolation operation Relative positioning linear V1.0 V4.20 38 MC_MoveLinearRelative Edge interpolation operation Absolute position circular interpolation V1.0 V4.20 39 MC_MoveCircularAbsolute Edge operation Relative position circular interpolation V1.0...
  • Page 398 Chapter2 Motion Function Block Operation Module O/S XG5000 Name Details condition 76 LS_MasterPLoopControlOn Master position loop control Edge V1.0 V4.60 77 LS_MasterPLoopControlOff Master position loop control cancel Edge V1.0 V4.60 78 LS_CrossCoupledControlOn Cross-coupled control Edge V1.0 V4.60 79 LS_CrossCoupledControlOff Cross-coupled control Cancel Edge V1.0 V4.60...
  • Page 399 Chapter2 Motion Function Block Operation Module O/S XG5000 Name Details condition 110 NC_RetraceMove Reverse operation Level V1.0 V4.28 111 NC_BlockSkip Block skip Level V1.0 V4.28 112 NC_DryRun Dry run operation Level V1.0 V4.28 113 NC_ToolMode Tool retract/recover operation Edge V1.0 V4.28 114 NC_ReadToolMode Read tool retract/recover modes...
  • Page 400 Chapter2 Motion Function Block 2.3 Setting Range by Product 2.3.1 Setting Range by Product Importance (1) The motion function block names of XGI-CPUZ7, XGI-CPUZ5 and XGI-CPUZ3 are all identical. This ‘Chapter 3 Function Block’ basically describes XGI-CPUZ7. (2) The XGI-CPUZ7, XGI-CPUZ5, and XGI-CPUZ3 motion function blocks have different setting ranges of input variables to set axis, slave, and cam table ID.
  • Page 401 Chapter2 Motion Function Block 2.4 Single-Axis Motion Function Block 2.4.1 Servo On/Off (MC_Power) Motion Function Block MC_Power BOOL Enable Status BOOL UINT Axis Axis UINT Vaild BOOL Error BOOL ErrorID WORD Input-Output UINT Axis Specify the axis to be commanded (See 2.2.1 Setting Range by Product) Input BOOL Enable...
  • Page 402 Chapter2 Motion Function Block 2.4.2 homing start (MC_Home) Motion Function Block MC_Home BOOL Execute Done BOOL UINT Axis Axis UINT LREAL Position Busy BOOL UINT BufferMode Active BOOL CommandAborted BOOL Error BOOL ErrorID WORD Input-Output UINT Axis Specify the axis to be commanded (See 2.2.1 Setting Range by Product) Input BOOL Execute...
  • Page 403 Chapter2 Motion Function Block (6) Example Program This example shows execution of MC_HOME command when the current command position is 100,000. (a) Function block setting (b) Parameter setting - Set the Homing method in SDO parameters to 33. (c) Timing diagram %MX1 MC_HOME.Busy MC_HOME.Active...
  • Page 404 Chapter2 Motion Function Block 2.4.3 Immediate stop(MC_Stop) Motion Function Block MC_Stop BOOL Execute Done BOOL UINT Axis Axis UINT LREAL Deceleration Busy BOOL LREAL Jerk CommandAborted BOOL Error BOOL ErrorID WORD Input-Output UINT Axis Specify the axis to be commanded (See 2.2.1 Setting Range by Product) Input BOOL Execute...
  • Page 405 Chapter2 Motion Function Block 2.4.4 Stop (MC_Halt) Motion Function Block MC_Halt BOOL Execute Done BOOL UINT Axis Axis UINT LREAL Deceleration Busy BOOL LREAL Jerk Active BOOL UINT BufferMode CommandAborted BOOL Error BOOL ErrorID WORD Input-Output UINT Axis Specify the axis to be commanded (See 2.2.1 Setting Range by Product) Input BOOL Execute...
  • Page 406 Chapter2 Motion Function Block 2.4.5 Absolute positioning operation (MC_MoveAbsolute) Motion Function Block MC_MoveAbsolute Done BOOL Execute BOOL Axis UINT Axis UINT Busy BOOL ContinuousUpdate BOOL Active LREAL Position BOOL CommandAborted LREAL Velocity BOOL Error LREAL Acceleration BOOL ErrorID LREAL Deceleration WORD LREAL Jerk...
  • Page 407 Chapter2 Motion Function Block (4) The axis is in 'DiscreteMotion' state while this motion function block is running, and it is switched to 'Standstill' state when operation is completed. (5) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are applied.
  • Page 408 Chapter2 Motion Function Block (9) Application example program This example shows the execution of another function block with BufferMode set to 1 while moving from the current command position of 50,000,000 to the 100,000,000 position, to move to the -100,000,000 position. (a) Function block setting (b) Timing diagram Position...
  • Page 409 Chapter2 Motion Function Block 2.4.6 Relative positioning operation (MC_MoveAbsolute) Motion Function Block MC_MoveRelative BOOL Execute Done BOOL UINT Axis Axis UINT BOOL ContinuousUpdate Busy BOOL LREAL Distance Active BOOL LREAL Velocity CommandAborted BOOL LREAL Acceleration Error BOOL LREAL Deceleration ErrorID WORD LREAL Jerk...
  • Page 410 Chapter2 Motion Function Block (8) During the deceleration operation, even if the Velocity and Acceleration inputs are changed by using the ContinuousUpdate function or the command re-execution function, the deceleration operation is not affected and the previous deceleration operation continues. (9) Basic Example Program This example shows the movement from the current command position of 50,000,000 to the 150,000,000 position by moving the distance corresponding to the set value (100,000,000).
  • Page 411 Chapter2 Motion Function Block (10) Application Example Program This example shows the execution of another function block with BufferMode set to 1 while moving from the current command position of 50,000,000 to the 150,000,000 position, to move to the 50,000,000 position. (a) Function block setting (b) Timing diagram Position...
  • Page 412 Chapter2 Motion Function Block 2.4.7 Additive positioning operation (MC_MoveAdditive) Motion Function Block MC_MoveAdditive BOOL Execute Done BOOL UINT Axis Axis UINT BOOL ContinousUpdate Busy BOOL LREAL Distance Active BOOL LREAL Velocity CommandAborted BOOL LREAL Acceleration Error BOOL LREAL Deceleration ErrorID WORD LREAL Jerk...
  • Page 413 Chapter2 Motion Function Block (6) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are applied. Only Distance, Velocity, Acceleration, Deceleration, Jerk input can be updated. (7) Velocity input can be set to 0 or changed. (8) During the deceleration operation, even if the Velocity and Acceleration inputs are changed by using the ContinuousUpdate function or the command re-execution function, the deceleration operation is not affected and the previous deceleration operation continues.
  • Page 414 Chapter2 Motion Function Block (10) Application Example Program This example shows the execution of MC_MOVEADDITIVE function block while moving from current command position of 0 to the 50,000,000 position, to move an additional 100,000,000 to the 150,000,000 position. (a) Function block setting (b) Timing diagram Position Velocity...
  • Page 415 Chapter2 Motion Function Block 2.4.8 Specified velocity operation (MC_MoveVelocity) Motion Function Block MC_MoveVelocity BOOL Execute InVelocity BOOL UINT Axis Axis UINT BOOL ContinuousUpdate Busy BOOL LREAL Velocity Active BOOL LREAL Acceleration CommandAborted BOOL LREAL Deceleration Error BOOL LREAL Jerk ErrorID WORD UINT Direction...
  • Page 416 Chapter2 Motion Function Block applied. Only Distance, Velocity, Acceleration, Deceleration, Jerk, Direction input can be updated. (8) Velocity input can be set to 0 or changed. 2-31...
  • Page 417 Chapter2 Motion Function Block (9) Basic Example Program This example program shows the movement at a velocity of 10,000,000. Once the set velocity is reached, InVelocityoutput is (a) Function block setting (b) Timing diagram Velocity Position 2-32...
  • Page 418 Chapter2 Motion Function Block (10) Application Example Program This example program shows that it stops running due to the execution of MC-Halt function block, while moving in the reverse direction at a velocity of 10,000,000. (a) Function block setting (b) Timing diagram Position Velocity 2-33...
  • Page 419 Chapter2 Motion Function Block 2.4.9 Absolute position operation ending with specified velocity operation (MC_MoveContinuousAbsolute) Motion Function Block MC_MoveContinousAbsolute BOOL Execute InEndVelocity BOOL UINT Axis Axis UINT BOOL ContinousUpdate Busy BOOL LREAL Position Active BOOL LREAL EndVelocity CommandAborted BOOL LREAL Velocity Error BOOL LREAL...
  • Page 420 Chapter2 Motion Function Block selects the direction which allows the shortest distance and operates if it does infinite length repetition operation. The range can be set to 0~4(0-No specified, 1-Forward direction, 2-Shortest distance, 3-Reverse direction, 4-Current direction), if the value outside the range is set and motion function block is executed, Error is On and “0x1017” occurs in ErrorID. (5) Output InEndVelocity is on when the relevant axis starts speed operation after reaching the specified position, and when the specified operation is interrupted, it is Off.
  • Page 421 Chapter2 Motion Function Block (b) Timing diagram Velocity Position (10) Application example program This example program shows the movement in the direction of the same speed when re-executing the function block after stopping the execution of MC-Halt function block, while moving from the current command position of 0 to the 50,000,000, then operating at a speed of 20,000,000.
  • Page 422 Chapter2 Motion Function Block (b) Timing diagram Position Velocity 2-37...
  • Page 423 Chapter2 Motion Function Block 2.4.10 Relative position operation ending with specified velocity operation (MC_MoveContinuousRelative) Motion Function Block MC_MoveContinousRelative BOOL Execute InEndVelocity BOOL UINT Axis Axis UINT BOOL ContinousUpdate Busy BOOL LREAL Distance Active BOOL LREAL EndVelocity CommandAborted BOOL LREAL Velocity Error BOOL LREAL...
  • Page 424 Chapter2 Motion Function Block Only Distance, EndVelocity, Velocity, Acceleration, Deceleration, Jerk input can be updated. (However, in case of InEndVelocity=On, it is reflected only EndVelocity inputs. (7) Velocity and EndVelocityy input can be set to 0 or changed. (8) Example program This example program shows the operation at a velocity of 20,000,000 after moving from the current command position of 50,000,000 to the 150,000,000 position by moving the distance corresponding to the set value (100,000,000).
  • Page 425 Chapter2 Motion Function Block (b) Timing diagram Velocity Position (9) Application example program This example program shows the movement at a velocity of 20,000,000 after moving from the current command position of 0 to the 50,000,000 position, then operating at a velocity of 20,000,000, stopping by executing MC_Halt function block, moving to the same relative position (20,000,000) by re-executing the function block.
  • Page 426 Chapter2 Motion Function Block (b) Timing diagram Position Velocity 2-41...
  • Page 427 Chapter2 Motion Function Block 2.4.11 torque control (MC_TorqueControl) Motion Function Block MC_TorqueControl BOOL Execute InTorque BOOL UINT Axis Axis UINT BOOL ContinousUpdate Busy BOOL LREAL Torque Active BOOL LREAL TorqueRamp CommandAborted BOOL LREAL Velocity Error BOOL LREAL Acceleration ErrorID WORD LREAL Deceleration LREAL...
  • Page 428 Chapter2 Motion Function Block (6) Output InTorque is On when the relevant axis reaches the specified torque, and when torque control operation is interrupted, it is Off. (7) The axis is in 'ContinuousMotion' state while this motion function block is running. (8) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are applied.
  • Page 429 Chapter2 Motion Function Block 2.4.12 Setting the current position (MC_SetPosition) Motion Function Block MC_SetPosition BOOL Execute Done BOOL UINT Axis Axis UINT LREAL Position Busy BOOL BOOL Relative CommandAborted BOOL UINT ExcutionMode Error BOOL ErrorID WORD Input-Output UINT Axis Specify the axis to be commanded (See 2.2.1 Setting Range by Product) Input BOOL Execute...
  • Page 430 Chapter2 Motion Function Block (4) Example program This example program shows the setting of the current position to 200,000,000 position by adding a relative position (Relative=1) corresponding to the set value (50,000,000) from the current position of 150,000,000. (a) Function block setting (a) Timing diagram Position 2-45...
  • Page 431 Chapter2 Motion Function Block 2.4.13 Velocity/Acceleration override (MC_SetOverride) Motion Function Block MC_SetOverride BOOL Enable Enabled BOOL UINT Axis Axis UINT LREAL VelFactor Busy BOOL LREAL AccFactor Error BOOL LREAL JerkFactor ErrorID WORD Input-Output UINT Axis Specify the axis to be commanded (See 2.2.1 Setting Range by Product) Input BOOL Enable...
  • Page 432 Chapter2 Motion Function Block (8) Example program This example shows the operation by changing the current velocity to 2,000,000/ 3,000,000/ 4,000,000/ 5,000,000 if VelFactor is changed to 2/3/4/5 at the current velocity of 1,000,000. (a) Function block setting (b) Timing diagram Velocity Position 2-47...
  • Page 433 Chapter2 Motion Function Block 2.4.14 Read parameter(MC_ReadParameter) Motion Function Block MC_ReadParameter BOOL Enable Vaild BOOL UINT Axis Axis UINT ParameterNumber Busy BOOL Error BOOL ErrorID WORD Value LREAL Input-Output UINT Axis Specify the axis to be commanded (See 2.2.1 Setting Range by Product) Input BOOL...
  • Page 434 Chapter2 Motion Function Block (4) The numbers of parameter are as below. *Note 2) Parameter Item Note Unit 0: pulse, 1: mm, 2: inch, 3:degree Pulse per revolution 1 ~ 4,294,967,295 [pulse] Travel distance per rotation 0.000000001 ~ 4,294,967,295 [단위] Speed command unit 0: Unit/sec, 1: Unit/min, 2: rpm *note1)
  • Page 435 Chapter2 Motion Function Block *Note 2) Parameter Item Note variable 0~4095 (Spindle EtherCAT encoder position variable = 0: I) Spindle EtherCAT encoder position 0~524287 (Spindle EtherCAT encoder position variable = address 1: M) The P Gain of the Spindle Positioning 1~500 Hz Mode The Feed Forward Gain of the Spindle...
  • Page 436 Chapter2 Motion Function Block 2.4.15 Write parameter(MC_WriteParameter) Motion Function Block MC_WriteParameter BOOL Execute Done BOOL Axis UINT Axis UINT ParameterNumber Busy BOOL LREAL Value Error BOOL UINT ExcutionMode ErrorID WORD Input-Output UINT Axis Specify the axis to be commanded (See 2.2.1 Setting Range by Product) Input BOOL...
  • Page 437 Chapter2 Motion Function Block (6) The numbers of parameter are as below. *Note 2) Parameter Item Note Unit 0: pulse, 1: mm, 2: inch, 3:degree Pulse per revolution 1 ~ 4,294,967,295 [pulse] Travel distance per rotation 0.000000001 ~ 4,294,967,295 [Unit] Speed command unit 0: Unit/sec, 1: Unit/min, 2: rpm *note1)
  • Page 438 Chapter2 Motion Function Block *Note 2) Parameter Item Note variable 0~4095 (Spindle EtherCAT encoder position variable = 0: I) Spindle EtherCAT encoder position 0~524287 (Spindle EtherCAT encoder position variable = address 1: M) The P Gain of the Spindle Positioning 1~500 Hz mode The Feed Forward Gain of the Spindle...
  • Page 439 Chapter2 Motion Function Block 2.4.16 Reset axis error (MC_Reset) Motion Function Block MC_Reset BOOL Execute Done BOOL UINT Axis UINT Axis Busy BOOL BOOL ErrorType Error BOOL ErrorID WORD Input-Output UINT Axis Specify the axis to be commanded (See 2.2.1 Setting Range by Product) Input BOOL...
  • Page 440 Chapter2 Motion Function Block 2.4.17 Touch probe (MC_TouchProbe/MC_TouchProbeEx) Motion Function Block MC_TouchProbe BOOL Execute Done BOOL Axis UINT Axis UINT UINT TriggerInput TriggerInput UINT BOOL WindowOnly Busy BOOL LREAL FirstPosition CommandAborted BOOL LREAL LastPosition Error BOOL ErrorID WORD RecordedPosition LREAL Input-Output UINT Axis...
  • Page 441 Chapter2 Motion Function Block (1) This motion function block is an extended touch probe function block that includes the functions of the existing touch probe (MC_TouchProbe).Extended touch probe function starts at the rising Edge of Execute input.Specify the signal to be used as a trigger in TriggerInput.
  • Page 442 Chapter2 Motion Function Block Notes In the case of using Touch Probe, please set the slave parameters before use. 1. At XG50000, click the registration information of the servo drive. 2. Select PDO Setting at the slave information window 2-57...
  • Page 443 Chapter2 Motion Function Block 3. Select Touch Probe item in the edit window and click the arrow(downward), and include it in the PDO communication data. Touch Probe related PDO item are as follows. 1) RxPDO Touch probe function(0x60B8) 2) TxPDO Touch probe state(0x60B9) Touch Probe 1 forward direction position value (0x60BA) Touch Probe 1 backward direction position value (0x60BB)
  • Page 444 Chapter2 Motion Function Block <When the TriggerInput input value is the rising edge of the touch probe and the touch probe function is in window mode, the Execute Trigger Event Sign Done End Point Permissible range Start Point Time Location is not recorded Location is recorded operation timing >...
  • Page 445 Chapter2 Motion Function Block 2-60...
  • Page 446 Chapter2 Motion Function Block 2.4. 18 Abort trigger events (MC_AbortTrigger) Motion Function Block MC_AbortTrigger BOOL Execute Done BOOL Axis UINT Axis UINT UINT TriggerInput TriggerInput USINT Busy BOOL Error BOOL ErrorID WORD Input-Output Specify the axis to be commanded. (See 2.2.1 Setting Range by UINT Axis Productreference, Real axis)
  • Page 447 Chapter2 Motion Function Block 2.4.19 SuperImposed operation (MC_MoveSuperImposed) Motion Function Block MC_MoveSuperImposed BOOL Execute Done BOOL UINT Axis Axis UINT BOOL ContinuousUpdate Busy BOOL LREAL Distance Active BOOL LREAL VelocityDiff CommandAborted BOOL LREAL Acceleration Error BOOL LREAL Deceleration ErrorID WORD LREAL Jerk CoveredDistance...
  • Page 448 Chapter2 Motion Function Block 2.4.20 SuperImposed operation stop(MC_MoveSuperImposed) Motion Function Block MC_HaltSuperImposed BOOL Execute Done BOOL UINT Axis Axis UINT LREAL Deceleration Busy BOOL LREAL Jerk Active BOOL CommandAborted BOOL Error BOOL ErrorID WORD Input-Output UINT Axis Specify the axis to be commanded (See 2.2.1 Setting Range by Product) Input...
  • Page 449 Chapter2 Motion Function Block 2.4.21 Extended homing start (LS_Home) Motion Function Block LS_Home BOOL Execute Done BOOL Axis UINT Axis UINT Busy BOOL LREAL Position SINT HomingMethod Active BOOL LREAL SwitchSearchSpeed CommandAborted BOOL LREAL ZeroSearchSpeed Error BOOL LREAL HomingAcc ErrorID WORD LREAL HomeOffset...
  • Page 450 Chapter2 Motion Function Block Only Position input can be updated. (6) The input range of SwitchSearchSpeed, ZeroSearchSpeed, and HomingAcc is 0 ≤ Parameter ≤1073741824in pulse units, ≤ Parameter ≤2147483647 and the input range of HomeOffset is -2147483648 in pulse units. If a value is input in a unit other than pulse unit, it is converted to pulse unit and checked if the value is out of range, and an error occurs if it is out of range.
  • Page 451 Chapter2 Motion Function Block 2.5 Multi-Axis Motion Function Block 2.5.1 Cam operation (MC_CamIn) Motion Function Block MC_CamIn BOOL Execute InSync BOOL UINT Master Master UINT UINT Slave Slave UINT LREAL ContinousUpdate Busy BOOL LREAL MasterOffset Active BOOL LREAL SlaveOffset CommandAborted BOOL LREAL MasterScaling...
  • Page 452 Chapter2 Motion Function Block Indicate that cam operation is normally being fulfilled. BOOL InSync (Indicate that the serve axis is following the cam table.) BOOL Busy Indicate that the execution of motion function block is not completed. BOOL Active Indicate that the current motion function block is controlling the relevant axis. BOOL CommandAborted Indicate that the current motion function block is interrupted while it is running.
  • Page 453 Chapter2 Motion Function Block (15) Set the magnification of cam data to be applied in MasterScaling and SlaveScaling. MasterScaling determines the scale rate of the main-axis data, and SlaveScaling determines the scale rate of the sub-axis data. Refer to the Figure below. After applying SlaveScaling = 2.0 SlaveScaling...
  • Page 454 Chapter2 Motion Function Block The sub axis starts moving to the synchronization position from the distance of the input value away based on the position where MasterSyncPosition is actually applied. If it is before starting moving, the sub axis waits at the relevant position in stop state, and if the sub axis is already in the section to move to the synchronization position at the beginning of the command, takes back the position of the synchronization starting point by the length of a table until it escapes the MasterStartDistance range.
  • Page 455 Chapter2 Motion Function Block (15) Example program This is an example of moving the main axis from 0 to 200,000 after executing the MC_CAMIN command on the sub axis after creating a cam profile. (a) Function block setting 2-70...
  • Page 456 Chapter2 Motion Function Block (b) Timing diagram MC_MoveRelative On MC_MOVERELATIVE.Done MC_CAMIN On MC_CAMIN.Busy MC_CAMIN.Active MC_CAMIN.Insync PLC_INFO._AX01_INFO.Synchronized Main axis speed Sub axis position Sub axis speed Main axis position 2-71...
  • Page 457 Chapter2 Motion Function Block (16) Application example program This example shows the movement of the main-axis from 0 to 200,000 positions after generating a cam profile and then executing MC_CAMIN command on the sub-axis. (a) Function block setting (b) Timing diagram Main axis speed Sub axis speed Sub axis position...
  • Page 458 Chapter2 Motion Function Block 2.5.2 Cam operation Cancel(MC_CamOut) Motion Function Block MC_CamOut BOOL Execute Done BOOL Slave UINT Slave UINT Busy BOOL Error BOOL ErrorID WORD Input-Output UINT Slave Set the sub axis. (See 2.2.1 Setting Range by Product) Input BOOL Execute Give cam operation stop command to the relevant axis in the rising Edge.
  • Page 459 Chapter2 Motion Function Block (b) Timing diagram Main axis speed Sub axis speed Main axis position Sub axis position 2-74...
  • Page 460 Chapter2 Motion Function Block 2.5.3 Gear operation (MC_GearIn) Motion Function Block MC_GearIn BOOL Execute InGear BOOL UINT Master Master UINT UINT Slave Slave UINT BOOL ContinousUpdate Busy BOOL RatioNumerator Active BOOL UINT RatioDenominator CommandAborted BOOL UINT MasterValueSource Error BOOL LREAL Acceleration ErrorID WORD...
  • Page 461 Chapter2 Motion Function Block operation is based on the command position of the main axis of motion controller, and if it is set to 1, synchronization operation is based on the current position. Other values set besides these two make Error of motion function block On and cause “0x1114” in ErrorID.
  • Page 462 Chapter2 Motion Function Block (b) timing diagram Axis1 Position Axis2 Position Axis1 Velocity Axis2 Velocity 2-77...
  • Page 463 Chapter2 Motion Function Block 2.5.4 Gear operation Cancel(MC_GearOut) Motion Function Block MC_GearOut BOOL Execute Done BOOL UINT Slave Slave UINT Busy BOOL Error BOOL ErrorID WORD Input-Output UINT Slave Set the sub axis. (See 2.2.1 Setting Range by Product) Input At the rising edge, the gear operation release command is given to the BOOL Execute...
  • Page 464 Chapter2 Motion Function Block (3) Example program After the execution of MC Gearln command in sub-axis at the current position of 0, ContinuousUpdate of main-axis is set to 1, and then the velocity is gradually changed (1,000,000  2,000,000  3,000,000). This examples show the operation to ensure that the velocity of sub-axis is no longer changed (b) by executing MC_GearOut command when the velocity of main- axis is 2,000,000.
  • Page 465 Chapter2 Motion Function Block 2.5.5 Electrical gearing by specifying the position (MC_GearInPos) Motion Function Block Input-Output UINT Master Set main axis (See 2.2.1 Setting Range by Product) UINT Slave Set the sub axis. (See 2.2.1 Setting Range by Product) Input BOOL Execute Give gear operation command to the relevant axis in the rising Edge.
  • Page 466 Chapter2 Motion Function Block Output Indicate that gear operation is normally being fulfilled as the specified gear ratio is BOOL InSync applied. BOOL StartSync Indicate synchronization is starting. BOOL Busy Indicate that the execution of motion function block is not completed. BOOL Active Indicate that the current motion function block is controlling the relevant axis.
  • Page 467 Chapter2 Motion Function Block (10) If the function block is re-executed (Execute input is On) before the instruction is terminated, the changed parameters are applied. Only RatioNumerator, RatioDenominator, MasterSyncPosition, SlaveSyncPosition, MasterStartDistance, Velocity, Acceleration, Deceleration input can be updated. (However, in case of InGear=On, RatioNumerator, RatioDenominator input can be updated.) (9) Example program This example program executes MC_GearInPos function block in which sub-axis starts synchronization from a position away...
  • Page 468 Chapter2 Motion Function Block (a) Function block setting 2-83...
  • Page 469 Chapter2 Motion Function Block (b) Timing diagram %MX1 MC_MOVERELATIVE.Done %MX2 MC_GEARINPOS.StartSync MC_GEARINPOS.Insync MC_GEARINPOS.Active PLC_INFO._AX01_INFO.Synchronized Axis 1 speed Axis 2 speed Axis 2 position Axis 1 position (10) Application example program This example program shows MC_GearInPos Active and InSync being off and gear operation being canceled when MC_GearOut command is issued on 2-axis at (a) position during the motion shown in the basic example program.
  • Page 470 Chapter2 Motion Function Block (b) Timing diagram %MX2 MC_MOVERELATIVE.Active MC_MOVERELATIVE.Done %MX1 MC_GEARINPOS.StarSync MC_GEARINPOS.Active MC_GEARINPOS.InSync %MX3 MC_GEAROUT.Done PLC_INFO._AX01_INFO.Synchronized Axis 1 speed Axis 2 speed Axis 1 position Axis 2 position 2-85...
  • Page 471 Chapter2 Motion Function Block 2.5.6. Phase compensation (MC_Phasing) Motion Function Block MC_Phasing BOOL Execute Done BOOL UINT Master Master UINT UINT Slave Slave UINT LREAL PhaseShift Busy BOOL LREAL Velocity Active BOOL LREAL Acceleration CommandAborted BOOL LREAL Deceleration Error BOOL LREAL Jerk ErrorID...
  • Page 472 Chapter2 Motion Function Block 2.57 Link operation(LS_MoveLink) Motion Function Block LS_MoveLink Done BOOL Execute BOOL Master UINT Master UINT Slave UINT Slave UINT StartSync BOOL DINT RatioNumber InSync BOOL UDINT RatioDenominator Busy BOOL UINT MasterValueSource Active BOOL LREAL MasterStartDistance LREAL MasterSyncPosition CommandAborted BOOL...
  • Page 473 Chapter2 Motion Function Block axis. Indicate that the current motion function block is interrupted while it is BOOL CommandAborted running. BOOL Error Indicates whether an error occurs or not. Output the number of error occurred while motion function block is WORD ErrorID running.
  • Page 474 Chapter2 Motion Function Block Execute Start Sync InSync Done MasterEndDistance Master Position MasterSyncPosition MasterStartDistance MasterStartPosition =MasterSyncPosition-MasterStartDistance SlaveEndPosition Slave Position SlaveSyncPosition SlaveWaitPosition Release Catch GearOperation Operation Operation 2-89...
  • Page 475 Chapter2 Motion Function Block 2.6 Group Motion Function Block 2.6.1 Add axis to group (MC_AddAxisToGroup) Motion Function Block MC_AddAxisToGroup BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT UINT Axis Axis UINT UINT IdentInGroup Busy BOOL Error BOOL ErrorID WORD Input-Output UINT AxesGroup Set the group where the relevant axis is added.
  • Page 476 Chapter2 Motion Function Block 2.6.2 Remove group axis (MC_AddAxisToGroup) Motion Function Block MC_RemoveAxisFromGroup BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT UINT IdentInGroup Busy BOOL Error BOOL ErrorID WORD Input-Output UINT AxesGroup Set the group where the relevant axis is removed. (1 ~ 16: 1 group ~ 16 group) Input BOOL Execute...
  • Page 477 Chapter2 Motion Function Block 2.6.3 Removes all axes from the group (MC_UngroupAllAxes) Motion Function Block MC_UngroupAllAxes BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT Busy BOOL Error BOOL ErrorID WORD Input-Output UINT AxesGroup Set the group where every axis is to be removed. (1 ~ 16: 1 group ~ 16 group) Input BOOL Execute...
  • Page 478 Chapter2 Motion Function Block 2.6.4 Group Enable (MC_GroupEnable) Motion Function Block MC_GroupEnable BOOL Execute Done BOOL AxesGroup AxesGroup UINT UINT Busy BOOL Error BOOL ErrorID WORD Input-Output UINT AxesGroup Set the group to be activated. (1 ~ 16: 1 group ~ 16 group) Input BOOL Execute...
  • Page 479 Chapter2 Motion Function Block 2.6.5 Group Disable (MC_GroupDisable) Motion Function Block MC_GroupDisable BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT Busy BOOL Error BOOL ErrorID WORD Input-Output UINT AxesGroup Set the group to be deactivated. (1 ~ 16: 1 group ~ 16 group) Input BOOL Execute...
  • Page 480 Chapter2 Motion Function Block 2.6.6 Group homing operation (MC_GroupHome) Motion Function Block MC_GroupHome BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT ARRAY[0..3] OF LREAL[ ] Position Busy BOOL UINT BufferMode Active BOOL CommandAborted BOOL Error BOOL ErrorID WORD Input-Output UINT AxesGroup Set the group returning to home.
  • Page 481 Chapter2 Motion Function Block 2.6.7 Group current position setting (MC_GroupSetPosition) Motion Function Block MC_GroupSetPosition Execute Done BOOL BOOL UINT AxesGroup AxesGroup UINT ARRAY[0..3] OF LREAL Position Busy BOOL BOOL Relative Active BOOL UINT ExecutionMode CommandAborted BOOL Error BOOL ErrorID WORD Input-Output UINT AxesGroup...
  • Page 482 Chapter2 Motion Function Block (4) Basic Example Program This example shows the change of the current position to position values (10,000,000/20,000,000/30,000,000) set in the position variables when executing MC_GroupSetPosition function block at the status where 1-axis, 2-axis and 3-axis are set as a single group.
  • Page 483 Chapter2 Motion Function Block 2.6.8 Group immediate stop (MC_GroupStop) Motion Function Block MC_GroupStop BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT LREAL Deceleration Busy BOOL LREAL Jerk Active BOOL CommandAborted BOOL Error BOOL ErrorID WORD Input-Output UINT AxesGroup Set the group to immediate stop. (1 ~ 16: 1 group ~ 16 group) Input BOOL Execute...
  • Page 484 Chapter2 Motion Function Block 2.6.9 Group stop (MC_GroupStop) Motion Function Block MC_GroupHalt BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT LREAL Deceleration Busy BOOL LREAL Jerk Active BOOL UINT BufferMode CommandAborted BOOL Error BOOL ErrorID WORD Input-Output UINT AxesGroup Set the group to stop. (1 ~ 16: 1 group ~ 16 group) Input BOOL Execute...
  • Page 485 Chapter2 Motion Function Block 2.6.10 Groups error reset (MC_GroupReset) Motion Function Block MC_GroupReset BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT Busy BOOL Error BOOL ErrorID WORD Input-Output UINT AxesGroup Set the group to do error reset. (1 ~ 16: 1 group ~ 16 group) Input BOOL Execute...
  • Page 486 Chapter2 Motion Function Block 2.6.11 Absolute position Linear Interpolation operation (MC_MoveLinearAbsolute) Motion Function Block MC_MoveLinearAbsolute Done BOOL Execute BOOL AxesGroup UINT AxesGroup UINT Busy ARRAY[0..3] OF LREAL Position BOOL Active LREAL Velocity BOOL CommandAborted LREAL Acceleration BOOL Error LREAL Deceleration BOOL ErrorID LREAL...
  • Page 487 Chapter2 Motion Function Block Acceleration, Deceleration, and Jerk inputs respectively. (5) Velocity is to set the interpolation speed of the axis group, and it indicates the integrated speed of each axis. The operation speed of each configuration axis is calculated as follows. Interpolat speed Target...
  • Page 488 Chapter2 Motion Function Block 2-103...
  • Page 489 Chapter2 Motion Function Block (b) Timing diagram Axis X velocity Axis X position Axis Y position Axis Y velocity 2-104...
  • Page 490 Chapter2 Motion Function Block (c) XY graph 2-105...
  • Page 491 Chapter2 Motion Function Block 2.6.12 Relative position Linear Interpolation operation (MC_MoveLinearRelative) Motion Function Block MC_MoveLinearRelative Done BOOL Execute BOOL AxesGroup UINT AxesGroup UINT Busy LREAL[ ] Distance BOOL Active LREAL Velocity BOOL CommandAborted LREAL Acceleration BOOL Error LREAL Deceleration BOOL ErrorID LREAL Jerk...
  • Page 492 Chapter2 Motion Function Block Acceleration, Deceleration, and Jerk inputs respectively. (5) Velocity is to set the interpolation speed of the axis group, and it indicates the integrated speed of each axis. The operation speed of each configuration axis is calculated as follows. Interpolat speed Target...
  • Page 493 Chapter2 Motion Function Block 2-108...
  • Page 494 Chapter2 Motion Function Block (Y axis) Starting position 4000 Y axis movement value (-3000) Linear interpolation end position 1000 (X axis) 1000 5000 10000 X axis movement value(9000) (b) Timing diagram Axis X velocity Axis X position Axis Y position Axis Y velocity 2-109...
  • Page 495 Chapter2 Motion Function Block (c) XY graph 2-110...
  • Page 496 Chapter2 Motion Function Block 2.6.13 Absolute position circular interpolation operation (MC_MoveCircularAbsolute) Motion Function Block MC_MoveCircularAbsolute Done BOOL Execute BOOL AxesGroup UINT AxesGroup UINT Busy UINT CircMode BOOL Active LREAL[ ] AuxPoint BOOL CommandAborted LREAL[ ] EndPoint BOOL Error UINT PathChoice BOOL ErrorID LREAL...
  • Page 497 Chapter2 Motion Function Block AxesGroup input. (2) When this motion function block starts, each axis performs circular trajectory interpolation control referring to the auxiliary point input, and the movement direction is determined by Path Choice input. If PathChoice input is set to 0, circular interpolation is operated in a clockwise direction, and if it is set to 1, circular interpolation is operated in a counter-clockwise direction.
  • Page 498 Chapter2 Motion Function Block (c) Circular Interpolation using Radius Speciation (CircMode = 2) This method performs circular interpolation to the target position by starting operation at the current position, and following a circular trajectory with a designated radius from the current position to the target position. In the figure below, the current position corresponds to the axes group coordinate at the start of the command, the radius corresponds to the X coordinate input for the AuxPoint, and the target position corresponds to the absolute coordinate input for the EndPoint.
  • Page 499 Chapter2 Motion Function Block (9) Example program This example shows the circular interpolation to the target position (1000, 1000) by moving clock-wise after setting the center point (2000,2000) specification method when the current command position is (1000, 1000). (a) Function block setting 2-114...
  • Page 500 Chapter2 Motion Function Block (b) Timing diagram Axis-X position Axis-Y position Axis-X velocity Axis-Y velocity (c) XY graph 2-115...
  • Page 501 Chapter2 Motion Function Block 2.6.14 Relative position circular interpolation operation (MC_MoveCircularRelative) Motion Function Block MC_MoveCircularRelative Done BOOL Execute BOOL AxesGroup UINT AxesGroup UINT Busy UINT CircMode BOOL Active LREAL[ ] AuxPoint BOOL CommandAborted LREAL[ ] EndPoint BOOL Error USINT PathChoice BOOL ErrorID LREAL...
  • Page 502 Chapter2 Motion Function Block (1) This motion function block issues relative position circular interpolation command on the axes group designated by AxesGroup input. (2) When this motion function block starts, each axis performs circular trajectory interpolation control referring to the auxiliary point input, and the movement direction is determined by Path Choice input.
  • Page 503 Chapter2 Motion Function Block Axis Central Point (AuxPoint) Target Position (EndPoint) Current Position X Axis (c) Circular interpolation with radius designation form In this method, operation starts at the current position, and it does circular interpolation to the target position along the circular path which has a radius of the value specified in the radius.
  • Page 504 Chapter2 Motion Function Block (b) Function block setting 2-119...
  • Page 505 Chapter2 Motion Function Block Axis-X position Axis-Y position Axis-X velocity Axis-Y velocity (c) XY graph 2-120...
  • Page 506 Chapter2 Motion Function Block 2.6.15 Read group axis parameter (LS_ReadGroupParameter) Motion Function Block LS_ReadGroupParameter Valid BOOL Enable BOOL AxesGroup UINT AxesGroup UINT ParameterNumber Busy BOOL Error BOOL ErrorID WORD Value LREAL Input-Output UINT AxesGroup Set the axis group to read parameters (1~16:1 group ~ 16 group) Input BOOL Enable...
  • Page 507 Chapter2 Motion Function Block (4) The numbers of number of axis groups parameter are as below. *Note 2) Parameter Item Note Configuration axis 01 0 : none, 1~36 Configuration axis 02 0 : none, 1~36 Configuration axis 03 0 : none, 1~36 Configuration axis 04 0 : none, 1~36 Configuration axis 05...
  • Page 508 Chapter2 Motion Function Block 2.6.16 Write axis group parameter (LS_WriteGroupParameter) Motion Function Block LS_WriteGroupParameter Vaild BOOL Execute BOOL AxesGroup UINT AxesGroup UINT ParameterNumber Busy BOOL LREAL Value Error BOOL UINT ExecutionMode ErrorID WORD Input-Output UINT AxesGroup Set the axis group to commanded (1~16:1 group ~ 16 group) Input At the rising edge, the corresponding parameter is reflected in the BOOL...
  • Page 509 Chapter2 Motion Function Block (6) The numbers of number of axis groups parameter are as below. *Note 2) Parameter Item Note Configuration axis 01 0 : none, 1~36 Configuration axis 02 0 : none, 1~36 Configuration axis 03 0 : none, 1~36 Configuration axis 04 0 : none, 1~36 Configuration axis 05...
  • Page 510 Chapter2 Motion Function Block 2.6.17 Axis group override (MC_GroupSetOverride) Motion Function Block MC_GroupSetOverride Enabled BOOL Enable BOOL AxesGroup UINT AxesGroup UINT LREAL VelFactor Busy BOOL LREAL AccFactor Error BOOL LREAL JerkFactor ErrorID WORD Input-Output UINT AxesGroup Set the axis group to commanded (1~16:1 group ~ 16 group) Input Execute override operation in the relevant axis group while input is is BOOL...
  • Page 511 Chapter2 Motion Function Block (9) Example program This example shows the operation by changing the current velocity to 2,000/ 3,000/ 4,000/ 5,000 for the VelFactor is changed to 2/3/4/5 at the current velocity of 1,000. (a) Function block setting (b) Timing diagram %MX1 MOVELINEARRELATIVE.Active GROUPSETOVERRIDE.Busy...
  • Page 512 Chapter2 Motion Function Block 2.7 Dedicated Function Block 2.7.1 Communication connection (LS_Connect) Motion Function Block LS_Connect BOOL Execute Done BOOL Busy BOOL Error BOOL ErrorID WORD Input Give communication connection command to the relevant motion controller in the BOOL Execute rising Edge.
  • Page 513 Chapter2 Motion Function Block 2.7.2 Communication disconnect (LS_Disconnect) Motion Function Block LS_Disonnect BOOL Execute Done BOOL Busy BOOL Error BOOL ErrorID WORD Input Give communication disconnection command to the relevant motion controller in the BOOL Execute rising Edge. Output BOOL Done Indicate whether to complete communication disconnection.
  • Page 514 Chapter2 Motion Function Block 2.7.3 Read SDO (LS_ReadSDO) Motion Function Block LS_ReadSDO BOOL Execute Done BOOL Slave UINT Slave UINT UINT Index Busy BOOL UINT SubIndex Error BOOL UINT Length ErrorID WORD Value DINT Input-Output UINT Slave Set the slave to be given a command. (See 2.2.1 Setting Range by Product) Input BOOL Execute...
  • Page 515 Chapter2 Motion Function Block 2.7.4 Write SDO (LS_WriteSDO) Motion Function Block LS_WriteSDO BOOL Execute Done BOOL Slave UINT Slave UINT UINT Index Busy BOOL UINT SubIndex Error BOOL UINT Length ErrorID WORD DINT Value Input-Output UINT Slave Set the slave to be given a command. (See 2.2.1 Setting Range by Product) Input BOOL Execute...
  • Page 516 Chapter2 Motion Function Block 2.7.5 Save SDO (LS_SaveSDO) Function Block LS_SaveSDO BOOL Execute Done BOOL Slave UINT Slave UINT Busy BOOL Error BOOL ErrorID WORD Input-Output UINT Slave Specify the Slave to be given a command. (See 2.2.1 Setting Range by Product) Input BOOL Execute...
  • Page 517 Chapter2 Motion Function Block 2.7.6 Encoder current position setting (LS_EncoderPreset) Function Block LS_EncoerPreset BOOL Execute Done BOOL UINT Encoder Busy BOOL LREAL Position Error BOOL BOOL Relative ErrorID WORD Input BOOL Execute Specify the position of the relevant encoder in the rising Edge. UINT Encoder Set the encoder to set the position.
  • Page 518 Chapter2 Motion Function Block 2.7.7 JOG operation (LS_Jog) Function Block LS_Jog BOOL Enable Enabled BOOL Axis UINT Axis UINT BOOL Direction Busy BOOL BOOL Low_High Error BOOL ErrorID WORD Input-Output UINT Axis Specify the axis to be commanded. (See 2.2.1 Setting Range by Product) Input BOOL Enable...
  • Page 519 Chapter2 Motion Function Block Axis 2 position Axis 2 velocity Axis 1 position Axis 1 velocity Axis 3 velocity Axis 3 position 2-134...
  • Page 520 Chapter2 Motion Function Block 2.7.8 Read Cam data (LS_ReadCamData) Function Block LS_ReadCamData BOOL Enable Done BOOL Axis UINT Axis UINT UINT CamTable ID Busy BOOL Error BOOL Array [] of LREAL MasterPoint Array [] of LREAL SlavePoint ErrorID WORD Array [] of BYTE CamCurveSel StartSlope LREAL...
  • Page 521 Chapter2 Motion Function Block 2.7.9 Write Cam data (LS_WrieCamData) Function Block LS_WriteCamData BOOL Execute Done BOOL Axis UINT Axis UINT UINT CamTable ID Busy BOOL LREAL StartSlope Error BOOL LREAL EndSlope ErrorID WORD UINT CamPointNum Array[] of LREAL MasterPoint Array[] of LREAL SlavePoint Array[] of BYTE CamCurveSel UINT ExecutionMode...
  • Page 522 Chapter2 Motion Function Block 1(mcQueued) : It is changed at the same point of time as in "Buffered" of Buffermode. (8.1.4. Command buffering: refer to BufferMode) 2-137...
  • Page 523 Chapter2 Motion Function Block 2.7.10 CAM block property write (LS_WriteCamBlockProperty) Motion Function Block LS_WriteCamBlockProperty BOOL Execute Done BOOL UINT CamBlockID Busy BOOL Error BOOL NodeDataNum UNIT MasterVelocity ErrorID WORD REAL MaxVelocity REAL MaxAccel REAL MaxJerk REAL Input BOOL Execute Write cam block data at the rising edge of the input. UINT CamBlockID Enter the detail specified Block number.
  • Page 524 Chapter2 Motion Function Block 2.7.11 CAM block node write (LS_WriteCamBlockNode) Motion Function Block LS_WriteCamBlockNode BOOL Execute Done BOOL UINT CamBlockID Busy BOOL UINT NodeID Error BOOL LREAL MasterPos ErrorID WORD LREAL SlavePos CamCurve BYTE EnableConVel BOOL ConectingVelocity REAL EnableConAccel BOOL REAL ConectingAccel EnableConJerk...
  • Page 525 Chapter2 Motion Function Block (2) This function block is a command used after the cam block related function block LS_WriteCamblockProperty is executed. Also, if there is no cam block, execute WriteCamBlockProperty to specify the number of nodes in the cam block. (3) Enter the cam block number to write to in CamBlockID.
  • Page 526 Chapter2 Motion Function Block 2.7.12 Creating cam data (LS_GenerateCamData) Motion Function Block LS_GenerateCamData BOOL Execute Done BOOL UINT CamBlock ID Busy BOOL Error BOOL UINT CamTableID ErrorID WORD CamPointNum UINT Input BOOL Execute Write cam block data at the rising edge of the input. UINT CamBlockID Enter the detail specified Block number.
  • Page 527 Chapter2 Motion Function Block 2.7.13 CAM block property read (LS_ReadCamBlockProperty) Motion Function Block LS_ReadCamBlockProperty BOOL Execute Done BOOL UINT CamBlockID Busy BOOL Error BOOL ErrorID WORD MaxNodeDataNum UINT NodeDataNum UINT REAL MasterVelocity REAL MaxVelocity REAL MaxAcceleration REAL MaxJerk Input BOOL Execute Write cam block data at the rising edge of the input.
  • Page 528 Chapter2 Motion Function Block 2.7.14 CAM block node read (LS_ReadCamBlockNode) Motion Function Block LS_ReadCamBlock BOOL Execute Done BOOL UINT CamBlockID Busy BOOL Error BOOL UINT NodeID ErrorID WORD LREAL MasterPos SlavePos LREAL CamCurve BYTE BOOL EnableConVel LREAL ConnectingVelocity BOOL EnableConAccel LREAL ConnectingAccel BOOL...
  • Page 529 Chapter2 Motion Function Block (6) This is a command function that replaces the online-read-cam block function in the figure below in XG5000. 2-144...
  • Page 530 Chapter2 Motion Function Block 2.7.15 Read ESC (LS_ReadEsc) Function Block LS_ReadEsc BOOL Execute Done BOOL UINT Busy BOOL UINT Error BOOL UINT Length ErrorID WORD UINT EcatCmd Value UDINT UINT Input BOOL Execute Give the ESC reading command to the slave controller in the rising Edge. UINT Set the slave controller address according to the EcatCmd.
  • Page 531 Chapter2 Motion Function Block (5) At EcatCmd, the type of command to use when reading ESC (EtherCAT Slave Controller) is specified. The following three commands can be used. Setting a value outside the range at EcatCmd will cause "Error 0x0F62”. 1) 1 - APRD (Auto Increment Physical Read) This command is used when reading the slave device data following the order of physical connection before normal communication connection by the master.
  • Page 532 Chapter2 Motion Function Block 2.7.16 ESC Write (LS_WriteEsc) Function Block LS_WriteEsc BOOL Execute Done BOOL UINT Busy BOOL UINT Error BOOL UINT Length ErrorID WORD UINT EcatCmd UINT UDINT Value Input BOOL Execute Give the ESC writing command to the slave controller in the rising Edge. UINT Set the slave controller address according to the EcatCmd.
  • Page 533 Chapter2 Motion Function Block (5) At EcatCmd, the type of command to use when reading ESC (EtherCAT Slave Controller) is specified. The following three write commands can be used. Setting a value outside the range at EcatCmd will cause "Error 0x0F72”. 1) 2- APWR( Auto Increment Physical Write) This command is used when reading the slave device data following the order of physical connection before normal communication connection by the master.
  • Page 534 Chapter2 Motion Function Block 2.7.17 CAM Skip (LS_CamSkip) Motion Function Block LS_CamSkip BOOL Execute Done BOOL UINT Slave Slave UINT UINT SkipCount Busy BOOL USINT SkipMode Active BOOL CommandAborted BOOL Error BOOL ErrorID WORD CoveredSkipCount UINT Input-Output UINT Slave Set the sub axis. (See 2.2.1 Setting Range by Product) Input BOOL Execute...
  • Page 535 Chapter2 Motion Function Block 2.7.18 Variable Cam operation (LS_VarCamIn) Motion Function Block LS_VarCamIn BOOL Execute InSync BOOL UDINT VarOffset UINT VarOffset UINT Slave Slave UINT LREAL ContinousUpdate Busy BOOL LREAL MasterOffset Active BOOL LREAL SlaveOffset CommandAborted BOOL LREAL MasterScaling Error BOOL LREAL SlaveScaling...
  • Page 536 Chapter2 Motion Function Block Output Indicate that cam operation is normally being fulfilled. BOOL InSync (Indicate that the serve axis is following the cam table.) BOOL Busy Indicate that the execution of motion function block is not completed. BOOL Active Indicate that the current motion function block is controlling the relevant axis.
  • Page 537 Chapter2 Motion Function Block 2.7.19 Variable Gear operation (LS_VarGearIn) Motion Function Block LS_VarGearIn BOOL Execute InGear BOOL UDINT VarOffset VarOffset UINT UINT Slave Slave UINT BOOL ContinousUpdate Busy BOOL RatioNumerator Active BOOL UINT RatioDenominator CommandAborted BOOL UINT MasterValueSource Error BOOL LREAL Acceleration ErrorID...
  • Page 538 Chapter2 Motion Function Block 2.7.20 Variable positioning gear operation (LS_VarGearInPos) Motion Function Block LS_VarGearInPos BOOL Execute InGear BOOL UDINT VarOffset VarOffset UINT UINT Slave Slave UINT RatioNumerator Busy BOOL UINT RatioDenominator Active BOOL UINT MasterValueSource CommandAborted BOOL LREAL MasterSyncPosition Error BOOL LREAL SlaveSyncPosition...
  • Page 539 Chapter2 Motion Function Block Indicate that the current motion function block is interrupted while it is BOOL CommandAborted running. BOOL Error Indicates whether an error occurs or not. WORD ErrorID Output the number of error occurred while motion function block is running. This motion function block is the function block that synchronizes the main axis and the servo axis according to the gear ratio set at the specific position by setting the variable value designated by the offset as the main axis (1) The variable value specified as the main axis should be the LREL type.
  • Page 540 Chapter2 Motion Function Block 2.7.21 Read the slave location of the CAM table (LS_ReadCamTableSlavePos) Motion Function Block LS_ReadCamTableSlavePos BOOL Execute Done BOOL UINT Axis Axis UINT UINT CamTableID Busy BOOL LREAL MasterPos SlavePos LREAL SlaveVel LREAL SlaveAccel LREAL Error BOOL ErrorID WORD Input-Output...
  • Page 541 Chapter2 Motion Function Block 2.7.22 Write inverter speed (LS_InverterWriteVel) Motion Function Block LS_InverterWriteVel BOOL Execute Done BOOL UINT Axis Axis UINT Error BOOL TargetVel WORD ErrorID Input-Output Specify the axis to be commanded. (See 2.2.1 Setting Range by Product, UINT Axis Real axis) Input...
  • Page 542 Chapter2 Motion Function Block 2.7.23 Read inverter speed (LS_InverterReadVel) Motion Function Block LS_InverterReadVel BOOL Enable Enabled BOOL UINT Axis Axis UINT Error BOOL ErrorID WORD ActualVel Input-Output Specify the axis to be commanded. (See 2.2.1 Setting Range by Product, UINT Axis Real axis) Input...
  • Page 543 Chapter2 Motion Function Block 2.7.24 Write inverter control word (LS_InverterControl) Motion Function Block LS_InverterControl BOOL Execute Done BOOL UINT Axis Axis UINT Error BOOL BOOL SwitchOn ErrorID WORD BOOL VoltageEn BOOL QuickStop BOOL EnableOP BOOL EnableRamp BOOL UnlockRamp BOOL ReferenceRamp BOOL FaultReset BOOL...
  • Page 544 Chapter2 Motion Function Block Inverter status according to the bit setting of the control word Change the inverter status according to the bit setting of the control word 2-159...
  • Page 545 Chapter2 Motion Function Block 2.7.25 Read inverter status 1 (LS_InverterStatus1) Motion Function Block LS_InverterStatus1 BOOL Enable Enabled BOOL UINT Axis Axis UINT Error BOOL ErrorID WORD RdySwitchOn BOOL SwitchedOn BOOL OpEn BOOL VoltageEn BOOL SwOnDisable BOOL Input-Output Specify the axis to be commanded. (See 2.2.1 Setting Range by Product, UINT Axis Real axis)
  • Page 546 Chapter2 Motion Function Block 2.7.26 Read inverter status 2 (LS_InverterStatus2) Motion Function Block LS_InverterStatus2 BOOL Enable Enabled BOOL UINT Axis Axis UINT Error BOOL ErrorID WORD Fault BOOL QuickStop BOOL Warning BOOL Remote BOOL TargetReach BOOL LimitActive BOOL Input-Output Specify the axis to be commanded. (See 2.2.1 Setting Range by Product, UINT Axis Real axis)
  • Page 547 Chapter2 Motion Function Block 2.7.27 Speed control operation (CSV mode) (LS_SyncMoveVelocity) Motion Function Block LS_SyncMoveVelocity BOOL Execute InVelocity BOOL UINT Axis Axis UINT Busy BOOL LREAL Velocity Active BOOL BOOL CmdPosMode CommandAborted BOOL UINT BufferMode Error BOOL ErrorID WORD Input-Output UINT Axis Specify the axis to be commanded.
  • Page 548 Chapter2 Motion Function Block 2.7.28 Read CAM table master position (LS_ReadCamTableMasterPos) Motion Function Block LS_ReadCamTableMasterPos BOOL Execute Done BOOL UINT Axis Axis UINT UINT CamTableID Busy BOOL LREAL MasterStartPos MasterPos LREAL LREAL MasterEndPos Error BOOL LREAL SlavePos ErrorID WORD LREAL Scale Input-Output UINT...
  • Page 549 Chapter2 Motion Function Block Slave Scale SlavePos Master MasterStartPos MasterPos MasterEndPos (2) Set the position of serve axis to read in the cam table as SlavePos value. Offset/Gear ratio/Phase correction operation applied to the command axis is not reflected in the MasterPos output. (3) When the cam table master position reading operation is completed, the Done output turns on.
  • Page 550 Chapter2 Motion Function Block 2.7.29 OnOff CAM Operation (LS_OnOffCam) Motion Function Block LS_OnOffCam BOOL Execute InSync BOOL UINT Master Master UINT UINT Slave Slave UINT Busy BOOL BOOL CamOnOff Active BOOL BOOL SkipOnCam BOOL SkipRunCam CommandAborted BOOL UINT MasterValueSource Error BOOL UINT OnCam_ID...
  • Page 551 Chapter2 Motion Function Block Output BOOL InSync Indicates that cam operation has entered the RunCam state. BOOL Busy Indicate that the execution of motion function block is not completed. BOOL Active Indicate whether the current motion function block is controlling the relevant axis. BOOL CommandAborted Indicate that the current motion function block is interrupted by other command.
  • Page 552 Chapter2 Motion Function Block (When turning off CamOnOff in RunCam, the operation must be maintained until the EndOfProfile signal is generated.) SlaveAxis CamOnOff EndOfProfile CamState Stop (7) If the SkipOnCam signal is On, RunCam is executed instantly without OnCam. If CamOnOff turns off after executing RunCam, perform the operation to switch to RunCam->OffCam->Stop state.
  • Page 553 Chapter2 Motion Function Block 2.7.30 RotaryKnife cam profile generation (LS_RotaryKnifeCamGen) Function Block LS_RotaryKnifeCamGen BOOL Execute Done BOOL UINT Axis Axis UINT UINT CamTableID Busy BOOL LREAL PartLength Error BOOL LREAL Circumference ErrorID WORD LREAL CuttingStart LREAL CuttingEnd LREAL CuttingSpdRatio UINT CamType UINT CamCurve CamPointNum UINT...
  • Page 554 Chapter2 Motion Function Block (4) On the Circumference input, enter the circumference of the RotaryKnife. Circumference PartLength PartLength (5) On the CuttingStart input, enter the starting position for the RotaryKnife to start cutting. On the CuttingStart input, enter the ending position for the RotaryKnife to end cutting. The speed of the conveyor and the RotaryKnife are synchronized between CuttingStart and CuttingEnd.
  • Page 555 Chapter2 Motion Function Block axis must start at the 1/2 position of PartLength. PartLength MasterAxis Circumference sRampIn SlaveAxis sRampOut (12) On the CuttingSpdRatio input, set the speed ratio for the cutting region. If CuttingSpdRatio is set to 100, a cam profile is generated which operates by synchronizing 1:1 with the speed of the main axis in the cutting region.
  • Page 556 Chapter2 Motion Function Block 2.7.31 Cross sealer cam profile generation (LS_CrossSealCamGen) Function Block LS_CrossSealCamGen BOOL Execute Done BOOL UINT Axis Axis UINT UINT CamTableID Busy BOOL LREAL PartLength Error BOOL LREAL Circumference ErrorID WORD LREAL SealStart LREAL SealEnd LREAL SealSpdRatio UINT CamType UINT CamCurve CamPointNum...
  • Page 557 Chapter2 Motion Function Block (3) On the Circumference input, enter the circumference of cross sealer. (4) Both the main and serve axes of the generated cam profile is output within the 0-360 range. For the PartLength and Circumference values, you must enter the distance moved by the main axis when the main and serve axes move in 360 value. Circumference PartLength (5) In the SealStart input, enter the position where the cross sealer seals in the sealStart input.
  • Page 558 Chapter2 Motion Function Block LS_RotaryCutCamGen. For the RampIn profile, the operation starts when the main axis is at 270 and not at 0. The profile also starts to perform sealing when the main axis is at 180 degrees. (12) The sRampIn and sRampOut types generate a shortened cam profile of RampIn and RampOut respectively. When operating using sRampIn and sRampOut, the cam operation starts when the main axis is at 0.
  • Page 559 Chapter2 Motion Function Block 2.7.32 Expand OnOff CAM Operation (LS_OnOffCamEx) Motion Function Block LS_OnOffCamEx BOOL Execute InSync BOOL UINT Master Master UINT UINT Slave Slave UINT Busy BOOL BOOL CamOnOff Active BOOL BOOL SkipOnCam BOOL SkipRunCam CommandAborted BOOL UINT MasterValueSource Error BOOL UINT...
  • Page 560 Chapter2 Motion Function Block 3: Use the profile generated with LS_CrossSealCamGen. LREAL StartModeParam Set the parameter according to the method for starting the cam operation. Output BOOL InSync Indicates that cam operation has entered the RunCam state. BOOL Busy Indicate that the execution of motion function block is not completed. BOOL Active Indicate whether the current motion function block is controlling the relevant axis.
  • Page 561 Chapter2 Motion Function Block Before After applying applying Serve axis Position Main, Serve axis Main axis starting point Position MasterOffset After applying Serve axis Position Before applying SlaveOffset Main, Serve axis Main axis starting point Position (4) Set the magnification of cam data to be applied in MasterScaling and SlaveScaling. MasterScaling determines the scale rate of the main-axis data, and SlaveScaling determines the scale rate of the sub-axis data.
  • Page 562 Chapter2 Motion Function Block OnOffCam StartPosition SlaveOffset MasterOffset Execute CamOnOff InSync EndOfProfile Stop CamState (8) The EndOfProfile signal outputs On when passing the end of a profile during operation of each OnCam/OffCam/RunCam cam profile. (9) If the CamOnOff signal is Off, the operation is performed to switch to RunCam->OffCam->Stop state. If the CamOnOff signal is switched from Off to On in the RunCam state, the RunCam state is maintained if OffCam is not yet executed.
  • Page 563 Chapter2 Motion Function Block 2.7.33 Master position loop control (LS_MasterPLoopControlOn) Motion Function Block LS_MasterPLoopControlOn BOOL Execute InControl BOOL UINT Axis Axis UINT LREAL P_Gain Busy BOOL LREAL I_Gain Active BOOL LREAL VelFF_Gain CommandAborted BOOL LREAL CtrlLimit Error BOOL ErrorID WORD Input-Output UINT Axis...
  • Page 564 Chapter2 Motion Function Block 2.7.34 Master position loop control Off (LS_MasterPLoopControlOff) Motion Function Block LS_MasterPLoopControlOff BOOL Execute Done BOOL UINT Axis Axis UINT Busy BOOL Error BOOL ErrorID WORD Input-Output UINT Axis Set the command axis. (Refer to 2.2.1 Setting Range by Product) Input BOOL Execute...
  • Page 565 Chapter2 Motion Function Block 2.7.35 Cross - coupled control (LS_CrossCoupledControlOn) Motion Function Block LS_CrossCoupledControlOn BOOL Execute InControl BOOL UINT Axis Axis UINT UINT PairAxis PairAxis UINT LREAL P_Gain Busy BOOL BOOL SlaveMode Active BOOL CommandAborted BOOL Error BOOL ErrorID WORD Input-Output UINT Axis...
  • Page 566 Chapter2 Motion Function Block 2.7.36 Cross - coupled control Off (LS_CrossCoupledControlOff) Motion Function Block LS_CrossCoupledControlOff BOOL Execute Done BOOL UINT Axis Axis UINT UINT PairAxis PairAxis UINT Busy BOOL Error BOOL ErrorID WORD Input-Output UINT Axis Set the command axis. (Refer to 2.2.1 Setting Range by Product) UINT PairAxis Set the Connect axis.
  • Page 567 Chapter2 Motion Function Block 2.7.37 Motion data Save (LS_SaveMotionData) Motion Function Block LS_SaveMotionData BOOL Execute Done BOOL UINT Mode Busy BOOL Error BOOL ErrorID WORD Input BOOL Execute Give motion data save command to the relevant axis in the rising Edge. UINT Mode Unused (Only‘0’is settable.)
  • Page 568 Chapter2 Motion Function Block 2.8 Coordinate System Operation Function Block 2.8.1 Machine information setting (MC_SetKinTransform) Motion Function Block MC_SetKinTransform BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT UINT KinType Busy BOOL UINT KinExtParam Active BOOL CommandAborted BOOL ARRAY[0..11] OF LREAL[ ] KinParam LREAL ToolOffsetX...
  • Page 569 Chapter2 Motion Function Block (3) The KinType input is used to set the type of the device. You can set the device as shown below. 1) 0: none 2) 1: XYZ 3) 2: Delta3 4) 3: Delta3R 5) 4: LinearDelta3 6) 5: LinearDelta3R 7) 6: T-Gantry 8) 7: T-GantryR...
  • Page 570 Chapter2 Motion Function Block KinParam[3] Rm: Length from the center of the moving frame to the link of the moving frame (mm) 2-185...
  • Page 571 Chapter2 Motion Function Block 2.8.2 PCS Setting (MC_SetCartesianTransform) Motion Function Block MC_SetCartesianTransform BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT LREAL TransX Busy BOOL LREAL TransY Active BOOL CommandAborted BOOL LREAL TransZ LREAL RotAngleA Error BOOL LREAL RotAngleB ErrorID WORD RotAngleC Input-Output UINT...
  • Page 572 Chapter2 Motion Function Block (3) TransX/TransY/TransZ is the move distance from MCS origin to PCS origin. RotA/RotB/RotC is the rotation value of PCS, RotA is the value that rotates PCS on the X-axis of PCS, RotB is the value that rotates PCS on the Y-axis of PCS, RotC is the value that rotates PCS on the Z-axis of PCS.
  • Page 573 Chapter2 Motion Function Block 2.8.3 Workspace setting (LS_SetWorkspace) Motion Function Block LS_SetWorkspace BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT UINT WorkspaceType Busy BOOL BOOL WorkspaceError Active BOOL CommandAborted BOOL ARRAY[0..7] OF LREAL[ ] WorksapceParam Error BOOL ErrorID WORD Input-Output UINT AxesGroup Set the axes group to set the workspace (1 ~ 16: 1 group ~ 16 group)
  • Page 574 Chapter2 Motion Function Block (5) WorkspaceParam input sets the parameters depending on the work space type. (6) The parameter setting of work space is explained as follows. Refer to chapter 9.4.5 Workspace setting in motion controller’s manual for more details. 1) Rectangle Parameter Value...
  • Page 575 Chapter2 Motion Function Block 4) Sector Parameter Value WorkspaceParam[0] L end (mm) Y Axis WorkspaceParam[1] L start(mm) WorkspaceParam[2] Z max(mm) WorkspaceParam[3] Z min(mm) WorkspaceParam[4] EndAngle(degree) WorkspaceParam[5] StartAngle(degree) EndAngle StartAngle X Axis 2-190...
  • Page 576 Chapter2 Motion Function Block 2.8.4 Time-linear interpolation operation for absolute position of coordinate system (LS_MoveLinearTimeAbsolute) Motion Function Block LS_MoveLinearTimeAbsolute BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT UINT CoordSystem Busy BOOL ARRAY[0..5] OF LREAL[ ] Position Active BOOL UINT TrajType CommandAborted BOOL LREAL...
  • Page 577 Chapter2 Motion Function Block Example program This example shows the linear interpolation to the target position of MCS (100, 200,-380) when the current command position is 0,0,-380 of MCS coordinate system. (a) Function block setting (b) Timing diagram %MX1 MC_MoveLinearTimeAbsolute.Done MC_MoveLinearTimeAbsolute.Busy MC_MoveLinearTimeAbsolute.Active 2-192...
  • Page 578 Chapter2 Motion Function Block 2.8.5 Time-linear interpolation operation for relative position of coordinate system (LS_MoveLinearTimeRelative) Motion Function Block LS_MoveLinearTimeRelative BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT UINT CoordSystem Busy BOOL ARRAY[0..5] OF LREAL[ ] Position Active BOOL UINT TrajType CommandAborted BOOL LREAL...
  • Page 579 Chapter2 Motion Function Block 2.8.6 Circular interpolation operation for absolute position of coordinate system (MC_MoveCircularAbsolute2D) Motion Function Block MC_MoveCircularAbsolute2D Done BOOL Execute BOOL AxesGroup UINT AxesGroup UINT Busy UINT CircMode BOOL Active LREAL[ ] AuxPoint BOOL CommandAborted LREAL[ ] EndPoint BOOL Error UINT...
  • Page 580 Chapter2 Motion Function Block (1) This motion function block issues absolute position circular interpolation command based on coordinate system on the axis group designated by AxesGroup input. (2) When this motion function block starts, each axis performs circular trajectory interpolation control referring to the auxiliary point input, and the movement direction is determined by Path Choice input.
  • Page 581 Chapter2 Motion Function Block (c) Circular Interpolation using Radius Speciation (CircMode = 2) This method performs circular interpolation to the target position by starting operation at the current position, and following a circular trajectory with a designated radius from the current position to the target position. In the figure below, the current position corresponds to the axes group coordinate at the start of the command, the radius corresponds to the X coordinate input for the AuxPoint, and the target position corresponds to the absolute coordinate input for the EndPoint.
  • Page 582 Chapter2 Motion Function Block (b) Timing diagram %MX1 MC_MoveCircularAbsolute2D.Done MC_MoveCircularAbsolute2D.Busy MC_MoveCircularAbsolute2D.Active 2-197...
  • Page 583 Chapter2 Motion Function Block 2.8.7 Circular interpolation operation for relative position of coordinate system (MC_MoveCircularRelative2D) Motion Function Block MC_MoveCircularRelative2D Done BOOL Execute BOOL AxesGroup UINT AxesGroup UINT Busy UINT CircMode BOOL Active LREAL[ ] AuxPoint BOOL CommandAborted LREAL[ ] EndPoint BOOL Error UINT...
  • Page 584 Chapter2 Motion Function Block WORD ErrorID Output the number of error occurred while motion function block is running. (1) This motion function block issues relative position circular interpolation command on the axes group designated by AxesGroup input. (2) When this motion function block starts, each axis performs circular trajectory interpolation control referring to the auxiliary point input, and the movement direction is determined by Path Choice input.
  • Page 585 Chapter2 Motion Function Block axis AuxPoint EndPoint Start Point X axis (f) Circular interpolation with radius designation form In this method, operation starts at the current position, and it does circular interpolation to the target position along the circular path which has a radius of the value specified in the radius. In the figure below, the current position corresponds to the axes group coordinate at the start of the command, the diameter corresponds to the X coordinate input for the AuxPoint, and the target position corresponds to the relative coordinate input for the EndPoint.
  • Page 586 Chapter2 Motion Function Block (e) Function block setting %MX1 MC_MoveCircularRelative2D.Done MC_MoveCircularRelative2D.Busy MC_MoveCircularRelative2D.Active 2-201...
  • Page 587 Chapter2 Motion Function Block 2.8.8 Synchronization setting of conveyor belt (MC_TrackConveyorBelt) Motion Function Block MC_TrackConveyorBelt BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT UINT ConveyorAxis Busy BOOL ARRAY[0..5] OF LREAL[ ] ConveyorOrigin Active BOOL ARRAY[0..5] OF LREAL[ ] ObjectPosition Error BOOL UINT CoordSystem...
  • Page 588 Chapter2 Motion Function Block 2.8.9 Synchronization setting of the rotary table (MC_TrackRotaryTable) Motion Function Block MC_TrackRotaryTable BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT UINT RotaryAxis Busy BOOL ARRAY[0..5] OF LREAL[ ] RotaryOrigin Active BOOL ARRAY[0..5] OF LREAL[ ] ObjectPosition Error BOOL UINT...
  • Page 589 Chapter2 Motion Function Block 2.8.10 JOG operation of the coordinate system (MC_RobotJog) Function Block LS_RobotJog BOOL Enable Enabled BOOL AxesGroup UINT AxesGroup UINT BOOL Low_High Busy BOOL BOOL Pos_X Error BOOL BOOL Neg_X ErrorID WORD BOOL Pos_Y BOOL Neg_Y BOOL Pos_Z BOOL Neg_Z...
  • Page 590 Chapter2 Motion Function Block check, and teaching. Jog can be used by dividing the speed into high speed and low speed. (3) It can be respectively applied to both high speed and low speed. If you change the value set in Low / High when the Enable input is On (JOG operation status), the speed will change without stopping JOG operation.
  • Page 591 Chapter2 Motion Function Block 2.8.11 Set path operation data (MC_SetMovePath) Motion Function Block LS_SetMovePath BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT ARRAY[] OF BYTE PathData PathData ARRAY[] OF BYTE UINT Step Busy BOOL UINT CommandType Active BOOL UINT Mode Error BOOL UINT...
  • Page 592 Chapter2 Motion Function Block LREAL Jerk Specify the change rate of acceleration/deceleration. [u/s Specify the sequential operation setting of motion function block. UINT BufferMode (Refer to 2.1.4.BufferMode) UINT TransitionMode Unused LREAL TransitionParameter Unused Output BOOL Done Indicate that the path data setting is completed successfully. BOOL Busy Indicate that the execution of motion function block is not completed.
  • Page 593 Chapter2 Motion Function Block 2.8.12 Delete path operation data (MC_RestMovePath) Motion Function Block LS_ResetMovePath BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT ARRAY[] OF BYTE PathData Busy BOOL UINT Step Active BOOL Error BOOL ErrorID WORD Input-Output Set the group to delete the path operation data. UINT AxesGroup (1 ~ 16: 1 group ~ 16 group)
  • Page 594 Chapter2 Motion Function Block 2.8.13 Read path operation data (MC_GetMovePath) Motion Function Block LS_GetMovePath BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT Busy BOOL ARRAY[] OF BYTE PathData Step Active BOOL UINT Error BOOL ErrorID WORD CommandType UINT Mode UINT CoordSystem UINT Positon...
  • Page 595 Chapter2 Motion Function Block LREAL Jerk Output the change rate of acceleration/deceleration. [u/s Output the sequential operation setting of motion function block. UINT BufferMode (Refer to 2.1.4.BufferMode) UINT TransitionMode Unused LREAL TransitionParameter Unused (1) This motion function block is the function block to read the path data to the axis group specified in AxesGroup input. (2) The step value can be set from 0, and the size of one step is 96 Bytes.
  • Page 596 Chapter2 Motion Function Block 2.8.14 Run path operation (MC_RunMovePath) Motion Function Block LS_RunMovePath BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT ARRAY[] OF BYTE PathData Busy BOOL UINT StartStep Active BOOL UINT EndStep CommandAborted BOOL Error BOOL ErrorID WORD CurStep UINT Input-Output UINT...
  • Page 597 Chapter2 Motion Function Block 2.9 NC Control Function Block 2.9.1 Specify NC program (NC_LoadProgram) Motion Function Block NC_LoadProgram BOOL Execute Done BOOL UINT NcChannel NcChannel UINT STRING ProgramName Busy BOOL UINT LoadMode Error BOOL ErrorID WORD Input-Output UINT NcChannel Set the NC channel to make the command. Input BOOL Execute...
  • Page 598 Chapter2 Motion Function Block 2.9.2 Specify block operation (NC_BlockControl) Motion Function Block NC_BlockControl BOOL Enable Enabled BOOL UINT NcChannel NcChannel UINT BOOL SingleBlock Busy BOOL BOOL OptionalStop Error BOOL ErrorID WORD Input-Output UINT NcChannel Set the NC channel to make the command. Input BOOL Enable...
  • Page 599 Chapter2 Motion Function Block 2.9.3 Reset (NC_Reset) Motion Function Block NC_Reset BOOL Execute Done BOOL UINT NcChannel NcChannel UINT Busy BOOL Error BOOL ErrorID WORD Input-Output UINT NcChannel Set the NC channel to make the command. Input BOOL Execute In the rising Edge, the NC is reset. Output BOOL Done...
  • Page 600 Chapter2 Motion Function Block Item Status Output Signal CNC Alarm signal AL Extinguish if there is no cause for the alarm Reference position return completion Hold Cancel(Emergency Stop) S, T, B Code Hold M Code Cancel M, S, T strobe signal Cancel Spindle revolution signal(S analog signal) Hold...
  • Page 601 Chapter2 Motion Function Block 2.9.4 Emergency stop (NC_Emergency) Motion Function Block NC_Emergency BOOL Enable Status BOOL UINT NcChannel NcChannel UINT Valid BOOL Busy BOOL Error BOOL ErrorID WORD Input-Output UINT NcChannel Set the NC channel to make the command. Input BOOL Enable The emergency stop is executed while the input is '1'.
  • Page 602 Chapter2 Motion Function Block 2.9.5 Start automatic operation (NC_CycleStart) Motion Function Block NC_CycleStart BOOL Execute Done BOOL UINT NcChannel NcChannel UINT Busy BOOL Error BOOL ErrorID WORD Input-Output UINT NcChannel Set the NC channel to make the command. Input BOOL Execute Start the automatic operation in the rising Edge.
  • Page 603 Chapter2 Motion Function Block 2.9.6 Feed hold (NC_FeedHold) Motion Function Block NC_FeedHold BOOL Enable Status BOOL UINT NcChannel NcChannel UINT Valid BOOL Error BOOL ErrorID WORD Input-Output UINT NcChannel Set the NC channel to make the command. Input BOOL Enable The NC channel will be in Feed Hold status while the input is enabled.
  • Page 604 Chapter2 Motion Function Block 2.9.7 NC homing (LS_Home) Motion Function Block NC_Home BOOL Execute Done BOOL UINT NcChannel NcChannel UINT Busy BOOL UINT NcAxis Active BOOL UINT ReferenceNum Error BOOL ErrorID WORD Input-Output UINT NcChannel Set the NC channel to make the command. Input BOOL Execute...
  • Page 605 Chapter2 Motion Function Block 2.9.8 Rapid traverse override (NC_RapidTraverseOverride) Motion Function Block NC_RapidTraverseOverride BOOL Enable Enabled BOOL UINT NcChannel NcChannel UINT LREAL VelFactor Busy BOOL Error BOOL LREAL AccFactor ErrorID WORD LREAL JerkFactor Input-Output UINT NcChannel Set the NC channel to make the command. Input BOOL Enable...
  • Page 606 Chapter2 Motion Function Block 2.9.9 Cutting feed override (NC_CuttingFeedOverride) Motion Function Block NC_CuttingFeedOverride BOOL Enable Enabled BOOL UINT NcChannel NcChannel UINT LREAL VelFactor Busy BOOL Error BOOL LREAL AccFactor ErrorID WORD LREAL JerkFactor Input-Output UINT NcChannel Set the NC channel to make the command. Input BOOL Enable...
  • Page 607 Chapter2 Motion Function Block 2.9.10 Spindle override (NC_SpindleOverride) Motion Function Block NC_SpindleOverride BOOL Enable Enabled BOOL UINT NcChannel NcChannel UINT LREAL VelFactor Busy BOOL Error BOOL LREAL AccFactor ErrorID WORD LREAL JerkFactor Input-Output UINT NcChannel Set the NC channel to make the command. Input BOOL Enable...
  • Page 608 Chapter2 Motion Function Block 2.9.11 M Code operation completed (NC_McodeComplete) Motion Function Block NC_McodeComplete BOOL Execute Done BOOL UINT NcChannel NcChannel UINT Busy BOOL Error BOOL ErrorID WORD Input-Output UINT NcChannel Set the NC channel to make the command. Input BOOL Execute Set the completion of the M Code operation on the corresponding the...
  • Page 609 Chapter2 Motion Function Block 2.9.12 S Code operation completed (NC_ScodeComplete) Motion Function Block NC_ScodeComplete BOOL Execute Done BOOL UINT NcChannel NcChannel UINT Busy BOOL Error BOOL ErrorID WORD Input-Output UINT NcChannel Set the NC channel to make the command. Input BOOL Execute Set the completion of the S Code operation on the corresponding the...
  • Page 610 Chapter2 Motion Function Block 2.9.13 T Code operation completed (NC_TcodeComplete) Motion Function Block NC_ScodeComplete BOOL Execute Done BOOL UINT NcChannel NcChannel UINT Busy BOOL Error BOOL ErrorID WORD Input-Output UINT NcChannel Set the NC channel to make the command. Input BOOL Execute Set the completion of the T Code operation on the corresponding the...
  • Page 611 Chapter2 Motion Function Block 2.9.14 Read NC parameter(MC_ReadParameter) Motion Function Block NC_ReadParameter BOOL Enable Valid BOOL UINT NcChannel NcChannel UINT UINT NcAxis Busy BOOL ParameterGroup Error BOOL ParameterNumber ErrorID WORD Value LREAL Input-Output UINT NcChannel Set the NC channel to make the command. Input BOOL Enable...
  • Page 612 Chapter2 Motion Function Block Parameter Group Item Description 1. Channel Standard Whether to call the macro when Set whether to call the macro program (9000.nc ~ settings the T code is commanded 9009.nc) when the T code is commanded. Parameter 0: Do not call 1: Call Dwell Method...
  • Page 613 Chapter2 Motion Function Block Parameter Group Item Description 1. Channel Standard Rotary axis Cylindrical This is the axis to which the rotation axis will be settings interpolation mapped during circular interpolation in cylindrical Parameter interpolation mode. The axes are X, Y, Z, and circular interpolation is performed by mapping the rotation axis to the selected axis.
  • Page 614 Chapter2 Motion Function Block Parameter Group Item Description Lower cutting speed limit of the If “Speed-limiting function for the circular milling circular milling ON/OFF” is set to ON, the cutting speed is limited to the set value or more. (0 ~ 10,000 unit/min, real number) Circular milling acceleration Set the acceleration at the circular milling.
  • Page 615 Chapter2 Motion Function Block Parameter Group Item Description 1. Channel 3. Cutting feed Set the upper speed limit of the If the cutting speed exceeding the set value is Setting cutting feed commanded, the cutting speed is limited to the set Parameter value and an alarm occurs.
  • Page 616 Chapter2 Motion Function Block Parameter Group Item Description Compensation amount of the tool Compensation amount 128 to be used to diameter 128 compensate the tool diameter Tool Compensation amount 1 of the Compensation amount 1 to be used to compensate length tool length the tool length...
  • Page 617 Chapter2 Motion Function Block Parameter Group Item Description G58 workpiece coordinate system Set the G58 workpiece coordinate system value for value 9 the W axis. G59 workpiece coordinate system Set the G59 workpiece coordinate system value for value 1 the X axis. ……...
  • Page 618 Chapter2 Motion Function Block Parameter Group Item Description 1. Channel 11. Macro Macro program call M code Assign the M code number to call the macro Program (9020.nc) program (9020.nc ~ (9020.nc ~ 9029.nc) with the M Parameter code. ※ 0, 30 of the input values are ignored. (0~255, integer) ……...
  • Page 619 Chapter2 Motion Function Block Parameter Group Item Description constant surface speed Note1) (0 ~ 100,000, real number) 16. Relative Relative coordinate’s offset value Set the relative coordinate’s offset value for the X Setting axis. Relative coordinate’s offset value Set the relative coordinate’s offset value for the Y axis.
  • Page 620 Chapter2 Motion Function Block Parameter Group Item Description Relative coordinate’s offset value Set the relative coordinate’s offset value for the B axis. Relative coordinate’s offset value Set the relative coordinate’s offset value for the C axis. Relative coordinate’s offset value Set the relative coordinate’s offset value for the U axis.
  • Page 621 Chapter2 Motion Function Block Parameter Group Item Description (-100 ~ 100 unit, real number) 2.9.15 Write NC parameter(NC_WriteParameter) Motion Function Block NC_WriteParameter BOOL Execute Done BOOL NcChannel UINT NcChannel UINT UINT NcAxis Busy BOOL ParameterGroup Error BOOL ParameterNumber ErrorID WORD LREAL Value UINT...
  • Page 622 Chapter2 Motion Function Block 2.9.16 Reverse operation(NC_RetraceMove) Motion Function Block NC_RetraceMove BOOL Enable Enabled BOOL UINT NcChannel NcChannel UINT Busy BOOL Error BOOL ErrorID WORD Input-Output UINT NcChannel Specify the NC channel to make commands (1 ~ 4 : Channel 1 ~ Channel 4) Input BOOL Enable...
  • Page 623 Chapter2 Motion Function Block 2.9.17 Block skip(NC_BlockSkip) Motion Function Block NC_BlockSkip BOOL Enable Enabled BOOL NcChannel UINT NcChannel UINT BOOL Skip1 Busy BOOL BOOL Skip2 Error BOOL BOOL Skip3 ErrorID WORD BOOL Skip4 Input-Output UINT NcChannel Specify the NC channel to make commands (1 ~ 4 : Channel 1 ~ Channel 4) Input BOOL...
  • Page 624 Chapter2 Motion Function Block 2.9.18 Dry Run (NC_DryRun) Motion Function Block NC_DryRun BOOL Enable Enabled BOOL NcChannel UINT NcChannel UINT Busy BOOL BOOL AuxFuncLock Error BOOL ErrorID WORD Input-Output UINT NcChannel Specify the NC channel to make commands (1 ~ 4 : Channel 1 ~ Channel 4) Input BOOL Enable...
  • Page 625 Chapter2 Motion Function Block 2.9. 19 Tool Retract/Recover Operation (NC_ToolMode) Motion Function Block NC_ToolMode BOOL Execute Done BOOL NcChannel UINT NcChannel UINT UINT ToolMode Busy BOOL Error BOOL ErrorID WORD Input-Output UINT NcChannel Specify the NC channel to make commands (1 ~ 4 : Channel 1 ~ Channel 4) Input BOOL...
  • Page 626 Chapter2 Motion Function Block 2.9. 20 Read Tool Retract/Recover Modes (NC_ReadToolMode) Motion Function Block NC_ReadToolMode BOOL Enable Enabled BOOL NcChannel UINT NcChannel UINT Busy BOOL ToolMode UINT Error BOOL ErrorID WORD Input-Output UINT NcChannel Specify the NC channel to make commands (1 ~ 4 : Channel 1 ~ Channel 4) Input BOOL...
  • Page 627 Chapter2 Motion Function Block 2.9.21 Mirror Image (NC_MirrorImage) Motion Function Block NC_MirrorImage BOOL Enable Enabled BOOL NcChannel UINT NcChannel UINT BOOL NcAxisX Busy BOOL BOOL NcAxisY Active BOOL BOOL NcAxisZ Error BOOL ErrorID WORD Input-Output UINT NcChannel Specify the NC channel to make commands (1 ~ 4 : Channel 1 ~ Channel 4) Input BOOL...
  • Page 628 Chapter2 Motion Function Block 2.9.22 Spindle operation control (NC_SpindleControl) Motion Function Block NC_SpindleControl BOOL Enable Enabled BOOL UINT NcChannel NcChannel UINT BOOL TgtVelReached Busy BOOL BOOL ZeroVelReached Error BOOL BOOL SS_Control ErrorID WORD Input-Output UINT NcChannel Specify the NC channel to make commands (1 ~ 4 : Channel 1 ~ Channel 4) Input BOOL...
  • Page 629 Chapter2 Motion Function Block 2.9.23 NC optional block skip (NC_BlockOptionalSkip) Motion Function Block NC_BlockOptionalSkip BOOL Execute Done BOOL NcChannel UINT NcChannel UINT Busy BOOL UINT SkipNum Error BOOL ErrorID WORD Input-Output UINT NcChannel Specify the NC channel to make commands (1 ~ 4 : Channel 1 ~ Channel 4) Input BOOL...
  • Page 630 Chapter2 Motion Function Block 2.9. 24 Manual Measurement of Compensation Amount (NC_ManualToolComp) Motion Function Block NC_ManualToolComp BOOL Execute Done BOOL NcChannel UINT NcChannel UINT UINT NcAxis Busy BOOL Error BOOL BOOL JOG_MPG ErrorID WORD BOOL Direction CompValue LREAL BOOL Low_High BOOL Pinput BOOL...
  • Page 631 Chapter2 Motion Function Block 2.9.25 NC spindle gear change (NC_ChgSpindleGear) Motion Function Block NC_ChgSpindleGear BOOL Execute Done BOOL NcChannel UINT NcChannel UINT Busy BOOL LREAL ChangeVelocity Error BOOL BOOL GearChangeCmpl ErrorID WORD LREAL MaxVelocity GearChangeEnable BOOL UINT GearOfMotor UINT GearOfMachine LREAL Backlash LREAL...
  • Page 632 Chapter2 Motion Function Block Backlash compensation amount (Backlash) P gain in a position mode (P_Gain) Feed Forward gain in a position mode (FF_Gain) (6) If setting the ChageVelocity value to values bigger than speed limit values of the relevant axis and executing the function block, the error “0x36C0”...
  • Page 633 Chapter2 Motion Function Block 2.9.26 Export NC program (NC_EXPORTPROGRAM) Motion Function Block NC_EXPORTPROGRAM BOOL Execute Done BOOL STRING SrcProgramName Busy BOOL STRING DstProgramName Error BOOL ErrorID WORD BOOL OverWrite Input BOOL Execute Save program to memory card in Rising Edge. STRING SrcProgramName Set the program name stored in PLC.
  • Page 634 Chapter2 Motion Function Block 2.9.26 NC program Import (NC_IMPORTPROGRAM) Motion Function Block NC_IMPORTPROGRAM BOOL Execute Done BOOL STRING SrcProgramName Busy BOOL Error BOOL STRING DstProgramName ErrorID WORD BOOL OverWrite Input BOOL Execute The program stored in the memory card is saved in the PLC in Rising Edge. STRING SrcProgramName Set the program name stored in memory card.
  • Page 635: Monitor Commands

    Chapter2 Motion Function Block 2.10 Monitor Commands 2.10.1 PLC status Information Reading (READ_PLC_INFO) Motion Function Block READ_PLC_INFO BOOL Enable Valid BOOL Read Data Read Data ANY_PTR ANY_PTR Index Busy UINT BOOL BOOL Error ErrorID WORD Input-Output ANY_PTR Read Data Enter a structure pointer in which to store state information data. Input BOOL Enable...
  • Page 636 Chapter2 Motion Function Block (5) Structures that can be input to ANY_PTR are as follows. Description Struct name Index range Note _Encoder Encoder status information structure _MC_Common Motion common state information structure CPUZ3: 1~9 _MC_Axis CPUZ5: 1~18 Motion axis state information structure CPUZ7: 1~36 _MC_AxesGroup 1~16...
  • Page 637 Chapter2 Motion Function Block Member name Description Data type Note MST_INFO Main axis information UINT AXIS_TYPE Axis type UINT LINKED_NODE Connection device node information UINT LINKED_SLOT Connection device slot information UINT UNIT Axis unit UINT VEL_UNIT Speed unit UINT AX_ERR Axis error code number WORD SVON_INCMPL...
  • Page 638 Chapter2 Motion Function Block Member name Description Data type Note HOME_CMPL Homing completion BOOL Disabled PLCopen Disabled status BOOL Standstill PLCopen Standstill status BOOL Discrete PLCopen Discrete status BOOL Continuous PLCopen Continuous status BOOL Synchronized PLCopen Synchronized status BOOL Homing PLCopen Homing status BOOL Stopping...
  • Page 639 Chapter2 Motion Function Block Member name Description Data type Note (Running or speed is zero) STOP Stop state by the stop command BOOL CMD_FAIL Command error exit status BOOL CMD_CMPL Command execution end BOOL LINTP Linear interpolation operation BOOL CINTP Circular interpolation operation BOOL HOME...
  • Page 640 Chapter2 Motion Function Block Member name Description Data type Note MTCP_Py Y Axis coordinate (MCS) LREAL MTCP_Pz Z Axis Axis coordinate (MCS) LREAL MTCP_A X axis rotation (MCS) LREAL MTCP_B Y axis rotation (MCS) LREAL MTCP_C Z axis rotation (MCS) LREAL PTCP_Px X axis coordinate (PCS)
  • Page 641 Chapter2 Motion Function Block Member name Description Data type Note FRAME_CONTROL1 Multi frame 1 control UINT FRAME_CONTROL2 Multi frame 2 control UINT FRAME_CONTROL3 Multi frame 3 control UINT FRAME_CONTROL4 Multi frame 4 control UINT FRAME_STATE1 Multi frame 1 status UINT FRAME_STATE2 Multi frame 2 status UINT...
  • Page 642 Chapter2 Motion Function Block Member name Description Data type Note TargetQtyCmpl Target quantity completion signal output BOOL PrgmNormalCmpl Program End BOOL PwrFailInAuto Whether there is a power outage during automatic BOOL operation ErrorCode Error code WORD IPR_HeartBeat IPR Heartbeat UDINT IPR_Run IPR operation state (0:stop, 1:running) BOOL...
  • Page 643 Chapter2 Motion Function Block Member name Description Data type Note McodeDistCmpl M code distribution complete signal BOOL McodeM00 Special M code output signal(M00) BOOL McodeM01 Special M code output signal(M01) BOOL McodeM02 Special M code output signal(M02) BOOL McodeM30 Special M code output signal(M30) BOOL McodeData M code data output...
  • Page 644 Chapter2 Motion Function Block Member name Description Data type Note ModalMcode Modal M Code UDINT ModalHcode Modal H Code UDINT ModalWorkCoord Modal Work Coordinate UDINT _NC_ChannelAxis structure details description Member name Description Data type Note Ready Axis ready BOOL Warning Warning occurrence status BOOL Alarm...
  • Page 645 Chapter2 Motion Function Block Member name Description Data type Note Attach Memory card installation BOOL Ready Memory card ready completion BOOL Memory card error BOOL Init Memory card initializing state BOOL FATErr File system error of memory card BOOL Busy Memory card during reading/writing BOOL Detach...
  • Page 646: Chapter 3 Motion Control Function

    Chapter 3 Motion Control function Chapter 3 Motion Control Function 3.1 Function overview Describe Representative functions of motion controller (Coordinate & Linear Interpolation, Circular Interpolation & Stop) briefly. 3.1.1 Position control Execute positioning control for the designated axis from starting position(current position) to goal position.(the position to move to) (1) Control by absolute coordinates (a) Execute positioning control from starting position to goal position designated in motion function block.
  • Page 647: Interpolation Control

    Chapter 3 Motion Control function [ Example ] ■ Starting Position : 5000 ■ Goal Position : -7000 In this condition, it moves reversely and stops at -2000. 5000 -2000 Reverse positioning control(movement value -7000) Goal Position Starting Positon 9.1.2 interpolation control (1) Linear Interpolation Control Execute Linear interpolation control with designated axis at start position.
  • Page 648 Chapter 3 Motion Control function (Y axis) Starting position 4000 Y axis movement value (1000-4000=-3000) Goal 1000 Position X axis 1000 5000 10000 X axis movement value (10000-1000=9000) (b) Linear Interpolation by incremental coordinates type 1) Linear interpolation is performed from the start address to the position including the target movement direction and movement amount for each axis.
  • Page 649 Chapter 3 Motion Control function (2) Circular Interpolation control Execute interpolation operation along the trace of circle with 2 axes in forward direction that already designated for each axis. Circular interpolation has 3 types according to auxiliary point, Middle point method passing auxiliary point, Center point method using auxiliary point as center of circle and Radius method using auxiliary point as radius of circle.
  • Page 650 Chapter 3 Motion Control function (b) Circular interpolation with center point designation form 1) Starts operating from starting position and execute circular interpolation along trace of circle that has distance from starting point to designated center point as radius. Forward Direction Goal Operating by circular interpolation Position...
  • Page 651 Chapter 3 Motion Control function (c) Circular interpolation with radius designation form 1) Starts operating from starting position and execute circular interpolation along trace of circular arc that has value designated in auxiliary point of main axis as it radius. An arc whose central point varies depending on the sign of the radius is drawn. Forward Direction Operating by circular interpolation when the sign of the radius <...
  • Page 652: Speed Control

    Chapter 3 Motion Control function 9.1.3 Speed control (1) Execution is made by speed control commands, and the operation proceeds at the established rate until buffer commands are executed, or stop commands are entered. (2) Speed control has forward operation and reverse operation. (a) Forward direction operation: In case of velocity >...
  • Page 653: Torque Control

    Chapter 3 Motion Control function 9.1.4 Torque control (1) The execution is made by the torque control command, and the operation is done in the set torque until the buffer command or stop command is entered. (2) Torque control have forward operation and reverse operation. (a) Forward direction operation: In case of torque >...
  • Page 654 Chapter 3 Motion Control function 3.2 Homing In case the position control function of motion controller is used, the origin must be determined first to execute commands based on the absolute coordinate position. The position value of absolute coordinates is the distance based on the predetermined origin(0 position).
  • Page 655 Chapter 3 Motion Control function 3.1.2 Homing 1) Operation Homing is carried out to confirm the origin of the machine when applying the power. Before performing the homing, parameters related to the homing of servo drive must be set in each axis. When the origin position is determined by homing, the origin detection signal is not recognized during the motion control operation.
  • Page 656 Chapter 3 Motion Control function  Relevant motion function block Operation Name Description condition MC_Home Edge Perform homing MC_Home BOOL Execute Done BOOL UINT Axis Axis UINT LREAL Position Busy BOOL UINT BufferMode Active BOOL CommandAborted BOOL Error BOOL ErrorID WORD Operation Name...
  • Page 657 Chapter 3 Motion Control function 2) L7NH Series servo drive homing parameters and operation The following figure shows input and output definitions of homing-related L7NH series servo drive parameters. The velocity, acceleration and homing methods can be specified. (1) Parameter for homing return Index Name Data Type...
  • Page 658 Chapter 3 Motion Control function (2) Homing Method(0x6098) L7NH Value Description Whether to apply No Homing Unavailabl (1) If NOT switch is Off, the initial movement direction becomes CW. If NOT switch is On, change of direction is made. The location that meets the first index pulse during operation in CCW after NOT switch is On becomes the Home position.
  • Page 659 Chapter 3 Motion Control function L7NH Value Description Whether to apply If the Home switch is Off, (5) and (6) method change direction. After the home switch is is Off, the place where the first index pulse meets during operation becomes the home position. Unavailabl 5, 6 Index pulse...
  • Page 660 Chapter 3 Motion Control function L7NH Value Description Whether to apply In (11) to (14) methods, the origin position is determined by the Home switch and NOT switch. (11) Upper figure: If NOT switch is Off, operation is made at switch search velocity, and the initial movement direction becomes CW.
  • Page 661 Chapter 3 Motion Control function below. L7NH Value Description Whether to apply Index pulse Home switch Negative limit switch (NOT) If the NOT switch is On ,(17) method change direction. The position where the NOT switch is turned off during operation after being turned on becomes the home position. Unavailabl Negative limit switch (NOT)
  • Page 662 Chapter 3 Motion Control function L7NH Value Description Whether to apply The Home position is determined as in (3) and (4) method, but index pulse is not used. In addition, the point where the Home switch is On/Off becomes the Home position. Unavailabl 19, 20 Home switch...
  • Page 663 Chapter 3 Motion Control function L7NH Value Description Whether to apply The Home position is determined as from (7) to (10) method but index pulse is not used. In addition, the point where the Home switch is On/Off becomes the Home position. (24) supported , 23, 24,...
  • Page 664 Chapter 3 Motion Control function L7NH Value Description Whether to apply The location that meets index pulse first during movement in the CCW/CW becomes the Home position. 33, 34 Supported Homing operation starting point becomes the Home position. Supported The first movement direction is CW direction, and it operates at the switch search speed. If it collides with a reverse stopper (Negative Stopper), it waits according to the torque limit value (0x2409) when returning to the home using the stopper and the time set value (0x240A) when returning to the home using the stopper, and then changes direction.
  • Page 665 Chapter 3 Motion Control function L7NH Value Description Whether to apply The first movement direction is CW direction, and it operates at the switch search speed. If it collides with a reverse stopper (Negative Stopper), it waits according to the torque limit value (0x2409) when returning to the home using the stopper and the time set value (0x240A) when returning to the home using the stopper, and then completes home return.
  • Page 666 Chapter 3 Motion Control function 3) MC_STOP (immediate stop) command operation during homing L7NH series can issue a stop command with MC_STOP command during homing. At this time, the deceleration operation varies according to the Quick Stop Option Code (0x605A) parameter. (1) Stop operation according to quick Stop Option Code (0x605A) Changee Variable type...
  • Page 667: Single-Axis Position Control

    Chapter 3 Motion Control function 3.2 Type of Control Operation Motion control modules execute control through programs set inmotion control program. Kinds of motion control operations include speed position control, speed velocity control, speed torque control, interpolation control, switching control between position/velocity, switching control between position/torque, and switching control between velocity/torque.
  • Page 668 Chapter 3 Motion Control function Velocity Distance=80 Time Position 100.0 40.0 20.0 Time 2) 1-Forward direction Positioning is executed toward the absolute position of forward direction. In case the target position is set with the range that exceeds infinite running repetition position, error (error code: 0x1081) occurs. [Example] The absolute position operation is executed with the following settings.
  • Page 669 Chapter 3 Motion Control function [Example] The absolute position operation is executed with the following settings. Infinite running repetition position: 360.0 Current position : 45.0 Goal Position : 270.0 Since the movement distance is 225.0°in case of the operation in forward direction, and 135.0°in case of the operation in reverse direction, operation is made in reverse direction, the shortest distance direction.
  • Page 670 Chapter 3 Motion Control function Velocity Time Position 100.0 70.0 15.0 Time 5) 4- Current direction Positioning is executed depending on the current operating direction. In case the current operating direction is forward, operation is made in the same way as in Direction=‘1-forward direction’...
  • Page 671 Chapter 3 Motion Control function MC_MoveAbsolute Done BOOL Execute BOOL Axis UINT Axis UINT Busy BOOL ContinuousUpdate BOOL Active LREAL Position BOOL LREAL Velocity CommandAborted BOOL Error LREAL Acceleration BOOL ErrorID LREAL Deceleration WORD LREAL Jerk UINT Direction UINT BufferMode 3-26...
  • Page 672 Chapter 3 Motion Control function 2) Control by Incremental method (「Relative positioning operation(MC_MoveRelative)」) (1) It moves the object as much as the target moving amount from start position. Unlike the target position of the a bsolute coordinate, the value specified on target position is not position value. That is a transfer amount from the starting position.
  • Page 673: Single-Axis Speed Control

    Chapter 3 Motion Control function 3.2.2 Single-axis speed control Execution is made by motion function block(「Specified velocity operation (MC_MoveVelocity)」), and operation is performed at the set velocity until stop condition is inputted. 1) Control features (1) Speed control operation of the specified axis is executed using specified velocity and acceleration/deceleration. T he velocity control is executed through a method to transmit the target position value that corresponds to the targ et velocity using position control of servo drive.
  • Page 674 Chapter 3 Motion Control function 3) Operation timing Speed Reaching Target Execute stop command velocity Target Stop with velocity deceleration of stop command TIme Execute InVelocity Busy Active Execute stop command 3-29...
  • Page 675: Single-Axis Torque Control

    Chapter 3 Motion Control function 3.2.3 Single-axis torque control If motion function block(「Torque control(MC_TorqueControl)」) is executed, torque control of the axis is made with the set torque value. 1) Control features (1) Torque control of the specified axis is made using target torque value and torque rising slope. (2) Torque rising slope (TorqueRamp) is the rate of change in torque per second to the target torque, and time to r each the target torque can be calculated as follows.
  • Page 676 Chapter 3 Motion Control function 3) Operation timing Speed Reaching Execute stop Target Torque command Target Torque Torque Ramp (=Deceleration with stop command) TIme Execute InTorque Busy Active Execute stop command 3-31...
  • Page 677 Chapter 3 Motion Control function 3.2.4 Specified Velocity Operation after Position Operation Speed control of the axis specified after being executed by motion function block (「Specified speed operation after relative position operation (MC_MoveContinuousRelative)」 and 「Specified speed operation after absolute position operation (MC_MoveContinuousAbsolute)」) is carried out after the execution of position control that ends with end rate specified from starting position (current stop position) to target position (position of point to move) at the rate specified in end velocity (EndVelocity) if there are no pending commands.
  • Page 678 Chapter 3 Motion Control function MC_MoveContinousRelative BOOL Execute InEndVelocity BOOL UINT Axis Axis UINT BOOL ContinousUpdate Busy BOOL LREAL Distance Active BOOL LREAL EndVelocity CommandAborted BOOL LREAL Velocity Error BOOL LREAL Acceleration ErrorID WORD LREAL Deceleration LREAL Jerk UINT BufferMode 3) Operation timing Speed Velocity...
  • Page 679: Switching Control

    Chapter 3 Motion Control function 3.2.5 Switching control In motion control module, switching control means real-time control switch between position control / velocity control / torque control. In case the control mode that is currently being executed (position control, velocity control, torque control) are intended to change to a different control mode immediately, BufferMode of commands is to be set to Aborting, and relevant motion function block is to be executed.
  • Page 680 Chapter 3 Motion Control function halt (MC_Halt) during operation with velocity control, performing operation stop with immediate stop (MC_Stop) motion function block or executing other motion function block. 7) Example of using switching control 3-35...
  • Page 681 Chapter 3 Motion Control function Execute First Done CommandAborted Test Second CommandAborted Position Control Velocity Control 3000 Velocity 2000 Position Time 3-36...
  • Page 682 Chapter 3 Motion Control function 3.2.6 Axis groups control Axis group control is a function to control the trajectory of moving objects by setting involved multiple axes into one axis group. For axis group control, axis group is to be set. Axis group operation includes linear interpolation, circular interpolation and helical interpolation.
  • Page 683 Chapter 3 Motion Control function (3) Removes all axes from the group It means removing all axes from the axis group. Name Description Operation condition MC_UngroupAllAxes Edge Removes all axes from the group MC_UngroupAllAxes BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT Busy...
  • Page 684: Linear Interpolation Control

    Chapter 3 Motion Control function 3.2.7 Linear Interpolation Control Interpolation of multiple axes from staring point (current stop position) to target position is performed with linear trajectory by using relevant axes set in the axis group. Linear interpolation can be performed up to 10 axes. 1) Linear interpolation control with absolute coordinates (「Absolute positioning linear interpolation operation(MC_MoveLinearAbsolute)」) (1) Executes linear interpolation from starting position to the target position designated on positioning data.
  • Page 685 Chapter 3 Motion Control function (5)Related Motion Function Block Name Description Operation condition MC_MoveLinearAbsolute Edge Absolute positioning linear interpolation operation MC_MoveLinearAbsolute Done BOOL Execute BOOL AxesGroup UINT AxesGroup UINT Busy LREAL[ ] Position BOOL Active LREAL Velocity BOOL CommandAborted LREAL Acceleration BOOL Error...
  • Page 686 Chapter 3 Motion Control function (7) Operation timing Start position (1000.0, 4000.0) Goal Position (10000.0, 1000.0) Goal speed : 10000.0 Position of axis 2 Starting position 4000 Moving amount (1000-4000 =-3000) Target 1000 position Position of axis 1 1000 5000 10000 Moving amount of axis 1 (10000-1000=9000)
  • Page 687 Chapter 3 Motion Control function 2) Linear interpolation control with relative coordinates (「Relative positioning interpolation operation (MC_MoveLinearRelative)」) (1) Linear interpolation is executed from starting position to movement direction targeted by each axis and position t hat includes movement direction. Positioning control is on basis of the current stop position. (2) Moving direction depends on the sign of the goal position (Moving amount) ■...
  • Page 688 Chapter 3 Motion Control function (5) Related Motion Function Block Name Description Operation condition MC_MoveLinearRelative Edge Relative positioning linear interpolation operation MC_MoveLinearRelative Done BOOL Execute BOOL AxesGroup UINT AxesGroup UINT Busy LREAL[ ] Distance BOOL Active LREAL Velocity BOOL CommandAborted LREAL Acceleration BOOL...
  • Page 689 Chapter 3 Motion Control function 3.2.8 ARC Interpolation Control Interpolation operation is performed along the trajectory of the circle in the direction of axis progress set by using two axes set in the axis group. There are three kinds of methods for circular interpolation such as midpoint method that passes through the position specified in auxiliary point, center point method that considers the position specified in auxiliary point as center point and radius method that takes the value specified in auxiliary point as the radius of an arc depending on ‘CircMode’...
  • Page 690 Chapter 3 Motion Control function (5 ) Operation pattern Start position (0.0, 0.0) Goal Position (10000.0, 6000.0) Midpoint Position (2000.0, 6000.0) Method(CircMode): Midpoint(0) Direction(PathChoice): - (Ignored in middle point method) Sub-axis forward Action by circular interpolation Middle point (2000, 6000) Target position (10000, 6000) 6000...
  • Page 691 Chapter 3 Motion Control function 2) Circular interpolation with center point designation form. 1) Starts operating from starting position and execute circular interpolation along trace of circle that has distance fro m starting point to designated center point as radius. 2) Movement direction is determined by the direction set in “PathChoice”...
  • Page 692 Chapter 3 Motion Control function (4) Restrictions of Using Circular interpolation control using center point specification method cannot be performed in case of the following errors. • In case there is an axis which is in the origin undetermined state among configuration axes at the time of absolute coordinate circular interpolation operation (error code: 0x20A0) •...
  • Page 693 Chapter 3 Motion Control function 3) Circular interpolation with radius point designation form. (1) Circular interpolation is performed from starting position to target position along the trajectory of the arc that take s the value set in circular interpolation auxiliary point. The arc that has center point depending on the sign of radi us ((+): arc angle <180°, (-): arc angle>=180°) is drawn.
  • Page 694 Chapter 3 Motion Control function (5 ) Operation pattern Start position (1000.0, 1000.0) Goal Position (9000.0, 1000.0) Auxiliary Position (5000.0, 0.0) Method(CircMode): Radius(2) Direction(PathChoice): CW(0) 「CW, Arc<180° 」 Circular interpolation Forward action Goal position Starting point 1000 (9000,1000) (1000,1000) Reverse Forward 1000 5000...
  • Page 695 Chapter 3 Motion Control function 4) Related Motion Function Block (1) Absolute position circular interpolation operation Name Description Operation condition MC_MoveCircularAbsolute Edge Absolute position circular interpolation operation MC_MoveCircularAbsolute Done BOOL Execute BOOL AxesGroup UINT AxesGroup UINT Busy UINT CircMode BOOL LREAL[ ] AuxPoint Active...
  • Page 696 Chapter 3 Motion Control function 5) Helical Interpolation (1) Three axes are used in the execution of circular interpolation commands(「Absolute positioning circular interpolati on operation (MC_MoveCircularAbsolute)」, 「Relative positioning circular interpolation operation (MC_MoveCircular Relative)」). That is, two axes move the trajectory of the arc depending on circular interpolation settings, and one axis performs linear interpolation in synchronization with circular interpolation motion.
  • Page 697 Chapter 3 Motion Control function (5 ) Operation pattern Start position (650.0, 400.0, 0) Goal Position (400.0, 1200.350) Center point Position (400.0, 400.0, 800.0) Method(CircMode): Center point(1) Direction(PathChoice): CCW(1) Goal position (400,1200,350) 1200 Linear Center point interpolation (400,800,0) part Starting position Helical interpolation Circular (650,400,0)
  • Page 698 Chapter 3 Motion Control function 3.2.9 Axis Control Buffer mode Cancellation of the existing axis motions and continued or continuous operation of them can be carried out by executing other motion function block while the axis is in operation. The motions are specified by entering buffer mode (BufferMode) in motion function block.
  • Page 699 Chapter 3 Motion Control function Buffered mode “ Buffered” It execute the next command after the completion of the existing commands in execution (Done output is On). 3) Buffered mode “ BlendingLow” It combines operation so that operation can be made at lower velocity in a comparison between the target velocity of the existing commands in execution at the time of command completion and that of buffered command.
  • Page 700 Chapter 3 Motion Control function It executes the next command after acceleration/deceleration so that operation can be performed at the target velocity of the next command at the point of time when the existing commands in execution are completed. 6) Buffered mode “ BlendingHigh” It combines operation so that operation can be made at higher velocity in a comparison between the target velocity of the existing commands in execution at the time of command completion and that of buffered command.
  • Page 701 Chapter 3 Motion Control function 3.2 10 Axis Group Control Buffer Mode and Transition Mode In axis group control as in speed control, motion commands can be executed continuously by using buffer mode, and the maximum number of runs that can be queued in the buffer is 10. The maximum number of buffers that can wait for execution on axis group control is 100.
  • Page 702 Chapter 3 Motion Control function ②End point ② Operation function block Velocity ②Starting point ② Operation function block ①End point ①Starting point ①End point Time /②Starting point ※ Motions in case of the BlendingNext 3-57...
  • Page 703 Chapter 3 Motion Control function 2) ‘TransitionMode’ (1) TMNone Motion trajectory is not changed, and curve is not inserted between the two operations. In case buffer mode is Blending in this setting, Buffered mode is operated. Motions according to the buffer mode are the same as the above Aborting and Buffered. (2) TMCornerDistance The curve can be inserted by specifying the distance of two motion block corners.
  • Page 704 Chapter 3 Motion Control function 3.2.11 Synchronous control 1) Gearing operation (1) Gear operation makes speed synchronization of the master axis (or encoder) and the slave axis depending on the set ratio. (2) Gear operation can be aborted with gear operation cancellation command. (3) Gear ratio (=velocity synchronization ratio) is calculated as follows.
  • Page 705 Chapter 3 Motion Control function Name Description Operation condition LS_VarGearIn Edge Variable Gearing operation LS_VarGearIn BOOL Execute InGear BOOL UDINT VarOffset VarOffset UINT UINT Slave Slave UINT BOOL ContinousUpdate Busy BOOL RatioNumerator Active BOOL UINT RatioDenominator CommandAborted BOOL UINT MasterValueSource Error BOOL LREAL...
  • Page 706 Chapter 3 Motion Control function 3-61...
  • Page 707 Chapter 3 Motion Control function (4) Related Motion Function Block Name Description Operation condition MC_GearInPos Edge Gearing by specifying the position MC_GearInPos BOOL Execute InSync UINT UINT Master Master UINT UINT Slave Slave BOOL RatioNumerator StartSync BOOL UINT RatioDenominator Busy BOOL UINT MasterValueSource...
  • Page 708 Chapter 3 Motion Control function 3) Cam operation (1) CAM operation controls cams by converting mechanical cam motion to the cam data set at the cam profile and synchronizing the data to the position of the motor designated as the main-axis. (2) Mechanical cam operation in the past can be replaced with software cam motion using the cam data at the cam profiles.
  • Page 709 Chapter 3 Motion Control function the master axis start point, and Slaveoffset sets the offset from the sub axis start point. Refer to the Figure below. Using offset may change the start position for cam operation, causing an abrupt operation. In such a case, MasterSyncPosition, MasterStartDistance should be used.
  • Page 710 Chapter 3 Motion Control function (c) MasterSyncPosition input specifies the position of the master axis within the table where the synchronization of actual cam operation is completed, andMasterStartDistanceinput specifies the relative position of the master axis where the synchronization starts. Synchronization starts at the MasterStartDistance distance relative to theMasterSyncPosition.
  • Page 711 Chapter 3 Motion Control function (d) Once cam operation starts normally, InSync output is On, and EndOfProfile output is 1 scan On every time one cam table operation is completed. Main axis Position MasterSyncPosition MasterStartDistance Synchronization Synchronized operation section Time section Serve axis Position...
  • Page 712 Chapter 3 Motion Control function (7) The items required when creating a cam profile are as follows. Item Contents Main axis position Set the CAM position of sub axis corresponding to main axis CAM data Sub axis position Set the characteristic curve between the cam data. Interpolation Type (Linear, Cubic) Start inclination...
  • Page 713 Chapter 3 Motion Control function (8) Related Motion Function Block Name Description Operation condition MC_CamIn Edge Cam Operation MC_CamIn BOOL Execute InSync BOOL UINT Master Master UINT UINT Slave Slave UINT LREAL ContinousUpdate Busy BOOL LREAL MasterOffset Active BOOL LREAL SlaveOffset CommandAborted BOOL...
  • Page 714 Chapter 3 Motion Control function Cam Skip (1) This function skips the cam operation as many as the number of cam operation cycles that user wants in the axis where cam operation is underway. (2) When Cam Skip command is issued on a sub-axis where cam operation is underway, the current cam cycle ends, and the skip operation starts.
  • Page 715 Chapter 3 Motion Control function LS_CamSkip BOOL Execute Done BOOL UINT Slave Slave UINT UINT SkipCount Busy BOOL USINT SkipMode Active BOOL CommandAborted BOOL Error BOOL ErrorID WORD CoveredSkipCount UINT 5) Reverse Operation is Banned during Synchronized Operation (1) In the state that synchronization control commands such as CAM and Gear are executed, this function stops synchronization control of the slave axis when the master axis operates in the reverse direction of synchronized operation referenced by the slave axis.
  • Page 716 Chapter 3 Motion Control function the slave axis stands still without starting synchronization control. After the master axis changed its operation in the reverse direction, when the position of the master axis passes by the position that started synchronization control, the slave axis starts the synchronization control operation. b) If the master axis performs reverse operation when starting synchronization control the slave axis performs the synchronization control operation according to synchronization commands executed on the slave axis by the operation direction of the master axis.
  • Page 717 Chapter 3 Motion Control function (6) Operation timing (a) Operation according to parameter setting when operating the Gear with the gear ratio of 1:1 Position of the master axis Amount of forward movement of the master axis Reference position of the master axis when starting Amount of reverse synchronized operation...
  • Page 718 Chapter 3 Motion Control function (7) Applying synchronization control commands (a) CAM operation MC_CamIn, LS_VarCamIn, LS_OnOffCam (b) Gear operation MC_GearIn, LS_VarGearIn, MC_GearInPos, LS_VarGearInPos (8) The version information that can use the function where reverse operation is banned during synchronized operation is as follows: Item Module O/S...
  • Page 719: Manual Control

    Chapter 3 Motion Control function 3.2.12 Manual control 1) JOG operation (1) Jog operation makes positioning control by manual jog commands of users. (2) Jog operation is possible even in the state in which the origin of the axis is not determined. (3) Jog commands are executed even in the origin determined or undetermined status, which makes it possible to monitor changes in position values of the axis.
  • Page 720 Chapter 3 Motion Control function (7) Operation timing Speed High Speed Low Speed Time High Speed Enable Diretion Low/High Busy 3-75...
  • Page 721 Chapter 3 Motion Control function 3.2.13 SuperImposed operation SuperImposed operation executes the positioning control additionally as much as the moving distance designated in the current motion operation. 1) Control features (1) When SuperImposed operation command is executed, the axis moves from the point at the time of command e xecution to the target distance specified in the Distance input.
  • Page 722 Chapter 3 Motion Control function (1) SuperImposed command is executed during velocity control or torque control operation (Error Code: 0x1082) (2) MC_HaltSuperImposed command is executed when SuperImposed operation is not being performed (Error Cod e: 0x1083) 4) Operation timing FB_Sup1 MC_MoveSuperimposed Go_Sup Execute...
  • Page 723 Chapter 3 Motion Control function 3.2.14. Phase compensation control Phase correction control performs phase correction for the main-axis of the axes during synchronization control operation. It performs a virtual movement of the position of the main-axis which the sub-axis refers to in synchronization control operation, and the sub-axis performs synchronized operation to the moved main-axis position.
  • Page 724 Chapter 3 Motion Control function 4) Operation timing Phase correction Master ax is ref erenced from the Master axis amount slave axis position Real master axis Master axis Time position velocity Phase correction velocity Taget velocity Cam operation reflected from the Slave a xis Time phase corretion...
  • Page 725 Chapter 3 Motion Control function 3.2.15 Cross - coupled control This is a function that provides stable control when synchronously controlling two physically coupled/connected axes such as Automated Guided Vehicles and Gantry Stages. 1) Cross-coupled control In case of synchronous control of two physically coupled/connected axes, the motor output for controlling one of them may affect the other axis, resulting in poor control performance.
  • Page 726 Chapter 3 Motion Control function required. In case of control gain tuning (change), there is no need to cancel the master position control loop command, just change the gain input to the master position control loop execution command and then turn on the contact. Current Network Motion...
  • Page 727 Chapter 3 Motion Control function Name Description Operation condition Master position loop control LS_MasterPLoopControlOff Edge Cancel LS_MasterPLoopControlOff BOOL Execute Done BOOL UINT Axis Axis UINT Busy BOOL Error BOOL ErrorID WORD Name Description Operation condition LS_CrossCoupledControlOn Cross-coupled control Edge LS_CrossCoupledControlOn BOOL Execute InControl...
  • Page 728 Chapter 3 Motion Control function (7) When executing or disabling cross-coupled control while the axis is in operation (Error code: 0x1234) (8) When the same axis is set in Axis and PairAxis of cross-coupled control function block (Error code: 0x1235) (9) In case master position loop control is not being executed for Axis and PairAxis set in cross-coupled control fun ction block (Error code: 0x1236) (10) When the P gain input value of cross-coupled control function block is negative (error code: 0x1237)
  • Page 729: Other Functions

    Chapter 3 Motion Control function 3.3 Other Functions 3.3.2 Modification Function of Control 1) Changes in input variables of motion function block in execution (1) In case there is no ContinuousUpdate input in motion function block, or execution (Execute input enabled) is made when ContinuousUpdate input is Off, the motion function block is operated with the input at the time when Execute input is On(rising Edge) applied.
  • Page 730 Chapter 3 Motion Control function (2) In case ContinuousUpdate input is On in Edge operation motion function block, the input at the time when Execute input is On (rising Edge) is applied to the motion function block if Execute input is On, and the motion function block makes a motion to reflect the change if the input is changed while ContinuousUpdate input is On.
  • Page 731 Chapter 3 Motion Control function 2) Position Override (1) It is a function to override the target position of the axis in position operation. Override function is enabled by suing ContinuousUpdate input of the position operation motion function block. When the position operation motion function block is being executed, the position operation to reflect changed objectives is performed by tuning Execute input On again by changing the target position after turning ContinuousUpdate input of the motion function block On.
  • Page 732 Chapter 3 Motion Control function 3) Velocity, Acceleration/Deceleration, Jerk override (1) It is a function to conduct velocity, acceleration/deceleration and jerk override of the specified axis (2) It can override velocity, acceleration/deceleration, jerk to absolute value using ContinuousUpdate input of the motion function block in operation.
  • Page 733 Chapter 3 Motion Control function [Example] Changes in velocity using override (MC_SetOverride) motion function block MC_MoveVelocity MC_SetOverride Enable Enabled Execute InVelocity Axis Axis Axis Axis VelFactor Busy ContinuousUpdate Busy ··· AccFactor Error Velocity Active ··· JerkFactor ErrorID ··· Acceleration CommandAborted ···...
  • Page 734 Chapter 3 Motion Control function 4) Present Position Change (1) It is a function to change the current position of the axis to the value specified by users. (2) Specify the position in Position input. In case Relative input is Off state when command is executed, the position of the axis is replaced with the Position input value, and in case Relative input is On state, Position input value is added to the current position of the axis.
  • Page 735 Chapter 3 Motion Control function 6) Infinite operation (1) Infinite running repetition function is to perform periodic updates on the display values of the command position and current position automatically with values set in ‘infinite running repetition position’ among expansion parameters of operating parameters.
  • Page 736 Chapter 3 Motion Control function position being used as infinite running repetition number mode It sets whether to enable or disable 'Infinite 0: Disable Infinite running repeat 0: Disable running repeat'. 1: Enable 3-91...
  • Page 737 Chapter 3 Motion Control function 3.3.2 Auxiliary Function of Control 1) Hardware high/low limit (1) It is used to make a sudden stop of servo drive before reaching lower limit/upper limit of the machine side by installing high/low limit switch in the inside of the high/low limit, the physical operating range of the machine side. In this case, the range is out of the upper limit, error ‘0x1200’...
  • Page 738 Chapter 3 Motion Control function 2) Soft Upper/lower limit (1) Soft stroke high/low limit is a function that does not perform the operation in out of the range of soft upper/lower limit set by users. (2) Soft stroke high/low limit of each driving axis can be set by using software package or axis parameter change function. (3) If the axis is outside the range of stroke, axis error occurs.
  • Page 739 Chapter 3 Motion Control function (6) Related parameter setting Item Contents Setting range Initial value S/W upper 2147483647 pls limit Set the range of software limit function Long real(LREAL) S/W lower -2147483648 pls limit 3) Position tracking error (1) It is a function to output an error when driving axis is in position operation, or the actual position read from the axis is further beyond tracking tolerance than the target position of the position operation instruction profile.
  • Page 740 Chapter 3 Motion Control function 4) Latch (touch probe) (1) It is a function to record the position of the axis when specific situation (Trigger event) occurs in the axis. (2) Touch probe 1 and 2 can be selected to use according to trigger input (TriggerInput) settings. Trigger input (TriggerInput)=0 : Latch function is performed when touch probe 1 signal is Off->On .
  • Page 741 Chapter 3 Motion Control function (5) To use the latch (touch probe) function, the following objects must be included in the PDO setting of the slave parameter. Trigger input RxPDO TxPDO 0 0x60B9 :0 Touch probe state Touch probe 1 0 0x60B8 :0 Touch probe function 0x60BA:0 touch probe 1 forward direction rising edge...
  • Page 742 Chapter 3 Motion Control function Occur Trigger Event End point of Permissible range Starting point of Permissible range Record positoin Time Don't record positoin <When triggerInput is set to touch probe falling edge (2~3)> (7) Related Motion Function Block Name Description Operation condition...
  • Page 743 Chapter 3 Motion Control function MC_AbortTrigger BOOL Execute Done BOOL Axis UINT Axis UINT UINT TriggerInput TriggerInput USINT Busy BOOL Error BOOL ErrorID WORD 5) Error reset monitoring (error reset timeout) (1) When resetting an error occurred in the servo drive, the monitoring time can be set. (2) In case an error occurs in servo drive at the time of resetting error that occurs in the axis due to error reset commands, whether servo drive error is properly reset can be verified by setting error reset monitoring time.
  • Page 744 Chapter 3 Motion Control function 3.3.3 Data management function 1) Parameter management (1) It is a function to read or change axis parameters stored in the module. (2) It can change desired parameter values by specifying axis number and corresponding parameter number. (3) Parameter value modified with parameter-write function is automatically stored in backup.ram in case there is no error.
  • Page 745 Chapter 3 Motion Control function 2) Cam data management It is able to read and change the cam data in program by the cam data Cam data reading/writing command (1) Read cam data (a) CmDataRead command reads the cam profile data designated by CamTable ID when Enable input is enabled and saves the data to the data area specified as MasterPoint and SlavePoint.
  • Page 746 Chapter 3 Motion Control function (b) Write CAM data Name Description Operation condition LS_WriteCamData Edge Write CAM data LS_WriteCamData BOOL Execute Done BOOL Axis UINT Axis UINT UINT CamTable ID Busy BOOL LREAL StartSlope Error BOOL LREAL EndSlope ErrorID WORD UINT CamPointNum Array[] of LREAL MasterPoint...
  • Page 747 Chapter 3 Motion Control function 3) SDO Parameter management (1) This function reads or changes SDO parameters of slave devices connected via network. (2) Parameter values for a certain axis number and the corresponding object number can be read or changed. Parameter number is specified by Index and SubIndex.
  • Page 748 Chapter 3 Motion Control function 3.3.4 EtherCAT Communication Diagnostics function EtherCAT slave devices performsEtherCAT communication using ASIC, FPGA, or EtherCAT Slave Controller (ESC) included in the standard micro controller. The communication diagnosis function of EtherCAT reads and writes the ECS (EtherCAT Slave Controller) registers and memories of the slave device, allowing the user to check EtherCAT communication status and errors.
  • Page 749 Chapter 3 Motion Control function 2) ESC Read (1) This function reads data in ESC of the slave devices connected via network. (2) Adp input specifies the EtherCAT slave device address, and the following values can be set depending on EcatCmd settings.
  • Page 750 Chapter 3 Motion Control function EcatCmd is 7(BRD), it increases by 1 due to all slaves that performed normal read operation. (7) After the execution of ESC read command, if normal data read operation is executed from the designated slave device, Done output is on.
  • Page 751 Chapter 3 Motion Control function 3) ESC write (1) This function writes data in ESC of the slave devices connected via network. (2) Adp input specifies the EtherCAT slave device address, and the following values can be set depending on EcatCmd settings.
  • Page 752 Chapter 3 Motion Control function (7) After the execution of ESC write command, if normal data write operation is executed in the specified slave device, Done output is on. (8) Slave devices use ESC to perform EtherCAT communication. Therefore, changing ESC register values while executing connection/disconnection command or during normal EtherCAT communication may prevent the slave device from maintaining existing motions or cause communication errors.
  • Page 753 Chapter 3 Motion Control function 3.3.5 Cable Duplication function It provides cable duplication function using port multiplier. Constructing a ring topology using port multiplier will prevent the network between slaves from disconnecting even in case of a cable disconnection on one side. When the disconnected cable is re-connected, it is recovered to the original communication method.
  • Page 754 Chapter 3 Motion Control function Condition LINE_FAIL[0] LINE_FAIL[1] LINE_FAIL[2] Only X3 is disconnected Only X2 is disconnected Both X2 and X3 are disconnected - When only X3 is disconnected, LINE_FAIL[0] of the port multiplier is ON and other status information is not ON because port A among general slaves (Slave 2, Slave 3) is not disconnected.
  • Page 755 Chapter 3 Motion Control function 2) Master parameter setting When using the in-connection replacement function, the slaves being replaced should be identical to the replacing slave. To determine whether the slaves being replaced are identical, check whether the manufacturer/product codes match. In addition, check whether the revision/serial numbers are identical, depending on the master parameter settings.
  • Page 756 Chapter 3 Motion Control function 3.3. 7 Position Control Range Expansion When executing the position control among motion functions, the target position value can be set in the range of 32-bit integer types based on the pulse position. However, if the resolution of a motor encoder is high or the transfer distance of the machine is long, position control is sometimes needed to exceed the range of 32-bit integer types.
  • Page 757 Chapter 3 Motion Control function (5) Current pos. compensation amount (6) Phase compensation amount of the phase compensation command (7) Target distance of the SuperImposed operation command (8) If the linear interpolation, TransitionMode is TMCornerDistance, the value of TransionParameter 3.3.8 Connection function less than set number If a slave whose replacement function during connection is set to '1: Use' in the motion controller is not connected, the unconnected slave can be restored using the replacement function during connection in the future, and the operation to allow EtherCAT connection of the remaining connected slaves is performed.
  • Page 758 Chapter 3 Motion Control function 3.3.9 Node switch operation mode setting In motion control module provides the function to set the station number of the slave through the node switch. When performing automatic connection with node switch set, the station number of each slave uses the value set in the node switch of the slave as the slave station number.
  • Page 759 Chapter 3 Motion Control function 4) Node switch operation mode difference Connect 4 identical EtherCAT slaves, set station number 1 to station number 4 in order from the first slave, and set the node switch to 4 to 1 from the first slave to the actually connected slave. The operation according to the switch operation mode is as follows.
  • Page 760 Chapter 3 Motion Control function 3.4 Coordinate Systems Operation Functions 3.4.1 Overview Different coordinate systems define various ways specifying certain positions or directions in the space. The figure below shows how to represent a certain TCP through each coordinate system. In the ACS coordinate system, TCP is represented as the rotation angle of a robot joint consisting of two links.
  • Page 761 Chapter 3 Motion Control function 3.4. 3 PCS setting PCS represents TCP on the work stand. TCP is defined by rotation and movement from the origin point. The parameter to convert PCS into MCS can be set using MC_SetCartesianTransform function block or setting axes group parameter. In MC_SetCartesianTransform, TransX/TransY/TransZ represents the distance of movement from the MCS origin point to the PCS origin point.
  • Page 762 Chapter 3 Motion Control function 3.4. 4 Machine information setting To operate the robot using coordinate system operation, the type of the robot (machine) and the machine parameters should be set at the axes group parameter in advance. Machine parameters can be set using MC_SetKinTransform function block. XG5000 axes group parameters can be set using the same.
  • Page 763 Chapter 3 Motion Control function (3) LinearDelta3 - MCS of the LinearDelta robot In case of a LinearDelta robot, the center of Fixed Frame is defined as MCS. the relationship between each axis connected to LinearDelta and MCS are as shown below. Z mcs Axis3 Y mcs...
  • Page 764 Chapter 3 Motion Control function (4) T-Gantry - MCS of the T-Gantry robot The MCS of the T-Gantry robot defines the position of the end of a tool when the positions of Axis 1 and Axis 2 are 0 as the origin (0, 0) of MCS.
  • Page 765 Chapter 3 Motion Control function 2) Machine information machine parameter setting (1) XYZ XYZ robot does not require separate machine parameters, as the position of each axis matches the XYZ coordinates of TCP. (2) Delta3/Delta3R Parameter Description KinParam[0] Lf:Link length of the fixed frame(mm) KinParam[1] Lm: Link length of the moving frame(mm) KinParam[2]...
  • Page 766 Chapter 3 Motion Control function 3) Machine information machine type setting A tool offset function is provided in addition to the machine information, as additional equipment may be connected to the end of the robot's TCP. Activating tool offset applies the offset to the TCP target position applied to the coordinate system operation. Z mcs X mcs Axis2...
  • Page 767 Chapter 3 Motion Control function MC_SetKinTransform BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT UINT KinType Busy BOOL UINT KinExtParam Active BOOL ARRAY[0..11] OF LREAL[ ] KinParam CommandAborted BOOL LREAL ToolOffsetX Error BOOL LREAL ToolOffsetY ErrorID WORD UINT ToolOffsetZ 3.4. 5 Workspace setting For coordinate system operation, in order to prevent machine damage or safety accident caused by the robot performing impossible motion, a work space function is provided to prevent the robot from going out of the preset work space.
  • Page 768 Chapter 3 Motion Control function 2) Workspace type and parameter The work space type supports 4 types of Rectangle/Cylinder/Delta/Sector. Rectangle Parameter Value WorkspaceParam[0] X max(mm) Y Axis WorkspaceParam[1] X min(mm) WorkspaceParam[2] Y max(mm) WorkspaceParam[3] Y min(mm) WorkspaceParam[4] Z max(mm) Xmin WorkspaceParam[5] Z min(mm) Xmax...
  • Page 769 Chapter 3 Motion Control function Sector Parameter Value WorkspaceParam[0] L end (mm) Y Axis WorkspaceParam[1] L start(mm) WorkspaceParam[2] Z max(mm) WorkspaceParam[3] Z min(mm) WorkspaceParam[4] EndAngle(degree) WorkspaceParam[5] StartAngle(degree) EndAngle StartAngle X Axis 3-124...
  • Page 770 Chapter 3 Motion Control function 3.4.6 Time Linear Interpolation Operation for Absolute Position of Coordinate System Use the related axes set in the axes group to perform interpolation control by moving the TCP from the current position to the target position in the set time in a linear trajectory. (1) Executes linear interpolation from starting position to the target position designated on positioning data.
  • Page 771 Chapter 3 Motion Control function The velocity profile of this operation type consists of sine curves. It is suitable for low-load high-velocity operation, and reduces impact on the motor caused by load changes. Sine2 (Sine With Constant) This velocity profile of this operation type consists of sine curves and constant speed sections. It is suitable for high-load, medium-velocity operation.
  • Page 772 Chapter 3 Motion Control function LS_MoveLinearTimeAbsolute BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT UINT CoordSystem Busy BOOL ARRAY[0..5] OF LREAL[ ] Position Active BOOL UINT TrajType Error BOOL LREAL TrajTime ErrorID WORD UINT BufferMode UINT TransitionMode LREAL TransitionParameter 9) Restrictions of Using Coordinate system absolute position time linear interpolation control cannot be performed in case of the following errors •...
  • Page 773 Chapter 3 Motion Control function Y Axis Start point Target point X Axis 1000 Interpolation velocity Time(msec) 1000 3000 4000 Execute Busy Active Done 3.4.7 Coordinate system circular interpolation control Coordinate system-based circular interpolation operation is performed, where the TCP moves in a circular trajectory on the XY plane using the designated axis in the axes group.
  • Page 774 Chapter 3 Motion Control function ation. Y axis Middle point Target point Start point Center point X axis (4) Restrictions of Using Circular interpolation control using mid-point specification method cannot be performed in case of the following errors. • During absolute coordinate circular interpolation, home position has not been determined in one or more of the component axes (Error Code: 0x20A0) •...
  • Page 775 Chapter 3 Motion Control function (5 ) Operation pattern Start position (0.0, 0.0, 0.0) Goal position (100.0, 60.0, 0.0) Midpoint Position (20.0, 60.0) Method(CircMode): Midpoint(0) Direction(PathChoice): - (Ignored in middle point method) Y axis Operation by the circular interpolation Middle point (20, 60) Target point (100, 60)
  • Page 776 Chapter 3 Motion Control function 3) Circular interpolation with center point designation form. (1) Starts operating from starting position and execute circular interpolation along trace of circle that has distance fro m starting point to designated center point as radius. (2) The movement direction is determined as the direction set in the absolute position circular interpolation operation (MC_MoveCircularAbsolute2D), the relative position circular interpolation operation (MC_MoveCircularRelative2D), or “PathChoice”...
  • Page 777 Chapter 3 Motion Control function (4) Restrictions of Using Circular interpolation control using center point specification method cannot be performed in case of the following errors. • During absolute coordinate circular interpolation, home position has not been determined in one or more of the component axes (Error Code: 0x20A0) •...
  • Page 778 Chapter 3 Motion Control function 4) Circular interpolation with radius point designation form. (1) Circular interpolation is performed from starting position to target position along the trajectory of the arc that take s the value set in circular interpolation auxiliary point. The arc that has center point depending on the sign of radi us ((+): arc angle <180°, (-): arc angle>=180°) is drawn.
  • Page 779 Chapter 3 Motion Control function (5 ) Operation pattern Start position (100.0, 100.0, 0.0) Goal Position (900.0, 100.0) Auxiliary Position (500.0, 0.0) Method(CircMode): Radius(2) Direction(PathChoice): CW(0) 「CW, Arc<180° 」 Y axis Circular interpolation operation Start point Target point(900,100) (100,100) X axis -100 Radius Arc angle <...
  • Page 780 Chapter 3 Motion Control function 5) Related Motion Function Block (1) Absolute position coordinate system circular interpolation operation Name Description Operation condition MC_MoveCircularAbsolute2D Edge Absolute position circular interpolation operation MC_MoveCircularAbsolute2D Done BOOL Execute BOOL AxesGroup UINT AxesGroup UINT Busy UINT CircMode BOOL Active...
  • Page 781 Chapter 3 Motion Control function 6) Helical Interpolation (1) When circular interpolation commands (absolute position coordinate system circular interpolation operation (MC_M oveCircularAbsolute2D), relative position coordinate system circular interpolation operation (MC_MoveCircularRelative 2D)) are executed, circular interpolation is performed by moving in a circular trajectory on the XY plane, while line ar interpolation synchronized to the circular interpolation motion is performed with respect to Z-axis (2) To perform helical interpolation, set the target position for linear interpolation at Pz of ‘EndPoint’.
  • Page 782 Chapter 3 Motion Control function (4 ) Operation pattern Start position (65.0, 40.0, 0.0) Goal position (40.0, 120.0, 35.0) Center point Position (40.0, 80.0, 0.0) Method(CircMode): Center point(1) Direction(PathChoice): CCW(1) Z axis Target point (40,120,35) Y axis Center point Linear (40,80,0) interpolation line Start point...
  • Page 783 Chapter 3 Motion Control function 2) Related Motion Function Block (1)Conveyor belt synchronized setting Name Description Operatio condition MC_TrackConveyorBelt Edge Conveyor belt synchronized setting MC_TrackConveyorBelt BOOL Execute Done BOOL UINT UINT AxesGroup AxesGroup UINT ConveyorAxis Busy BOOL ARRAY[0..5] OF LREAL[ ] ConveyorOrigin Active BOOL...
  • Page 784 Chapter 3 Motion Control function X mcs Y mcs Yconveyor Trans InitTCP(-240,0,-380) [objectposition] [objectposition] Trans [conveyororigin] Xconveyor [ConveyorOrgin] ConveyorAxis FunctionBlock CoordSystem Position[] Description MoveLinearTimeAbsolute1 0,0,0 Move to the origin of the object MoveLinearTimeAbsolute2 40,0,0 Triangle drawing 1 MoveLinearTimeAbsolute3 20,36.64,0 Triangle drawing 2 MoveLinearTimeAbsolute4 0,0,0 Triangle drawing 3...
  • Page 785 Chapter 3 Motion Control function 3.4.9 Synchronized Operation for Rotary Table In a coordinate-based operation, one of the axes group is designated as the rotary axis, and the objects moving on the rotary table are tracked. Z mcs Y mcs Zpcs X mcs Zrotary...
  • Page 786 Chapter 3 Motion Control function (2) Rotary table synchronized setting disable(PCS setting) Name Description Operatio conditio MC_SetCartesianTransform Edge PCS setting MC_SetCartesianTransform BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT LREAL TransX Busy BOOL LREAL TransY Active BOOL LREAL TransZ CommandAborted BOOL LREAL RotAngleA...
  • Page 787 Chapter 3 Motion Control function MC_TrackRotaryTable LS_MoveLinearTimeAbsolute LS_MoveLinearTimeAbsolute 운전시작 Execute Done Execute Done Execute Done AxesGroup AxesGroup AxesGroup AxesGroup AxesGroup AxesGroup RotaryAxis Busy CoordSystem Busy CoordSystem Busy RotaryOrigin RotaryOrigin Active 0,0,0,0,0,0 Position Active 0,0,-30,0,0,0 Position Active ObjectPosition ObjectPosition TrajType TrajType Error Error Error...
  • Page 788 Chapter 3 Motion Control function 2) Related Motion Function Block (1) Path data setting of the coordinate system Name Description Operatio condition LS_SetMovePath Edge Coordinate system path data setting LS_SetMovePath BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT ARRAY[] OF BYTE PathData PathData ARRAY[] OF BYTE...
  • Page 789 Chapter 3 Motion Control function LS_GetMovePath BOOL Execute Done BOOL UINT AxesGroup AxesGroup UINT PathData ARRAY[] OF BYTE Busy BOOL Step UINT Active BOOL Error BOOL ErrorID WORD CommandType UINT Mode UINT CoordSystem UINT Positon ARRAY[0..6] OF LREAL[ ] Velocity LREAL Acceleration LREAL...
  • Page 790 Chapter 3 Motion Control function will be changed from Init to Op (Operational) mode. Therefore, the mode should be switched in the order of Op->Init->Boot to switch from the Op mode to the Boot mode. The FoE download is executed while the Boot mode is running. After the FoE download is completed, you should perform a mode switch to Boot->Init again Init Bootstrap...
  • Page 791 Chapter 3 Motion Control function (2) Select the file you want to download from the open dialog box. (3) Enter the password (number) in the password confirmation dialog box. (4) Select the OK button to download the file. (5) When the download is completed, change the StateMachine state to Init. 3-146...
  • Page 792 Chapter 3 Motion Control function 3.6 Rotaryknife operation 3.6.1 Overview of Rotaryknife operation RotaryKnife operation is a function that cuts the workpiece moving through the conveyor without stopping the conveyor using a rotating cutter. In addition to the cutting operation, it can be used for operation that follows the work synchronized with the main axis, such as sealing or labeling.
  • Page 793 Chapter 3 Motion Control function condition LS_CrossSealCamGen Edge Cross sealer cam profile generation LS_CrossSealCamGen BOOL Execute Done BOOL UINT Axis Axis UINT UINT CamTableID Busy BOOL LREAL PartLength Error BOOL LREAL Circumference ErrorID WORD LREAL SealStart LREAL SealEnd LREAL SealSpdRatio UINT CamType UINT CamCurve UINT CamPointNum...
  • Page 794 Chapter 3 Motion Control function and output. In cross sealer operation, the main axis does not use the conveyor axis, but a virtual axis that operates in the range of 0 to 360 as the main axis. Conveyor axis 1 transfers one work piece to Conveyor 2 when the main axis operates from 0 to 360.
  • Page 795 Chapter 3 Motion Control function PartLength PartLength MasterAxis MasterAxis Running Running Running Running Circumference Circumference RampIn sRampIn SlaveAxis SlaveAxis RampOut sRampOut 6) Start position of LS_OnOffCam operation when creating cam profile with LS_CrossSealCamGen When LS_OnOffCam operation is started with a cam profile created with LS_CrossSealCamGen, the starting position of LS_OnOffCam operation should be different depending on whether the CamType input during profile creation is RampIn/RampOut or sRampIn/sRampIn/sRampOut.
  • Page 796 Chapter 3 Motion Control function 3.6.3 Rotaryknife operation example 1) Basic rotary cutter operation example 1 If you start the operation with the basic rotary knife operation, the operation is repeatedly cut to the specified PartLength. The distance between the rotary cutter and the mark sensor (SensorDistance) must be longer than the PartLength. Before starting operation, both the main axis of the conveyor axis and the subordinate axis of the rotary cutter axis must have completed servo-on and origin determination.
  • Page 797 Chapter 3 Motion Control function determination. SensorDistance MarkSensor Circumference Axis2 PartLength Axis1 Master MC_MoveVelocity AxisRun Execute InVelocity Axis1 Axis Axis ContinuousUpdate Busy MasterVelocity Velocity Active Acceleration CommandAborted Deceleration Error Jerk ErrorID Direction BufferMode RotaryKnife LS_OnOffCam Start LS_RotaryKnifeCamGen Execute InSync Execute Done Axis2 Axis Axis...
  • Page 798 Chapter 3 Motion Control function 3.7 CAM block Functions 3.7.1 Overview of CAM block Function The cam block function creates a cam profile by setting the cam curve, connection speed, connection acceleration, and connection jerk. In the cam block function, various cam curves such as StraightLine/ModifiedSine/ModefiedTrapezoid/DoubleHarmonic/TripleHarmonic can be set, and up to 100 blocks can be added, 360 nodes can be set per block, and a total of 6000 nodes can be set.
  • Page 799 Chapter 3 Motion Control function 2) Cam Block Property Cam operation speed : Input operation speed of main axis of cam block. The entered speed value is used to calculate the maximum speed/maximum acceleration/maximum jerk of the sub axis. Maximum speed of sub axis: Enter the maximum speed of sub axis. The maximum speed value of the sub axis is used to check whether the maximum speed value is exceeded when setting the cam block and does not affect the creation of the camp profile.
  • Page 800 Chapter 3 Motion Control function 4) Cam curve There are a total of 12 types of cam curves that can be set in the cam block function. The characteristics of each cam curve are as follows. CamCurve Characteristic curve 0:StraightLine 1:ModifiedSine 2:ModifiedTrapezoid 3-155...
  • Page 801 Chapter 3 Motion Control function 3:DoubleHarmonic 4:TripleHarmonic 5:THMTG1-3 3-156...
  • Page 802 Chapter 3 Motion Control function 6:THMTF1-3 7:THMTF1-3-5 8:TH0J0A 3-157...
  • Page 803 Chapter 3 Motion Control function 9:3rd Curve 10:5th Curve 11:7th Curve 3-158...
  • Page 804 Chapter 3 Motion Control function 5) Adding Cam block node data If you click the button on the cam block screen, one last node is added. 6) Adding Cam block node data If you click the button on the cam block screen, one node is added at the selected location. 7) Adding Cam block node data Select node data and click the button to delete the selected node data.
  • Page 805 Chapter 3 Motion Control function 8) Delete all cam block node data Select node data and click the button to delete all node data. 9) Export camp file In order to perform CAM operation with CAM block data, you must first create a CAM profile from CAM block. The procedure for exporting camblock to campfile is as follows.
  • Page 806 Chapter 3 Motion Control function (4) Check the created camp profile Open the camp profile to check the created camp profile 3.7.3 Cam block setting function Provides functions to read/write/save cam blocks and create camp profile files while driving. To create a camp profile file by setting a cam block, first set the cam block properties and the number of nodes using the LS_WriteCamBlockProperty function block.
  • Page 807: Chapter 4 Nc Control Function

    Chapter4 NC Control Function Chapter 4 NC Control Function Chapter 4 describes how the motion controller user creates the motion program of the G-code format. The motion controller can program motions through a kind of scripting language called the G code. Chapter 10 describes the basic terms and conceptual explanations for the G code programming, and explains how to configure the program.
  • Page 808 Chapter4 NC Control Function Reserved Content character Y axis of the XYZ rectangular coordinate system (Secondary Axis) Z axis of the XYZ rectangular coordinate system (Third Axis) In the XYZ rectangular coordinate system, the rotation axis parallel to the X axis. (When it is set to the rotation axis in the parameters setting) In the XYZ rectangular coordinate system, the rotation axis parallel to the Y axis.
  • Page 809: Coordinate System

    Chapter4 NC Control Function 4.1.4 Coordinate System The coordinate system means the space to be used as a basis for operating the machine. The motion controller uses the right- handed rectangular coordinate system and supports four modes: machine coordinate system, work coordinate system, local coordinate system, and relative coordinate system.
  • Page 810 Chapter4 NC Control Function 3) Local Coordinate System It is called the local coordinate system to set the reference point at any position on the workpiece coordinate system and make the command when programing with the workpiece coordinate system. It refers to the coordinate system created newly within the program of the workpiece coordinate.
  • Page 811 Chapter4 NC Control Function 4.1. 5 How to Accelerate/Decelerate Interpolation Operation The NC control function can set how to accelerate and decelerate operation during cutting feed. A method of acceleration and deceleration has an acceleration/deceleration before interpolation mode and an acceleration/deceleration after interpolation mode. According to each mode, the form of acceleration and deceleration zones of an axis in cutting feed varies.
  • Page 812 Chapter4 NC Control Function Cutting Operation 2 Cutting Operation 1 [Speed profiles] 3) Acceleration and deceleration form in the acceleration/deceleration mode after interpolation The speed profile of acceleration and deceleration zones can be set by setting the form of acceleration and deceleration of the cutting feed in the cutting feed setting of the NC channel parameter.
  • Page 813 Chapter4 NC Control Function 5) Corner speed limit function The function is to improve the problem that curvature occurs in a corner when setting the time constant value bigger if using acceleration and deceleration after interpolation. It provides two modes such as an angle mode and a speed differential mode. Corner speed limit function in the cutting feed setting of the NC channel parameter 0: Disable 1: Angle mode 2: Speed differential mode can be set.
  • Page 814 Chapter4 NC Control Function 7) Speed differential mode If the speed difference between the end point of the specified existing block and the starting point of a new block is greater than the setting value of the allowed speed difference, the next block starts to traverse after being decelerated up to the setting value of the deceleration speed.
  • Page 815: Program Configuration

    Chapter4 NC Control Function 4.2 Program Configuration 4.2.1 NC program The NC program is a file consisting of the commands with control information about the axis. NC program can be added to 'Motion data - NC program' in XG5000. The NC program is used in the form of ‘program name.extension’ when saving the NC program as a file, and the file name extension of the NC program used is ‘nc’.
  • Page 816 Chapter4 NC Control Function 4.2.2 NC Program Configuration 1) Basic configuration of the program The NC program is created with various instructions (G / M codes and instructions) that can be recognized by the motion controller and it consists of a set of blocks with the information for each operation command. The NC program is written in the ST language.
  • Page 817 Chapter4 NC Control Function 3) Main and sub program Basically, you can configure and control the NC program with the main program only. However, if a series of identical commands or control intervals are repeated, you can make such parts into the subprogram and call it in case of necessity. When the subprogram is called, the details of the subprogram will run thereafter.
  • Page 818 Chapter4 NC Control Function 5) Call and return of the sub program The subprogram is called by M98. The procedures for call and return of the subprogram are as follows. P_ Q_ R_ L_ M98: Call of the sub program M99: End of the sub program P _: For M98, the name of the subprogram (_ is a 4-digit number.) For M99, the statement Number of the block to return...
  • Page 819 Chapter4 NC Control Function 4.2.3 Data 1) Data type used in the NC program The NC program uses the numerical data for each axis command, feed rate command, DWELL command, macro variables, etc. When each operator is applied, the constant is used directly in the program. At this time, the range of data type that can be used for the NC program of motion controller is as follows.
  • Page 820 Chapter4 NC Control Function 4.2.4 NC program write Programs added to ‘Motion Data – NC Program’ in XG5000 can basically be downloaded when the motion controller’s operation mode is in the stop state. However, the NC program can be downloaded even when the operation mode is in the run state, and there are some restrictions in this case.
  • Page 821 Chapter4 NC Control Function - If the number of repetitions is specified in the M99 command, automatic operation stops after repeating the number of repetitions and then the downloaded program is changed. (2) If the NC_LoadProgram command is executed during internal write processing after downloading the NC program, error 0x3605 occurs.
  • Page 822 Chapter4 NC Control Function 4.3 NC Commands The NC command is basically described based on the three types of data: the type of motion to be moved, the target position and the target speed. The basic formats of the position command and speed command are as follows. 4.3.1 Basic Format of the NC Position Command The motion controller supports two types of commands;...
  • Page 823 Chapter4 NC Control Function When you specify the position of the coordinate, the operating mode of the command depends on whether to use the value that includes "." or not ".". Please refer to the position formula in "4.2.3 System of units of data (2) " G02 X100.
  • Page 824 Chapter4 NC Control Function 4.3.2 NC command list The NC commands (G / M code and other commands) used for the motion controller are as follows. Classification Program command Function Rapid positioning control Linear interpolation feed control Clockwise circular / helical interpolation Counter clockwise circular / helical interpolation Dwell function Exact Stop...
  • Page 825 Chapter4 NC Control Function Classification Program command Function Set the local coordinate system Select the machine coordinate system Select the workpiece coordinate system 1 Select the workpiece coordinate system 2 Select the workpiece coordinate system 3 Select the workpiece coordinate system 4 Select the workpiece coordinate system 5 Select the workpiece coordinate system 6 Single direction positioning...
  • Page 826 Chapter4 NC Control Function Classification Program command Function Program’s operation is stopped. Selective stop PROGRAM END Forward rotation of the master axis Reverse rotation of the master axis Main axis stop M code Tool change Coolant ON Coolant OFF Program End Auxiliary program call End of the auxiliary program X, Y, Z, A, B, C, U, V, W, S...
  • Page 827 Chapter4 NC Control Function 4.3.3 NC command description 1) G Code The G code defines the types of the commands such as feed and machining method of each axis during machining, and it is the command to carry out mechanical drive and operation of the NC program, etc. There are two types of G code as shown below.
  • Page 828 Chapter4 NC Control Function The Rapid Traverse command is a modal command so once it is instructed, it is valid for the axis traversing command until another traverse command is made. G00 X100 Y100 Z100 The above program is the example set to absolute command using G90. After that, it rapidly traverses the X and Y axis to (100,100) points and then, traverses the Z axis to 100 points again.
  • Page 829 Chapter4 NC Control Function The linear interpolation (G01) is the function that simultaneously traverses each axis in a straight line to the commanded position at the speed set by the F command in order to perform the desired machining (eg. cutting) as shown in the figure above.
  • Page 830 Chapter4 NC Control Function is defined as XY plane, G18 as ZX plane, and G19 as YZ plane as shown below. If you enter the command information beyond the selected plane, an error will occur. G17 plane G18 plane G02(MCW) G02(MCW) G17 : XY plane G02/MCW...
  • Page 831 Chapter4 NC Control Function Unlike the circular interpolation with specifying the central point, the circular interpolation with the R (radius) designation cannot command a 360-degree perfect circle. [Circular interpolation with specifying the radius(R)] During the circular interpolation, if the start and end radii of the arc are different, an alarm occurs. If it is within the error radius, it traverses to the original trajectory and then reaches the final position with a straight line.
  • Page 832 Chapter4 NC Control Function G00 X0 Y0 Z0 % XY plane G02 X50 Y50 I50 F100 % Clockwise circular interpolation, Central point(X=X+50, Y=0), speed G03 X0 Y0 R50 % Counter clockwise circular interpolation, R(Radius)=50 % Relative coordinates G03 X100 Y100 J100 % Counter clockwise circular interpolation, Central point(X=0, Y=Y+100) G02 X-100 Y-100 R100 % Clockwise circular interpolation, R(Radius)=100...
  • Page 833 Chapter4 NC Control Function Z=Z+0) G02 Z-100 X-100 R100 % Clockwise circular interpolation, R(Radius)=100, % Target position to traverse(X=X-100, Z=Z-100) % YZ plane G02 Y50 Z50 J50 F300 % Clockwise circular interpolation, Central point(Y=Y+50, Z=Z+0), speed 300 G03 Y0 Z0 R50 % Counter clockwise circular interpolation, R(Radius)=50 G03 Y100 Z100 K100 % Counter clockwise circular interpolation, Central point(Y=Y+0,...
  • Page 834 Chapter4 NC Control Function (4) Helical interpolation(G02/G03) (G90, G91) G17 (G02, G03) X_ Y_ (I_ J_, R_) Z_ F_ (G90, G91) G18 (G02, G03) X_ Z_ (I_ K_, R_) Y_ F_ (G90, G91) G19 (G02, G03) Y_ Z_ (J_ K_, R_) X_ F G90, G91: Absolute/Incremental command G17, G18, G19: Specify the plane to execute the circular interpolation G02, G03: Clockwise, counter clockwise circular interpolation...
  • Page 835 Chapter4 NC Control Function (5) Dwell function (G04) G04 (X_, P_) G04: Dwell command X_, P_: Dwell time command information(sec, msec) The DWELL command (G04) is the command to stop for the time specified following "X" or "P" and then, execute the next block.
  • Page 836 Chapter4 NC Control Function (6) Exact Stop(G09) Exact Stop (Precision stop command) In normal feed / cutting operations, the corner section decelerates the current block and accelerates the next block because it is affected by physical inertia when accelerating or decelerating the axis traverse. That is why ‘Rounding’ occurs. This function performs the ‘Inposition Check’...
  • Page 837 Chapter4 NC Control Function (7) data setting (G10) (G90, G91) G10 (L10) (P_ R_) (G90, G91) G10 (L12) (P_ R_) G10: data setting L10: H Data setting(tool diameter) L12: D Data setting(tool length) P_: Offset no. R_: Tool compensation G90, G91: The compensation value is set and the value previously set is updated. This command is used in the diameter of a tool, the compensation value of tool length and reference position offset of the coordinate system, and can be input by program.
  • Page 838 Chapter4 NC Control Function (8) Polar coordinate command(G15, G16) G16 X_ Y_ G15: Polar coordinate command cancel G16: Polar coordinate command X_: Polar coordinate circular radius Y_: Polar coordinate angle command A polar coordinate command is used if the current coordinate system works with the polar coordinate system, not the right- angle coordinate system.
  • Page 839 Chapter4 NC Control Function (9) Selecting the plane for circular interpolation (G17, G18, G19) (G90, G91) G17 (G02, G03) X_ Y_ (I_ J_ / R_) F_ (G90, G91) G18 (G02, G03) X_ Z_ (I_ K_ / R_) F_ (G90, G91) G19 (G02, G03) Y_ Z_ (J_ K_ / R_) F G90, G91: Absolute/Incremental command G17: X-Y plane G18: Z-X plane...
  • Page 840 Chapter4 NC Control Function (10) Inch/meter unit input (G20, G21) G20: Inch unit input G21: Meter unit input This command sets whether the position unit to be input is inch or meter. Even if this command is executed, the system of units including a position displayed on screen or an internal offset keeps the system of units set by parameters.
  • Page 841 Chapter4 NC Control Function (11) Stroke function enable/disable(G22, G23) G22 (X_ Y_ Z_) (I_ J_ K_) G22: Stroke check function On G23: Stroke check function Off X_ Y_ Z_: Enter the lower limit position based on the machine origin of each coordinate. I_ J_ K_: Enter the upper limit position based on the machine origin of each coordinate.
  • Page 842 Chapter4 NC Control Function (12) Home return OK (G27) (G90, G91) G27 X_ Y_ Z_ A_ B_ C_ U_ V_ W_ S_ G90, G91: Absolute/Incremental command G27: Home return OK X_ Y_ Z_ A_ B_ C_ U_ V_ W_ S_: target coordinate Through this command, it traverses to the specified X, Y, Z coordinate.
  • Page 843 Chapter4 NC Control Function The axes without receiving the auto-homing command do not move. The incremental commands are available for axis positioning. If the axis position command is "0", it returns directly to the machine origin without dropping by waypoints. G01 X100.
  • Page 844 Chapter4 NC Control Function (G90, G91) G30 (P2, P3, P4) X_ Y_ Z_ U_ G90, G91: Absolute/Incremental command G30: Auto homing command P2: Second home P3: Third home P4: fourth home X_ Y_ Z_ A_ B_ C_ U_ V_ W_ S_: Coordinate of waypoint of each axis to be homed This command automatically returns each commanded axis to the preconfigured 2nd, 3rd, 4th origin.
  • Page 845 Chapter4 NC Control Function (16) Skip function (G31 / G31.1 / G31.2 / G31.3 / G31.4) {G31 / G31.1 / G31.2 / G31.3 / G31.4} X_ Y_ Z_ A_ B_ C_ U_ V_ W_ S_ F_ G31 / G31.1 / G31.2 / G31.3 / G31.4: Command G code for each external signal X_ Y_ Z_ A_ B_ C_ U_ V_ W_ S_: transfer position F_: Feed rate The method of command and the type of axis feed are applied the same as those for linear interpolation (G01).
  • Page 846 Chapter4 NC Control Function (17) Automatic tool length measurement (G37 / G37.1 / G37.2 / G37.3 / G37.4) {G37 / G37.1 / G37.2 / G37.3 / G37.4} X_ Y_ Z_ G37: Auto tool length measurement 1 G code G37.1: Auto tool length measurement 1 G code G37.2: Auto tool length measurement 2 G code G37.3: Auto tool length measurement 3 G code G37.4: Auto tool length measurement 4 G code...
  • Page 847 Chapter4 NC Control Function (19) Type of axis feed during auto tool measurement Once the command of auto tool measurement is given, it rapidly moves a tool at first ((a) section). If a tool comes into the section of speed reduction set by a parameter, the tool is moved at a low speed set by the parameter ((B) section). If the tool reaches the measuring point and the measuring signal (SKIP signal of the NC_BLOCKSKIP command) is ON, tool movement is stopped.
  • Page 848 Chapter4 NC Control Function (18) Corner circular interpolation(G39) {G39} X_ Y_ / I_ J_ : Handle corner offset with circular interpolation X_ Y_ / I_ J_ : Command the vector for the next block The corner off circular interpolation with the tool radius of the corner as the radius is carried out by the next command specified in the state of G01, G02 or G03.
  • Page 849 Chapter4 NC Control Function (19) Disable tool diameter compensation (G40) {G40} [G00/G01] X_ Y_ Z_ A_ B_ C_ U_ V_ W_ S_ G40: Disable tool diameter compensation X_ Y_ Z_ A_ B_ C_ U_ V_ W_ S_: Instruct the vector of the next command block The G40 command is to cancel the tool diameter compensation.
  • Page 850 Chapter4 NC Control Function (20) Tool diameter compensation (G41, G42) {G41/G42} [G00 / G01] X_ Y_ Z_ A_ B_ C_ U_ V_ W_ S_ D_ G41: Left compensation of the tool diameter G42: Right compensation of the tool diameter D_: The offset number that stores the tool diameter compensation value X_ Y_ Z_ U_: Instruct the vector of the next command block (1) Start –...
  • Page 851 Chapter4 NC Control Function [Tool path of the outer corner (acute angle)] (Type A) [Tool path of the outer corner (acute angle)] (Type B) 4-45...
  • Page 852 Chapter4 NC Control Function (2) Compensation mode [Outer wall Machining(obtuse angle)] [Outer wall Machining(acute angle)] 4-46...
  • Page 853 Chapter4 NC Control Function [Inner Machining] 4-47...
  • Page 854 Chapter4 NC Control Function (3) Cancel mode [Tool path of the inner corner] [Tool path of the outer corner (obtuse angle)] (Type A) [Tool path of the outer corner (obtuse angle)] (Type B) 4-48...
  • Page 855 Chapter4 NC Control Function [Tool path of the outer corner (acute angle)] (Type A) [Tool path of the outer corner (acute angle)] (Type B) 4-49...
  • Page 856 Chapter4 NC Control Function N1 G91 G17 G00 G41 X20. Y20. D08 (D08 tool offset no.) N2 G01 Z-25. F100 (The radius value of the tool is entered in the corresponding number) N3 Y40. F250 N4 G39 X40. Y20. (Circular type compensation path) N5 X40 Y20.
  • Page 857 Chapter4 NC Control Function The parameters related to tool diameter correction are as follows. Group and parameter name parameter channel parameter * The parameter related to the tool diameter compensation amount is "tool diameter compensation amount 1 ~ tool diameter compensation amount 128". (21) Tool length compensation (G43, G44 G49 G43 Z_ H_ G49 Z_...
  • Page 858 Chapter4 NC Control Function With the above settings, the correction amount is set to a - value for a short tool and a + value for a long tool with respect to the reference tool. Therefore, tool length compensation can always be specified only with the G43 during the program. Standard tool Short tool Long tool...
  • Page 859 Chapter4 NC Control Function (22) Tool offset (G45~ G48) G45 {G01 / G02 / G03} X_ Y_ D_ G46 {G02 / G03} X_ Y_ D_ G47 {G02 / G03} X_ Y_ D_ G48 {G02 / G03} X_ Y_ D_ G45: Tool offset increase G46: Tool offset decrease : Tool offset double increase : Tool offset double decrease...
  • Page 860 Chapter4 NC Control Function For circular arc interpolation, only 1/4 circle and 3/4 circle can be done. In other words, move toward the circular arc that radius is increased or decreased as much as the compensation value and the center of circular arc is the same. Half or perfect circle repeatedly commands 1/4 and 3/4 circles.
  • Page 861 Chapter4 NC Control Function (23) Scaling (G50, G51, Scaling Function) Scaling function is to reduce or enlarge the size of the programmed shape and then, to program. It can be applied variously by designating the whole magnifications or different magnifications of each axis. The tool offset data is excluded from the subject for scaling.
  • Page 862 Chapter4 NC Control Function N01 G92 X0 Y0 Z0 N02 G90 G51 X-100. Y-100. P0.5 N03 G00 G43 Z-200. H02 N04 G41 X-50. Y-50. D01 N05 G01 Z-250. F1000 N06 Y-150. F200 N07 X-150 N08 G02 Y-50. J50. N09 G01 X-50. N10 G00 G49 Z0 N11 G40 G50 X0 Y0 N12 M02...
  • Page 863 Chapter4 NC Control Function (24) Mirror image (G50, G51, Mirror Image) G51 X_ Y_ Z_ I-_ J-_ K-_ G50: Mirror image disable G51:Mirror image setting X_ Y_ Z_: The center coordinate value of mirror image should be absolute G90. If X_Y_Z_ are omitted, the location where G51 is commanded becomes the center of the mirror image.
  • Page 864 Chapter4 NC Control Function G54 G91 XZ0. G54 G90 G00 X0. Y0. G52 G90 X90. Y80. (Setting of local coordinate system 1) G00 X0. Y0. M98 P1234 (Auxiliary program call) G52 X60. Y80. (Setting of local coordinate system 2) G51 X0. Y0. I-1500. J-1500. (1.5 times increase of scale) (Mirror image for X and Y ON) M98 P1234...
  • Page 865 Chapter4 NC Control Function (25) Local Coordinate System setting(G52) G52 X_ Y_ Z_ G52: Local coordinate system setting The local coordinate system is the coordinate system that sets and uses the reference point at an arbitrary point based on the set workpiece coordinate system when creating the program by the workpiece coordinate system. With the local coordinate system command, the new coordinate system, namely, the local coordinate system can be set in all workpieces coordinate systems (G54 to G59).
  • Page 866 Chapter4 NC Control Function G28X0Y0 G00G90X1. Y1. G92X0Y0 G00X500Y500 G52X1. Y1. G00X0Y0 G01X500F100 Y500 G52X0Y0 G00X0Y0 4-60...
  • Page 867 Chapter4 NC Control Function (26) Mechanical coordinate system selection(G53) G90 G53 X_ Y_ Z_ G90: Absolute command G53: Machine coordinate system selection X_ Y_ Z_: feed position G53 is the command to use the machine coordinate system and the tool moves rapidly to the X_Y_Z_ position above in the machine coordinate system.
  • Page 868 Chapter4 NC Control Function (27) Select the workpiece coordinate system 1~6(G54, G55, G56, G57, G58, G59) G54 X_ Y_ Z_ G55 X_ Y_ Z_ G56 X_ Y_ Z_ G57 X_ Y_ Z_ G58 X_ Y_ Z_ G59 X_ Y_ Z_ G54: Select the workpiece coordinate system 1 G55: Select the workpiece coordinate system 2 G56: Select the workpiece coordinate system 3...
  • Page 869 Chapter4 NC Control Function (28) Single direction positioning (G60) G90 G60 X_ Y_ Z_ U_ G60: Single Direction Positioning command G00: Positioning command X_ Y_ Z_ U_: Target position to traverse Single Direction Positioning (G60) is the function used for tool traversing, which replaces the Rapid Traverse or runs last. After stopping at the position separated by the overrun stroke set for the commanded positioning direction, it moves to the end position and obtains the effect of backlash compensation.
  • Page 870 Chapter4 NC Control Function G17 G40 G80 T01 G90 G54 G60 X5.0 Y5.0 S1200 M03 T02 G43 Z2.5 H01 M08 G99 G82 R2.5 Z-2.0 P200 F150.0 G60 Y20.0 G60 X20.0 G60 Y5.0 G80 Z2.5 M09 G28 Z2.5 M05 4-64...
  • Page 871 Chapter4 NC Control Function (29) Exact Stop Mode(G61) G61: Exact Stop Mode command The Exact Stop mode (G61) command is used to avoid not exactly reaching the location designated in the previous block due to NC’s continuous execution between continuous blocks in the cutting feed. If exact stop mode is commanded, motion speed is reduced to 0 in the end point of motion of a block.
  • Page 872 Chapter4 NC Control Function (30) automatic corner override mode(G62) : Automatic Corner Override Mode command This function enables smooth feed by automatically reducing the tool feed speed to prevent the tool load from increasing while moving to the inner corner in the tool diameter compensation mode (G41/G42). There are 4 types of inner corners to which automatic corner override mode is applied.
  • Page 873 Chapter4 NC Control Function When it is determined as an inner corner, an override is applied to the feed rate from the start section to the end section of the corner. The start section and end section are saved in parameters. The save location is as follows Automatic corner override parameter channel...
  • Page 874 Chapter4 NC Control Function * Always Automatic Corner Override Automatic corner override can be applied to the entire cutting feed as well as tool diameter compensation. If the parameter setting is 0, it is the normal automatic corner override mode, and if it is 1, the automatic corner override function is always available.
  • Page 875 Chapter4 NC Control Function Program path Tool center path If an arc exists in the corner with automatic corner override applied, the feed rate is applied as follows. Deceleration section feed speed = command feed speed × automatic corner override amount × feed speed override amount (31) Tapping Mode G63: Tapping Mode Command...
  • Page 876 Chapter4 NC Control Function (32) Cutting Mode(G64) G64: Cutting Mode command The Cutting mode (G64) command is the feed mode that is set as the default of the cutting feed mode. A tool is not decelerated at the end point of a block and executes the next block. But as in the real feed, the current block is previously decelerated and the next block is previously accelerated, a phenomenon of rounding happens at the corner.
  • Page 877 Chapter4 NC Control Function (33) Macro call (G65) G65 P_ L_ <Data designation> G65: Macro call P_: Program Number L_: Frequency of repetition A custom macro can be called with the macro call (G65) command. A custom macro has several features different from a Sub Program. ...
  • Page 878 Chapter4 NC Control Function Designation of factors have 3 methods as follows:  Designation of factor 1 Use one alphabet from A to Z except G, L, O, N and P. I, J and K should be designated in alphabetic order but other variables should not be in alphabetic order. Address Variable Address...
  • Page 879 Chapter4 NC Control Function  Combination designations Even if factors are designated by combining designation of factors 1 and 2, alarms do not occur. In this case, factor address follow designation 1. Variable Variable As in the figure, in case of a combination designation, the address according to the designation of factors 1 is valid. Therefore, D5.0, not I(2)4.0, is valid in #L7 address.
  • Page 880 Chapter4 NC Control Function After executing the block that motion is commanded during a macro call, the macro call is carried out. If G66 is commanded again during a macro modal call (G66), the next modal call can be carried out. If G67 is commanded, the macro call is not carried out from the next block.
  • Page 881 Chapter4 NC Control Function (35) Coordinate Rotation G17 G68 X_ Y_ R_ G18 G68 Z_ X_ R_ G19 G68 Y_ Z_ R_ : Coordinate System Rotation : Coordinate System Rotation cancel G17 X_ Y_ : Coordinate values of the G17 plane and the center of rotation G18 Z _X_ : Coordinate values of the G18 plane and the center of rotation G19 Y_ Z_...
  • Page 882 Chapter4 NC Control Function (36) Counter Tapping Cycle G74 [G90/G91] [G98/G99] X_ Y_ Z_ R_ P_ F_ K _ : Counter Tapping Cycle X_ Y_ : Position of the hole : Depth of the hole : Coordinate for R point : Cutting feed rate : Number of repetition The Counter Tapping Cycle (G74) command is the function that is useful in creating counter screws.
  • Page 883 Chapter4 NC Control Function (37) Canned Cycle Cancel (G80) : Canned Cycle Cancel The Canned Cycle Cancel (G80) command is the function that releases all drilling data and aborts the canned cycle function. As it aborts canned cycle data such as R point and Z point, R point and Z point become 0 through incremental command.
  • Page 884 Chapter4 NC Control Function (38) Drilling Cycle/Spot Drilling Cycle G81 [G90/G91] [G98/G99] X_ Y_ Z_ R_ F_ K _ : Drilling Cycle/Spot Drilling Cycle X_ Y_ : Position of the hole : Depth of the hole : Coordinate for R point : Cutting feed rate : Number of repetition The Drilling Cycle/Spot Drilling Cycle (G81) commands are used for general drilling, reaming and spot boring.
  • Page 885 Chapter4 NC Control Function (39) Drilling Cycle/Counter boring cycle G82 [G90/G91] [G98/G99] X_ Y_ Z_ R_ P_ F_ K _ : Drilling Cycle/Spot Drilling Cycle X_ Y_ : Position of the hole : Depth of the hole : Position of R point : Dwell time at the bottom of a hole : Cutting feed rate : Number of repeats...
  • Page 886 Chapter4 NC Control Function (40) Tapping Cycle G84 [G90/G91] [G98/G99] X_ Y_ Z_ R_ P_ F_ K _ : Tapping Cycle X_ Y_ : Position of the hole : Depth of the hole : Coordinate for R point : Cutting feed rate : Number of repetition The Tapping Cycle (G84) command is used for creating screws.
  • Page 887 Chapter4 NC Control Function (41) Absolute command(G90) G90 G01 X_ Y_ Z_ A_ B_ C_ U_ V_ W_ G90: absolute position command G01/G00: linear interpolation /Positioning X_ Y_ Z_ A_ B_ C_ U_ V_ W_: target position to traverse The absolute command (G90) is the method of commanding the feed position based on the currently set coordinate system.
  • Page 888 Chapter4 NC Control Function (42) The incremental command(G91) G91 G01 X_ Y_ Z_ A_ B_ C_ U_ V_ W_ G91: Incremental command G01/G00: linear interpolation /Positioning X_ Y_ Z_ A_ B_ C_ U_ V_ W_: target position to traverse The incremental command (G91) is the method to instruct the movement amount to the target point to traverse for the current position based on the currently set coordinate system.
  • Page 889 Chapter4 NC Control Function (43) Work-piece Coordinate System Setting, Maximum Spindle Speed (G92) When setting the Work-piece Coordinate System G92 X_ Y_ Z_ A_ B_ C_ U_ V_ W_ G92: Work-piece Coordinate System command X_ Y_ Z_ A_ B_ C_ U_ V_ W_: Input of offset value by axis The work-piece coordinate system setting is a command to shift the coordinate system in current use as much as the input offset.
  • Page 890 Chapter4 NC Control Function designated at 100 rpm G96 S1000 % When controlling constant surface speed, cutting speed is 1000 m/min (44) Feed mode command per minute (G94) G94 G01 X_ F_ G94: Feed mode command per minute G01: Linear interpolation feed command X_: Coordinate value of the target position to move through the linear interpolation feed F_: Speed command It is the command to set the input unit to the user input unit (mm, degree) per minute.
  • Page 891 Chapter4 NC Control Function (46) Constant surface speed control (G96) G96 S_ G96: Constant surface speed (= circumferential speed) control command S_: Cutting speed command (m/min) It is the function used when machining materials with an inconstant diameter. Keep the cutting speed constant and revolve the spindle by calculating the rotation number of the main axis according to change in material diameters.
  • Page 892 Chapter4 NC Control Function (47) Constant surface speed cancel (G97) G97 S_ G96: Constant surface speed control cancel = Constant rotation number control S_: Set the rotation speed of the main axis in rpm The modal code operates before G96 (constant surface speed control) is commanded. The code is used when rotating the main axis at the constant speed.
  • Page 893 Chapter4 NC Control Function (49) Return to R Point at a Canned Cycle (G99) : Return to Initial Point, R point (initial point of cutting feed) at a Canned Cycle Rapidly return to R point after completing boring. Initial point R point : Initial point of cutting feed Z point : Bottom of a hole 4-87...
  • Page 894 Chapter4 NC Control Function (50) Cylindrical interpolation mode setting (G107) G107 C_ G107: Cylindrical interpolation command C_: Set the rotation axis and radius of a cylinder (If the value is 0, the cylindrical interpolation is canceled.) The cylindrical interpolation is a type of contour control, which is the control mode for machining a cylindrical surface. It can be easily created when grooving the cylindrical CAM.
  • Page 895 Chapter4 NC Control Function (51) Polar coordinate interpolation mode ON/OFF (G112, G113) G112 G01/G02/G03 G113 G112: Set the polar coordinate interpolation mode, it is maintained until the G113 is commanded. G01/G02/G03: Command to the rectangular coordinate system of the linear and rotary axis. G113: Disable the polar coordinate interpolation mode The polar coordinate interpolation converts the command entered into the rectangular coordinate system into the movement of the linear axes (X, Y, Z: tool movement) and the rotary axes (A, B, C: workpiece).
  • Page 896 Chapter4 NC Control Function G112 % Polar coordinate interpolation mode On G01 C10 F100 % P1: C10 traverse G01 X-8 % P2: X -8 Position traverse G03 X-10. C8. R2. % P3: X -10 Y 8 G113 % Disable the polar coordinate interpolation mode Caution In the polar coordinate interpolation, only the straight line (G01) and circular interpolation (G02 / G03) can be used.
  • Page 897 Chapter4 NC Control Function 2) M code Operating the machine through the motion control requires the functions for various mechanical operations in addition to the functions such as feed and interpolation using the G codes. In order to control the machine using the functions other than those supported by the G codes, the motion controller supports the M codes.
  • Page 898 Chapter4 NC Control Function M code Function Meaning Tool change Tool change Depending on the type of automatic tool changer (ATC), it is also used as the specific macro program call function. A coolant motor is operated. Before this command, the auto switch of the coolant on the machine’s Coolant ON control panel must be set to On.
  • Page 899 Chapter4 NC Control Function 3) Other Operation instructions of the NC program Other instructions of the motion controller are the commands that control the progress of the program that is not supported by G code, M code, or logical / numerical operation function. Using the variables and instructions, it can program flexible and complicated forms of operations synchronized with the G / M code.
  • Page 900 Chapter4 NC Control Function 1-3) system variable #FNi (N = X, D, W, L; i= 1, 2, 3, …) For the system variables, # followed by a device type, M with a variable type and a number. The range of input values available for each variable type is different.
  • Page 901 Chapter4 NC Control Function 2-3) Performing the address range check for each data type Type Local variable Global variable System flag #X0 ~ #X32767 #MX0 ~ #MX16777215 #FX0 ~ #FX1048575 16 bit #W0 ~ #W2047 #MW0 ~ #MW1048575 #FW0 ~ #FW65535 32 bit #D0 ~ #D1024 #MD0 ~ #MD524287...
  • Page 902 Chapter4 NC Control Function (5) Branch command(GOTO) GOTO N_ GOTO: Unconditional branch to the block designated as "N_" N_: Specify the Statement Number to Jump The branch instruction is the function to branch unconditionally to the block marked with the Statement Number "N_" that is specified after "GOTO".
  • Page 903 Chapter4 NC Control Function (7) Operation command There are substitution of variables and integers, the four fundamental arithmetic operations, Mathematical operation, etc. for available operations. The types of commands are shown in the table below. When using multiple operations in combination, the priority is given in order of variable, multiplication / division, addition / subtraction.
  • Page 904 Chapter4 NC Control Function (9) Optional Block Skip This is used as the command of / at the head of a block. It selects whether to perform the current block through an external signal. The command should be located in the forefront of the block and can be separated by using a number at the end of the block.
  • Page 905 Chapter4 NC Control Function 4.4 NC Parameter NC parameter is channel parameter and axis parameter. The each parameter is as follows. Parameter Group Item Description 1. Channel 1. Standard Target machining quantity Set the target machining quantity. parameter settings (0 ~ 2,147,483,647) Target machining quantity at Set the target machining quantity for repeated M99 repeated machining...
  • Page 906 Chapter4 NC Control Function Parameter Group Item Description 1. Channel 1. Standard Whether or not to search the The number of buffers that can store the program’s parameter settings Statement Number Statement Number (N__) is limited to 1,000 in the system.
  • Page 907 Chapter4 NC Control Function Parameter Group Item Description Main spindle axis number Set the number of an axis to be used as the main spindle axis in the NC channel. Set the system that does not use the spindle axis to 0. To automatically execute spindle commands in the NC function module, set it exactly the same as the axis number connected to the NC S axis.
  • Page 908 Chapter4 NC Control Function Parameter Group Item Description 1. Channel 2. Circular Regenerate the circular center Set whether to recreate the central point of the arc parameter milling setting when the circular alarm occurs without generating an arc alarm when the distance between the start point and the end point exceeds the tolerance of the difference between the two radii under the I, J, K circular commands.
  • Page 909 Chapter4 NC Control Function Parameter Group Item Description 1. Channel 3. Set the Set the upper speed limit of the If the cutting speed exceeding the set value is parameter cutting feed cutting feed commanded, the cutting speed is limited to the set value and an alarm occurs.
  • Page 910 Chapter4 NC Control Function Parameter Group Item Description 1. Channel 7. Automatic Start section of automatic Set the override area (Ls) of the starting block that parameter corner corner override setting forms the corner in case of automatic corner override override command.
  • Page 911 Chapter4 NC Control Function Parameter Group Item Description speed is smaller than this value, it is fed at the command speed. (0 ~ 99999.999 mm/min, 0~ 9999.999 inch/min, real number) 4-105...
  • Page 912 Chapter4 NC Control Function Parameter Group Item Description 1. Channel 8. Tool How to apply the Set the method of applying the compensation amount parameter diameter compensation value of the of the tool diameter when compensating the tool compensation tool diameter diameter.
  • Page 913 Chapter4 NC Control Function Parameter Group Item Description 1. Channel 10. Workpiece Whether to use the workpiece Set whether to use the workpiece coordinate parameter coordinate coordinate system shift amount. system shift amount. system 0: Do not use 1: Used Workpiece coordinate system Set the workpiece coordinate system shift amount shift amount 1...
  • Page 914 Chapter4 NC Control Function Parameter Group Item Description 1. Channel 11. Macro Whether to apply the single Set whether to apply the single block stop function parameter program block stop function to the macro to the macro program(9000.nc ~ 9999.nc) program 0: Stop 1: Do not stop...
  • Page 915 Chapter4 NC Control Function Parameter Group Item Description 1. Channel + measured reference Set the measurement reference distance from the parameter Automatic distance X of automatic tool automatic tool offset to the contact surface in the tool offset offsets +traversing direction of X. Machine origin Reference tool Con tact surface...
  • Page 916 Chapter4 NC Control Function Parameter Group Item Description Automatic tool Sets the detection range (err) for automatic tool length measurement detection measurement. range of automatic tool (0 ~ 99.999 mm, 0 ~ 9.999 inch, real number) offset Automatic tool deceleration Sets the automatic tool length measurement deceleration speed of automatic tool speed (Fp).
  • Page 917 Chapter4 NC Control Function Parameter Group Item Description 1. Channel 14. Default Modal traverse of default If there is no G00 or G01, select the G code to be parameter setting settings applied as the default modal. 0: Rapid Traverse(G00) 1: Cutting Feed(G01) Modal plane of default settings If there is no G code instruction for G17, G18, G19...
  • Page 918 Chapter4 NC Control Function Parameter Group Item Description Relative coordinate’s offset Set the relative coordinate’s offset value for the V value #8 axis. Relative coordinate’s offset Set the relative coordinate’s offset value for the W value #9 axis. 4-112...
  • Page 919 Chapter4 NC Control Function Parameter Group Item Description 1. Axis setting Setting the direction for the Set the traverse command for the axis set as the Channel/axis modular axis modular axis. parameter 0: Unidirectional 1: Bidirectional 2. Home Coordinates of the 2nd origin Set the coordinates of the 2nd origin.
  • Page 920 Chapter4 NC Control Function Parameter Group Item Description (-100 ~ 100 unit, real number) 4-114...
  • Page 921 Chapter4 NC Control Function The parameter number, group number, and item number in the table above can be used as operands of NC_ReadParameter or NC_WriteParameter when reading or writing NC parameters in a motion program. For the function block, refer to 8.8.14 and 8.8.15. Motion Function Block NC_WriteParameter BOOL...
  • Page 922: Spindle Functions

    Chapter4 NC Control Function 4.5 Spindle Functions A spindle is a rotating axis that is used to equip a work-piece or a cutting tool in machine tools. The NC control of a motion controller provides methods to control the spindle axis and various operation functions. 4.5.1 Spindle Device This part explains basic settings to use the spindle axis and spindle devices supported to control the spindle axis in the NC control of a motion controller.
  • Page 923 (9) or vl (2) using the ‘EtherCAT parameter – Slave – Start command’. [Ex.] Set the operation mode to csv (9) in the start command of the LS ELECTRIC L7NH servo drive 2) to set the spindle axis To use the spindle axis in the NC control, set motion data in the following order.
  • Page 924 Chapter4 NC Control Function 4-118...
  • Page 925 Chapter4 NC Control Function (3) NC channel/Axis - Connection of an axis Connect the axis to be used as the spindle axis among axes registered with the axis parameter to NC channel 1/S axis, or spindle axis. [Ex.] Connect Axis 4 (connection of Slave 4 (S1000 Option)) to the NC S axis (4) NC channel parameter - Set how to operate the spindle axis Set how to handle the spindle M/S-code of the spindle axis and the main spindle axis number according to how to operate the spindle axis.
  • Page 926 Chapter4 NC Control Function 4-120...
  • Page 927 Chapter4 NC Control Function 4.5.2 How to Operate the Spindle Axis Users can set how to operate the spindle axis in the NC control of a motion controller. The spindle axis that is set to the main spindle axis number according to values of the M-code and S-code can be automatically operated or users can control the spindle axis directly using motion commands after the NC function module confirms the values of the M-code and S-code in a task program.
  • Page 928 Chapter4 NC Control Function Variable Description MainSpindle Main spindle axis number check McodeStrobe M code output strobe signal McodeData M code data output ScodeStrobe S code output strobe signal ScodeData S code data output ※ If the NC spindle axis is automatically operated in the NC function module, you can check the axis number set as the main spindle axis in the ‘Check main spindle axis number’...
  • Page 929 Chapter4 NC Control Function 2) User operation in a task program (1) Operation If the block where the spindle-related M-code (M03, M04, M05, M19) and S-code are used in the NC program, users can control the spindle axis by separately confirming the values of the M-code or S-code in a task program. (a) Treatment order a) If the block where the M-code (M03, M04, M05, M19) and S-code are used in the NC program, the relevant block stops automatic operation of the NC program.
  • Page 930 Chapter4 NC Control Function (b) Status Information For more information, you can check the _NC_Channel structure in 2.10.1 Reading PLC status information (READ_PLC_INFO0. Variable Description MainSpindle Main spindle axis number check McodeStrobe M code output strobe signal McodeData M code data output ScodeStrobe S code output strobe signal ScodeData...
  • Page 931 Chapter4 NC Control Function 4.5.3 Spindle-related parameter If controlling the spindle axis in the NC control of a motion controller, explain the relevant parameter. 1) Axis parameter Item Description Setting range Initial value Set the value to compensate backlash of machine. 0 or Backlash compensation amount Long real (LREAL) positive...
  • Page 932 Chapter4 NC Control Function 1:reverse direction direction Orientation offset 0 ~ 360 The tolerance range to reach the Determine whether to reach the command speed 0 ~ 100 % 95 % spindle rotation command speed of the spindle axis by the set value. The tolerance RPM to reach the Determine whether to reach the zero speed of the 0 ~ 100 rpm...
  • Page 933 Chapter4 NC Control Function 4.5.4 Spindle operation function Users can set how to operate the spindle axis in the NC control of a motion controller. If the spindle axis that is set to the main spindle axis number according to values of the M-code and S-code is automatically operated in the NC function module, explain the spindle operation function.
  • Page 934 Chapter4 NC Control Function _NC_Channel Values of the current command CVelOfSpindle Spindle command speed velocity of the spindle SpindleStop _NC_Channel Spindle stop state check signal SpindleCW _NC_Channel Spindle CW state check signal SpindleCCW _NC_Channel Spindle CCW state check signal _NC_Channel Spindle command velocity reached After reaching the target velocity, SpindleCVelAgr...
  • Page 935 Chapter4 NC Control Function Conduct operation using ‘rapid traverse acceleration/deceleration/jerk’ of channels / S axis parameters to change velocity of the spindle axis. After starting the S-code velocity change operation, the program of the next block is automatically operated. (2) Status After starting the M05 stop operation, the status information is changed as follows.
  • Page 936 Chapter4 NC Control Function 5) Homing operation (1) Operation When executing commands by setting the NcAxis input of the NC_Home command to 10 (S axis) and the ReferenceNum input to ‘1: The 1st homing’, execute the homing operation of the spindle axis according to the method set in the ‘method for homing operation’...
  • Page 937 Chapter4 NC Control Function (d) 35: Set the homing of the current position The current position of the spindle axis becomes a reference position. Immediately after the NC_Home command is executed, the ‘axis S homing completion’ (HomeCmpl) state variable is turned on, and the ‘axis S work-piece coordinate system command position’...
  • Page 938 Chapter4 NC Control Function If the ‘spindle encoder selection’ parameter is ‘0: Disable’, the homing operation cannot be executed. If satisfying the following conditions according to the ‘spindle encoder selection’ parameter, homing operation can be normally executed. (a) ‘1: Motor ENC’ The position actual value (0x6064:0) object should be set in the setting of the EtherCAT Slave TxPDO.
  • Page 939 Chapter4 NC Control Function a) Unit of Encoder 2 = 0: pulse b) Encoder 2 max. value = 2147483647 pls c) Encoder 2 Min. value = -2147483648 pls 6) Orientation (1) Operation When executing the M19 block in the NC program, move the spindle axis to the ‘Spindle Orientation Offset’ position of the spindle axis.
  • Page 940 Chapter4 NC Control Function (a) ‘1: Motor ENC’ The position actual value (0x6064:0) object should be set in the setting of the EtherCAT Slave TxPDO. (b) ‘2: Encoder 1’ d) Unit of Encoder 1 = 0: pulse e) Encoder 1 max. value = 2147483647 pls f) Encoder 1 Min.
  • Page 941: Operation

    Chapter4 NC Control Function e) Encoder 2 max. value = 2147483647 pls f) Encoder 2 Min. value = -2147483648 pls 7) Constant surface speed control (1) Operation The function is used when machining a material with an inconstant diameter. When executing the G96 (constant surface speed control) command in the NC program, the NC spindle axis controls constant surface speed.
  • Page 942 Chapter4 NC Control Function 4.5.5 Spindle Operation status The NC control of a motion controller provides a status information variables that can confirm the operation status of the spindle axis. For more information, you can check the _NC_Channel structure in 2.10.10.1 Reading PLC (READ_PLC_INFO0. 1) NC channel status variables(_NC_Channel structure) Variable Description...
  • Page 943 Chapter4 NC Control Function 2) NC S axis status information(_NC_ChannelAxis structure) Variable Description Ready Axis S ready Warning Axis S warning occurrence Alarm Axis S alarm occurrence status ServoOn Axis S servo On/Off status ServoReady Axis S servo ready status ServoAlarm Axis S servo alarm status OprRdy...
  • Page 944 Chapter4 NC Control Function 4.5.6 Spindle-related Command The NC control of a motion controller sets information of the current speed of the NC channel spindle axis and provides individual commands that support spindle operations such as gear conversion of the spindle axis. 1) Spindle operation control (NC_SpindleControl) (1) Operation If the current speed of the spindle cannot be confirmed in the NC function module because there is no encoder in the spindle...
  • Page 945 Chapter4 NC Control Function WORD ErrorID Output the error number that occurred while the function block is running. ※ For function block operation, see ‘8.8.22 Spindle Operation Control (NC_SpindleControl)’. 2) Spindle gear change (NC_ChangeSpindleGear) (1) Operation The function is used to change parameter values related to gear conversion and to change the velocity of the spindle axis at the speed that gear conversion can be conducted in order to change gears connected to the NC channel spindle axis.
  • Page 946 Chapter4 NC Control Function (2) Function block The spindle gear conversion (NC_ChangeSpindleGear) function block is as follows: Motion Function Block NC_ChgSpindleGear BOOL Execute Done BOOL NcChannel UINT NcChannel UINT Busy BOOL LREAL ChangeVelocity Error BOOL BOOL GearChangeCmpl ErrorID WORD LREAL MaxVelocity GearChangeEnable BOOL...
  • Page 947: Chapter 5 Motion Program

    Chapter 5 Motion Program Chapter 5 Motion Program 5.1 Program Configuration and Operation Method The program of the motion controller is divided into main task program, periodic task program and initialization task program. The features of each program in execution are as follows. 5.1.1 Program Configuration The motion controller's initialization, main and periodic task programs are executed based on the cycle.
  • Page 948: Program Setting Method

    Chapter 5 Motion Program 5.1. 2 Program Setting Method 1) How to set the main task program In the main task location, click the right mouse button and click 『Add item』-『Program』. (However, when creating the project, the main task program is already created.) 2) How to set the Periodic task program In the cycle task location, click the right mouse button and click 『Add item』-『Program』.
  • Page 949 Chapter 5 Motion Program 3) How to set the initial task program (1) In the initialization task location, click the right mouse button and click 『Add item』-『Program』. (2) Create the necessary initialization program. Make sure to write the INIT_DONE command in the initialization task program. (When the operating condition of the INIT_DONE is executed, the initialization task is terminated and the scan program will run.) 5.1.3 Program Scan time...
  • Page 950 Chapter 5 Motion Program If the main task is not completed for one cycle, just measure the time from the start of the main task cycle to the time when the main task is completed as shown below. Main task period Main task period Perform Motion...
  • Page 951 Chapter 5 Motion Program (2) Using the flag: The scan time is stored in the system flag(F) area below. WORD Flag Name Description %FW512 _PTASK_SCAN_MAX Maximum scan time of main task program (Unit:100us) %FW513 _PTASK_SCAN_MIN Minimum scan time of main task program (Unit:100us) %FW514 _PTASK_SCAN_CUR Current scan time of main task program (Unit:100us)
  • Page 952 Chapter 5 Motion Program 5.2 State Information read In the motion controller program, the state of each axis and axis group and the operation state of the motion controller can be checked through the member variables of the _MC_Axis and _MC_AxesGroup structures in 2.10.1 Reading PLC Status Information (READ_PLC_INFO). Most of the program examples in Chapter 5.3 were written using the read status information function to indicate the status of axes and axis group.
  • Page 953 Chapter 5 Motion Program 5.2.2 Axis Group Status Information read This is an example program that utilizes READ_PLC_INFO to check axis groups status information. (1) All axis number of axis groups state information variables used in the example below are based on the above program. (Axis 1 group is _AG01, axis 2 group is _AG02) (2) Here is the list of axis groups state variables used in the example below.
  • Page 954: Operation Ready

    Chapter 5 Motion Program 5.3 Single Axis Operation Program 5.3.1 Operation Ready These are example programs that make access to servo drive connected with Ethernet cable and get the connected servo drive to be On to operate EtherCAT servo drive. (2) 1 Scan on (2) 1Axis/2Axis ready off (3) Connect EtherCAT...
  • Page 955: Homing Operation

    Chapter 5 Motion Program 5.3.2 Homing operation Homing is carried out to set the origin of the machine after the power is applied. Since homing is performed in the servo drive, homing methods may vary depending on servo drive manufacturers. In motion control module, the completion of homing command and error situation is monitored, and the position of the origin after homing is applied to control.
  • Page 956 Chapter 5 Motion Program (5) Axis operating state information : If the axis is in operation, it is On. (6) 1/2 axis homing command : In example programs, homing (MC_Home) motion function block is performed under the following conditions. - Homing condition is On - The axis is normally connected - There should be no errors and warnings.
  • Page 957 Chapter 5 Motion Program 5.3.3 Absolute Position/Relative Position Operation It is a program for absolute position and relative position operation using motion control module. The absolute position is based on the origin and, and relative position the current position. (1) Command condition (2) Axis connection status (4) Axis servo-on status (3) Axis error/...
  • Page 958 Chapter 5 Motion Program (1) Command condition : It is a condition to make the axis perform position control operation. (2) Axis connection status flag : When the axis to be operated is connected to motion control module, and EtherCAT communication with motion control module is normally performed, it is On.
  • Page 959 Chapter 5 Motion Program - Buffer mode: It sets the point of time when motion function block is executed. That is, it sets whether to execute immediately or execute after the completion of commands which are currently being performed. For more details, refer to “2.1.4 Buffer Mode input”.
  • Page 960 Chapter 5 Motion Program 5.3.4 Speed/Torque Control Operation These are example programs for speed control and torque control operation using motion control modules. In case of the torque control, torque control of servo drive is used, and in motion control module, command for executing torque control is issued, and execution completion and status is monitored.
  • Page 961 Chapter 5 Motion Program (3) Axis error/warning status information : If there are errors and warnings in the axis, it is On. (4) Axis servo on status information : If the axis is in servo-on state, it is On, and servo-off state, it becomes Off. (5) Axis operating state information : If the axis is in operation, it is On.
  • Page 962 Chapter 5 Motion Program (9) Speed control operation command output variables : It is a variable to store output values generated when specified velocity operation (MC_MoveVelocity) motion function block is executed. - Reaching the set speed completed: When the set speed is reached through speed control operation, it is On. - Function Block in execution: When motion function block is executed, it is On, and operation completion is On, it becomes Off.
  • Page 963 Chapter 5 Motion Program 5.3.5 Axis stop It is an example program to stop the axis in operation. The motion function block to stop the axis in operation includes “Immediate Stop (MC_Stop)” and “Halt (MC_Halt)”. As a command to implement emergency stop of the axis, “Immediate Stop (MC_Stop)” performs “Immediate Stop (MC_Stop)”, and other motion function blocks cannot be executed during the stop.As a command to stop the axis, “Halt (MC_Halt)”...
  • Page 964 Chapter 5 Motion Program (3) Axis error/warning status information : If there are errors and warning in the axis, it is On. (4) Axis operating state information : If the axis is in operation, it is On. (5) 1-axis emergency stop / 2-axis axis stop commands : In example programs, immediate stop (MC_Stop) motion function block is executed in 1-axis, and halt (MC_Halt) motion function block is executed in 2-axis under the following conditions.
  • Page 965: Error Process

    Chapter 5 Motion Program 5.3.6 Error process It is an example program to check the errors that occurred on the axis and conduct error reset. (1) Command condition (2) Axis connection status (4) Comparison of axis error number (3) Axis error/ warning status (7) Error reset command output variables - Execution completed...
  • Page 966 Chapter 5 Motion Program (1) Command condition : It is a condition to give error reset commands to the axis. (2) Axis connection status information : When the axis to be operated is connected to motion control module, and EtherCAT communication with motion control module is normally performed, it is On.
  • Page 967 Chapter 5 Motion Program 5.3.7 Operation Change It is an example program to change the current location of the axis and speed in operation. (1) Command condition (2) Axis connection status (4) Axis operation status (3) Axis error/ warning status (7) Current position change (6) Velocity override command input variables command output variables...
  • Page 968 Chapter 5 Motion Program - The axis is normally connected - There should be no errors and warnings. - The axis is not in operation. In addition, speed/acceleration override (MC_SetOverride) motion function block is executed under the following conditions. - The operating speed change condition is On. - The axis is normally connected - There should be no errors and warnings.
  • Page 969: Parameter Read/ Write

    Chapter 5 Motion Program 5.3.8 Parameter Read/ Write Parameter read/write commands include “Parameter Write (MC_WriteParameter)” and Parameter Read (MC_ReadParameter)” as well as “SDO Write (LS_WriteSDO)” and “SDO Read (LS_ReadSDO)”. “Parameter Write (MC_WriteParameter)” and “Parameter Read (MC_ReadParameter)” are commands to write and read operation parameters of the axis or encoder parameter, and “SDO Write (LS_WriteSDO)”...
  • Page 970 Chapter 5 Motion Program (3) Axis error/warning status information : If there are errors and warnings in the axis, it is On. (4) Axis operating state information : If the axis is in operation, it is On. (5) 1-axis parameter write/ 2-axis servo parameter read commands : In example programs, Parameter Read (MC_ReadParameter) motion function block is executed in 1-axis, and Servo Parameter Read (LS_ReadSDO) motion function block is executed in 2-axis under the following conditions.
  • Page 971 Chapter 5 Motion Program *Note1 JOG deceleration 0 or LREAL Positive number ) [Unit/s *Note1 JOG Jerk 0 or LREAL Positive number ) [Unit/s Override mode 0: Specified by ratio, 1: Specified by unit *Note 1 Backlash compensation amount 0 or Long real (LREAL) positive number ) [Unit] Parameter Item...
  • Page 972 Chapter 5 Motion Program 2: 200kPPS, 3: 100kPPS 4: 10kPPS, 5: 1kPPS 6: 0.1kPPS Encoder 1 Speed unit 0: unit/sec, 1: unit/min, 2: rpm Encoder 1 position filter time constant 0~1000 ms Encoder 2 unit 0: pulse, 1: mm, 2: inch, 3:degree Encoder 2 pulse per rotation 1 ~ 4,294,967,295 [pulse] Encoder 2 travel distance per rotation...
  • Page 973 Chapter 5 Motion Program  Parameter write (1) Command condition (3) Axis error/warning status (2) Axis connection status (4) Axis operation status (6) Parameter write command input variables - Command axis - Parameter number (7) SDO write command input variables - Parameter value to write - Command slave - Execution mode...
  • Page 974 Chapter 5 Motion Program (LS_WriteSDO) motion function block is executed in 2-slave under the following conditions. - Parameter write condition is On - The axis is normally connected - There should be no errors and warnings. - Not in operation. Conditions to execute function block may vary depending on systems.
  • Page 975: Linear Interpolation Operation

    Chapter 5 Motion Program 5.4 Multi-Axis Operation Program 5.4.1 Linear Interpolation operation It is an example program to operate linear interpolation with axes set to the same group. In the example program, 1-axis and 2-axis are assumed to be included in the same axis group. Refer to the example program of “appendix 6.4.5 Axis group processing” to include an axis in axis group or remove the axis from axis group.
  • Page 976 Chapter 5 Motion Program (1) Command condition : It is a condition to give linear interpolation command to the axis group. (2) Axis groups connection status information : In case axes of the axis group to be operated are connected to motion control module, and EtherCAT communication with motion control module is normally performed, it is On.
  • Page 977 Chapter 5 Motion Program 5.4.2 Circular interpolation operation It is an example program to operate circular interpolation operation with axes set to the same group. In the example program, 1-axis and 2-axis are assumed to be included in the same axis group. Refer to the example program of “5.4.5 Axis group processing” to include an axis in axis group or remove the axis from axis group.
  • Page 978 Chapter 5 Motion Program (1) Command condition : It is a condition to give circular interpolation command to the axis group. (2) Axis groups connection status information : In case axes of the axis group to be operated are connected to motion control module, and EtherCAT communication with motion control module is normally performed, it is On.
  • Page 979: Synchronous Operation

    Chapter 5 Motion Program 5.4.3 Synchronous operation It is an example program on the synchronous operation in which serve axis moves in synchronization ratio set in the main axis. (1) Command condition (2) Axis connection status (4) Axis operation status (3) Axis error/warning status (5) 2 axis synchronous operation/Synchronous operation cancellation commands...
  • Page 980 Chapter 5 Motion Program (4) Axis operating state information : If the axis is in operation, it is On. (5) 2 Axis synchronous operation/Synchronous operation cancellation commands : In the example program, electronic gear operation (MC_GearIn) motion function block is executed under the following conditions. - Synchronous operation condition is On.
  • Page 981: Cam Operation

    Chapter 5 Motion Program 5.4.4 CAM Operation It is an example program on the cam operation that moves in synchronization based on cam (CAM) profile in which serve axis is set. (1) Command condition (2) Axis connection status (4) Axis operation status (3) Axis error/warning status (5) 2 axis cam operation/ Cam operation cancellation comm ands...
  • Page 982 Chapter 5 Motion Program : If there are errors and warnings in the axis, it is On. (4) Axis operating state information : If the axis is in operation, it is On. (5) 2-axis cam operation/Cam operation cancellation commands : In the example program, cam operation (MC_CamIn) motion function block is executed under the following conditions. - Cam operation condition is On.
  • Page 983 Chapter 5 Motion Program 5.4.5 Axis groups process (1) Command condition (2) Group connection status (3) Error/Wrarnig status (4) Group operation status (6) Remove axis from group (7) Add axis to group command command input variable output variables - Axis group - Execution completed - The axis ID on axis group ID - Function block in execution...
  • Page 984 Chapter 5 Motion Program In addition, group axis exclusion (MC_RemoveAxisFromGroup) motion function block is executed under the following conditions. - Remove axis from group condition is On. - The axis is normally connected - There should be no errors and warnings.] - The axis is not in operation.
  • Page 985 Chapter 5 Motion Program 5.4.6 Axis groups operation example 1. Status Information variable setting 2. EtherCAT Slave connection Slave connect ECAT_Slave connect 5-39...
  • Page 986: Group Configuration

    Chapter 5 Motion Program 3. Group Configuration Group Add axis to group (1) Add axis to group (2) Servo On Servo Axis01 – Servo on Axis03 – Servo on 5. Group Enable Group Enable AxesGroup2_Group enable 5-40...
  • Page 987 Chapter 5 Motion Program Group Homing Group Homing Axes Group 2 - Homing Linear Interpolation Linear interpolation Axes group2-Linear interpolation(1) 5-41...
  • Page 988 Chapter 5 Motion Program Group Disable Group disable Axes group2-Group disable Group release Ungroup Axesgroup2-Ungroup 5-42...
  • Page 989 Chapter 5 Motion Program 10. Timing diagram 5-43...
  • Page 990 Chapter 5 Motion Program 5-44...
  • Page 991: Chapter 6 Ethercat Diagnosis

    Chapter 6 EtherCAT Diagnosis Chapter 6 EtherCAT Diagnosis This chapter describes the diagnosis function provided by the EtherCAT master and XG5000. (1) Offline Diagnosis Function In XG5000, the user can check the validity of the slave participating in EtherCAT communication through the ESI (EtherCAT Slave Information) file inspection used in the EtherCAT connection process.
  • Page 992 Chapter 6 EtherCAT Diagnosis At this time, the required PDO configuration for each operation mode is as follows. Based on the above, if there is no PDO item corresponding to the currently set operation mode in the currently set PDO setting, the following warning message is displayed on the screen when adding a slave.
  • Page 993 Chapter 6 EtherCAT Diagnosis Notes The following is the PDO configuration for each operation mode suggested by the Implementation Directive for CiA402 Drive Profile (ETG.6010 D(R) V1.1.0). Please refer to the PDO configuration for each operation mode. (c) Check ESI File Validation In XG5000, there is a function to check the ESI file through the XSD (XML Schema Definition) file, which is the structure definition file of the ESI file.
  • Page 994 Chapter 6 EtherCAT Diagnosis When the menu is executed, the following warning dialog box is displayed If you check the result window, you can check the ESI file error to which the currently tested device belongs.
  • Page 995 Chapter 6 EtherCAT Diagnosis (2) Online Diagnosis Function XGI-CPUZ provides the diagnostic function of the currently connected EtherCAT network through the flag and diagnostic function. The diagnostic flag provides the function to read the ESC register through the flag without using the existing ESC Register read command (LS_READESC).
  • Page 996 Chapter 6 EtherCAT Diagnosis (b) Slave diagnosis using diagnostic flags EtherCAT communication problems may occur due to various causes such as device failure or external EMC disruption during EtherCAT communication. In these cases, the diagnostic flags allow us to estimate the location of the slave where the problem is occurring.
  • Page 997 Chapter 6 EtherCAT Diagnosis XGI-CPUZ provides a monitoring function that can check the flags that can check the EtherCAT communication status on one screen through the [Master]-[Diagnosis Information] screen. [Diagnostic Information Window Description] a. How to display monitor: determines the format of the data displayed Decimal or hexadecimal can be selected. b.
  • Page 998 Chapter 6 EtherCAT Diagnosis (d) Confirmation of CiA 402 Drive Profile support mode You can check the CiA 402 Drive Profile mode supported by the slave on the diagnostic information screen. On the diagnostic information screen, select a slave on the slave, right-click and select [Slave basic Information]. In the slave information confirmation window, you can check the information of the CiA 402 support mode supported by the slave along with the slave name/revision information.
  • Page 999 Chapter 6 EtherCAT Diagnosis (f) Change of slave state The function to change the state of the state machine of the EtherCAT slave is supported on the diagnostic information screen. On the diagnosis information screen, place the mouse on the detailed information of the slave, right-click the mouse, select the [Change Slave State] menu, and select the state you want to change.
  • Page 1000 Chapter 6 EtherCAT Diagnosis 6-10...

This manual is also suitable for:

Xgi-cpuz3Xgi-cpuz5Xgi-cpuz7

Table of Contents