You are on page 1of 145

Iberia F2F Training | Day 1

Agenda
1 Introduction to Sysmac
Sysmac Brand
Omron has created the new Sysmac brand as a symbol of
Automation Systems’ customer-oriented activities.

New Sysmac is born to promise the defined quality of


product & service to the global market and customers by
achieving competitive machine automation solution.

The target of the new Sysmac brand is to obtain the


confidence from the customers and be recognized as a
quality brand.
Sysmac Brand

always in control is the brand voice of Sysmac. It


summarizes the message that Omron wants to
always in transmit to the market:
control
Connectivity

High Quality

Reliability
Sysmac Brand

Sysmac products are global. That means they can be


acquired in any part of the World and the customer
Service and can get worldwide technical support.
Support
Omron policy is to guarantee 7 years availability and
10 years production from the date of release of the
product. The NJ controller is not a PC and therefore
will fall within Omron standard policy.

Moreover, all the technical specs regarding the


robustness and reliability that the CJ series has, can be
applied to the new NJ-Series.
?
Any questions?
2 Sysmac Family
The Heart of the Platform
The heart of the new platform are the new Machine Controller: NJ5 and the new Software:
Sysmac Studio.

NJ5 1.0 Sysmac Studio 1.0


• The One Machine Controller • The One Software

Sysmac Version This version works OK This version doesn’t work


Distributed I/Os
An extensive line up of digital / analogue I/O terminals and encoder input terminals are available
for EtherCAT connectivity.

GX series 1.1 NX’s SmartSlice I/O >1.0


• Digital, analogue and encoder I/O units • Up to 64 I/O units per station
• Removable I/O terminal • Screwless wiring
• Automatic and manual address setting • Safety Integrated
Inverters and Servos

MX2 G5
 Proven (40,000 units in FY10)
1.1  Powerful servo
2.1
 with EtherCAT option  Proven technology
 up to 15 kW  Small and with EtherCAT
 Global product embedded
 With linear motor support
 Up to 15kW
 Global product
Vision
The Unique Offering.

FQ-M 1.0
 Compact integrated
(Camera+controller) Vision system
 Designed for pick and place
applications
 EtherCAT embedded
 Encoder input for tracking
 Global product
A look at the future…
Sysmac has just started. In the near future new devices which met the Sysmac standards will be
released under this brand.

RX Inverter NJ3 , NJ… New IO family (iBUS)


A look at the future…
Sysmac has just started. In the near future new devices which met the Sysmac standards will be
released under this brand.

NX_ (iBUS) Safety Controller New HMI


A look at the future…
Sysmac has just started. In the near future new devices which met the Sysmac standards will be
released under this brand.

And within the NJ/X core

Kinematics CNC …
SQL,Robotics,…
?
Any questions?
3 NJ5 Architecture
NJ architecture

The NJ-series Controllers are based on IEC 61131-3. They provide high-speed control
performance as machine automation controllers.
Currently, all NJ-series Controllers share the same specifications except the number of axes it can
control. At present, the available references are:

Model Number Performance I/O capacity / Program Memory capacity


of axes Number of capacity for variables
Configuration
Units
NJ501-1300 16 LD: 1.8 ns 2,560 points / 20 MB 4 MB: Not retained
(8 times faster than CJ2) 40 Units during power
Addition of DINT: 40.4 ns interruption
(4 times faster than CJ2)
NJ501-1400 32 Addition of LREAL: 31.9 ns 2 MB: Retained
(188 times faster than CJ2) during power
interruption

NJ501-1500 64
NJ architecture

Today’s CPUs:
NJ architecture
NJ Specifications
The general specifications such as ambient operating temperature and noise
immunity are the same as CJ Series, securing the hardware reliability in the same
level as conventional PLCs.
With the fan-less structure, the same maintenance capability as conventional PLCs
are secured.
Item Specifications
Noise immunity 2 kV on power supply line (Conforms to IEC 61000-4-4)
Vibration resistance 5 to 8.4 Hz, 3.5-mm amplitude, 8.4 to 150 Hz,
acceleration: 9.8 m/s2 in X, Y, and Z directions for 100 minutes
(Time coefficient: 10 minutes x coefficient factor 10 = total time 100 min.) (according to JIS
C60068-2-6)

Shock resistance 147 m/s2 3 times each in X, Y, and Z directions


(Relay Output Unit: 100 m/s2) (according to JIS C60068-2-27)
Ambient operating 0 to 55C
temperature
Ambient operating 10 to 90% (with no condensation)
humidity
Ambient storage -20 to 75C (excluding battery)
temperature
NJ Series
Here is a look at the NJ series from the outside.

End Unit
SD card Slot

Power Supply Unit


USB Port

Ethernet/IP Port

EtherCATPort

CPU Unit
Battery Slot
NJ Series
And here is a look from the inside.

New Intel CPU at 1.6 GHz

Hard Real-Time
Operating System

OMRON-made runtime modules for


Sequencing and Motion

PLCopen Motion Function Blocks

Fully conforms IEC 61131-3 standards


NJ architecture
The NJ Series supports two different system configurations. Regardless of which configuration
is used, it is always composed, at least, by a Power Supply Unit, a CPU Unit and an End Unit
(included with the CPU unit).

Basic System Configuration

In this configuration, the NJ controller only has one “rack”, so it can handle up to 10 units (CJ
units). Communications can be performed using different ways.
NJ architecture
NJ architecture
Expanded system configuration

Expansion Racks can be connected to


the CPU Rack to expand the number of
Configuration Units in the system
beyond the CPU Rack. You can mount
up to 10 Configuration Units to each
rack. You can connect up to three
Expansion Racks to a CPU Rack.
NJ architecture
Power Supply
The available references for the power supply units are the following:

Model Number Supply Voltage Output Output Output RUN CPU Expansion Weight
Current Current Capacity output Rack Racks
(5 VDC) (24 VDC)

NJ-PA3001 100 to 240 VAC 6.0 A 1.0 A 30 W Yes Yes Yes 470 g max.

NJ-PD3001 24 VDC 6.0 A 1.0 A 30 W Yes Yes Yes 490 g max.

A CJ-series Power Supply Unit cannot be used to supply power on an NJ-system CPU Rack or
Expansion Rack. If you connect a CJ-series Power Supply Unit to a CPU Rack, a CPU error (WDT
error) will occur, and the CPU Unit will not operate.
If you connect the Power Supply Unit to an Expansion Rack, operation is performed without error
detection. Normal operation, however, may be unstable due to insufficient supplied power. Also,
an internal bus check error (i.e., a Controller error in the major fault level) may occur when the
power is interrupted. In that case, the CPU Unit will not operate.
NJ architecture
CPU Unit

The software in the CPU Unit is divided into modules that are called function modules for the NJ-
series CPU Unit. The basic function module, which is the PLC Function Module, runs on top of the
OS. The other modules run on top of the PLC Function Module.

A description of each function module is given in the next slide.


NJ architecture
NJ architecture
CPU Unit
Function module Abbreviation Description

PLC Function Module PLC This function module executes the user program, sends commands to the Motion Control
Function Module, and provides an interface to the USB and SD Memory Card.

Motion Control MC This function module executes motion processing based on target values (such as the
Function Module position or velocity target value) from the motion control instruction in the user program. It
outputs command values, controls status, and obtains information through the EtherCAT
master function module. This function module functions as an open-loop controller that
outputs command values for Servo Drives.

