Omron SYSMAC-SE20, NJ501, DA0271, GX-AD0471, NJ301 Startup Manual

...
Machine Automation Controller NJ-series
Startup Guide
for Simulink® PLC Coder™ & Sysmac Studio
SYSMAC-SE20□□ NJ501-□□□□ NJ301-□□□□ R88D-KN-ECT GX-AD0471/DA0271
W529-E1-01
©OMRON, 2013
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. Nevertheless,
OMRON assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting
from the use of the information contained in this publication.
Introduction
The NJ-series Startup Guide for Simulink® PLC Coder™ and Sysmac Studio (hereinafter, may
be referred to as “this Guide”) describes the startup procedures that are required to use a
combination of Simulink® PLC Coder™ from The MathWorks® Inc. and NJ-series CPU Unit for
the first time and the basic operating instructions for the Sysmac Studio. A simple single-axis
positioning example is used for the discussion. You can perform the procedures that are
presented in this Guide to quickly gain a basic understanding of the combination of Simulink®
PLC Coder™ and NJ-series CPU Unit.
This Guide does not contain safety information and other details that are required for actual use.
Thoroughly read and understand the manuals for all of the devices that are used in this Guide
to ensure that the system is used safely. Review the entire contents of these materials,
including all safety precautions, precautions for safe use, and precautions for correct use.
Intended Audience
This guide is intended for the following personnel.
• Personnel in charge of introducing FA systems
• Personnel in charge of designing FA systems
The personnel must also have the following knowledge.
• Knowledge of electrical systems (an electrical engineer or the equivalent)
• Knowledge of MATLAB®/Simulink® from The MathWorks® Inc.
• Knowledge of NJ-series CPU Units
• Knowledge of operation procedure of Sysmac Studio
Applicable Products
This guide covers the following products.
• CPU Units of NJ-series Machine Automation Controllers
• Sysmac Studio Automation Software
• MATLAB®/Simulink® from The MathWorks® Inc.
• Simulink® PLC Coder™ from The MathWorks® Inc.
Special Information
The icons that are used in this Guide are described below.
Precautions for Correct Use
Precautions on what to do and what not to do to ensure proper operation and
performance.
Additional Information
Additional information to read as required.
This information is provided to increase understanding or make operation easier.
1
2
Terms and Conditions Agreement
Read and understand this catalog.
Please read and understand this catalog before purchasing the products. Please consult your
OMRON representative if you have any questions or comments.
Warranties.
(a) Exclusive Warranty. Omron’s exclusive warranty is that the Products will be free from defects in
materials and workmanship 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.
(b) 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.
(c) 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-complying 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 combination with any electrical or electronic components, circuits, system assemblies or any other
materials 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
CONSEQUENTIAL 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.
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
3
and limitations of use which apply to the Product. This information by itself is not sufficient for a
complete determination of the suitability of the Product in combination with the end product, machine,
system, 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
application 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
EQUIPMENT OR SYSTEM.
Programmable Products.
Omron Companies shall not be responsible for the user’s programming of a programmable Product,
or any consequence thereof.
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
performance 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;
however, no responsibility is assumed for clerical, typographical or proofreading errors or omissions.
4
Precautions
• When building a system, check the specifications for all devices and equipment that will make
up the system and make sure that the OMRON products are used well within their rated
specifications and performances. Safety measures, such as safety circuits, must be
implemented in order to minimize the risks in the event of a malfunction.
• Thoroughly read and understand the manuals for all devices and equipment that will make up
the system to ensure that the system is used safely. Review the entire contents of these
manuals, including all safety precautions, precautions for safe use, and precautions for
correct use.
• Confirm all regulations, standards, and restrictions that the system must adhere to.
• Contact The MathWorks® Inc. for the codes that were outputted from Simulink® PLC
Coder™.
• Applicability of codes that were outputted from Simulink® PLC Coder™ must be judged by
the customer.
• Check the user program for proper execution before you use it for actual operation.
Trademarks
• Sysmac and SYSMAC are trademarks or registered trademarks of OMRON Corporation in
Japan and other countries for OMRON factory automation products.
• EtherCAT® is registered trademark and patented technology, licensed by Beckhoff
Automation GmbH, Germany.
• MATLAB® and Simulink® are registered trademarks of The MathWorks® Inc.
• Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation.
Other company names and product names in this Guide are the trademarks or registered
trademarks of their respective companies.
Software Licenses and Copyrights
The NJ-series CPU Units and Sysmac Studio incorporate certain third party software. The license and
copyright information associated with this software is available at http://www.fa.omron.co.jp/nj_info_e/.
5
Related Manuals
The following manuals are related to the NJ-series Controllers. Use these manuals for reference.
Manual name Cat. No. Model numbers Application Description
Sysmac Studio Version 1
Operation Manual
W504 SYSMAC-SE2□□□ Learning about the operating
procedures and functions of the
Sysmac Studio.
The operating procedures of the Sysmac
Studio are described.
NJ-series CPU Unit Hardware
User’s Manual
W500 NJ501-□□□□
NJ301-□□□□
Learning the basic specifications
of the NJ-series CPU Units,
including introductory information,
designing, installation, and
maintenance.
Mainly hardware information is
provided.
An introduction to the entire NJ-series
system is provided along with the following
information on a Controller built with an
NJ501 CPU Unit.
Features and system configuration
Introduction Part names and functions
General specifications Installation and
wiring
Maintenance and inspection
Use this manual together with the
NJ-series CPU Unit Software User’s
Manual (Cat. No. W501).
NJ-series CPU Unit Software
User’s Manual
W501 NJ501-□□□□
NJ301-□□□□
Learning how to program
and set up an NJ-series CPU Unit.
Mainly software information is
provided.
The following information is provided on a
Controller built with an NJ-series CPU Unit.
CPU Unit operation
CPU Unit features
Initial settings
Programming based on IEC 61131-3
language specifications
Use this manual together with the
NJ-series CPU Unit Hardware User’s
Manual (Cat. No.W500).
NJ-series CPU Unit Motion
Control USER'S MANUAL
W507 NJ501-□□□□
NJ301-□□□□
Learning about motion control
settings and programming
concepts.
The settings and operation of the CPU Unit
and programming concepts for motion
control are described. Use this manual
together with the NJ-series CPU Unit
Hardware User’s Manual (Cat. No. W500)
and NJ-series CPU Unit Software User’s
Manual (Cat. No. W501).
6
Manual name Cat. No. Model numbers Application Description
NJ-series Instructions
Reference Manual
W502 NJ501-□□□□
NJ301-□□□□
Learning detailed specifications
on the basic instructions of an
NJ-series CPU Unit.
The instructions in the instruction set
(IEC61131-3 specifications) are described.
When programming, use this manual
together with the NJ-series CPU Unit
Hardware User’s Manual (Cat. No. W500)
and NJ-series CPU Unit Software User’s
Manual (Cat. No. W501).
NJ-series Motion Control
Instructions Reference
Manual
W508 NJ501-□□□□
NJ301-□□□□
Learning about the specifications
of the motion control instructions
that are provided by OMRON.
The motion control instructions are
described.
When programming, use this manual
together with the NJ-series CPU Unit
Hardware User’s Manual (Cat. No. W500),
NJ-series CPU Unit Software User’s
Manual (Cat. No. W501) and NJ-series
CPU Unit Motion Control User’s Manual
(Cat. No. W507).
NJ-series Troubleshooting
Manual
W503 NJ501-□□□□
NJ301-□□□□
Learning about the errors that
may be detected in an NJ-series
Controller.
Concepts on managing errors that may be
detected in an NJ-series Controller and
information on individual errors are
described.
Use this manual together with the
NJ-series CPU Unit Hardware User’s
Manual (Cat. No.W500) and NJ-series
CPU Unit Software User’s Manual (Cat.
No. W501).
AC Servomotors/Servo Drives
(Built-in EtherCAT
Communications) User's
Manual
I576 R88D-KN□-ECT/
R88M-K
Learning detailed specifications of
a G5-series Servo Drive.
This manual explains how to install and
wire the Servo Drive, set parameters
needed to operate the Servo Drive, and
remedies to be taken and inspection
methods to be used in case that problems
occur.
AC Servomotors/Servo Drives
EtherCAT Communications
Linear Motor Type User's
Manual
I577 R88D-KN-ECT-L/R88L-EC Learning detailed specifications of
a G5-series Servo Drive.
This manual explains how to install and
wire the Servo Drive, set parameters
needed to operate the Servo Drive, and
remedies to be taken and inspection
methods to be used in case that problems
occur.
EtherCAT Slave Units User's
Manual
W488 GX-□□□□□□□ Learning detailed specifications of
a GX-series EtherCAT Slave Unit.
This manual contains information you need
to know to use the EtherCAT Slave Unit.
Revision History
A manual revision code appears as a suffix to the catalog number on the front and back covers
of the manual.
7
Cat. No.
W529-E1-01
Revision
Revision code Date Revised content
A June 2013 Original production
CONTENTS
Introduction............................................................................................................... 1
Intended Audience .................................................................................................. 1
Applicable Products ................................................................................................ 1
Special Information ................................................................................................. 1
Terms and Conditions Agreement .......................................................................... 2
Precautions............................................................................................................... 4
Trademarks............................................................................................................. 4
Software Licenses and Copyrights.......................................................................... 4
Related Manuals....................................................................................................... 5
Revision History....................................................................................................... 7
1. System to Construct and Configuration Devices........................................... 9
1.1. System Configuration and
Configuration Devices .......................................... 9
1.2. The Servo System Constructed in this Guide................................................11
2. Before Y ou Begin............................................................................................. 12
2.1. Wiring the Devices and Installing the Software............................................. 12
2.2. Designing the Control Algorithm ................................................................... 12
3. Setting up the System..................................................................................... 14
3.1. System Setup Procedures............................................................................ 14
3.2. Simulink PLC Coder & Sysmac Studio Operation Procedure....................... 15
3.2.1. Outputting the Code using the Simulink PLC Coder ........................... 15
3.2.2. Importing the Code into the Sysmac Studio ........................................ 18
3.2.3. Checking the Calculation Accuracy..................................................... 20
3.2.4. Creating the EtherCAT Network Configuration.................................... 23
3.2.5. Setting the Axis ................................................................................... 24
3.2.6. Creating Programs .............................................................................. 26
3.2.7. Synchronization (Download) ............................................................... 29
3.2.8. System Operation Check .................................................................... 30
4. Appendix.......................................................................................................... 33
4.1. Programming in Ladder Diagram Language................................................. 33
4.1. Sample File List............................................................................................ 35
8
1. System to Construct and Configuration Devices
1.1. System Configuration and Configuration Devices
This section describes the system configuration and configuration devices used in this Guide.
The following figure represents the system configuration.
Comp
uter
Sysmac Studio, MATLAB/Simulink, and Simulink PLC Coder are installed.
USB cable
NJ-PA3001 Power Supply Unit
9
EtherCA
T communications
cable
R88D-KN01L-ECT
Servo Drive
Node Address 1 (Axis 0)
R88M-K10030T
NJ301-1200 CPU Unit
Servomotor
10
The models of the devices that are described in this Guide are given in the following table.
When selecting devices for an actual application, refer to the device manuals.
Device name Model Manual name
NJ-series CPU Unit NJ301-1200 (Unit version 1.04)
NJ-series Power Supply Unit NJ-PA3001
EtherCAT communications
cables
XS5W-T421-CMD-K
NJ-series CPU Unit Hardware
User’s Manual (Cat. No. W500)
AC Servo Drives R88D-KN01L-ECT (version 2.10)
AC Servomotors R88M-K10030L
Motor Power Cables
(for the AC Servo Drives)
R88A-CAKA003S
Encoder Cables
(for the AC Servo Drives)
R88A-CRKA003C
AC Servomotors/Servo Drives
(Built-in EtherCAT
Communications) User's Manual
(Cat. No. I576)
USB cable Commercially available USB cable*1---
*1. Use a USB2.0 (or 1.1) cable (A connector - B connector), 5.0 m max.
The names and versions of the software that are used in this Guide are given below. Install the
following software to a computer (OS: Windows 7).
Manufacturer Name Version
OMRON Corporation Sysmac Studio Version 1.05
The MathWorks Inc. MATLAB/Simulink R2013a
The MathWorks Inc. Simulink PLC Coder R2013a
Loading...
+ 26 hidden pages