OMRON SYSMAC-XR011 User Manual

Sysmac Library
User’s Manual for EtherCAT® 1S Series Library
SYSMAC-XR011
W571-E1-07
NOTE
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior written permission of OMRON.
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. Neither is any liability assumed for damages resulting from the use of the information contained in this publication.
Trademarks
• Sysmac and SYSMAC are trademarks or registered trademarks of OMRON Corporation in Japan and other countries for OMRON factory automation products.
• Microsoft, Windows, Windows Vista, Excel, and Visual Basic are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries.
• EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany.
• ODVA, CIP, CompoNet, DeviceNet, and EtherNet/IP are trademarks of ODVA.
• The SD and SDHC logos are trademarks of SD-3C, LLC.
Other company names and product names in this document are the trademarks or registered trademarks of their respective companies.
Copyrights
Microsoft product screen shots reprinted with permission from Microsoft Corporation.

Introduction

Thank you for purchasing an NJ/NX-series CPU Unit or an NY-series Industrial PC.
This manual contains information that is necessary to use the function blocks in the EtherCAT 1S Series Library. (“Function block” is sometimes abbreviated as “FB”.) Please read this manual and make sure you understand the functionality and performance of the NJ/NX-series CPU Unit before you attempt to use it in a control system.
This manual provides function block specifications. It does not describe application restrictions or com­bination restrictions for Controllers, Units, and components.
Refer to the user’s manuals for all of the products in the application before you use any of the products.
Keep this manual in a safe place where it will be available for reference during operation.

Features of the Library

The EtherCAT 1S Series Library is used to initialize the absolute encoder, back up and restore the parameters for an OMRON 1S-series Servo Drive with built-in EtherCAT communications.
You can use this library to reduce manpower of programming when implementing the processing for a Servo Drive.
Introduction

Intended Audience

This manual is intended for the following personnel, who must also have knowledge of electrical sys­tems(an electrical engineer or the equivalent).
• Personnel in charge of introducing FA systems.
• Personnel in charge of designing FA systems.
• Personnel in charge of installing and maintaining FA systems.
• Personnel in charge of managing FA systems and facilities.
For programming, this manual is intended for personnel who understand the programming language specifications in international standard IEC 61131-3 or Japanese standard JIS B 3503.

Applicable Products

For the model numbers and versions of an NJ/NX-series CPU Unit, NY-series Industrial PC, and the Sysmac Studio that this library supports, refer to Sysmac Library Version Information in the SYS-