EtherCAT Master ECAT This function module communicates with the EtherCAT slaves as the EtherCAT master.
Function Module

EtherNet/IP Function EIP This function module performs EtherNet/IP communications.


Module

For example, when motion control instructions are executed in the user program in the PLC
Function Module, the Motion Control Function Module performs motion processing. Then the
Servo Drives are controlled through the EtherCAT Master Function Module.
NJ architecture
Memory areas in CPU Unit

The memory in the CPU unit follows the following table:

Memory Type Contents

Non-Volatile Memory Tasks | POUs (Programs, Functions and Function Blocks) | Controller Configuration and Setup |
Variable and Ether/IP Data Link Tables | Trace Memory | Instruction Library |

RAM (Volatile Memory) Values of Variables (User defined, System defined and CIO and WR areas used for CJ units)

Battery-backup Values of Retained Variables | DM, HR and EM areas used for CJ units | System Time | Event Log
Memory Data | Absolute Encoder Home Offset Data

External SD Memory Custom User Data (Sysmac Studio can generate some of that custom data, for example, CAM
Card profiles)
NJ architecture
Relationships between Programs, Tasks, and
Variables

The concepts of programs, tasks and variables will


be covered fully later. However it is interesting to
know how they are composed in the CPU unit.

The user program in the CPU Unit consists of one or


more programs. To execute a program, you must
assign it to a task. (Tasks are used to specify
conditions for executing the programs that are
assigned to them.)
Programs contain instructions, functions, and
function blocks. (Functions and function blocks
contain specific sets of instructions.)
NJ architecture
CPU Start-up

The CPU Unit is ready to operate several seconds after the power supply is turned ON. All
outputs from Basic Output Units are OFF during this time. External communications are not
performed and the RUN indicator flashes. (This is called the start-up status.)

When operation is enabled, the CPU Unit will enter the start-up mode that is set in the
Controller Configuration and Setup. The start-up mode can be set to RUN mode or PROGRAM
mode. RUN mode is the default setting.

As it takes several seconds to enter RUN mode after the power is turned ON, the Power Supply
Units provide a RUN Output, for example, to implement fail-safe circuits so that external devices
do not operate incorrectly.
NJ architecture
CPU Operating Modes

There are two operating modes: RUN mode and


PROGRAM mode.

RUN Mode
The user program is executed in RUN mode. The
default setting of the start-up mode is RUN mode.
Variables can be monitored and set in this mode.

PROGRAM Mode
The user program is not executed in PROGRAM mode.
Use this mode to transfer the project (with the user
program) and check I/O wiring.
CPU LEDs
Indicator Color Status Meaning
■ Lit The CPU Unit is in normal operation in RUN mode.
Green
RUN
Flashing The CPU Unit is waiting (entering this status for about 10 seconds at
(1-s intervals)
startup and at program transfer)
Not lit Operation is stopped.
■ Red Lit Major fault level Controller error
ERROR Flashing Partial fault level Controller error or minor fault level Controller error
(1-s intervals)
Not lit The CPU Unit is in normal operation.
BUSY ■ Flashing Built-in non-volatile memory access in progress
Yellow
Not lit Other than the above
SD PWR ■ Lit SD Memory Card can be used.
Green
Not lit Other than the above
SD ■ Flashing SD Memory Card access in progress
Green
Not lit Other than the above
EtherCAT Port LEDs
Indicator Color Status Description
Lit EtherCAT communications is in progress.
・ I/O data is being input and output: Operational state
Flashing EtherCAT communications is established. (One of the following states)
EtherCAT ■ (1 second • Only message communications: Pre-Operational state
NET RUN green cycle) • Message communications, and inputs of I/O data: Safe-Operational state
Not lit EtherCAT communications is stopped.
• Power-off state, or the Unit is being reset.
• There is a MAC address error, communications controller error, or other error.
Lit An unrecoverable error such as a hardware error or exceptional process occurs
Flashing A recoverable error occurs
EtherCAT ■
(1 second
NET ERR red
cycle)
Not lit No error
Lit Link is established
EtherCAT ■ Flashing Data being transmitted and reprieved after link is established
LINK/ACT yellow (The indicator flashes every time data is sent or received.)
Not lit Link is not established
Ethernet/IP Port LEDs
Indicator Color Status Operation status
NET RUN - Not lit Ethernet communications is not possible.
• The power supply is off, or was reset.
• A MAC address error of communications controller error occurs.
■ Green Flashing In the process of making Ethernet communications
• In the process of establishing tag data link communications.
• In the process of getting an IP address from BOOTP.
Lit In normal operation
NET ERR - Not lit There is no Ethernet communications error.
• The power supply is off, or was reset.
■ Red Flashing A user-recoverable error occurs.
• An error occurs in TCP/IP communications or CIP
communications.
• FTP server setting error, or NTP server setting error, etc.
• Tag data link setting error, tag data link verification error, etc.
Lit A non-recoverable error by users occurs.
• A MAC address error or communications controller error occurs.
LINK/ACT - Not lit Link not established.
• The cable is not connected.
• The power supply is off, or was reset.
■ Yellow Flashing Data communications in progress after link is established.
Lit Link established.
Memory Card
SD Memory Cards and SDHC Memory Cards are supported.
• Operation guaranteed for OMRON Memory Cards only
• FAT16 and FAT32 SD Memory Card formats are supported. (CJ: FAT16 only)
Service life detection supported
• This function detects that the end of the SD Memory Card’s service life (for writing
performance) approaches.
With the SD Memory Card, the following functions can be realized
• FTP Server
• Reading/writing files with SD Memory Card Operation Instructions
• Saving EtherCAT packet data
• Automatic program transfer at startup (V1.1)
• Backing up system data (V1.1)
• Updating firmware (non disclosure)

Model Card type Capacity Format Number of overwrites


HMC-SD291 SD 2 GB FAT16 100,000
?
Any questions?
4 CJ Units
CJ Units
Most of CJ Units can be used with the NJ-Series CPUs. In fact, the "J" in the name
means its compatibility with the CJ internal bus (PC21), so most of them will work
without any limitation.

However, there are some aspects and restrictions that have to be into account when
specific units are mounted. This section will cover those aspects and will show the
limitations when using these specific units.
Types of Units
As you probably know, CJ Units can be summarized in the following types:
• Basic I/O Units
• Special I/O Units
• CPU Bus Units
• Other Units (End Convert and I/O Interface Units)

A total of up to 10 Units (Types 1, 2 or 3) can be connected to the CPU Rack and to


each of the Expansion Racks (3 Racks maximum). (A Controller error in the major
fault level will occur if 11 or more Units are connected.)

