Professional Documents
Culture Documents
Agenda
1 Introduction to Sysmac
Sysmac Brand
Omron has created the new Sysmac brand as a symbol of
Automation Systems’ customer-oriented activities.
High Quality
Reliability
Sysmac Brand
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.
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:
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)
End Unit
SD card Slot
Ethernet/IP Port
EtherCATPort
CPU Unit
Battery Slot
NJ Series
And here is a look from the inside.
Hard Real-Time
Operating System
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
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.
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.
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
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
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 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
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)
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)
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.)
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).
• 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-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.
• 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
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
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
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)
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.
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.
SMTP Client Step2 and later Not supported Not supported Not supported
FINS Supported(*2) Supported(*2) Supported Supported
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.
Input
EtherCAT Slave EtherCAT Slave
Controller Controller
How EtherCAT Works: Ethernet «On The Fly»
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 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
• Branching Connection
• 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
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
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.
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
Algorithm
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);
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:
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.
CPU Unit
User
User program
program (Or,
(Or, external
external
communicate).
communicate).
Variable
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.
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).
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.
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.
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
• 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.
* 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.
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
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
• 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?