MAC-XR
OMRON website (http://www.ia.omron.com/products/family/3459/download/catalog.html).
Sysmac Library Catalog (Cat. No. P102). This catalog can be downloaded from the
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
1

Manual Structure

Precautions for Safe Use
Precautions for Correct Use
Additional Information
Version Information
Manual Structure

Special Information

Special information in this manual is classified as follows:
Precautions on what to do and what not to do to ensure safe usage of the product.
Precautions on what to do and what not to do to ensure proper operation and performance.
Additional information to read as required. This information is provided to increase understanding or make operation easier.
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.
2
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
Manual Structure
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
3

CONTENTS

CONTENTS
Introduction ..............................................................................................................1
Features of the Library................................................................................................................................. 1
Intended Audience....................................................................................................................................... 1
Applicable Products..................................................................................................................................... 1
Manual Structure ......................................................................................................2
Special Information......................................................................................................................................2
CONTENTS................................................................................................................4
Terms and Conditions Agreement ..........................................................................6
Warranty, Limitations of Liability .................................................................................................................. 6
Application Considerations .......................................................................................................................... 7
Disclaimers .................................................................................................................................................. 7
Safety Precautions ...................................................................................................8
Definition of Precautionary Information........................................................................................................ 8
Symbols....................................................................................................................................................... 8
Cautions....................................................................................................................................................... 9
Precautions for Correct Use..................................................................................10
Related Manuals ..................................................................................................... 11
Revision History .....................................................................................................14
Procedure to Use Sysmac Libraries .............................................................................................. 15
Procedure to Use Sysmac Libraries Installed Using the Installer .............................................................. 16
Procedure to Use Sysmac Libraries Uploaded from a CPU Unit or an Industrial PC................................ 20
Common Specifications of Function Blocks ................................................................................ 23
Common Variables .................................................................................................................................... 24
Precautions................................................................................................................................................ 30
Individual Specifications of
Function Blocks...................................................................................................................... 31
InitEncoder_1S .......................................................................................................................................... 32
Backup_1S ................................................................................................................................................ 41
Restore_1S................................................................................................................................................ 55
MotorSetup_1S.......................................................................................................................................... 64
Restart_1S................................................................................................................................................. 73
EasyTuning_1S ......................................................................................................................................... 78
Appendix .......................................................................................................................................... 91
Referring to Library Information ................................................................................................................. 92
Referring to Function Block and Function Source Codes .......................................................................... 95
Objects to Back up and Restore................................................................................................................ 96
4
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
CONTENTS
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
5

Terms and Conditions Agreement

Terms and Conditions Agreement

Warranty, Limitations of Liability

Warranties
Exclusive Warranty
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.
Limitations
OMRON MAKES NO WARRANTY OR REPRESENTATION, EXPRESS OR IMPLIED, ABOUT NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OF THE PRODUCTS. BUYER ACKNOWLEDGES THAT IT ALONE HAS DETERMINED THAT THE PRODUCTS WILL SUITABLY MEET THE REQUIREMENTS OF THEIR INTENDED USE.
Omron further disclaims all warranties and responsibility of any type for claims or expenses based on infringement by the Products or otherwise of any intellectual property right.
Buyer Remedy
Omron’s sole obligation hereunder shall be, at Omron’s election, to (i) replace (in the form originally shipped with Buyer responsible for labor charges for removal or replacement thereof) the non-com­plying Product, (ii) repair the non-complying Product, or (iii) repay or credit Buyer an amount equal to the purchase price of the non-complying Product; provided that in no event shall Omron be responsible for warranty, repair, indemnity or any other claims or expenses regarding the Products unless Omron’s analysis confirms that the Products were properly handled, stored, installed and maintained and not subject to contamination, abuse, misuse or inappropriate modification. Return of any Products by Buyer must be approved in writing by Omron before shipment. Omron Companies shall not be liable for the suitability or unsuitability or the results from the use of Products in combi­nation with any electrical or electronic components, circuits, system assemblies or any other materi­als or substances or environments. Any advice, recommendations or information given orally or in writing, are not to be construed as an amendment or addition to the above warranty.
See http://www.omron.com/global/ or contact your Omron representative for published information.
Limitation on Liability; Etc
OMRON COMPANIES SHALL NOT BE LIABLE FOR SPECIAL, INDIRECT, INCIDENTAL, OR CON­SEQUENTIAL DAMAGES, LOSS OF PROFITS OR PRODUCTION OR COMMERCIAL LOSS IN ANY WAY CONNECTED WITH THE PRODUCTS, WHETHER SUCH CLAIM IS BASED IN CONTRACT, WARRANTY, NEGLIGENCE OR STRICT LIABILITY.
Further, in no event shall liability of Omron Companies exceed the individual price of the Product on which liability is asserted.
6
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)

Application Considerations

Suitability of Use
Omron Companies shall not be responsible for conformity with any standards, codes or regulations which apply to the combination of the Product in the Buyer’s application or use of the Product. At Buyer’s request, Omron will provide applicable third party certification documents identifying ratings and limitations of use which apply to the Product. This information by itself is not sufficient for a com­plete determination of the suitability of the Product in combination with the end product, machine, sys­tem, or other application or use. Buyer shall be solely responsible for determining appropriateness of the particular Product with respect to Buyer’s application, product or system. Buyer shall take applica­tion responsibility in all cases.
NEVER USE THE PRODUCT FOR AN APPLICATION INVOLVING SERIOUS RISK TO LIFE OR PROPERTY OR IN LARGE QUANTITIES WITHOUT ENSURING THAT THE SYSTEM AS A WHOLE HAS BEEN DESIGNED TO ADDRESS THE RISKS, AND THAT THE OMRON PRODUCT(S) IS PROPERLY RATED AND INSTALLED FOR THE INTENDED USE WITHIN THE OVERALL EQUIP­MENT OR SYSTEM.
Terms and Conditions Agreement
Programmable Products
Omron Companies shall not be responsible for the user’s programming of a programmable Product, or any consequence thereof.

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.
Change in Specifications
Product specifications and accessories may be changed at any time based on improvements and other reasons. It is our practice to change part numbers when published ratings or features are changed, or when significant construction changes are made. However, some specifications of the Product may be changed without any notice. When in doubt, special part numbers may be assigned to fix or establish key specifications for your application. Please consult with your Omron’s representative at any time to confirm actual specifications of purchased Product.
Errors and Omissions
Information presented by Omron Companies has been checked and is believed to be accurate; how­ever, no responsibility is assumed for clerical, typographical or proofreading errors or omissions.
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
7

