Omron SYSMAC-SE20 Series Startup Manual
Omron SYSMAC-SE20 Series Startup Manual

Omron SYSMAC-SE20 Series Startup Manual

Machine automation controller nj-series, simulink plc coder & sysmac studio
Hide thumbs Also See for SYSMAC-SE20 Series:

Advertisement

Quick Links

Machine Automation Controller NJ-series
Startup Guide
for Simulink
Sysmac Studio
SYSMAC-SE20□□
NJ501-□□□□
NJ301-□□□□
R88D-KN□-ECT
GX-AD0471/DA0271
®
PLC Coder™ &
W529-E1-01

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SYSMAC-SE20 Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Omron SYSMAC-SE20 Series

  • Page 1 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...
  • 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. Nevertheless, OMRON assumes no responsibility for errors or omissions.
  • Page 3: Introduction

    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.
  • Page 4: Terms And Conditions Agreement

    (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.
  • Page 5 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.
  • Page 6: 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.
  • Page 7: Related Manuals

    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 W504 SYSMAC-SE2□□□ Learning about the operating The operating procedures of the Sysmac Operation Manual procedures and functions of the Studio are described.
  • Page 8 Instructions Reference NJ301-□□□□ of the motion control instructions described. Manual that are provided by OMRON. 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...
  • Page 9: 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. W529-E1-01 Cat. No. Revision Revision code Date Revised content June 2013 Original production...
  • Page 10: Table Of Contents

    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 System to Construct and Configuration Devices ........... 9 1.1.
  • Page 11: System To Construct And Configuration Devices

    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. Computer Sysmac Studio, MATLAB/Simulink, and Simulink PLC Coder are installed. USB cable NJ-PA3001 Power Supply Unit NJ301-1200 CPU Unit...
  • Page 12 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.
  • Page 13: The Servo System Constructed In This Guide

    1.2. The Servo System Constructed in this Guide This guide describes the procedure to start up the system for single-axis positioning with a Servo Drive and Servomotor for one axis. The operations from creating the control algorithm using the Simulink® from the MathWorks® Inc. to operation check using the actual devices are given as the startup procedure.
  • Page 14: Before You Begin

    2. Before You Begin 2.1. Wiring the Devices and Installing the Software You wire the devices and install the software on the computer as described in 1.1. System Configuration and Configuration Devices. Additional Information Refer to the manuals for the devices that are used in the system for wiring of the devices.
  • Page 15 Additional Information Set the sampling time of the Controller so that it matches the task period of the Sysmac Studio. (Primary periodic task period on the Sysmac Studio: 500 μs, 1 ms, 2 ms, or 4 ms) The following figure shows the inside of the Controller block. The Controller block is composed of two blocks;...
  • Page 16: Setting Up The System

    3. Setting up the System 3.1. System Setup Procedures The operation procedure of Simulink and Sysmac Studio is given below. 3.2.1 Outputting the Code using the Simulink PLC You make a setting for outputting the code for the Coder Sysmac Studio and output the code with test code. ▼...
  • Page 17: Simulink Plc Coder & Sysmac Studio Operation Procedure

    Open the Sample File No. 1 PLCCoderDemoMC.mdl that is provided separately on the Simulink. Click the Controller block to output the code and select PLC Code - Options from the Code Menu. Select PLC Code Generation, and then select OMRON Sysmac Studio for Target IDE.
  • Page 18 Select the Generate testbench for subsystem check box. Click the Apply Button. Click the Generate Code Button.
  • Page 19 The PLCCoderDemoMC.xml file is saved into the plcsrc folder specified in Code Output Directory. Additional Information When you adjust the parameters after code generation, you generate the code as a variable, not a constant (literal). Access the website of The MathWorks Inc. or refer to the Simulink PLC Coder User’s Guide that is provided by The MathWorks Inc.
  • Page 20: Importing The Code Into The Sysmac Studio

    3.2.2. Importing the Code into the Sysmac Studio You import the code outputted by the Simulink PLC Coder into the Sysmac Studio. Additional Information Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for how to use the Sysmac Studio.
  • Page 21 Select Import ST Program from the Tools Menu. Select the PLCCoderDemoMC.xml file that was outputted in the previous section in the Import ST Program Dialog Box. The data is imported and the programs, functions, function blocks, data types, and global variables in the XML file are added to the project of Sysmac Studio. The Controller block whose code is outputted by the Simulink PLC Coder and its internal blocks CommandPositionGenerator and PositionController are imported as function blocks of Sysmac Studio.
  • Page 22: Checking The Calculation Accuracy

    3.2.3. Checking the Calculation Accuracy You confirm that the code has the same calculation accuracy as the Simulink (within the acceptable error range) by a simulation. Double-click the Task Settings in the Multiview Explorer to display the Task Settings Tab Page. Set the task period to 1 ms in the Task Settings View on the Sysmac Studio so that the period matches the sampling time of the Controller on the Simulink.
  • Page 23 Select Run from the Simulation Menu of the Sysmac Studio. Double-click TestBench in the Multiview Explorer to display the program. Confirm that testVerify is True and testCycleNum is the value of TEST_CYCLE_COUNT written in the comment. You can confirm that calculation accuracy of the output data is the same level as the Simulink (within the acceptable error range) if testVerify is True.
  • Page 24 Additional Information The initial value of the acceptable error depends on the data type as shown below. Set an appropriate value according to the actual application. ■ Integer data: 0 (Match) ■ REAL data: 0.0001 ■ LREAL data: 1.0E-5...
  • Page 25: Creating The Ethercat Network Configuration

    3.2.4. Creating the EtherCAT Network Configuration You register a R88D-KN01L-ECT Servo Drive that operates as axis 0 on the EtherCAT network configuration. Double-click EtherCAT in the Multiview Explorer to display the EtherCAT Tab Page where you edit the EtherCAT network configuration. Drag the R88D-KN01L-ECT from the Toolbox to the master.
  • Page 26: Setting The Axis

    3.2.5. Setting the Axis You add an axis to control the Servo Drive, assign the Servo Drive to the axis, and make the axis parameter settings. Double-click Motion Control Setup in the Multiview Explorer and right-click Axis Settings and select Add - Axis Settings from the menu. Double-click MC_Axis000(0) (Axis 0) that was added under Motion Control Setup - Axis Settings in the Multiview Explorer to display the axis parameter setting view.
  • Page 27 Make the Unit Conversion Settings according to the mechanical configuration. Unit of display: mm Command pulse count per motor rotation: 1048576 pulse/rev Work travel distance per motor rotation: 10 mm/rev Make the Operation Settings according to the mechanical configuration. Maximum velocity: 500 mm/s Maximum jog velocity: 50 mm/s...
  • Page 28: Creating Programs

    3.2.6. Creating Programs You create a program for calling the function blocks whose code was outputted by the Simulink PLC Coder and a program for outputting command values to the Servo Drive. Delete TestBench and MainTB because they are used for the test to check the calculation accuracy.
  • Page 29 Create the PositionControl program for the following processing. - Servo ON (by executing an MC_Power instruction) - Home definition (by executing an MC_Home instruction) - Calculation of velocity command values by the Controller function block whose code was outputted by the Simulink PLC Coder - Output of velocity command values to the Servo Drive (by executing the MC_SyncMoveVelocity instruction) Precautions for Correct Use...
  • Page 30 Assigning the PositionControl program that you created to a task. Double-click the Task Settings in the Multiview Explorer to display the Task Settings Tab Page. Set the task period to 1ms in the Task Settings View on the Sysmac Studio so that the period matches the sampling time of the Controller on the Simulink.
  • Page 31: Synchronization (Download)

    3.2.7. Synchronization (Download) You transfer the programs and parameter settings to the physical CPU Unit. Select Online from the Controller Menu. Select Synchronization from the Controller Menu. Click the Transfer to Controller Button.
  • Page 32: System Operation Check

    3.2.8. System Operation Check You execute the operation according to the programs transferred to the physical CPU Unit and check the operation using the data trace function. Precautions for Correct Use The physical motor will run. Thoroughly read and understand the manuals for all devices that make up the system to ensure that the system is used safely.
  • Page 33 Make the trace settings as shown below. Trigger condition: Rising edge of PositionControl.Smv_Ex Trace target variables: PositionControl.i_Controller.TargetPosition PositionControl.i_Controller.i0_PositionController.CommandPosition PositionControl.i_Controller.ActualPosition PositionControl.i_Controller.CommandVelocity Click the Start Trace Button (with red filled circle icon) on the upper left part of the window to start data tracing. The data trace function is started and waits for the trigger.
  • Page 34 Double-click PositionControl in the Multiview Explorer to display the program. Change the value of StartPg variable for execution conditions of Servo ON, home definition, and command value output to True to start positioning. When you click the Stop Button (with write square icon) or the trace data becomes full, the data trace operation will stop and the results will be displayed.
  • Page 35: Appendix

    4. Appendix 4.1. Programming in Ladder Diagram Language To call a function block from a program written in the ladder diagram language, the function block must have at least one BOOL input variable and one BOOL output variable. This section describes the procedure for adding boolean signals to the block on the Simulink. Additional Information You also can add BOOL variables on the Sysmac Studio after importing the code without changing the block on the Simulink.
  • Page 36 When the code is imported to the Sysmac Studio, the BOOL variables are added as shown below. The program to call the function block is written in the ladder diagram language as shown below. Additional Information Refer to the Sample File No. 6 PLCCoderDemoMC_LD.mdl that is provided separately for the Simulink model used in this section.
  • Page 37: Sample File List

    4.1. Sample File List The following sample files are related to this Guide. We provide the sample files separately. File Name Description PLCCoderDemoMC.mdl File that contains the Simulink model described in 2.2. Designing the Control Algorithm of this Guide. PLCCoderDemoMC.smc Sysmac Studio project file that contains Sysmac Studio programs described in 3.2.6 Creating Programs of this Guide.
  • Page 38 2013 W529-E1-01 0613(-)

Table of Contents