The End Convert must be connected to the right end of each CPU/Expansion Rack.
(One End Cover is provided with the CPU Unit and with each I/O Interface Unit. (A
Controller error in the major fault level will occur if the End Cover is not connected to
the right end.)

Additionally, a Power Supply Unit (NJ-PA3001 or NJ-PD3001) has to be mounted in


each CPU/Expansion rack and CS/CJ-series I/O Connecting Cables are required to
connect the I/O Interface Unit to the I/O Control Unit or precious I/O Interface Unit.
You can see below an example of configuration.
Types of Units
General Considerations
Main conceptual differences have to be into account when using CJ units with the NJ-
Series CPU.

First of all, the configuration of each unit is done using Sysmac Studio, instead CX-
Programmer (and the I/O table). During the Hands On section, you will learn how to
do that.

Also, most of the data that a unit requires to run or is retrieved by the CPU unit, is
contained in variables instead of fixed memory address. For example, to know the
state of the inputs of a digital inputs card, we will use variables instead of
remembering the fixed allocation addresses (i.e. CIO 0000.00 to CIO 0000.15, for
example).

Additionally, the number of units can be mounted per CPU is:


• Up to 40 Basic I/O Unit can be mounted
• Up to 40 Special I/O Unit can be mounted
• Up to 16 Bus I/O Unit can be mounted
Basic I/O Units
Input Units

• Digital Input Units: There are not major issues using these kind of units in
the NJ.
• CJ1W-INT01: This unit will be fully supported in version 1.1. Version 1.0 does
not support Event Tasks, so that unit can be used just like a Digital Inputs
Unit, not as Interruption Inputs Unit.
• TS Units (CJ1W-TS561/562): No major issues.

Output Units

• Digital Output Units: There are not major issues using these kind of units in
the NJ.
Special I/O Units
• Most Special Units (like CJ1W-AD081, CJ1W-MAD42, CJ1W-PH41U, CJ1W-
TC003, etc.) works without any issue.

• CJ1W-AD042 and CJ1W-DA042V: These units cannot use Direct Conversion


mode. With these units, Cyclic Conversion mode has to be set.
• CJ1W-V680C11/12: Can only use EM banks 0 to C for Special I/O Area "Data
Storage Area" settings.
• CJ1W-CT021/CTL41-E
Cannot use Interrupt Tasks.
Since IODR and IOWR instructions are not supported, many operations cannot
be performed, like read or write the counter values or other parameters, make
settings during program operation, etc.
• CJ1W-CRM21: Unsupported Unit. Supported since version 1.1.
• CJ1W-NC413/433: Unsupported Units.
Bus I/O Units
• CJ1W-SCU22/32/42: No major issues have been found with these cards.
However, because of the new NJ architecture, not all NT-Link and C mode
commands are supported. Also, SerialRcv and SerialSend have to be used
instead of DRXDU and DTXDU. Interrupt task will be supported from version
1.1.
Note that CJ1W-SCU21/31/41 are not officially supported.
• CJ1W-EIP21: Supported from version 1.1.

• CJ1W-CLK23: Will be supported from version 1.1. Note that CJ1W-CLK21 is not
officially supported.
• CJ1W-DRM21: No major issues have been found with this card. EM Banks
from 0 to C must be used for master/slave free allocations. CX-Integrator is
used to configure the network/free allocations.
Bus I/O Units

• CJ1W-PRM21: No major issues have been found with this card. EM Banks from 0
to C must be used for slave allocations. CX-Configurator FDT is used for making
allocations.
• CJ1W-PRT21: No major issues have been found with this card. EM Banks from 0
to C must be used for device allocations.
• CJ1W-PNT21: No major issues have been found with this card. EM Banks from 0
to C must be used for device allocations.
• Other Units not shown above (as CJ1W-ETN21, CJ1W-MCH72 or CJ1W-SPU01)
are not supported.
?
Any questions?
5 Sysmac Studio
Sysmac Studio
The Sysmac Studio is the main Support Software that you use for Sysmac products. On it, you
can set up the Controller configurations, parameters, and programs, and you can debug and
simulate operation.

Other Support Software


The following Support Software is also included in the Sysmac Studio Software Package
Standard Edition.

• Network Configurator
The Network Configurator is used for tag data links on the built-in EtherNet/IP port.
• CX-Integrator
The CX-Integrator is used for remote I/O communications with a DeviceNet Unit.
• CX-Protocol
The CX-Protocol is used for protocol macros with Serial Communications Units.
• CX-Designer
The CX-Designer is used to create screens for NS-series PTs.
Sysmac Studio: CX-One compatibility

For CX-One 4.22 customers and later:


Yes. There are no compatibility problems and both packages can be run together. Either package
can be installed or uninstalled in any order.

For CX-One 4.0 to 4.21 customers:


Yes. Both packages can be installed and run together. However, because the CX-One package was
written without knowledge of the possible existence of Sysmac Studio, there are the following
limitations:
CX-One 4.0 to 4.21 MUST be installed prior to Sysmac Studio
When uninstalling CX-One, Sysmac Studio MUST be uninstalled first. (There is a pop-up message
to ensure this happens)

For CX-One 3.x customers and older:


No. Sysmac Studio cannot be installed alongside CX-One v3. You should uninstall it and upgrade.
Sysmac Studio: Version Schedule
Current Version (at the time of writing)  1.0.8.

Support of FQ-M
Three editions in the same media, depending on the entered serial number:
• Trial Version (30 days)
• Vision Edition (for setting-up and using of FQ-M)
• Standard Edition (all the functionality)

February  V1.09

Cam Editing by program, customizable inerface, Run/stop programs from others,…


New versions are expected to be released every 3 months. Auto-update tool is included in the
current version of Sysmac Studio.
Sysmac Studio

Let’s see an overview video.


?
Any questions?
6 Ethernet/IP
Ethernet/IP
EtherNet/IP is an industrial multi-vendor network that uses
One Ethernet. The EtherNet/IP specifications are open standards
Factory managed by the ODVA (Open DeviceNet Vendor Association),
Automation just like DeviceNet.
Network
EtherNet/IP is not just a network between Controllers. It is also
used as a field network. Because EtherNet/IP uses standard
Ethernet technology, various general-purpose Ethernet devices
can be used in the network.

Additionally, the Ethernet/IP built-in Port supports other


protocols and features, like FTP, SNMP or socket services.
How Ethernet/IP works

EtherNet/IP is built on the standard TCP/IP stack, and makes use of all 7 layers of OSI
reference model. Technically, it is an application layer protocol that. That means that
EtherNet/IP is simply the way data is organized in a TCP or UDP packet.

EtherNet/IP is part of CIP, the Common Industrial Protocol. CIP defines the Object
structure and specifies the message transfer. CIP protocol over CAN is DeviceNet. CIP
protocol over Ethernet is EtherNet/IP.

There are two kinds of messages that are transferred between EtherNet/IP devices:
• Explicit Messages (asynchronous, as needed)
• I/O Messages (Data messages that are continuously transferred), usually known as
Tag Data Links.
How Ethernet/IP works
The way of working of Ethernet/IP uses some techniques which requires the switches
to be managed in order to get the most of the Ethernet/IP performance.
So, the features that a switch should have are the following ones:
• Multicast filtering (IGMP Snooping or GMRP)
Ethernet/IP uses multicast packets to send the data over the network. When the Ethernet
switch does not use multicast filtering, multicast packets are sent to all nodes, just like
broadcast packets, which increases the traffic in the network. Settings must be made in the
Ethernet switch to enable this function. There must be enough multicast filters for the
network.
• QoS (Quality of Service) Function for TCP/UDP Port Number (layer 4)
This function controls the priority of packet transmissions so that packets can be sent with
higher priority to a particular IP address or TCP (UDP) port. When tag data links and message
communications are executed on the same network, tag data links can be sent at higher
priority to prevent problems such as transmission delays due to message communications
traffic and packet losses due to buffer overflow.
How Ethernet/IP works

Omron Switches:
• W4S1-03B 3-port basic ethernet switch

QoS
• W4S1-05B 5-port basic ethernet switch
• W4S1-05C 5-port enhanced ethernet switch
Laye r 4
How Ethernet/IP works

Westermo Switches:
• Westermo Lynx+ Series

IGMP
• Westermo iLine MDI Series

o o ping
Sn
Omron Ethernet/IP Enabled Devices

CJ2M-CPU3x CJ2H-EIP CJ/S1W-EIP21 eXpectia


Omron Ethernet/IP Enabled Devices and Software

NS-Series SYSMAC Gateway & CX-Supervisor 3.2


CX-Compolet

Note that these products have been designed to communicate only with NJ and
CJ2 Series and may not work with other Ethernet/IP devices
NJ5 - Comparison with other Ethernet/IP devices
Tag Data Links (Cyclic Communications)

Item NJ built-in NJ+ CJ1W-EIP21(*1) CJ2H built-in CJ2M built-in


EtherNet/IP port EtherNet/IP port EtherNet/IP port (*2)
Number of connections 32 256 256 32
Number of registerable 32 256 256 32
tag sets
Packet interval 10.0 to 10000 ms 0.5 to 10000 ms 0.5 to 10000 ms 1.0 to 10000 ms
(in 1-ms increments) (in 0.5-ms (in 0.5-ms (in 0.5-ms
increments) increments) increments)
Allowed 1000 pps 6000 pps 6000 pps 3000 pps
communications
bandwidth per Unit
Maximum data size per 600 bytes (300 1444 bytes (722 1444 bytes (722 1280 bytes (640
connection words) words) words) words)
Maximum link data size 19200 bytes 369664 bytes 369664 bytes 1280 bytes
per node (9,600 words) (184,832 words) (184,832 words) (640 words)
Tag data link in units of Supported Not supported Not supported Not supported
odd number of bytes
Communications past Supported Supported Not supported (*3) Not supported (*3)
an IP router

*1 They are supported with CJ1W-EIP21 version 1.1 and later.


*2 They are supported with CJ2M version 1.1 and later.
*3 To be supported in future.
NJ5 - Comparison with other Ethernet/IP devices
CIP Explicit Messages

Item NJ built-in NJ+ CJ1W-EIP21(*1) CJ2H built-in CJ2M built-in


EtherNet/IP port EtherNet/IP port EtherNet/IP port (*2)
Class 3 (connected) 64 128 128 64
Number of connections
UCMM (unconnected) Client: 32 max Client: 32 max Client: 32 max Client: 16 max
Number of possible Server: 32 max Server: 32 max Server: 32 max Server: 16 max
communications at one
time

CIP client function Supported Supported Supported Not supported

*1 They are supported with CJ1W-EIP21 version 1.1 and later.


Other Ethernet/IP Port Functionalities
FTP Server
You can send FTP commands from an FTP client software application on a computer on
an Ethernet network to upload
and download large files on the SD Memory Card.
In order to use the FTP Server functionality, you have to enable it and set the user and
password with the Sysmac Studio software.
FTP stands for File Transfer Protocol.

NTP Client
This functionality permits the NJ5 to connect to a NTP Server at the specified time or
at a specified interval after the power supply to the CPU Unit is turned ON and update
the internal clock time in the CPU Unit is updated with the read time from that NTP
Server.
NTP stands for Network Time Protocol.
Other Ethernet/IP Port Functionalities

SNMP
The SNMP is a network management protocol. You can use the SNMP to manage any
network that consists of devices that support SNMP. The server that manages the
network is called the SNMP manager. The managed network devices are called SNMP
agents and the information sent to the SNMP manager when an event ocurrs is cold
SNMP trap.

SNMP stands for Simple Network Management Protocol.


Other Ethernet/IP Port Functionalities

Sockets
Socket services on the built-in EtherNet/IP port are used to exchange data between
Controllers and general-purpose applications that do not support CIP message
communications (the Ethernet/IP application protocol). The Controller requests the
socket service from the user program.

Currently, socket services can be requested from a ST program (ladder will be


supported in the future). The instructions used start with the "Skt" prefix, like
SktUDPCreate, SktUDPRcv or SktUDPSend.
Other Ethernet/IP Port Functionalities
Comparison with other Omron devices

Item NJ built-in NJ+ CJ1W-EIP21(*1) CJ2H built-in CJ2M built-in


EtherNet/IP port EtherNet/IP port EtherNet/IP port

FTP Server Supported Supported Supported Supported


FTP Client Step2 and later Not supported Not supported Not supported
NTP Client Supported NTP Supported SNTP Supported SNTP Supported SNTP
DNS Client Supported Supported Supported Supported
BOOTP Client Supported Supported Supported Supported
SNMP Supported Supported Supported Supported
CIDR Supported Supported Supported Supported
Socket Service Supported Not supported Not supported Not supported
Special instructions
provided

SMTP Client Step2 and later Not supported Not supported Not supported
FINS Supported(*2) Supported(*2) Supported Supported

*1 They will be supported with CJ1W-EIP21 version 1.1 and later.


:2. Accessible only CJ compatible memory area.
?
Any questions?
7 EtherCAT
EtherCAT
EtherCAT is the fastest emerging network for machine
One automation. It is Ethernet based, fast, accurate and highly
efficient in term of data transmission.
Machine
Network As standard, EtherCAT permits to connect all the devices you
need in the machine: Motion, Drives, Vision, I/Os, etc, so
you can consider it as your One Machine Network.

Additionally, all our EtherCAT devices have been designed


and tested to meet Omron stringent requirements on noise
immunity.
EtherCAT

In the following table you can see a comparison between EtherCAT and other well
known network types. You can clearly see what the fastest one is.
0.125ms 0.25ms 0.5ms 1ms 2ms 4ms
(0.44ms) (0.88ms) (1.77ms) (3.55ms)
SSCNET-III ? byte no no 8 axes 16 axes 16 axes(*2) 16 axes(*2)
MECHATROLINK-II 17byte no 2 axes 7 axis 15 axes 30 axes 30 axes
32byte no 1 axis 4 axes 9 axes 21 axes 30 axes
SX-BUS (Fuji) 32byte no ? ? 16 axes? 32 axes -
EtherCAT 64byte 22 axes 44 axes 89 axes 178 axes 357 axes 714 axes
SERCOS-III 64byte 10 axes 20 axes 40 axes 80 axes 160 axes 321 axes
E/IP CIP Motion 64byte 8 axes 16 axes 32 axes 64 axes 128 axes 257 axes
MECHATROLINK-III 64byte 4 axes 8 axes 13 axes 20 axes 31 axes 46 axes
EtherCAT 8byte 147 axes 294 axes 589 axes 1179 axes 2358 axes 4716 axes
SERCOS-III 8byte 41 axes 82 axes 165 axes 254 axes 254 axes 254 axes
E/IP CIP Motion 8byte 11 axes 22 axes 45 axes 90 axes 181 axes 362 axes
Real Time Express ? no no 32 axes (32 axes) no no
MECHATROLINK-III 16byte 6 axes 9 axes 15 axes 22 axes 33 axes 41 axes
How EtherCAT Works
EtherCAT is based on standard Ethernet frames (IEE 802.3). However, it does not use
all the layers of the standard OSI stack, so, generally speaking, it cannot be used
with standard Ethernet devices.
How EtherCAT Works
Technically, an Ethercat network IS
capable of transporting standard
TCP/IP frames, being fully
transparent for the non-EtherCAT
devices connected to the
network.

However, other features than


being the One Machine Network,
are currently out of the scope of
the Sysmac products.
How EtherCAT Works: Overview
• EtherCAT does not transmit data to each slave node on the network. But it
passes Ethernet frames through each of the slave nodes.
• While the frame passes through, the slave nodes reads and writes data in the
specific area allocated to it in the frames in a few nanoseconds.
• The Ethernet frames sent by the EtherCAT master go through all EtherCAT
slaves without stopping on the way. Once they reach the final slave on the
network, they are sent back by the slave. They go through all slaves again and
return to the EtherCAT master.
• This mechanism allows realtime and high speed data transmission.
How EtherCAT Works: Ethernet «On The Fly»
One of the functional principles of EtherCAT is Ethernet “On the Fly”:
• Process data is extracted and inserted on the fly: Process data size per slave
almost unlimited (1 Bit…60 Kbyte, if needed using several frames)
• Compilation of process data can change in each cycle, e.g. ultra short cycle time
for axis, and longer cycles for I/O update possible
• In addition asynchronous, event triggered communication is supported.
The overall delay introduced by each slave (pass-through delay) is virtually zero.
Actually, it is less than 1 µs.

Output Slave Slave

Input
EtherCAT Slave EtherCAT Slave
Controller Controller
How EtherCAT Works: Ethernet «On The Fly»

Is it clear? Let’s see a video.


How EtherCAT works: Distributed Clock (DC)

The DC-based clock synchronization enables sharing the same time (EtherCAT System
Time) across all EtherCAT devices (including the master). This enables the timing of the
operation of all devices to be synchronized with the shared time.
Currently, OMRON servos and encoder’s inputs support it.
How EtherCAT works
At the end of the process (when all slaves have read/written their data), the frame is
sent back to the master.
EtherCAT Node measures time difference between leaving and returning frame, that
is the Propagation Delay Time.
How EtherCAT works
Precise Synchronization (<< 1 μs) by exact adjustment of Distributed Clocks.
How EtherCAT works: Communication Protocol

• The EtherCAT ports built in NJ-series CPU Units use


the CoE (CAN application protocol over EtherCAT)
protocol to exchange data with slaves on EtherCAT
network.
• The CoE protocol realizes the CANOpen.
communications on EtherCAT network.
• With the CoE, parameters and control information
held by various slaves are defined by the data
specification called Object Dictionary (OD) .
• For Servo Drives, for example, basic parameters
such as inertia ratio as well as gain parameters such
as speed gain are the object dictionary.
How EtherCAT works: Communication Protocol

PDO communication data


(before) There are two methods to exchange data between the
Actual position master and the slaves:
Actual velocity
Actual torque
• PDO Communications:
Communications using process data objects (PDOs) to
Command position
exchange information in realtime with a fixed period.
Command velocity This kind of communication is performed automatically to
Error code refresh slaves data mapped as variables or axes in the NJ
CPU. Some slaves support PDO Mapping (picture on the
PDO communications data
(after) left).
Actual position
• SDO Communications:
Actual velocity Communications using service data object (SDO) for
Command position
communicating information when required.
This kind of communication is performed, generally
Command velocity speaking, programmatically by the user.
EtherCAT Topology

The NJ-series CPU Unit can be connected using daisy chain connections with no
branching, or with branching connections using Branching Units. This supports
redundancy, and all topologies other than rings.

• Daisy Chain
Maximum number of slaves: 192

Cable length between two slaves:


100 m max. (same for between a Branching Unit and
a slave)

Total permissible cable length in a network depends


on network topology. (It will be calculated
automatically within Sysmac Studio.)
EtherCAT Topology

• Branching Connection

Branching topology can be


achieved using the Omron
Junction Slaves:
• GX-JC03 (3 ports)
• GX-JC06 (6 ports)

Each Junction Slave has one


input port and more than one
output port. The output ports on
each Junction Slave can be
connected to another Junction
Slave or other EtherCAT slaves.
Branching Units
• GX-JC03 (3 ports)
• GX-JC06 (6 ports)
Safety over EtherCAT
Just some facts

• Safety over EtherCAT (FSoE) defines a safety communication layer for the
transportation of safety process data between Safety over EtherCAT devices.
• FSoE is an open technology within the EtherCAT Technology Group (ETG).
o The protocol is developed according to IEC 61508 It meets the Safety
Integrity Level (SIL) 3
o Residual Error Probability R(p) < 10-9
• The protocol is approved by an independent Notified Body (TÜV)
• FSoE Frame is mapped in the cyclic PDOs
• Therefore the protocol is suitable for safe I/O as well as for functional safe
motion control
• Confirmed transfer from the FSoE Master to the FSoE Slave and vice versa
• Safe Device Parameter can be downloaded from the Master to the Slave at Boot-
Up of a FSoE Connection
• Certified products with Safety over EtherCAT are available since 2005
Third Party EtherCAT Slaves
To use a 3rd party’s slave on the Sysmac Studio, you have to import the ESI file in
the following procedures.

Procedure
1. Right-click the EtherCAT master on the
EtherCAT Edit Pane, and select Display Note: The ESI file to
ESI Library. import must conform
2. On the ESI Library Dialog Box, click the to the ESI schema
“This folder” in red. specifications version
3. The folder to store the ESI file opens. 1.4. Otherwise it
Save the ESI file of the 3rd party. could not be used.
4. Restart Sysmac Studio.
?
Any questions?
8 IEC 61131-3
Why IEC 61131-3?
In the global competition, the demand for conforming to the IEC 61131-3 standards
are getting stronger and stronger. In the Asian market, it has been increasingly
adopted due to the initiative of European companies.

U.S.A / Canada
Requested by
50% of
Customers Germany,
Netherlands,
Switzerland, Austria
Requested by
80% of Customers

China
Promotion
started Japan
FB and ST language
increasingly adopted
Why IEC 61131-3

Customer’s value of IEC61131-3 (from voice of European customer):

1. Readability
2. Reusability
3. Variety of programming language (IL/LD/ST/SFC/FBD)
4. Portability among multi-vender's programs
5. Reducing education cost
6. Education background
7. Global standard
8. Service engineer at end-user requests the standard
Concept of IEC 61131-3
The following is the software model specified in IEC 61131-3.

Configuration

Resource Resource

Task Task

Program Program Program

FB FB

• Program, Function, and Function Block are called “POU (Program Organization
Unit).” Each of them is a unit of reuse in software.
• Execution timing and attributes can be specified for each POU by assigning the
POU to a task.
POU (Program Organization Unit)
What is the POU?
POU (Program Organization Unit) is a unit of the execution model of user program that
is defined in the IEC61131-3. The entire user program is composed by combining two
or more POUs.

There are three kinds of components of the POU.


• Program
• Function Block (FB)
• Function (FUN)
POU (Program Organization Unit)
The supported POUs and the features in detail:
Items Program Function Block (FB) Function (FUN)
Task allocation Possible Not possible Possible
Local variables The value is retained. The value is retained. The value is not retained.
Each instance has local variables.
Return value None None Yes
In Language LD, ST LD, ST LD, ST
Algorithm
User defined FUN Possible Possible Not Possible
User defined FB Possible Possible Not Possible
Instance None Yes None
Execution condition Always executed Executed each period. Specify the Specified by the EN input.
execution condition with an input
variable.
EN/ENO None EN: None EN: Yes.
ENO: Yes (can be omitted.) ENO: Yes (can be omitted.)

• User-defined FB or FUN can be nested up to 8 levels.


• POU instances are allocated to local variables. They cannot be allocated to global variables. (With CJ Series,
they are allocated to global variables. )
POU (Program Organization Unit)
Difference between Function Block (FB) and Functions (FUN):
• Function
• Needs no instances. You can enter instructions more easily.
• Does not occupy memory area. They can be used unlimitedly.
• Suitable for simple calculations and instructions which do not
require state memorization.
• ’AT’ is not available in Function
• Function block
• Needs instances. You have to name an instance every time you
use it.
• Occupies memory area. The number of usable instances is limited
by the memory size.
• Instructions which need memorizing internal states, such as timer
instruction, must be function blocks.
Function Block (FB)
A FB consists of a local variables table and an algorithm part (ladder language and
Structured Text). A FB generates and uses instances.
TONinstance
FB definition is set as an instance in the program
TON
Trig TimeUp
In Q

Instance name SetValue PT ET ElapValue

Local variables table Input Output


Variables Variables
Input parameter Input variables In-out Output parameter Input Parameter Output Parameter
variables, Output variables,
Local variables

Algorithm
・ Described in ladder TON_instance(In:=Trig, PT:=SetValue, Q=>TimeUp, ET =>ElapValue);
language or Structured TRIG is substituted for In (Input).
Text.
・ All Instructions, user- (* When the Input variables and the Output variables are omitted. *)
defined FUN, and user- TON_instance(Trig, SetValue, TimeUp, ElapTime);
defined FBs are available.
Red: Input. Blue: Output.
Function (FUN)
A FUN consists of a local variable table and an algorithm (ladder language and Structured
Text). A FUN is used by specifying the FUN name or the instruction name. (The instance is
unnecessary. )
Function

Local variable table MAX


EN Trig Done
EN ENO
Input parameter Output parameter
Input In-out Output
variables variables variables Value1 In1 Result
(return value)
Local In2
Value2 Return Value
variables

Algorithm

Instruction (FB Result := MAX(In1:=Value1, In2:=Value2);


type excluded)
(* When the Input variables are omitted. *)
FUN
Result := MAX ( Value1, Value2 ) ;

Local variables in the Function cannot be monitored. (* EN/ENO can be included as parameters *)
Result := MAX( EN:=Trig, In1:=Value1, In2:=Value2, ENO=>Done);

Red: Input. Blue: Output.


Languages
The language to express the Algorithm in the POU (Program, FB, and FUN) is called a
programming language.

In the IEC61131-3, five languages are defined:


• LD (ladder diagram language)
• ST (Structured Text)
• SFC (Sequential Function Charts)
• FBD (Function block diagram)
• IL (Instruction Lists)

The programming language that can be used by the NJ series are ladder diagram
language (LD) and Structured Text (ST). SFC is expected to be supported in ver. 1.1.
Ladder
Major difference from the ladder language for the CJ are:

• Not compatible with the Ladder program of CJ series.


In future, CJ interchangeable Instructions and the CJ Program import tool will be
prepared.
• To build the variable-programming environment, all special instructions are
regenerated as a Functions and Function blocks. The name of the instructions are
also different.
• NJ series does not support the index registers.
Arrays can implement the conventional applications that use the index registers.
• The Data Types specially developed for Omron PLCs (Timer type, the Counter
type, the Number type, and the ***_ BCD type, etc.) are not supported in the NJ
series.
ST (Structured Text)

The major difference from Structured Text for the CJ series is as follows:

• With the NJ series, you can create a Controller program written only in ST.
With the CJ series, due to restrictions in instructions, functions, and memory
access, it was not possible to create a program written only in ST.

• The Function Blocks and the Functions that are provided as standard for Sysmac
Studio can be used in the ST Program.

• With ST, there is no problem of expanding usage in the user program memory,
and deterioration of instruction execution performance.
Variables

A variable is defined by its name, type and attributes. Sysmac Studio and the
NJ-Series provide a comprehensive variable-based programming
environment.

NJ series solved most of the problems that CJ-Series had with variables. You
can have a full-fledged variable-based programming.
Global variables
Scope of Global variables:
• It is possible to access the Global variables from all POUs (Program, FB, and
FUN).
• To prevent any unnecessary accesses and trouble arising from such accesses, a
POU access is defined as an external variable.

Global variable

POU POU

External External
Local variable variable
Local variable Local variable variable
Local variable
Local variables
Local variables are defined (or declared) in the Local variables table of each POU.
• For the FB and FUN, there are Input Variable, Output Variable, In-out Variable,
and Return Value (For FUN only).
Variable Attributes
Here are a list of the possible attributes of a variable. Not all of them can be applied to
every variable but depend on what it is defined for.
Attribute Description
Variable name Name to identify the Variable.
Data type Type and a range of the value that the Variable expresses.
AT specification Used when an I/O port or a specific address of the CJ unit is used as a Variable.
Retain Retains values when the power shutdowns.
Initial Value Specified at any of below situation to set an arbitrary value.
• At power ON
• When switched to RUN mode
• Initialization is specified when the Program is transferred.

Constant Prohibits changing values.


It is used so as not to change the constant setting.
Network Publish Variables can be read/written from the outside of the Controller by the CIP communications and the
data link function.
Communications Prohibits writing the value by the CIP message communications.
Write Disable (to be supported in the future)
Edge Upward/downward differentiation of the Input variables can be set. (Only for Function Blocks. )
Variable Addressing: I/O port
An "I/O port" is a logical interface for the CPU Unit to exchange data with an outside
device (slave/unit).
It is automatically generated when Slave/Unit Configuration Information is created in
Sysmac Studio.

CPU Unit

User
User program
program (Or,
(Or, external
external
communicate).
communicate).

Variable

Device variables Logical interface for CPU Unit to


exchange data with the outside

I/O port I/O port

The outside of CPU


EtherCAT
Unit CJ unit
Slave
Variable Addressing: I/O port
Example. CJ1W-AD041-V1
Registered automatically on the I/O Map View of Sysmac Studio.
The address of I/O port is shown like "IOBus://rack#0/slot#0/Ch1_RdAI".
Memory used for CJ units
To facilitate reuse of past properties, the NJ series has Memory used for CJ units.
You don’t have to be aware of the memory for normal programming by variables.
They will be necessary for the following cases:
• With a part of CPU Bus Unit for CJ series (like DeviceNet) and Special I/O Units
• For communications with external devices

CJ unit memory area Retained / AT Specification


Not Retained Method
CIO 0 to 6143 Not Retained %6143.15
%W511
WR W0 to W511 Not Retained
HR (Holding Area) H0 to H511, H512 to H1535 Retained
DM (Data Memory) D0 to D32767 Retained

EM (EM Area) E0_00000 to E18_32767 Retained

Auxiliary Area (*) A0 to A1471 -


Basic Data Types
Classification Data type Size Value range Example method of specifying
(Byte) Constants (literal)

BOOL type BOOL 2 0/1 or FALSE/TRUE TRUE/FALSE BOOL#1

Bit string type BYTE 1 16#00 to FF BYTE#16#A5


BYTE#2#10100101
WORD 2 16#0000 to FFFF BYTE#2#1010_0101
DWORD 4 16#00000000 to FFFFFFFF
(*) Decimal number notation is not
LWORD 8 16#0000000000000000 to allowed
FFFFFFFFFFFFFFFF

Integer type SINT 1 -128 to +127 SINT#10#100


SINT#100
INT 2 -32768 to +32767 SINT#16#64
DINT 4 -2147483648 to +2147483647
If data type is not specified, DINT
LINT 8 -9223372036854775808 to is selected as a default.
+9223372036854775807
(*)Limitation:
USINT 1 0 to +255 Only “-2147483648” expression is
not allowed 」
UINT 2 0 to +65535
UDINT 4 0 to +4294967295
ULINT 8 0 to +18446744073709551615
Basic Data Types
Classification Data type Size (Byte) Value range Example of method of
specifying Constants
(literal)

REAL type REAL 4 Significant digit number: Seven digits REAL#10#-12.0


-3.402823e+38 to -1.175494e-38
0
-1.175494e-38 to 3.402823e+38 If data type is not specified,
+∞/-∞ LREAL is selected as a default.

LREAL 8 Significant digit number: 15 digits


-1.79769313486231e+308 to
-2.22507385850720e-308
0
2.22507385850720e-308 to
1.79769313486231e+308
+∞/-∞

Duration type TIME 8 T#-9223372036854.775808ms to TIME#60s500ms , T#60s500ms


T#+9223372036854.775807ms T#16d5h3m4s
Date type DATE 8 D#1970-01-01 to D#2554-07-21 DATE#2010-12-3 ,D#1994-09-23

Time type TIME_OF_DAY 8 TOD#00:00:00.000000000 to TOD#12:16:28.12


TOD#23:59:59.999999999

Date and time DATE_AND_TIME 8 DT#1970-01-01-00:00:00.000000000 to DT#1994-09-23-12:16:28.12


type DT#2554-07-21-23:34:33.709551615

String type STRING 0 - 1985 The character code is UTF-8. ‘OMRON' ‘PLC'
Derivative Data Types

They are the data types that defines configuration based on basic data type.

The derivative data types defined in the IEC61131-3 are as follows. (Data types
supported by NJ series only. )
• Structure
• Enumeration
• Array
• Range specification
• Union (To be added to IEC61131-3 (3rd Edition)).
Structures
A structure handles two or more data of the same or different data types as one data.
Those are handled collectively as one data.

Structure Variable Box1

Structure “Box” Member


Height Structure Variable Box2
Member
Width Member
Height Height Structure Variable Box3
Depth
Width Member
Width
Height
Depth

Depth Width

Depth
Enumeration
The Enumeration is a derivative data type. It expresses the variable value of by a
characters called "Enumerator".

You have to set in advance the values that the variable can be as enumerators (or
characters).

Enumeration allows us to easily understand the meaning of variable values.

Data type definition


Array
An array is used to group plural data of the same attributes and handle them as one. It
can be specified for basic data types and derivative data types.
It is suitable for controlling two or more data that have the same concept like
coordinate values for Motion Control.
The table below shows the number of dimensions that can be specified for an array.

Classification Data type The greatest


number of
dimensions
Basic data type BOOL data type, Bit string type, Integer type, REAL numbers, Three-dimensional
Duration type, Date data type, Time data type, Date and time
data type, and String type
Derivative data type Structure, Union, and Enumeration Three-dimensional
POU Instance type One-dimensional
Range Specification
Range specification is used to limit the value ranges of variables in the following
integer types.

Classification Data type


Integer type SINT, INT, DINT, LINT, USINT, UINT, UDINT, ULINT

Range specification becomes effective in the following cases:


• When a constant attribute is specified.
• When the initial value of a variable is specified.
• When a value is written by the CIP message communications
Range Specification
What happens when a value is out of the range.
Case Conditions Error detection
User program Constants specification OK (An error will occur by a program check).
No Constants specification NG
Communication Writing from Integer type Variable OK (A command error will occur by a program
Sysmac Studio. check).
CIP message
communications Integer-type array Variable Aggregate NG
Member OK (A command error will occur by a program
check).
Member of Structure (integer type) OK (A command error will occur by a program
check).
Member of Structure Aggregate NG
(integer-type array Variable)
Member OK (A command error will occur by a program
check).
EtherNet/IP tag Writing to a single member with range OK (An error will occur).
data link specification
Writing to the Aggregate including members with NG
range specification
FINS message / All NG
Controller Link
data link
Unions
Union is a data type defined by NJ series. It allows access from plural different data
types to an identical data.

Example. Divide a WORD type data into its rightmost and leftmost bytes, and treat them as byte
data. Handles a WORD type data as a bit data.
System-defined Data Types
To improve user-friendliness, some Function Blocks (FB) and Functions (FUN) that are
prepared for NJ series uses derivative data types (Structure and Union) for its inputs
and outputs.

The data types defined by Omron for NJ are described under the following rules.
• Structure: starts with "_ s", and the subsequent characters are described in
upper cases.
• Union: starts with "_ e", and the subsequent characters are described in lower
cases.
• User can not create data type which start with underscore ‘_’.
Tasks
Tasks are used to specify user program execution and I/O refreshing in the CPU
Unit. They are also used to specify execution conditions and execution priorities.
(Here, I/O refreshing includes cyclic data exchange with EtherCAT slaves and CJ-
series Units.) Some tasks are executed periodically.
Kind Of Tasks
There are two kinds of tasks, as shown in the following table. They are
defined by their execution conditions and execution priorities.

Number of Task Execution


Type of Task Definition Main Processing Content
Task Priority

The primary periodic task is executed


once every task period. It has higher
I/O refreshing, user
Primary priority than any other task. Motion
1 4 (fixed) program execution, and
Periodic Task control and EtherCAT communications
motion control.
are executed on the primary periodic
task period.

The processing that can be


performed depends on
the task execution
Periodic The periodic tasks are executed once priority:
0 to 3 16, 17, or 18
Tasks every task period. •Execution priority 16: I/O
refreshing and user
program execution.
•Execution priority 17 o
Kind Of Tasks
The CPU Unit periodically executes both the primary periodic task and periodic
tasks. (The interval in which the CPU Unit executes the primary periodic task or a
periodic task is called the task period.)

From 1 to 128 programs can be assigned to one task. The programs that are
assigned to a task are executed in the order that they are assigned. Execution of
the all of the programs assigned to each task is called user program execution.
Exchanging data with CJ-series Units or EtherCAT slaves is called I/O refreshing.
You can assign I/O refreshing for each slave and Unit to the primary periodic task
or priority-16 periodic task. (By default, refreshing for all slaves and Units is
assigned to the primary periodic task.)
Tasks Periods
The task period of the Primary Periodic Task can be set to:
• 500 µs
• 1 ms
• 2 ms
• 4 ms

And the task period of each periodic task can be set to an integer multiple of the
task period of the Primary Periodic Task. Any of the following can be set.

Task period of the primary


Task periods that you can set for periodic tasks
periodic task

1 ms, 2 ms, 3 ms, 4 ms, 5 ms, 8 ms, 10 ms, 15 ms, 20 ms, 25 ms, 30 ms, 40 ms, 50 ms, 60
500 µs
ms, 75 ms, or 100 ms

1 ms, 2 ms, 3 ms, 4 ms, 5 ms, 8 ms, 10 ms, 15 ms, 20 ms, 25 ms, 30 ms, 40 ms, 50 ms, 60
1 ms
ms, 75 ms, or 100 ms

2 ms 2 ms, 4 ms, 8 ms, 10 ms, 20 ms, 30 ms, 40 ms, 50 ms, 60 ms, or 100 ms

4 ms 4 ms, 8 ms, 20 ms, 40 ms, 60 ms, or 100 ms


Task Execution Priority
The CPU Unit executes the task with
the highest execution priority first. If
the execution conditions are met for
another task with a higher execution
priority while a task is under
execution, the task with the higher
execution priority is given priority in
execution.

• The primary periodic task has the


highest execution priority. The
Controller executes it with a
higher priority than any other
task.
• There are three execution priority
levels for periodic tasks.
Overall Operation
Tasks operate with the task period of the primary periodic task (called the primary
period) as the standard period.

• The Controller executes a periodic task once during multiple primary periods.
For example, if the task period of the primary periodic task is set to 1 ms and
the task period of the priority-16 periodic task is set to 4 ms, the priority-16
periodic task is executed once while the primary periodic task is executed four
times.
• The primary periodic task and periodic tasks are processed during the task
periods even in PROGRAM mode. The user program is executed in RUN mode.
• I/O refreshing is executed according to the task periods.
• The CPU Unit executes system services, such as communications processing,
during the unused time between executions of all of the tasks.

In the next slide you can find examples of how the tasks operate in two different
cases: when there is only set a Primary Periodic Task and when four tasks (Primary
Periodic one and other three Periodic tasks) are set.
Overall Operation
Primary Periodic Task Only

* IO: Indicates I/O refreshing (data outputs and then data inputs).
Details on Primary Periodic Task
The primary periodic task has the highest execution priority. It executes processes
with high speed and high precision. In every period, this task performs system
common processing, I/O refreshing, user program execution, and motion control.
Unlike periodic tasks, the primary periodic task performs motion control
processing (MC).

*1: Task period The CPU Unit executes tasks in this fixed period. This is a preset, fixed time.
*2: Task execution time This is the actual time it takes from the point that the execution condition is met until execution is completed.
Details on Periodic Tasks
A periodic task executes its programs every task period, which is an integer multiple of
the primary period. You can use 0 to 3 periodic tasks. The priority-16 periodic task can
also refresh I/O and use motion control instructions. Processing for periodic tasks that
do not control I/O is different from processing for periodic tasks that do control I/O.

Periodic Tasks That Do Not Control I/O

* The Controller will temporarily interrupt the execution of a periodic task in order to execute a task with a higher execution priority.
Details on Periodic Tasks
Periodic Tasks That Control I/O

* The Controller will temporarily interrupt the execution of a periodic task in order to execute a task with a higher execution
priority.
Details System Services

System services are the processes other than task processing that the CPU Unit
executes. System services include the following processes:
• USB port service, like Processing of service requests
• Built-in EtherNet/IP port service, like Ethernet/IP Data Link Processing
• Service for CJ-series Special Units, like Execution of Communication
Instructions
• SD Memory Card service, like FTP Access or SD Card operations
• Self-diagnosis, i.e. Hardware Error Detection
System services are executed during the unused time between executions of all of the
tasks, as shown in the next slide.
Details System Services
You can use the Basic Settings in the Operation Settings of the Sysmac Studio to set the
execution time interval and execution time percentage of monitoring for system
services.
?
Any questions?
9 PLCopen
What PLCopen is
PLCopen is an international association aiming to
create a common programming standard based on the
IEC-61131-3.

The technical comitees are composed by motion


specialists from:
• Motion Control technology suppliers
• Big OEMs
• Big end Users

Omron is active member in PLCopen Motion Task


force (TC2) Comitee.
Why PLCOpen?
PLCOpen standard is created from the specialst experience from major motion
manufacturers: SIEMENS, OMRON, Schneider, Beckhoff, B&R, KUKA Robotics, etc…

PLCOpen standards are focused in application and real customer needs.

What can we find in the NJ5-Series Controller?:


• NJ Series implements PLCOpen for Motion Control.
• NJ Series also includes own OMRON technology Motion Functions, i.e. : (i.e.
MC_Movelink)
Motion Functions
Motion FB’s are used to request to the MC to perform several Motion Functions and
changes of the Axis State.

IEC User Program MC Module

Motion
FB 1
Axis
Axis States
Disabled In this state, the axis is not energized so cannot follow any profile
on it’s own.

Standstill In this state, the axis is energized, controlled and stopped (The MC
is not demmanding motion).

Stopping In this transition State axis is stopping motion until the Standstill
state is reached.
Example: MC_Stop

ErrorStop In this transition State axis is stopping due to error.

Homing In this state Axis is referencing to origin. In most of the cases it


implies motion.
Axis States
Discrete Motion In this state Axis is performing a motion profile that will start and
stop not depending on other axes. Normally it is a Point to Point
operation.

Example: A Relative or Absolute positioning, A Feed operation,


etc…
Continuous Motion In this state Axis is performing an endless motion profile

Example: MoveVelocity, TorqueControl,…

Synchronized Motion In this state Axis is electronically synchronized to a master axis.

Example: Gear, Cam, MoveLink,…


Axis States
The operation of an axis when motion control instructions are executed for it is
shown in the following figure. Motion control instructions are executed in
sequence and axes enter one of the states shown.
Motion Function Block Execution
EXECUTE These instructions will continue execution until one of the following status occurs.
(Rising Edge BOOL) • The specified operation is completed.
• Another motion control instruction is executed and interrupts operation.
• The instruction is restarted when Execute changes from FALSE to TRUE again.
Values for the other input variables are updated when Execute changes to TRUE.

Input Example: MC_Move_Relative


Execute

ENABLE • These motion control instructions execute every period while the input variable
(Enable BOOL) Enable to the motion control instruction is TRUE.
• As long as Enable is TRUE, the other input variables are also refreshed every
period.

Example: MC_Power
Input
Enable
Execute Type FB’s Basic Structure

FB

Axis

Busy Done Done


Execute
Busy
Aborted
Error Aborted
Error
Active
Done, Busy, Aborted and Error are mutally exclusive
Execute Type FB’s Basic Output Structure
• Will change to TRUE when the instruction ends operation normally or when the
commanded condition is reached.
Done • InGear (Gear Ratio Achieved) or InSync are specific variants for the Done Output in
some FB’s.

• The output variable CommandAborted will change to TRUE when another operation
Aborted instruction interrupts the commanded operation.

• The instruction instance will output an error when it is executed with an input
Error variable that is outside of the valid range.

• The output variable Busy is TRUE when the instruction instance is executing. Busy will
change to TRUE when the input variable Execute changes to TRUE. Busy will change to
Busy FALSE when the output variable Done, CommandAborted, or Error changes to TRUE.

• The output variable Active changes to TRUE when the function block instance obtains
permission to control the applicable axis. In non-buffered mode, the output variable
Active may change slower than the Busy variable. However, in buffered mode, the
Active variables may have different values.
Enable Type FB’s Basic Structure

FB

Axis
Busy Status
Enable Status
Busy
Error Aborted Aborted
Error
Active
Enable Type FB’s Basic Output Structure
Status • The “Enable” input is coupled to a “Valid” output. “Enable” is level sensitive,
and “Valid” shows that a valid set of outputs is available at the FB.
• The “Valid” output is TRUE as long as a valid output value is available and
the “Enable” input is TRUE.

Aborted • The output variable CommandAborted will change to TRUE when another
operation instruction interrupts the commanded operation.

Error • The instruction instance will output an error when it is executed with an
input variable that is outside of the valid range.

• The output variable Busy is TRUE when the instruction instance is executing.
Busy Busy will change to TRUE when the input variable Execute changes to TRUE.
Busy will change to FALSE when the output variable Done,
CommandAborted, or Error changes to TRUE
?
Any questions?

You might also like