Safety Precautions

WARNING
Caution
Indicates a potentially hazardous situation which, if not avoided, could result in death or serious injury. Addition­ally, there may be severe property damage.
Indicates a potentially hazardous situation which, if not avoided, may result in minor or moderate injury, or property damage.
Safety Precautions

Definition of Precautionary Information

The following notation is used in this user’s manual to provide precautions required to ensure safe usage of an NJ/NX-series Controller and an NY-series Industrial PC.
The safety precautions that are provided are extremely important to safety. Always read and heed the information provided in all safety precautions.
The following notation is used.

Symbols

The circle and slash symbol indicates operations that you must not do.
The specific operation is shown in the circle and explained in text.
This example indicates prohibiting disassembly.
The triangle symbol indicates precautions (including warnings).
The specific operation is shown in the triangle and explained in text.
This example indicates a precaution for electric shock.
The triangle symbol indicates precautions (including warnings).
The specific operation is shown in the triangle and explained in text.
This example indicates a general precaution.
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 do.
8
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)

Cautions

Safety Precautions
Caution
Read all related manuals carefully before you use this library.
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.
The Sysmac Library and manuals are assumed to be used by personnel that is given in Intended Audience in this manual. Otherwise, do not use them.
The sample programming shows only the portion of a program that uses the func­tion or function block from the library.
When using sample programming in actual devices, also program safety circuits, device interlocks, I/O with other devices, and other control procedures.
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
9

Precautions for Correct Use

Precautions for Correct Use
Using the Library
• When you use the library, functions or function blocks that are not described in the library manual may be displayed on the Sysmac Studio. Do not use functions or function blocks that are not described in the manual.
• Do not change the names and the contents of any object list.
• Setting the NoProductChk input variable to TRUE allows you to execute restore even when the prod­uct code in the backup data differs from the product code of the restore destination. Make sure that the restore destination is a 1S-series Servo Drive before you attempt to restore the parameters.
• Do not attempt to turn OFF the power supply to the Controller and EtherCAT slaves or stop the Eth­erCAT communications until the processing for this function block ends normally or ends in an error.
• After completion of Restore_1S function block, cycle the control power supply to the 1S-series Servo Drive to apply the restored parameters.
• When the model which was backed up differs from the model to be restored, confirm that the restore can be performed with the object list which was backed up, and then change NoproductChk of this function block to TRUE.
• Confirm that the models to be backed up are applicable models and versions before you perform the backup.
Using Sample Programming
• 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.
10
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)

Related Manuals

