Page 1
Sysmac Library User’s Manual for EtherCAT G5 Series Library ® SYSMAC-XR004 W548-E1-05...
Page 2
No patent liability is assumed with respect to the use of the information contained herein. Moreover, because OMRON is constantly striving to improve its high-quality products, the information contained in this manual is subject to change without notice. Every precaution has been taken in the preparation of this manual. Neverthe- less, OMRON assumes no responsibility for errors or omissions.
Keep this manual in a safe place where it will be available for reference during operation. Features of the Library The EtherCAT G5 Series Library is used to initialize the absolute encoder, back up and restore the parameters for an OMRON G5-series Servo Drive with built-in EtherCAT communications.
Information on differences in specifications and functionality for CPU Units and Industrial PCs with different unit versions and for different versions of the Sysmac Studio are given. Note References are provided to more detailed or related information. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 5
Manual Structure Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Function Blocks ..................... 31 InitEncoder_G5............................32 Backup_G5 ..............................40 Restore_G5 ............................... 55 Appendix ......................... 69 Referring to Library Information ......................... 70 Referring to Function Block and Function Source Codes................73 Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 7
CONTENTS Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Omron’s exclusive warranty is that the Products will be free from defects in materials and workman- ship for a period of twelve months from the date of sale by Omron (or such other period expressed in writing by Omron). Omron disclaims all other warranties, express or implied.
Disclaimers Performance Data Data presented in Omron Company websites, catalogs and other materials is provided as a guide for the user in determining suitability and does not constitute a warranty. It may represent the result of Omron’s test conditions, and the user must correlate it to actual application requirements. Actual perfor- mance is subject to the Omron’s Warranty and Limitations of Liability.
The filled circle symbol indicates operations that you must do. The specific operation is shown in the circle and explained in text. This example shows a general precaution for something that you must Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Emergency stop circuits, interlock circuits, limit circuits, and similar safety measures must be provided in external control circuits. Check the user program, data, and parameter settings for proper execution before you use them for actual operation. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
• Create a user program that will produce the intended device operation. • Check the user program for proper execution before you use it for actual operation. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Features and system configuration mation, designing, installa- Introduction tion, and maintenance. Part names and functions Mainly hardware informa- tion is provided General specifications Installation and wiring Maintenance and inspection Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 14
Controller User’s trol with NJ/NY-series Con- ical control. Use this manual together with the NY532-5400 Manual trollers. NJ/NY-series G code Instructions Reference Manual (Cat. No. O031) when pro- gramming. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 15
An introduction of the CNC Operator, installation Operation Manual -RTNC0D the CNC Operator and how procedures, basic operations, connection opera- to use it. tions, and operating procedures for main func- tions are described. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Revision code Date Revised content April 2015 Original production December 2015 Corrected mistakes. July 2016 Changed the manual name. November 2016 Changed the manual name. January 2019 Added compatible models. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
2 and later steps. • Set the project type to Standard Project or Library Project. • Set the device category to Controller. • Set the device version to 1.01 or later. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 19
Insert the Sysmac Library’s function blocks and functions into the circuit using one of the follow- ing two methods. • Select the desired function block or function in the Toolbox and drag and drop it onto the pro- gramming editor. Drug & Drop Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 20
When the device selected currently is an NJ/NX-series CPU Unit or an NY-series Industrial PC, the device icon is displayed in the Multiview Explorer. Select an old-version Sysmac Library and click the Delete Reference Button. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 21
Procedure to Use Sysmac Libraries Installed Using the Installer Add the desired Sysmac Library to the list and click the OK Button. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Insert the Sysmac Library’s function blocks and functions into the circuit using one of the follow- ing two methods. • Select the desired function block or function in the Toolbox and drag and drop it onto the Lad- der Editor. Drug & Drop Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 23
Sysmac Libraries, unlike the case where you install then using the installer. Please install the manual and help files using the installer if you need them. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 24
Procedure to Use Sysmac Libraries Uploaded from a CPU Unit or an Industrial PC Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
The processing is executed when the variable changes to TRUE. Enable The processing is executed while the variable is TRUE. Abort BOOL Abort The processing is aborted. You can select the aborting method. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 27
BOOL input variable Abort to abort the processing of a function block. When Abort changes to TRUE, CommandAborted changes to TRUE and the execution of the function block is aborted. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 28
This section provides timing charts for a normal end, aborted execution, and errors. Normal End Execute Done Busy CommandAborted Error ErrorID 16#0000 ErrorIDEx 16#00000000 Canceled Execution Execute Abort Busy CommandAborted Error ErrorID 16#0000 ErrorIDEx 16#00000000 Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 30
Timing Charts This section provides timing charts for a normal end and errors. Normal End Enable Enabled Retained CalcRslt Retained Busy Error ErrorID 16#0000 ErrorIDEx 16#00000000 Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Execute-type function blocks cannot be re-executed by the same instance. If you do so, the output value will be the initial value. For details on re-execution, refer to the motion control user’s manual. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Function block and function version 1.01 Compatible Models Item Name Model numbers Version Device G5-series Servo Drive R88D-KN-ECT Version 2.10 or later G5-series Servo Motor R88M-KT(-) (with absolute encoder) R88M-KS(-) R88M-KC(-) Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 35
*5. Refer to SDO Abort Codes in the instructions reference manual for a list of SDO abort codes. Real Times, durations, Bit strings Integers num- dates, and text strings bers Execute NodeAdr TimeOut Done Busy Error ErrorID ErrorIDEx Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 36
• If Execute remains TRUE even after execution of the function block is ended, the output values of Done and Error are held. Timing Chart for Normal End Scan Execute Busy Done Error ErrorID #0000 #0000 #0000 #0000 ErrorIDEx #00000000 #00000000 #00000000 #00000000 Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 37
Slaves are given in the table in Message Communica- the order of slave node addresses. _EC_MBXSlavTbl tions Enabled Slave Array[1..512] OF BOOL TRUE: Message communications Table are possible. FALSE: Message communications are not possible. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 38
More than 32 EtherCAT com- that no more than 32 EtherCAT 16#1808 16#00000000 tions Resource munications instructions were communications instructions Overflow executed at the same time. are executed at the same time. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 39
*1. N = 192 for NJ501, NJ301 and NJ101. N = 512 for NX701. Internal Variables Name Data type Default Comment INITENCODER_G5_instance OmronLib\EC_G5\InitEncoder_G5 OperatingEnd BOOL Processing completed Trigger BOOL FALSE Execution condition Operating BOOL Processing RS_instance InitEncoderBusy BOOL Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 40
Default Comment INITENCODER_G5_instance OmronLib\EC_G5\InitEncoder_G5 Trigger BOOL FALSE Execution condition Value of Trigger from previous LastTrigger BOOL FALSE task OperatingStart BOOL FALSE Processing started. Operating BOOL FALSE Processing InitEncoderBusy BOOL FALSE Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 41
IF (Operating=TRUE) THEN INITENCODER_G5_instance( Execute :=TRUE, NodeAdr:=1, TimeOut:=0, Busy=>InitEncoderBusy); IF (INITENCODER_G5_instance.Done=TRUE) THEN // Processing after normal end. Operating:=FALSE; END_IF; IF (INITENCODER_G5_instance.Error=TRUE) THEN // Processing after error end. Operating:=FALSE; END_IF; END_IF; Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Function Block and Function Information Item Description Library file name OmronLib_EC_G5_V1_1.slr Namespace OmronLib\EC_G5 Function block and function number 00008 Source code published/not published Not published Function block and function version 1.01 Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 44
*2. If DirName is omitted, this specifies the root directory on the SD Memory Card. *3. You can use it to identify that communications processing is in progress. *4. For details, refer to Troubleshooting on page 48. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 45
Backup_G5 Real Times, durations, Bit strings Integers num- dates, and text strings bers Execute NodeAdr DirName OverWrite TimeOut Done Busy SdoBusy Error ErrorID ErrorIDEx Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 46
• To use this function block, you need to create in advance a directory named OM_ObjList\Drive in the root directory on the SD Memory Card and store object lists provided by OMRON in it. Be sure to store all the object lists. Then, access the object lists to back up the parameters with this function block.
Page 47
TRUE only for one task period after execution of the function block is ended. • If Execute remains TRUE even after execution of the function block is ended, the output values of Done and Error are held. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 48
• In backup or restore processing, the value of SdoBusy is TRUE when data objects are being sent. The value of SdoBusy is FALSE when data objects are not being sent due to the internal processing of the function block. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 49
Slaves are given in the table in Message Communica- the order of slave node addresses. _EC_MBXSlavTbl tions Enabled Slave Array[1..512] OF BOOL TRUE: Message communications Table are possible. FALSE: Message communications are not possible. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 50
The backup file exists on the Change the directory in which Already Exists SD Memory Card when Over- to store the backup file. Or, Write is FALSE. delete the existing backup file in advance. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 51
• Create a user program that will produce the intended device operation. • Check the user program for proper execution before you use it for actual operation. This sample programming backs up and then restores parameters for a Servo Drive. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 52
BOOL FALSE BackupTrigger BOOL FALSE Backup execution condition RestoreTrigger BOOL FALSE Restore execution condition TargetSlave UINT Target slave node Address TargetDirectory STRING[41] SD card directory TargetTimeOut UINT Time out value Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 53
Backup_G5 Name Data type Default Comment BackupBusy BOOL RestoreBusy BOOL BackupOperating BOOL Backup processing RestoreOperating BOOL Restore processing BackupOperatingEnd BOOL Backup processing completed RestoreOperatingEnd BOOL Restore processing completed RS_Backup_instance RS_Restore_instance Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 54
Backup_G5 Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 55
IF ( (BackupTrigger=TRUE) AND (BackupLastTrigger=FALSE) AND (_EC_MBXSlavTbl [TargetSlave]=TRUE) AND (MC_Axis000.Status.Disabled=TRUE) AND (_Card1Ready=TRUE) AND (BackupBusy=FALSE) AND (RestoreBusy=FALSE) ) THEN BackupOperatingStart:=TRUE; BackupOperating :=TRUE; END_IF; BackupLastTrigger:=BackupTrigger; // Initialize Backup_G5 instruction. IF (BackupOperatingStart=TRUE) THEN BACKUP_G5_instance( Execute :=FALSE); BackupOperatingStart:=FALSE; Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 56
IF (RestoreOperating=TRUE) THEN RESTORE_G5_instance( Execute :=TRUE, NodeAdr:=TargetSlave, DirName:=TargetDirectory, NoProductChk:=FALSE, TimeOut:=TargetTimeOut, Busy=>RestoreBusy); IF (RESTORE_G5_instance.Done=TRUE) THEN // Processing after normal end. RestoreOperating:=FALSE; END_IF; IF (RESTORE_G5_instance.Error=TRUE) THEN // Processing after error end. RestoreOperating:=FALSE; END_IF; END_IF; Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Function Block and Function Information Item Description Library file name OmronLib_EC_G5_V1_1.slr Namespace OmronLib\EC_G5 Function block and function number 00009 Source code published/not published Not published Function block and function version 1.01 Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 59
*2. If DirName is omitted, this specifies the root directory on the SD Memory Card. *3. You can use it to identify that communications processing is in progress. *4. For details, refer to Troubleshooting on page 62. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 60
Restore_G5 Real Times, durations, Bit strings Integers num- dates, and text strings bers Execute NodeAdr DirName NoProductChk TimeOut Done Busy SdoBusy Error ErrorID ErrorIDEx Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 61
If necessary, set DirName (Directory Name) and TimeOut (Timeout Time). The backup file in the directory specified with DirName (Directory Name) is restored to the G5-series Servo Drive when execution of the function block is ended. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 62
• If Execute remains TRUE even after execution of the function block is ended, the output values of Done and Error are held. Timing Chart for Normal End Scan Execute Done Busy SdoBusy Error ErrorID #0000 #0000 #0000 #0000 ErrorIDEx #00000000 #00000000 #00000000 #00000000 Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 63
SD Memory Card access failed (no SD Memory Card inserted, a file is being accessed, etc.). h) The number of SD Memory Card related instructions such as FileReadVar exceeded the maxi- mum number of instructions that can be executed at the same time. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 64
The directory name specified Check the length of the direc- with DirName is too long. tory name specified with Dir- Name so that it is within the valid range. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 65
*1. Refer to SDO Abort Codes in the instructions reference manual for a list of SDO abort codes. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 69
C: Updated after the control power is reset, or after a Config command is executed via EtherCAT communications. D: Changeable only when the EtherCAT communications state is Pre-Operational (Pre-Op). R: Updated when the control power supply is reset. Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 70
Restore_G5 Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Referring to Library Information Referring to Library Information When you make an inquiry to OMRON about the library, you can refer to the library information to iden- tify the library to ask about. The library information is useful in identifying the target library among the libraries provided by OMRON or created by the user.
Page 73
When you refer to the libraries, the library information is displayed at the locations shown below. (3)Library author (1)Library file name (2)Library version (4)Library comment (6)Name (5)FB/FUN name space (8)FB/FUN author (10)FB/FUN comment (7)FB/FUN version Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Page 74
Select a function block and function to display its library information at the bottom of the Toolbox Pane. The text “by OMRON” which is shown on the right of the library name (1) indicates that this library was provided by OMRON.
Referring to Function Block and Function Source Codes You can refer to the source codes of function blocks and functions provided by OMRON to customize them to suit the user’s environment. User function blocks and user functions can be created based on the copies of these source codes.
Page 76
Referring to Function Block and Function Source Codes Sysmac Library User’s Manual for EtherCAT G5 Series Library (W548)
Need help?
Do you have a question about the EtherCAT G5 Series and is the answer not in the manual?
Questions and answers