Related Manuals
The following are the manuals related to this manual. Use these manuals for reference.
Manual name Cat. No. Model numbers Application Description
NX-series CPU Unit
Hardware User’s Manual
NX-series NX102 CPU Unit Hardware User’s Manual
NX-series NX1P2 CPU Unit Hardware User’s Manual
NJ-series CPU Unit Hardware User’s Manual
NY-series IPC Machine Controller Industrial Panel PC Hardware User’s Manual
W535 NX701- Learning the basic specifi-
cations of the NX-series NX701 CPU Units, includ­ing introductory information, designing, installation, and maintenance. Mainly hard­ware information is pro­vided
W593 NX102- Learning the basic specifi-
W578 NX1P2- Learning the basic specifi-
W500 NJ501-
NJ301-
NJ101-
W557 NY532- Learning the basic specifi-
cations of the NX102 CPU Units, including introductory information, designing, installation, and mainte­nance. Mainly hardware information is provided.
cations of the NX-series NX1P2 CPU Units, includ­ing introductory information, designing, installation, and maintenance. Mainly hard­ware information is pro­vided
Learning the basic specifi­cations of the NJ-series CPU Units, including intro­ductory information, design­ing, installation, and maintenance.
Mainly hardware informa­tion is provided
cations of the NY-series Industrial Panel PCs, including introductory infor­mation, designing, installa­tion, and maintenance. Mainly hardware informa­tion is provided
An introduction to the entire NX701 CPU Unit system is provided along with the following infor­mation on the CPU Unit.
Features and system configuration
Overview
Part names and functions
General specifications
Installation and wiring
Maintenance and inspection
An introduction to the entire NX102 system is provided along with the following information on the CPU Unit.
Features and system configuration
Introduction
Part names and functions
General specifications
Installation and wiring
Maintenance and Inspection
An introduction to the entire NX1P2 CPU Unit system is provided along with the following infor­mation on the CPU Unit.
Features and system configuration
Overview
Part names and functions
General specifications
Installation and wiring
Maintenance and Inspection
An introduction to the entire NJ-series system is provided along with the following information on the CPU Unit.
Features and system configuration
Overview
Part names and functions
General specifications
Installation and wiring
Maintenance and inspection
An introduction to the entire NY-series system is provided along with the following information on the Industrial Panel PC.
Features and system configuration
Introduction
Part names and functions
General specifications
Installation and wiring
Maintenance and inspection
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
11
Related Manuals
Manual name Cat. No. Model numbers Application Description
NY-series IPC Machine Controller Industrial Box PC Hardware User's Manual
NJ/NX-series CPU Unit Software User’s Manual
NY-series IPC Machine Controller Industrial Panel PC / Industrial Box PC Software User’s Manual
NJ/NX-series Instruc­tions Reference Manual
NY-series Instructions Reference Manual
NJ/NX-series CPU Unit Motion Control User's Manual
NY-series IPC Machine Controller Industrial Panel PC / Industrial Box PC Motion Control User’s Manual
NJ/NX-series Motion Control Instructions Ref­erence Manual
NY-series Motion Control Instructions Reference Manual
NJ/NY-series NC Inte­grated Controller User’s Manual
W556 NY512- Learning the basic specifi-
cations of the NY-series Industrial Box PCs, includ­ing introductory information, designing, installation, and maintenance. Mainly hard­ware information is pro­vided
W501 NX701-
NX102-
NX1P2-
NJ501-
NJ301-
NJ101-
W558 NY532-
NY512-
W502 NX701-
NX102-
NX1P2-
NJ501-
NJ301-
NJ101-
W560 NY532-
NY512-
W507 NX701-
NX102-
NX1P2-
NJ501-
1-
NJ30
1-
NJ10
W559 NY532-
NY512-
W508 NX701-
NX102-
NX1P2-
NJ501-
NJ301-
NJ101-
W561 NY532-
NY512-
O030 NJ501-5300
NY532-5400
Learning how to program and set up an NJ/NX-series CPU Unit.
Mainly software informa­tion is provided
Learning how to program and set up the Controller functions of an NY-series Industrial PC
Learning detailed specifica­tions on the basic instruc­tions of an NJ/NX-series CPU Unit
Learning detailed specifica­tions on the basic instruc­tions of an NY-series Industrial PC
Learning about motion con­trol settings and program­ming concepts of an NJ/NX-series CPU Unit.
Learning about motion con­trol settings and program­ming concepts of an NY-series Industrial PC.
Learning about the specifi­cations of the motion con­trol instructions of an NJ/NX-series CPU Unit.
Learning about the specifi­cations of the motion con­trol instructions of an NY-series Industrial PC.
Performing numerical con­trol with NJ/NY-series Con­trollers.
An introduction to the entire NY-series system is provided along with the following information on the Industrial Box PC.
Features and system configuration
Introduction
Part names and functions
General specifications
Installation and wiring
Maintenance and inspection
The following information is provided on a Con­troller built with an NJ/NX-series CPU Unit.
CPU Unit operation
CPU Unit features
Initial settings
Programming based on IEC 61131-3 language specifications
The following information is provided on NY-series Machine Automation Control Software.
Controller operation
Controller features
Controller settings
Programming based on IEC 61131-3 language specifications
The instructions in the instruction set (IEC 61131-3 specifications) are described.
The instructions in the instruction set (IEC 61131-3 specifications) are described.
The settings and operation of the CPU Unit and programming concepts for motion control are described.
The settings and operation of the Controller and programming concepts for motion control are described.
The motion control instructions are described.
The motion control instructions are described.
Describes the functionality to perform the numer­ical control. Use this manual together with the
NJ/NY-series G code Instructions Reference Manual (Cat. No. O031) when pro-
gramming.
12
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
Manual name Cat. No. Model numbers Application Description
G code Instructions Ref­erence Manual
Sysmac Studio Version 1 Operation Manual
CNC Operator Operation Manual
AC Servomotors/Servo Drivers 1S-series with Built-in EtherCAT Communications User’s Manual
O031 NJ501-5300
NY532-5400
W504 SYSMAC
-SE2
O032 SYSMAC
-RTNC0D
I586 R88M-1
R88D-1SN-ECT
I621 R88M-1A
R88D-1SAN-ECT
Learning about the specifi­cations of the G code/M code instructions.
Learning about the operat­ing procedures and func­tions of the Sysmac Studio.
Learning an introduction of the CNC Operator and how to use it.
Learning how to use the Servomotors/Servo Drives with built-in EtherCAT Com­munications.
The G code/M code instructions are described. Use this manual together with the NJ/NY-series NC Integrated Controller User’s Manual (Cat. No. O030) when programming.
Describes the operating procedures of the Sys­mac Studio.
An introduction of the CNC Operator, installation procedures, basic operations, connection opera­tions, and operating procedures for main func­tions are described.
Describes the hardware, setup methods and functions of the Servomotors/Servo Drives with built-in EtherCAT Communications.
Related Manuals
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
13

Revision History

Revision History
A manual revision code appears as a suffix to the catalog number on the front and back covers of the manual.
Cat. No.
Revision code Date Revised content
01 July 2016 Original production 02 November 2016 Changed the manual name. 03 March 2017 Compatible with R88D-1SN 04 January 2019 • Added compatible models.
05 April 2019 • Added compatible models.
06 July 2019 Added following function blocks:
07 October 2020 Compatible with R88D-1SN
W571-E1-07
• Compatible with R88D-1SN
• Compatible with 1S Series other than R88D-1SN
• MotorSetup_1S
•Restart_1S
• EasyTuning_1S
Revision code

-ECT Version 1.1

-ECT Version 1.2

-ECT Version 1.4

-ECT
14
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)

Procedure to Use Sysmac Libraries

Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
15

Procedure to Use Sysmac Libraries Installed Using the Installer

Version Information
Precautions for Correct Use
Procedure to Use Sysmac Librar­ies Installed Using the Installer
This section describes the procedure to use Sysmac Libraries that you installed using the installer.
There are two ways to use libraries.
• Using newly installed Sysmac Libraries
• Using upgraded Sysmac Libraries
To use Sysmac Libraries, you need the Sysmac Studio version 1.14 or higher.

Using Newly Installed Libraries

1 Start the Sysmac Studio and open or create a new project in which you want to use Sysmac
Libraries.
If you create a new project, be sure to configure the settings as follows to enable the use of Sysmac Libraries. If you do not configure the following settings, you cannot proceed to the step 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.
16
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
Procedure to Use Sysmac Libraries Installed Using the Installer
Precautions for Correct Use
Device
Drug & Drop
2 Select ProjectLibraryShow References.
If you have more than one registered device in the project, make sure that the device selected currently is an NJ/NX-series CPU Unit or an NY-series Industrial PC. If you do not select an NJ/NX-series CPU Unit or an NY-series Industrial PC as the device, Library References does not appear in the above menu. 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.
3 Add the desired Sysmac Library to the list and click the OK Button.
The Sysmac Library file is read into the project.
Now, when you select the Ladder Editor or ST Editor, the function blocks and functions included in a Sysmac Library appear in the Toolbox.
For the procedure for adding and setting libraries in the above screen, refer to the Sysmac Stu- dio Version 1 Operation Manual (Cat. No. W504).
4 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.
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
17
Procedure to Use Sysmac Libraries Installed Using the Installer
Precautions for Correct Use
Precautions for Correct Use
Device
• Right-click the programming editor, select Insert Function Block in the menu, and enter the fully qualified name (\\name of namespace\name of function block).
After you upgrade the Sysmac Studio, check all programs and make sure that there is no error of the program check results on the Build Tab Page.
Select Project
Check All Programs from the Main Menu.

Using Upgraded Libraries

1 Start the Sysmac Studio and open a project in which any old-version Sysmac Library is
included.
2 Select ProjectLibraryShow References.
If you have more than one registered device in the project, make sure that the device selected currently is an NJ/NX-series CPU Unit or an NY-series Industrial PC. Otherwise, Library Refer­ences does not appear in the above menu. 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.
3 Select an old-version Sysmac Library and click the Delete Reference Button.
18
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
Procedure to Use Sysmac Libraries Installed Using the Installer
4 Add the desired Sysmac Library to the list and click the OK Button.
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
19

Procedure to Use Sysmac Libraries Uploaded from a CPU Unit or an Industrial PC

Version Information
Procedure to Use Sysmac Librar­ies Uploaded from a CPU Unit or an Industrial PC
You can use Sysmac Libraries uploaded from a CPU Unit or an Industrial PC to your computer if they are not installed.
The procedure to use uploaded Sysmac Libraries from a CPU Unit or an Industrial PC is as follows.
To use Sysmac Libraries, you need the Sysmac Studio version 1.14 or higher.
1 Start the Sysmac Studio and create a new project in which you want to use Sysmac Libraries.
2 Connect the computer to the CPU Unit or the Industrial PC and place it online. 3 Upload POUs in which any Sysmac Library is used to the computer.
Now, when you select the Ladder Editor or ST Editor, the function blocks and functions included in the Sysmac Library used in the uploaded POUs appear in the Toolbox.
4 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.
20
Drug & Drop
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
Procedure to Use Sysmac Libraries Uploaded from a CPU Unit or an Industrial PC
Precautions for Correct Use
• Right-click the programming editor, select Insert Function Block in the menu, and enter the fully qualified name (\\name of namespace\name of function block).
• The Sysmac Studio installs library files of the uploaded Sysmac Stutio to the specified folder on the computer if they are not present. However, the Sysmac Studio does not install library files to the specified folder on the computer if they are present.
The specified folder here means the folder in which library files are installed by the installer.
• Note that uploading Sysmac Libraries from a CPU Unit or an Industrial PC does not install the manual and help files for the 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 Instructions Manual for EtherCAT 1S Series Library (W571)
21
Procedure to Use Sysmac Libraries Uploaded from a CPU Unit or an Industrial PC
22
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)

Common Specifications of Function Blocks

Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
23

Common Variables

Common Variables
This section describes the specifications of variables (EN, Execute, Enable, Abort, ENO, Done, Cal­cRslt, Enabled, Busy, CommandAborted, Error, ErrorID, and ErrorIDEx) that are used for more than
one function or function block. The specifications are described separately for functions, for exe­cute-type function blocks, and for enable-type function blocks.

Definition of Input Variables and Output Variables

Common input variables and output variables used in functions and function blocks are as follows.
Function/function
Var iabl e I/O
EN Input BOOL OK Execute The processing is executed while the
Execute OK Execute The processing is executed when the
Enable OK Run The processing is executed while the
Abort BOOL OK Abort The processing is aborted.
Data type
block type to use
Execute-
type
Enable-
type
Meaning DefinitionFunction block
Function
variable is TRUE.
variable changes to TRUE.
variable is TRUE.
You can select the aborting method.
24
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
Common Variables
Function/function
Variable I/O
ENO Output BOOL OK Done The variable changes to TRUE when the
Done BOOL OK Done The variable changes to TRUE when the
Busy BOOL OK OK Executing The variable is TRUE when the process-
CalcRslt LREAL OK Calculation
Enabled BOOL OK Enabled The variable is TRUE when the output is
Command Aborted
Error BOOL OK OK Error This variable is TRUE while there is an
ErrorID WORD OK OK Error Code An error code is output. ErrorIDEx DWORD OK OK Expansion
Data type
BOOL OK Command
block type to use
Execute-
type
Enable-
type
Function
Meaning DefinitionFunction block
Result
Aborted
Error Code
processing ends normally.
It is FALSE when the processing ends in an error, the processing is in progress, or the execution condition is not met.
processing ends normally.
It is FALSE when the processing ends in an error, the processing is in progress, or the execution condition is not met.
ing is in progress.
It is FALSE when the processing is not in progress.
The calculation result is output.
enabled. It is used to calculate the con­trol amount for motion control, tempera­ture control, etc.
The variable changes to TRUE when the processing is aborted.
It changes to FALSE when the process­ing is re-executed the next time.
error.
It is FALSE when the processing ends normally, the processing is in progress, or the execution condition is not met.
An expansion error code is output.

Execute-type Function Blocks

• Processing starts when Execute changes to TRUE.
• When Execute changes to TRUE, Busy also changes to TRUE. When processing is completed nor­mally, Busy changes to FALSE and Done changes to TRUE.
• When continously executes the function blocks of the same instance, change the next Execute to TRUE for at least one task period after Done changes to FALSE in the previous execution.
• If the function block has a CommandAborted (Instruction Aborted) output variable and processing is aborted, CommandAborted changes to TRUE and Busy changes to FALSE.
• If an error occurs in the function block, Error changes to TRUE and Busy changes to FALSE.
• For function blocks that output the result of calculation for motion control and temperature control, you can use the 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 Instructions Manual for EtherCAT 1S Series Library (W571)
25
Common Variables
Busy
Done
CommandAborted
Error
16#00000000
16#0000
ErrorID
ErrorIDEx
Execute
Busy
Abort
CommandAborted
Error
16#00000000
16#0000
ErrorID
ErrorIDEx
Execute
In-out variables
Input variables
• If Execute is TRUE and Done, CommandAborted, or Error changes to TRUE, Done, Command­Aborted, and Error changes to FALSE when Execute is changed to FALSE.
• If Execute is FALSE and Done, CommandAborted, or Error changes to TRUE, Done,Command­Aborted, and Error changes to TRUE for only one task period.
• If an error occurs, the relevant error code and expansion error code are set in ErrorID (Error Code) and ErrorIDEx (Expansion Error Code). The error codes are retained even after Error changes to FALSE, but ErrorID is set to 16#0000 and ErrorIDEx is set to 16#0000 0000 when Execute changes to TRUE.
Abcd_instance
Abcd
InOut_Val InOut_Val
Execute Done
Busy
CommandAborted
Error
ErrorID
ErrorIDEx
In-out variables
Output variables
Timing Charts
This section provides timing charts for a normal end, aborted execution, and errors.
Normal End
Canceled Execution
26
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
Aborted Execution
Busy
Done
CommandAborted
Error
16#00000000
16#0000
ErrorID
ErrorIDEx
Execute
Busy
Done
CommandAborted
Error
16#0000 16#0000
ErrorID
16#00000000 16#00000000ErrorIDEx ErrorIDEx
ErrorIDEx
Execute
ErrorIDErrorIDErrorID ErrorID
Errors
Common Variables
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
27
Common Variables
Busy
Enabled
Error
16#00000000
16#0000
ErrorID
ErrorIDEx
Enable
CalcRslt
Retained
Retained

Enable-type Function Blocks

• Processing is executed while Enable is TRUE.
• When Enable changes to TRUE, Busy also changes to TRUE. Enabled is TRUE during calculation of the output value.
• If an error occurs in the function block, Error changes to TRUE and Busy and Enabled change to FALSE. When Enable changes to FALSE, Enabled, Busy, and Error change to FALSE.
Abcd_instance
In-out variables
Input variables
InOut_Val InOut_Val
Enable Enabled
Abcd
CalcRslt
Busy Error
ErrorID
ErrorIDEx
In-out variables
Output variables
• If an error occurs, the relevant error code and expansion error code are set in ErrorID (Error Code) and ErrorIDEx (Expansion Error Code). The error codes are retained even after Error changes to FALSE, but ErrorID is set to 16#0000 and ErrorIDEx is set to 16#0000 0000 when Enable changes to TRUE.
• For function blocks that calculate the control amount for motion control, temperature control, etc., Enabled is FALSE when the value of CalcRslt (Calculation Result) is incorrect. In such a case, do not use CalcRslt. In addition, after the function block ends normally or after an error occurs, the value of CalcRslt is retained until Enable changes to TRUE. The control amount will be calculated based on the retained CalcRslt value, if it is the same instance of the function block that changed Enable to TRUE. If it is a different instance of the function block, the control amount will be calculated based on the initial value.
Timing Charts
This section provides timing charts for a normal end and errors.
Normal End
28
Sysmac Library Instructions Manual for EtherCAT 1S Series Library (W571)
Loading...
+ 78 hidden pages