NX_NJ_CPU unit software_User's Manual
NX_NJ_CPU unit software_User's Manual
NX_NJ_CPU unit software_User's Manual
NJ/NX-series
CPU Unit
Software
User’s Manual
NX701-17
NX701-16
NX1P2-11
NX1P2-10
NX1P2-90
NJ501-5
NJ501-4
NJ501-3
NJ301-12
NJ301-11
NJ101-10
NJ101-90 CPU Unit
W501-E1-20
NOTE
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in
any form, or by any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior
written permission of OMRON.
No patent liability is assumed with respect to the use of the information contained herein. Moreover, because
OMRON is constantly striving to improve its high-quality products, the information contained in this manual is
subject to change without notice. Every precaution has been taken in the preparation of this manual. Neverthe-
less, OMRON assumes no responsibility for errors or omissions. Neither is any liability assumed for damages
resulting from the use of the information contained in this publication.
Trademarks
• Sysmac and SYSMAC are trademarks or registered trademarks of OMRON Corporation in Japan and other
countries for OMRON factory automation products.
• Microsoft, Windows, Windows Vista, Excel, and Visual Basic are either registered trademarks or trademarks of
Microsoft Corporation in the United States and other countries.
• EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany.
• ODVA, CIP, CompoNet, DeviceNet, and EtherNet/IP are trademarks of ODVA.
Other company names and product names in this document are the trademarks or registered trademarks of their
respective companies.
Copyrights
Microsoft product screen shots reprinted with permission from Microsoft Corporation.
Introduction
Introduction
Thank you for purchasing an NJ/NX-series CPU Unit.
This manual contains information that is necessary to use the NJ/NX-series CPU Unit. Please read this
manual and make sure you understand the functionality and performance of the NJ/NX-series CPU
Unit before you attempt to use it in a control system.
Keep this manual in a safe place where it will be available for reference during operation.
Intended Audience
This manual is intended for the following personnel, who must also have knowledge of electrical sys-
tems (an electrical engineer or the equivalent).
• Personnel in charge of introducing FA systems.
• Personnel in charge of designing FA systems.
• Personnel in charge of installing and maintaining FA systems.
• Personnel in charge of managing FA systems and facilities.
For programming, this manual is intended for personnel who understand the programming language
specifications in international standard IEC 61131-3 or Japanese standard JIS B 3503.
Applicable Products
This manual covers the following products.
• NX-series CPU Units
• NX701-17
• NX701-16
• NX1P2-11
• NX1P2-111
• NX1P2-10
• NX1P2-101
• NX1P2-90
• NX1P2-901
Part of the specifications and restrictions for the CPU Units are given in other manuals. Refer to Rele-
vant Manuals on page 2 and Related Manuals on page 27.
Relevant Manuals
The following table provides the relevant manuals for the NJ/NX-series CPU Units.
Read all of the manuals that are relevant to your system configuration and application before you use
the NJ/NX-series CPU Unit.
Most operations are performed from the Sysmac Studio Automation Software. Refer to the Sysmac Stu-
dio Version 1 Operation Manual (Cat. No. W504) for information on the Sysmac Studio.
Manual
Basic information
Hardware User’s Manual
NX-series CPU Unit
Hardware User's Manual
NX-series NX1P2 CPU Unit
Hardware User’s Manual
NJ-series CPU Unit
Software User’s Manual
NJ/NX-series CPU Unit
Purpose of use
Manual
Basic information
*1 Refer to the NJ/NX-series Troubleshooting Manual (Cat. No. W503) for the error management concepts and an overview of the error
items. Refer to the manuals that are indicated with triangles for details on errors for the corresponding Units.
Manual Structure
Page Structure
The following page structure is used in this manual.
A step in a procedure 1 Join the Units so that the connectors fit exactly.
Hook
Indicates a procedure. Connector
Hook holes
Lock
Release
Slider
Manual name NJ-series CPU Unit Hardware User’s Manual (W500) 4-9
This illustration is provided only as a sample. It may not literally appear in this manual.
Special Information
Special information in this manual is classified as follows:
Additional Information
Additional information to read as required.
This information is provided to increase understanding or make operation easier.
Version Information
Information on differences in specifications and functionality for Controller with different unit versions
and for different versions of the Sysmac Studio is given.
Precaution on Terminology
In this manual, “download” refers to transferring data from the Sysmac Studio to the physical Controller
and “upload” refers to transferring data from the physical Controller to the Sysmac Studio.
For the Sysmac Studio, synchronization is used to both upload and download data. Here, “synchronize”
means to automatically compare the data for the Sysmac Studio on the computer with the data in the
physical Controller and transfer the data in the direction that is specified by the user.
1 10
2 11
Introduction to
1 NJ/NX-series Controllers 10 Communications Setup
3 12
CPU Unit Example of Actual
2 Operation 11 Application Procedures
4 A
I/O Ports, Slave
3 Configuration, and
Unit Configuration
12 Troubleshooting
5 I
7
5 Designing Tasks I Index
8
6 Programming
9
Checking Operation and
7 Actual Operation
9 Backup Functions
CONTENTS
Introduction ............................................................................................................... 1
Versions ................................................................................................................... 23
Terminology ............................................................................................................. 30
Section 6 Programming
6-1 Overview of Programming Procedures ................................................................................. 6-3
6-2 POUs (Program Organization Units)...................................................................................... 6-5
6-2-1 What Are POUs?......................................................................................................................... 6-5
6-2-2 Overview of the Three Types of POUs........................................................................................ 6-6
9-1-5 Relation Between the Different Types of Backup Functions and Data Groups......................... 9-10
9-1-6 Applicable Range of the Backup Functions .............................................................................. 9-11
9-2 SD Memory Card Backups.................................................................................................... 9-13
9-2-1 Backup (Controller to SD Memory Card) .................................................................................. 9-14
9-2-2 Restore (SD Memory Card to Controller) ................................................................................. 9-19
9-2-3 Verify (between Controller and SD Memory Card) ................................................................... 9-27
9-3 Disabling Backups to SD Memory Cards ............................................................................ 9-32
9-4 Automatic Transfers from SD Memory Cards ..................................................................... 9-33
9-5 Program Transfer from SD Memory Card ............................................................................ 9-35
9-6 Sysmac Studio Controller Backups..................................................................................... 9-42
9-6-1 Backup (Controller to Computer) .............................................................................................. 9-43
9-6-2 Restore (Computer to Controller) ............................................................................................. 9-44
9-6-3 Verify (between Controller and Computer) ............................................................................... 9-46
9-7 Importing and Exporting Sysmac Studio Backup File Data .............................................. 9-47
9-8 Sysmac Studio Variable and Memory Backup Functions.................................................. 9-48
9-8-1 Applicable Data for Sysmac Studio Variable and Memory Backup Functions .......................... 9-48
9-8-2 Using Sysmac Studio Variable and Memory Backup Functions ............................................... 9-48
9-8-3 Compatibility between CPU Unit Models .................................................................................. 9-49
9-9 Backup Functions When EtherCAT Slaves Are Connected............................................... 9-51
9-9-1 Backed Up EtherCAT Slave Data ............................................................................................. 9-51
9-9-2 Backup Support Depending on the Controller Status............................................................... 9-51
9-9-3 Conditions for Restoring EtherCAT Slave Data ........................................................................ 9-52
9-9-4 EtherCAT Slaves for Which You Can Back Up Data ................................................................. 9-53
9-10 Backup Functions When EtherCAT Slave Terminals Are Connected............................... 9-56
9-10-1 Backing Up Data in an EtherCAT Slave Terminal ..................................................................... 9-56
9-10-2 Backup Support Depending on the EtherCAT Slave Terminal Status....................................... 9-57
9-10-3 Conditions for Restoring EtherCAT Slave Terminal Data.......................................................... 9-57
9-11 Backup Functions When NX Units Are Connected ............................................................ 9-58
9-11-1 Backing Up Data in NX Units on the CPU Unit......................................................................... 9-58
9-11-2 Backup Support Depending on the Controller Status............................................................... 9-58
9-11-3 Conditions for Restoring NX Unit Data on the CPU Unit .......................................................... 9-59
9-12 Backup Functions When CJ-series Units Are Connected ................................................. 9-60
9-12-1 Backed Up CJ-series Unit Data ................................................................................................ 9-60
9-12-2 Backup Support Depending on the Controller Status............................................................... 9-60
9-12-3 Conditions for Restoring CJ-series Unit Data ........................................................................... 9-60
9-13 Backup-related Files ............................................................................................................. 9-62
9-13-1 Types of Backup-related Files................................................................................................... 9-62
9-13-2 Specifications of a Backup File................................................................................................. 9-63
9-13-3 Specifications of a Restore Command File............................................................................... 9-63
9-13-4 Specifications of an Automatic Transfer Command File ........................................................... 9-66
9-13-5 Specifications of a Controller Verification Results File.............................................................. 9-69
9-13-6 Specifications of an EtherCAT Verification Results File............................................................ 9-70
9-13-7 Specifications of an EtherCAT Slave Terminal Verification Results File ................................... 9-71
9-13-8 Specifications of an NX Unit Verification Results File............................................................... 9-72
9-13-9 Specifications of CJ-series Unit Verification Results File.......................................................... 9-73
9-14 Compatibility between Backup-related Files ...................................................................... 9-75
9-14-1 Compatibility between Backup Functions ................................................................................. 9-75
9-14-2 Compatibility between CPU Unit Models .................................................................................. 9-76
9-14-3 Compatibility between Unit Versions of CPU Units................................................................... 9-77
9-15 Functions That Cannot Be Executed during Backup Functions....................................... 9-78
Section 12 Troubleshooting
12-1 Operation after an Error ........................................................................................................ 12-2
12-1-1 Overview of NJ/NX-series Status.............................................................................................. 12-2
12-1-2 Fatal Errors in the CPU Unit...................................................................................................... 12-5
12-1-3 Non-fatal Errors in the CPU Unit ............................................................................................... 12-7
12-2 Troubleshooting................................................................................................................... 12-16
12-2-1 Checking to See If the CPU Unit Is Operating ........................................................................ 12-16
12-2-2 Troubleshooting Flowchart for Non-fatal Errors....................................................................... 12-18
12-2-3 Error Table............................................................................................................................... 12-19
12-2-4 Error Descriptions ................................................................................................................... 12-37
12-2-5 Troubleshooting Errors That Are Not in the CPU Unit............................................................. 12-99
Appendices
A-1 Specifications ..........................................................................................................................A-3
A-1-1 General Specifications ................................................................................................................A-3
A-1-2 Performance Specifications.........................................................................................................A-3
A-1-3 Function Specifications .............................................................................................................A-10
A-2 Calculating Guidelines for the Real Processing Times of Tasks for the NX701 System A-18
A-2-1 Calculating the Average Real Processing Times of Tasks ........................................................A-19
A-2-2 Example of Calculating the Average Real Processing Time of a Task and Setting the Task Period
..................................................................................................................................................A-26
A-3 Calculating Guidelines for the Real Processing Times of Tasks for the NX1P2 System A-29
A-3-1 Calculating the Average Real Processing Times of Tasks ........................................................A-30
A-3-2 Example of Calculating the Average Real Processing Time of a Task and Setting the Task Period
..................................................................................................................................................A-36
A-4 Calculating Guidelines for the Real Processing Times of Tasks for the NJ-series System
...............................................................................................................................................A-39
A-4-1 Calculating the Average Real Processing Times of Tasks ........................................................A-40
A-4-2 Example of Calculating the Average Real Processing Time of a Task and Setting the Task Period
..................................................................................................................................................A-50
Index
Warranties
Exclusive Warranty
Omron’s exclusive warranty is that the Products will be free from defects in materials and workman-
ship for a period of twelve months from the date of sale by Omron (or such other period expressed in
writing by Omron). Omron disclaims all other warranties, express or implied.
Limitations
OMRON MAKES NO WARRANTY OR REPRESENTATION, EXPRESS OR IMPLIED, ABOUT
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OF
THE PRODUCTS. BUYER ACKNOWLEDGES THAT IT ALONE HAS DETERMINED THAT THE
PRODUCTS WILL SUITABLY MEET THE REQUIREMENTS OF THEIR INTENDED USE.
Omron further disclaims all warranties and responsibility of any type for claims or expenses based
on infringement by the Products or otherwise of any intellectual property right.
Buyer Remedy
Omron’s sole obligation hereunder shall be, at Omron’s election, to (i) replace (in the form originally
shipped with Buyer responsible for labor charges for removal or replacement thereof) the non-com-
plying Product, (ii) repair the non-complying Product, or (iii) repay or credit Buyer an amount equal
to the purchase price of the non-complying Product; provided that in no event shall Omron be
responsible for warranty, repair, indemnity or any other claims or expenses regarding the Products
unless Omron’s analysis confirms that the Products were properly handled, stored, installed and
maintained and not subject to contamination, abuse, misuse or inappropriate modification. Return of
any Products by Buyer must be approved in writing by Omron before shipment. Omron Companies
shall not be liable for the suitability or unsuitability or the results from the use of Products in combi-
nation with any electrical or electronic components, circuits, system assemblies or any other materi-
als or substances or environments. Any advice, recommendations or information given orally or in
writing, are not to be construed as an amendment or addition to the above warranty.
Application Considerations
Suitability of Use
Omron Companies shall not be responsible for conformity with any standards, codes or regulations
which apply to the combination of the Product in the Buyer’s application or use of the Product. At
Buyer’s request, Omron will provide applicable third party certification documents identifying ratings
and limitations of use which apply to the Product. This information by itself is not sufficient for a com-
plete determination of the suitability of the Product in combination with the end product, machine, sys-
tem, or other application or use. Buyer shall be solely responsible for determining appropriateness of
the particular Product with respect to Buyer’s application, product or system. Buyer shall take applica-
tion responsibility in all cases.
NEVER USE THE PRODUCT FOR AN APPLICATION INVOLVING SERIOUS RISK TO LIFE OR
PROPERTY WITHOUT ENSURING THAT THE SYSTEM AS A WHOLE HAS BEEN DESIGNED TO
ADDRESS THE RISKS, AND THAT THE OMRON PRODUCT(S) IS PROPERLY RATED AND
INSTALLED FOR THE INTENDED USE WITHIN THE OVERALL EQUIPMENT OR SYSTEM.
Programmable Products
Omron Companies shall not be responsible for the user’s programming of a programmable Product, or
any consequence thereof.
Disclaimers
Performance Data
Data presented in Omron Company websites, catalogs and other materials is provided as a guide for
the user in determining suitability and does not constitute a warranty. It may represent the result of
Omron’s test conditions, and the user must correlate it to actual application requirements. Actual perfor-
mance is subject to the Omron’s Warranty and Limitations of Liability.
Change in Specifications
Product specifications and accessories may be changed at any time based on improvements and other
reasons. It is our practice to change part numbers when published ratings or features are changed, or
when significant construction changes are made. However, some specifications of the Product may be
changed without any notice. When in doubt, special part numbers may be assigned to fix or establish
key specifications for your application. Please consult with your Omron’s representative at any time to
confirm actual specifications of purchased Product.
Safety Precautions
Conformance to EU Directives
Applicable Directives
• EMC Directives
• Low Voltage Directive
Concepts
EMC Directive
OMRON devices that comply with EU Directives also conform to the related EMC standards so that
they can be more easily built into other devices or the overall machine. The actual products have
been checked for conformity to EMC standards.*
Whether the products conform to the standards in the system used by the customer, however, must
be checked by the customer. EMC-related performance of the OMRON devices that comply with EU
Directives will vary depending on the configuration, wiring, and other conditions of the equipment or
control panel on which the OMRON devices are installed. The customer must, therefore, perform
the final check to confirm that devices and the overall machine conform to EMC standards.
* Applicable EMC (Electromagnetic Compatibility) standards are as follows:
EMS (Electromagnetic Susceptibility): EN 61131-2
EMI (Electromagnetic Interference): EN 61131-2 (Radiated emission: 10-m regulations)
Conformance to EU Directives
The NJ/NX-series Controllers comply with EU Directives. To ensure that the machine or device in
which the NJ/NX-series Controller is used complies with EU Directives, the Controller must be
installed as follows:
• The NJ/NX-series Controller must be installed within a control panel.
• You must use the power supply in SELV specifications for the DC power supplies connected to
DC Power Supply Units and I/O Units.
• NJ/NX-series Controllers that comply with EU Directives also conform to the Common Emission
Standard (EN 61000-6-4). Radiated emission characteristics (10-m regulations) may vary
depending on the configuration of the control panel used, other devices connected to the control
panel, wiring, and other conditions.
You must therefore confirm that the overall machine or equipment complies with EU Directives.
Conformance to KC Standards
Observe the following precaution if you use NX-series Units in Korea.
Noise Filter
Manufacturer Model
Cosel Co., Ltd. TAH-06-683
Versions
Hardware revisions and unit versions are used to manage the hardware and software in NJ/NX-series
Units and EtherCAT slaves. The hardware revision or unit version is updated each time there is a
change in hardware or software specifications. Even when two Units or EtherCAT slaves have the
same model number, they will have functional or performance differences if they have different hard-
ware revisions or unit versions.
Checking Versions
You can check versions on the ID information indications or with the Sysmac Studio.
ID information indication
Note The hardware revision is not displayed for the Unit that the hardware revision is in blank.
MAC address
PORT1 :
PORT2 :
Hardware
Unit version Ver.1. HW Rev. revision
LOT No. DDMYY xxxx
ID information indication
Note The hardware revision is not displayed for the Unit that the hardware revision is in blank.
ID information indication
1 Right-click CPU Rack under Configurations and Setup - CPU/Expansion Racks in the Multiv-
iew Explorer and select Production Information.
The Production Information Dialog Box is displayed.
2 Right-click any open space in the Unit Editor and select Production Information.
The Production Information Dialog Box is displayed.
1 Click the Show Detail or Show Outline Button at the lower right of the Production Information
Dialog Box.
The view will change between the production information details and outline.
The information that is displayed is different for the Outline View and Detail View. The Detail
View displays the unit version, hardware version, and software versions. The Outline View dis-
plays only the unit version.
Note The hardware revision is separated by "/" and displayed on the right of the hardware version. The hardware
revision is not displayed for the Unit that the hardware revision is in blank.
1 Double-click EtherCAT under Configurations and Setup in the Multiview Explorer. Or, right-
click EtherCAT under Configurations and Setup and select Edit from the menu.
The EtherCAT Tab Page is displayed.
2 Right-click the master on the EtherCAT Tab Page and select Display Production Information.
The Production Information Dialog Box is displayed.
The unit version is displayed after “Rev.”
1 Click the Show Detail or Show Outline Button at the lower right of the Production Information
Dialog Box.
The view will change between the production information details and outline.
Related Manuals
The followings are the manuals related to this manual. Use these manuals for reference.
Terminology
Term Description
absolute encoder home offset This data is used to restore in the CPU Unit the actual position of a Servo Drive with
an absolute encoder. The offset is the difference between the command position
after homing and the absolute data that is read from the absolute encoder.
array specification One of the variable specifications. An array variable contains multiple elements of
the same data type. The elements in the array are specified by serial numbers
called subscripts that start from the beginning of the array.
AT One of the attributes of a variable.
This attribute allows the user to specify what is assigned to a variable. An I/O port
or an address in memory used for CJ-series Units can be specified.
axes group A functional unit that groups together axes within the Motion Control Function Mod-
ule.
Axes Group Variable A system-defined variable that is defined as a structure and provides status infor-
mation and some of the axes parameters for an individual axes group.
An Axes Group Variable is used to specify an axes group for motion control instruc-
tions and to monitor the command interpolation velocity, error information, and
other information for the axes group.
axis A functional unit within the Motion Control Function Module. An axis is assigned to
the drive mechanism in an external Servo Drive or the sensing mechanism in an
external Encoder Input Slave Unit.
Axis Variable A system-defined variable that is defined as a structure and provides status infor-
mation and some of the axis parameters for an individual axis.
An Axis Variable is used to specify an axis for motion control instructions and to
monitor the command position, error information, and other information for the axis.
basic data type Any of the data types that are defined by IEC 61131-3.
They include Boolean, bit string, integer, real, duration, date, time of day, date and
time, and text string data types.
"Basic data type" is used as opposed to derivative data types, which are defined by
the user.
cam data variable A variable that represents the cam data as a structure array.
A cam data variable is an array structure that consists of phases and displace-
ments.
CJ-series Unit Any of the CJ-series Units that can be used with an NJ-series Controller.
Communications Coupler Unit The generic name of an interface unit for remote I/O communications on a network
between NX Units and a host network master. For example, an EtherCAT Coupler
Unit is a Communications Coupler Unit for an EtherCAT network.
Constant One of the attributes of a variable.
If you specify the Constant attribute for a variable, the value of the variable cannot
be written by any instructions, ST operators, or CIP message communications.
Controller The range of devices that are directly controlled by the CPU Unit.
In the NX-series System, the Controller includes the CPU Rack and EtherCAT
slaves (including general-purpose slaves and Servo Drives).
In the NJ-series System, the Controller includes the CPU Rack, Expansion Racks,
and EtherCAT slaves (including general-purpose slaves and Servo Drives).
Controller error Errors that are defined by the NJ/NX-series System.
“Controller error” is a collective term for major fault level, partial fault level, minor
fault level, and observation Controller events.
Controller event One of the events in the NJ/NX-series System. Controller events are errors and
information that are defined by the system for user notification. A Controller event
occurs when the system detects a factor that is defined as a Controller event.
Controller information Information that is defined by the NJ/NX-series System that is not an error. It rep-
resents an information Controller event.
CPU Unit The Unit that serves as the center of control for a Machine Automation Controller.
The CPU Unit executes tasks, refreshes I/O for other Units and slaves, etc. The
NJ/NX-series CPU Units include the NX701-, NX1P2-, NJ501-
and NJ301-.
Term Description
derivative data type A data type that is defined by the user. Structures, unions, and enumerations are
derivative data types.
device A general term for any Unit or slave that is refreshed by the I/O refreshing that is
performed by the CPU Unit. Specifically, it refers to EtherCAT slaves, NX Units on
the CPU Unit, built-in I/O, Option Boards, and CJ-series Units.
device output An output for any Unit or slave that is refreshed by the I/O refreshing that is per-
formed by the CPU Unit.
device variable A variable that is used to access a specific device through an I/O port.
download To transfer data from the Sysmac Studio to the Controller with the synchronization
operation of the Sysmac Studio.
edge One of the attributes of a variable.
This attribute makes a BOOL variable pass TRUE to a function block when the vari-
able changes from FALSE to TRUE or when it changes from TRUE to FALSE.
enumeration One of the derivative data types. This data type takes one item from a prepared
name list of enumerators as its value.
enumerator One of the values that an enumeration can take expressed as a character string.
The value of an enumeration is one of the enumerators.
EtherCAT Master Function Module One of the function modules. This function module controls the EtherCAT slaves as
the EtherCAT master.
EtherNet/IP Function Module One of the function modules. This function module controls the built-in EtherNet/IP
port.
event log A function that recognizes and records errors and other events.
Event Setup Settings that define user-defined errors and user-defined information.
event task A task that executes a user program only once when the task execution conditions
are met.
FB An acronym for "function block."
forced refreshing Forcing the refreshing of an input from an external device or an output to an exter-
nal device, e.g., when the user debugs a program.
Addresses that are subject to forced refreshing can still be overwritten from the
user program.
FUN An abbreviation for "function."
function A POU that is used to create an object that determines a unique output for the
same input, such as for data processing.
function block A POU that is used to create an object that can have a different output for the same
input, such as for a timer or counter.
function module One of the functional units of the software configuration of the CPU Unit.
general-purpose slave Any of the EtherCAT slaves that cannot be assigned to an axis.
global variable A variable that can be read or written from all POUs (programs, functions, and func-
tion blocks).
I/O map settings Settings that assign variables to I/O ports. Assignment information between I/O
ports and variables.
I/O port A logical interface that is used by the CPU Unit to exchange data with an external
device (slave or Unit).
I/O refreshing Cyclic data exchange with external devices that is performed with predetermined
memory addresses.
information One of the event levels for Controller events or user-defined events. These are not
errors, but appear in the event log to notify the user of specific information.
Initial Value One of the attributes of a variable. The variable is set to the initial value in the fol-
lowing situations.
• When power is turned ON
• When the CPU Unit changes to RUN mode
• When you specify to initialize the values when the user program is transferred
• When a major fault level Controller error occurs
inline ST ST programming that is included within a ladder diagram program.
instruction The smallest unit of the processing elements that are provided by OMRON for use
in POU algorithms. There are ladder diagram instructions (program inputs and out-
puts), function instructions, function block instructions, and ST statements.
Term Description
literal A constant expression that is used in a user program.
local variable A variable that can be accessed only from inside the POU in which it is defined.
“Local variable” is used as opposed to “global variable.”
Local variables include internal variables, input variables, output variables, in-out
variables, and external variables.
main memory The memory inside the CPU Unit that is used by the CPU Unit to execute the OS
and user program.
major fault level Controller error An error for which all NJ/NX-series Controller control operations stop. The CPU
Unit immediately stops user program execution and turns OFF the loads for all
slaves and Units (including remote I/O).
MC Test Run A function to check motor operation and wiring from the Sysmac Studio.
memory used for CJ-series Units One type of I/O memory in an NX1P2 CPU Unit and NJ-series CPU Unit. It contains
addresses that can be directly specified by the user.
It can be accessed only with variables with an AT attribute. This memory is used to
access CJ-series Units and CJ-series networks.
However, you cannot connect the CJ-series Units to the NX1P2 CPU Units.
minor fault level Controller error An error for which part of the control operations for one of the function modules in
the NJ/NX-series Controller stop.
An NJ/NX-series CPU Unit continues operation even after a minor fault level Con-
troller error occurs.
Motion Control Function Module One of the function modules. The MC Function Module performs motion control
based on commands from the motion control instructions that are executed in the
user program.
motion control instruction A function block instruction that executes motion control.
The Motion Control Function Module supports instructions that are based on func-
tion blocks for PLCopen® motion control as well as instructions developed specifi-
cally for the Motion Control Function Module.
namespace A system that is used to group and nest the names of functions, function block defi-
nitions, and data types.
Network Publish One of the attributes of a variable.
This attribute allows you to use CIP message communications or tag data links to
read/write variables from another Controller or from a host computer.
NX bus The NX-series internal bus. An NX1P2 CPU Unit has the NX bus.
NX Units Any of the NX-series Units that perform I/O processing with connected external
devices. The Communications Coupler Units are not included with the NX Units.
observation One of the event levels for Controller events or user-defined events.
These are minor errors that do not affect control operations, but appear in the event
log to notify the user of specific information.
partial fault level Controller error An error for which all of the control operations for one of the function modules in the
NJ/NX-series Controller stop.
An NJ/NX-series CPU Unit continues operation even after a partial fault level Con-
troller error.
PDO communications An abbreviation for process data communications. Data is exchanged between the
master and slaves on a process data communications cycle. (The process data
communications cycle is the same as the task period of the primary periodic task.)
periodic task A task for which user program execution and I/O refreshing are performed each
period.
PLC Function Module One of the function modules. 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.
POU An acronym for "program organization unit." A POU is a unit in a program execution
model that is defined in IEC 61131-3.
A POU contains an algorithm and a local variable table and forms the basic unit
used to build a user program.
There are three types of POUs: programs, functions, and function blocks.
primary periodic task The task with the highest priority.
Term Description
process data communications One type of EtherCAT communications in which process data objects (PDOs) are
used to exchange information cyclically and in realtime. Process data communica-
tions are also called PDO communications.
program Along with functions and function blocks, one of the three types of POUs.
Programs are assigned to tasks to execute them.
Range Specification One of the variable specifications. You can specify a range for a variable in
advance. The variable can take only values that are in the specified range.
Retain One of the attributes of a variable. The values of variables with a Retain attribute
are held at the following times. (Variables without a Retain attribute are set to their
initial values.)
• When power is turned ON after a power interruption
• When the CPU Unit changes to RUN mode
• When you specify to not initialize the values when the user program is transferred
SDO communications One type of EtherCAT communications in which service data objects (SDOs) are
used to transmit information whenever required.
Servo Drive/encoder input slave Any of the EtherCAT slaves that is assigned to an axis. In the NJ/NX-series Sys-
tem, it would be a Servo Drive or Encoder Input Slave Unit.
slave A device that performs remote I/O for a master.
slave and Unit configurations A generic term for the EtherCAT configuration and Unit configuration.
Slave Terminal A building-block remote I/O terminal to which a Communications Coupler Unit and
NX Units are mounted. A Slave Terminal is one type of slave.
Special Unit Setup A generic term for the settings for a Special Unit, including the settings in allocated
DM Area words.
structure One of the derivative data types. It consists of multiple data types placed together
into a layered structure.
synchronization A function that automatically compares the information in the NJ/NX-series Control-
ler with the information in the Sysmac Studio, displays any differences and loca-
tions in a hierarchical form, and can be used to synchronize the information.
Sysmac Studio A computer software application for setting, programming, debugging, and trouble-
shooting NJ/NX-series Controllers. It also provides operations for motion control
and a Simulator.
system common processing System processing that is performed by the CPU Unit to perform I/O refreshing and
the user program execution within a task. Exclusive control of variables between
tasks, data trace processing, and other processing is performed.
system service Processing that is performed by the CPU Unit in unused time between task pro-
cessing. The system service includes communications processing, SD Memory
Card access processing, self-diagnosis processing, and other processing.
system-defined variable A variable for which all attributes are defined by the system and cannot be changed
by the user.
task An attribute that defines when a program is executed.
task period The interval at which the primary periodic task or a periodic task is executed.
union One of the derivative data types. It allows you to handle the same data as different
data types.
Unit A device that mounts to the CPU Rack or an Expansion Rack. In NJ/NX-series
manuals, it refers to CJ-series Units.
Unit configuration The configuration information for the Units that are set on the Sysmac Studio. This
information tells what Unit models are connected to the CPU Unit and where they
are connected.
upload To transfer data from the Controller to the Sysmac Studio with the synchronization
operation of the Sysmac Studio.
user program All of the programs in one project.
user-defined event One of the events in the NJ/NX-series System. These events are defined by the
user. “User-defined events” is a generic term for user-defined errors and user-
defined information.
user-defined variable A variable for which all of the attributes are defined by the user and can be changed
by the user.
Term Description
variable A representation of data, such as a numeric value or character string, that is used in
a user program.
You can change the value of a variable by assigned the required value. “Variable” is
used as opposed to “constant,” for which the value does not change.
variable memory A memory area that contains the present values of variables that do not have AT
specifications. It can be accessed only with variables without an AT attribute.
Revision History
A manual revision code appears as a suffix to the catalog number on the front and back covers of the
manual.
Introduction to NJ/NX-series
Controllers
This section describes the features, basic system configuration, specifications, and
overall operating procedure of an NJ/NX-series Controller.
Sysmac Studio
Automation Software
IEC programming
1-1-1 Features
Hardware Features
Standard-feature EtherCAT Control Network Support
All CPU Units provide an EtherCAT master port for EtherCAT communications. EtherCAT is an
advanced industrial network system that achieves faster, more-efficient communications. It is based
on Ethernet. Each node achieves a short fixed communications cycle time by transmitting Ethernet
frames at high speed. The standard-feature EtherCAT control network allows you to connect all of
the devices required for machine control (e.g., I/O systems, Servo Drives, Inverters, and machine
vision) to the same network.
Version Information
A CPU Unit with unit version 1.06 or later and Sysmac Studio version 1.07 or higher are required
to use the NX-series Safety Control Units. 1
1-1-1 Features
The NX1P2 CPU Units allow you to mount NX-series Digital I/O Units, Analog I/O Units and other
Units on the CPU Unit, in addition to EtherCAT network slaves.
Parallel Execution of Tasks with a Multi-core Processor (Only for the NX701 and NX1P2)
The NX701- CPU Unit has a multi-core processor that can execute more than one task in
parallel. This enables high-speed control of even large-scale devices including an improvement of
communications performance for large capacity data.
The NX1P2- CPU Unit has a multi-core processor that can execute the tasks, tag data
link service, and system services in parallel. This secures communications performance with the
Sysmac Studio, an HMI, or other devices.
Software Features
Integrated Sequence Control and Motion Control
An NJ/NX-series CPU Unit can perform both sequence control and motion control. You can simulta-
neously achieve both sequence control and multi-axes synchronized control. Sequence control,
motion control, and I/O refreshing are all executed in the same control period. The same control
period is also used for the process data communications cycle for EtherCAT. This enables precise
sequence and motion control in a fixed period with very little deviation.
Multitasking
You assign I/O refreshing and programs to tasks and then specify execution conditions and execu-
tion order for them to flexibly combine controls that suit the application.
Support Software
Peripheral USB port
Sysmac Studio
NX-series Controller
Power
Supply Unit CPU Unit
LAN USB
Or
EtherNet/IP
EtherCAT Network
Configuration
Built-in EtherNet/IP port EtherCAT
Built-in EtherCAT port
Servo Drive/encoder
Slave Terminal General-purpose slaves
input slaves
Additional Information
You can connect the Sysmac Studio directly to the Communications Coupler Unit to set up the
Slave Terminal. Refer to the NX-series EtherCAT Coupler Units User’s Manual (Cat. No. W519)
for details.
Network Configurations
• Host computers, HMIs, and other NJ/NX-series Controllers are connected to the built-in Ether-
Net/IP port.
• An NX701 CPU Unit has two EtherNet/IP ports.
EtherNet/IP
HMI
Support Software
You can use the following Support Software to set up, monitor, and debug an NX701 CPU Unit.
• Sysmac Studio
The Sysmac Studio is the main Support Software that you use for an NX701 CPU Unit. 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 Stan-
dard Edition.
NX Unit
Support Software Configuration
NX-series NX1P2
CPU Unit
LAN
EtherNet/IP
NX Units
Built-in EtherCAT port
CPU Rack
EtherCAT Network
EtherCAT
Configuration
Servo Drive/encoder
Slave Terminal input slaves General-purpose slaves
Additional Information
You can connect the Sysmac Studio directly to the Communications Coupler Unit to set up the
Slave Terminal. Refer to the NX-series EtherCAT Coupler Units User’s Manual (Cat. No. W519)
for details.
Network Configurations
• Host computers, HMIs, and other NJ/NX-series Controllers are connected to the built-in Ether-
Net/IP port.
EtherNet/IP
NX-series
NX1P2
CPU Unit
Serial-communications devices
Support Software
You can use the following Support Software to set up, monitor, and debug an NX1P2 CPU Unit.
• Sysmac Studio
The Sysmac Studio is the main Support Software that you use for an NX1P2 CPU Unit. 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 Stan-
dard Edition.
Support Software
The Support Software is connected to the peripheral USB port on the CPU Unit with a commercially
available USB cable. You can also connect it through an Ethernet cable that is connected to the
built-in EtherNet/IP port.
Refer to 10-2 Connection with Sysmac Studio for details on the connection configuration of the Sup-
port Software.
LAN USB
Or
CPU Rack
EtherNet/IP
EtherCAT Network
Configuration
Built-in EtherNet/IP port EtherCAT
Additional Information
You can connect the Sysmac Studio directly to the Communications Coupler Unit to set up the
Slave Terminal. Refer to the NX-series EtherCAT Coupler Units User’s Manual (Cat. No. W519)
for details.
Network Configurations
• Host computers, HMIs, and other NJ-series Controllers are connected to the built-in EtherNet/IP
port or to a CJ1W-EIP21 EtherNet/IP Unit.
• A DeviceNet network is connected to a DeviceNet Unit. A CompoNet network is connected to a
CompNet Unit. A serial communications network is connected to a Serial Communications Unit.
Host computer HMI NJ-series Controller
EtherNet/IP
EtherNet/IP Unit
CompoNet
Built-in EtherNet/IP port
MS NS WORD NODE ADR 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 MS NS WORD NODE ADR 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
CRT1 OD16
CRT1-OD16 OD16
CRT1-OD16
CRT1
REMOTE TERMINAL REMOTE TERMINAL
Serial General-purpose
device with serial
DeviceNet Unit communications
DeviceNet
Support Software
You can use the following Support Software to set up, monitor, and debug an NJ-series Controller.
• Sysmac Studio
The Sysmac Studio is the main Support Software that you use for an NJ-series Controller. 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 Stan-
dard Edition.
Note Items that are marked with asterisks in the table are improvements that were made during version upgrades. Refer to A-
14 Version Information for NX-series Controllers and A-15 Version Information for NJ-series Controllers for information
on version upgrades.
Step 4. Wiring
Connect the network cables and wire the I/O.
Step 1-1 • External I/O devices and Unit configuration NX-series CPU Unit Hard-
Designing I/O and • Refresh periods for external devices ware User’s Manual (Cat. 1
Processing • Program contents No. W535)
NX-series NX1P2 CPU Unit
Hardware User's Manual
Step 1-3
Designing Pro-
grams
Variable Design • Defining variables that you can use in more than one POU and 6-3 Variables
variables that you use in only specific POUs
• Defining the variables names for the device variables that you use
to access slaves and Units
• Defining the attributes of variables, such as the Name and Retain
attributes
• Designing the data types of variables
Project Creation 1. Create a project in the Sysmac Studio. New Project Button Sysmac Studio Version 1
2. Insert a Controller. Insert − Controller Operation Manual (Cat. No.
W504)
The following Controller Configurations and Setup and the Programming and Task Settings can be performed in either
order.
Step 2-1
Slave and Unit
Configurations
1) Creating the Slave 1. Creating the slave configuration and EtherCAT Slave Set- 3-2-1 Creating the EtherCAT
and Unit Configura- Unit configuration either offline or ting Editor Slave Configuration
tions online. (For online configuration, make Unit Editor 3-2-2 Creating the Unit Con-
the online connection that is described
figuration
in step 5.)
2. Setting up any Slave Terminals that are NX-series EtherCAT Cou-
used. pler Unit User’s Manual
(Cat. No. W519)
2) Assigning Device Registering device variables in variable I/O Map 3-3 I/O Ports and Device
Variables to I/O Ports tables (Variable names are user defined or Variables
automatically created.)
3) Creating the Axes Creating the axes and setting them as real Configurations and 3-5 Creating the Axes and
and Assigning Them axes or virtual axes. Creating axes groups Setup − Motion Con- Assigning Them to the
to the Servo to perform interpolated axes control. trol Setup Servo Drives/Encoder Input
Drive/Encoder Input Slaves/NX Units
Slaves
Setting the initial values for the PLC Configurations and 4-2 Initial Settings for the
Function Module Setup − Controller PLC Function Module
Setup − Operation
Settings
(For NJ-series CPU Units) Configurations and 4-4 Initial Settings for Spe-
Initial settings for Special Units Setup − CPU/Expan- cial Units
sion Racks
(To use motion control) Configurations and 4-5 Initial Settings for the
Setting the initial settings for the Setup − Motion Con- Motion Control Function
Motion Control Function Module trol Setup Module
Setting the initial values for the Ether- Configurations and 4-6 Initial Settings for the
CAT Function Module Setup − EtherCAT EtherCAT Master Function
Module
Setting the initial values for the Ether- Configurations and 4-7 Initial Settings for the
Net/IP Function Module Setup − Controller EtherNet/IP Function Mod-
Setup − Built-in Ether- ule
Net/IP Port Settings
Step 2-3
Programming
1) Registering Vari- • Registering the variables used by more Global Variable Table Sysmac Studio Version 1
ables than one POU in the global variable Editor Operation Manual (Cat. No.
table with Sysmac Studio W504)
Local Variable Table
• Registering the local variable table for Editor 6-3 Variables
each program
• Registering the local variable table for
each function block and function
2) Writing Algorithms Writing the algorithms for the POUs (pro- Programming Editor Section 6 Programming
for POUs grams, function blocks, and functions) in NJ/NX-series Instructions
the required languages Reference Manual (Cat. No.
W502) and NJ/NX-series
Motion Control Instructions
Reference Manual (Cat. No.
W508)
3) Setting the Tasks Making task settings Configurations and 4-2-3 Task Settings
Setup − Task Settings
Step 2-4 Checking the algorithms and task execu- Section 7 Checking Opera-
Offline Debugging tion times on the Simulator (virtual control- tion and Actual Operation
ler)
2. Setting Hard- • Setting the node addresses of the EtherCAT slaves Operation manuals for the
ware • Setting unit numbers on the rotary switches on the front of the Spe- EtherCAT slaves and Spe-
cial Units cial Units
1. Connecting • Connecting the built-in EtherCAT port NX-series CPU Unit Hard-
• Connecting the built-in EtherNet/IP port ware User’s Manual (Cat.
Ethernet Cable
No. W535)
NX-series NX1P2 CPU Unit
Hardware User's Manual
(Cat. No. W578) 1
NJ-series CPU Unit Hard-
ware User’s Manual (Cat.
2. Wiring I/O • Wiring I/O to EtherCAT slaves Operation manuals for the
• Wiring Basic I/O Units and Special Units EtherCAT slaves
NX-series CPU Unit Hard-
ware User’s Manual (Cat.
No. W535)
NX-series NX1P2 CPU Unit
Hardware User's Manual
(Cat. No. W578)
NJ-series CPU Unit Hard-
ware User’s Manual (Cat.
No. W500)
1. Online Connec- Turn ON the power supply to the Control- Controller − Commu- Section 7 Checking Opera-
ler and place the Sysmac Studio online. nications Setup tion and Actual Operation
tion to Sysmac Stu-
Then, download the project.*
dio and Project Controller − Synchro-
(Perform this step before you create the
Download slave configuration or Unit configuration
nization
from the mounted Units in step 2-1.)
2. Operation Check 1. Check the wiring by using forced Section 7 Checking Opera-
refreshing of real I/O from the I/O Map tion and Actual Operation
on Controller
or Watch Tab Page.
2. For motion control, use the MC Test
Run operations in PROGRAM mode to
check the wiring. Then check the motor
rotation directions for jogging, travel
distances for relative positioning (e.g.,
for electronic gear settings), and hom-
ing operation.
3. Change the Controller to RUN mode
and check the operation of the user
program.
* Use the Synchronize Menu of the Sysmac Studio to download the project.
The CPU Unit also contains settings, the user program, variables, and other data. The CPU Unit uses
this data to perform processing. Of this data, variables are used to access the CPU Unit and I/O, and
for external communications.
The internal software and the use of variables for I/O access enable the CPU Unit to execute both
sequence control and motion control.
NJ/NX-series CPU Unit
Software Data
Settings
User program execution
Accessing I/O
Sequence control User program
CJ-series Units
Other Controllers,
host computers, etc.
External communications
Note You can use CJ-series Units only with NJ-series CPU Units.
Note You can use NX Units on the CPU Unit, built-in I/O, and Analog I/O Option Boards only with the NX1P2 CPU
Units.
This section describes the following items to provide you with a basic understanding of how the CPU
Unit performs sequence control and motion control.
Item Reference
Software P.2-4
Accessing I/O P.2-11
Sequence control and motion control P.2-27
Overview of CPU Unit data P.2-34
Operation for CPU Unit status P.2-35
Refer to the following manuals for details on the use of variables for external communications.
Communications Manual
EtherNet/IP • For information on using variables with the built-in EtherNet/IP port, refer to the
NJ/NX-series CPU Unit Built-in EtherNet/IP Port User’s Manual (Cat. No. W506).
• For information on using variables with an EtherNet/IP Unit, refer to the CJ-series
EtherNet/IP Units Operation Manual for NJ-series CPU Unit (Cat. No. W495).
Serial communica- CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit
tions (Cat. No. W494)
2
2-1-2 Overview of Operation According to CPU Unit Status
2-2 Software
This section describes the software configuration of the CPU Unit, and how the software components
operate.
2-2 Software
cessing Unit
Initialization Startup state Initialization is performed only when Self diagnosis at startup
the power supply is turned ON.
Processing executed Normal operation The processing is executed within User program execution
with tasks and error states the assigned task. These tasks are and I/O refreshing
executed either periodically or only
once when the specified condition 2
is met.
Tag data link service These services are performed only Tag data links
Refer to 2-7-1 CPU Unit Status for information on the CPU Unit status.
Initialization
Initialization is performed only when the power supply is turned ON.
The following processing is performed for initialization.
Processing Description
Self diagnosis at startup Operation is monitored for the following errors: Power Supply
Error, CPU Unit Reset, CPU Unit Watchdog Timer Error, and
Incorrect Power Supply Unit Connected.*1
Data check The _RetainFail (Retention Failure Flag) system-defined variable
changes to TRUE at the following time: when the values of vari-
ables for which the Retain attribute was set to retain the values
and the values in DM, EM, and HR Areas in the memory used for
CJ-series Units*2 were not retained after a power interruption.
Detecting NX Units*3 The NX Units mounted in the Controller are detected.
Detecting CJ-series Units*4 The CJ-series Units mounted in the Controller are detected.
Recording Power Turned ON and Power The Power Turned ON and Power Interrupted events are
Interrupted events recorded.
*1 Refer to 12-1-2 Fatal Errors in the CPU Unit for information on the following errors: Power Supply Error, CPU
Unit Reset, CPU Unit Watchdog Timer Error, and Incorrect Power Supply Unit Connected.
*2 You can use memory for CJ-series Units only with NJ-series CPU Units and NX1P2 CPU Units.
*3 You can use NX Units on the CPU Unit only with the NX1P2 CPU Units.
*4 You can use CJ-series Units only with NJ-series CPU Units.
Task Operation
Processing is assigned to tasks. There are three kinds of tasks, as shown in the following table.
They are defined by their execution priorities and execution conditions.
Execution priority
Type of peri- Main processing con-
(smaller values indicate higher pri- Execution condition
odic task tent
ority)
Primary periodic 4 The primary periodic I/O refreshing, user
task This task has the highest execution task is periodically exe- program execution,
priority. cuted. and motion control
Periodic tasks 5*1 The periodic task is I/O refreshing, user
periodically executed. program execution,
This task has the next highest execu-
The task period is an and motion control
tion priority after the primary periodic
task. integer multiple of the
task period of the pri-
mary periodic task.
16*2, 17, or 18 The periodic task is The processing that
periodically executed. can be performed
The task period is an depends on the task
integer multiple of the execution priority.
task period of the pri- Execution priority 16:
mary periodic task. I/O refreshing and user
program execution
Execution priority 17 or
18: User program exe-
cution
Event tasks 8 or 48 An event task is exe- User program execu-
cuted only once when tion
the specified condition
is met.
*1 You can use the priority-5 periodic task only with the NX701 CPU Units.
*2 You cannot use the priority-16 periodic task with the NX1P2 CPU Units.
The CPU Unit executes the task with the highest execution priority first. The following operation
example is for the primary periodic task and a periodic task. If the primary periodic task is ready for
execution while a periodic task is in execution, execution of the primary periodic task is prioritized.
2-2 Software
Primary Task Task Task
periodic task
Task period of periodic task Task period of periodic task
Task Task
Processing
Command
Motion control instruction
Note The CPU Unit executes motion control in the primary periodic task and in the priority-5 periodic task.
Refer to 5-11-3 System Input and Output Response Times for details.
Additional Information
With an NX701 CPU Unit, you can execute motion control in the primary periodic task and in the
priority-5 periodic task. If these two motion controls need to be identified, the motion control in
the primary periodic task is called motion control 1, while the motion control in the priority-5 peri-
odic task is called motion control 2.
The tag data link service is executed with a priority that is between the execution
priorities of the priority-16 periodic task and the priority-17 periodic task.
The tag data link service for an NX-series CPU Unit is executed in parallel with the execution of
tasks.
For details on the tag data link service, refer to 5-6 Services Other Than Tasks.
2-2 Software
Note The option board service is executed only by an NX1P2 CPU Unit.
Option boad
service
The option board service is executed in parallel with the execution of tasks.
Refer to 5-6 Services Other Than Tasks for details on the option board service.
System Services
System Services
System services include the following processing.
Processing Contents
USB port service*1 • Processing of service requests from the Sysmac Studio or host computers
Built-in EtherNet/IP port ser- • Processing of message service requests, such as CIP commands, from
vice the Sysmac Studio, an HMI, host computers, or other Controllers
• Execution of communications instructions for CIP and socket communica-
tions
Built-in EtherCAT port service • Execution of EtherCAT message communications
Communications processing • Execution of communications processing for a Serial Communications
for a Serial Communications Option Board
Option Board*2
CJ-series Special Unit service • Event servicing for CJ-series Special Units
*3 • Execution of communications instructions (CIP)
SD Memory Card service • Access from FTP client
• SD Memory Card operations from the Sysmac Studio
• Execution of SD Memory Card instructions
Self-diagnosis • Hardware error detection
System
services
In an NJ/NX-series CPU Unit, you use variables in the user program to access I/O and memory in the
Attribute set-
Variables Accessed data
tings
User-defined variables All attributes can CPU Unit
be set.
Semi-user-defined Device variables Device variables Some attributes EtherCAT slaves*2*3
variables for EtherCAT can be set.*1
slaves
Device variables NX Units on the CPU Unit
for NX Units*4
Device variables Built-in I/O
for built-in I/O*4
Device variables Analog I/O Option Boards
for Option
Boards*4
Device variables CJ-series Basic I/O Units and
for CJ-series CJ-series Special Units
Units*5
Cam data variables Servo Drives, encoder input
slaves, and CPU Unit
System-defined System-defined variables for PLC No attributes can CPU Unit
variables Function Module be set.
System-defined MC Common Servo Drives, encoder input
variables for Variable slaves, and CPU Unit
motion control Axis Variables
Axes Group Vari-
ables
System-defined variables for Ether- Built-in EtherNet/IP port
Net/IP
System-defined variables for Ether- Built-in EtherCAT master port
CAT master
System-defined variables for NX CPU Unit
bus*6
*1 Refer to Device Variable Attributes on page 3-12 for the attributes that can be set.
*2 “EtherCAT slaves” includes any NX Units on EtherCAT Slave Terminals.
*3 With the Sysmac Studio version 1.08 or lower, the EtherCAT slaves to which axes are assigned cannot be
accessed via EtherCAT slave device variables.
*4 You can use device variables for NX Units, built-in I/O, and Option Boards only with the NX1P2 CPU Units.
*5 You can use CJ-series Units only with NJ-series CPU Units.
*6 You can use system-defined variables for NX bus only with the NX1P2 CPU Units.
User-defined Variables
The user defines all of the attributes of a user-defined variable. Refer to 6-3 Variables for details on
user-defined variables.
Semi-user-defined Variables
Semi-user-defined variables have some attributes that you can set. These variables are used to access
specific data. A semi-user-defined variable can either be a device variable or a cam data variable,
depending on what it can access.
Device Variables
Device variables are used to access data in devices. A device is a general term for any Unit or slave
that is refreshed by the I/O refreshing that is performed by the CPU Unit. Specifically, it refers to Eth-
erCAT slaves, NX Units on the CPU Unit, built-in I/O, Analog I/O Option Boards, and CJ-series
Units.
The device and the data to access in that device determine the type of device variable, as shown
below.
Device variables for built-in I/O*3 Built-in I/O I/O data for built-in I/O
Device variables for Option Boards*3 Analog I/O Option Boards I/O data for Analog I/O Option Boards
Device variables for CJ-series CJ-series Basic I/O Units Real I/O data in Basic I/O Units
Units*4 CJ-series Special Units Operating data*5 and setup data for
Special Units*6
*1 With the Sysmac Studio version 1.08 or lower, the EtherCAT slaves to which axes are assigned cannot be
accessed via EtherCAT slave device variables.
*2 This refers to I/O data that is exchanged during the process data communications cycle between the mas-
ter and slaves.
*3 You can use device variables for NX Units, built-in I/O, and Option Boards only with the N1P2 CPU Units.
*4 You can use CJ-series Units only with NJ-series CPU Units.
*5 This data is used in the operation of CJ-series Units. The CIO Area portion of the memory used for CJ-
series Units is used.
*6 This data is used to set up the CJ-series Units. The DM Area portion of the memory used for CJ-series
Units is used.
Device variables are used to access data for EtherCAT slaves, NX Units on the CPU Unit, built-in
I/O, Analog I/O Option Boards, and CJ-series Units through the I/O ports. The I/O ports are logical
ports that are used to access devices.
CPU Unit
Instruction
Device variable
EtherCAT slave, NX
I/O port Unit, or CJ-series Unit
System-defined Variables
System-defined variables are defined in advance in an NJ/NX-series Controller. The names and all
attributes are defined by the system. They have specific functions. You cannot change the variable
names or any other attributes.
The system-defined variables are specific to a function module. There are system-defined variables for
each function module. The types of system-defined variables are listed in the following table.
*1 Only the NX1P2 CPU Units have the NX Bus Function Module.
The system-defined variables for motion control are classified according to what the Motion Control
Function Module does, as listed in the following table.
*1 An axes group consists of multiple axes. An axes group is used for interpolation.
Analog I/O Option Boards*4 --- Device variables for Option Boards
CJ-series Units*5 Basic I/O Units --- Device variables for CJ-series Units
Special Units • Operating data Device variables for CJ-series Units
• Setup data
Assigned memory User-defined variables
area data*6
*1 With the Sysmac Studio version 1.08 or lower, the EtherCAT slaves to which axes are assigned cannot be
accessed via EtherCAT slave device variables.
*2 You can use NX Units on the CPU Unit only with the NX1P2 CPU Units.
*3 You can use the built-in I/O only with the NX1P2 CPU Units.
*4 You can use Analog I/O Option Boards only with the NX1P2 CPU Units.
*5 You can use CJ-series Units only with NJ-series CPU Units.
*6 This data is for extended functions and slave I/O that you assign by specifying addresses in memory. You can-
not access assigned memory area data with device variables.
CPU Unit
User program
Variables
Axis variables Device variables Device variables Device Device Device variables User-defined
for for NX Units variables for variables for for CJ-series Units variables
EtherCAT slaves built-in I/O Option Boards
*1
*1
I/O
Servo Drive and encoder input slaves that are These slaves are accessed directly with Axis variables.*2
assigned to axes
*1 With the Sysmac Studio version 1.08 or lower, the EtherCAT slaves to which axes are assigned cannot be
accessed via EtherCAT slave device variables. 2
*2 For a Servo Drive, one Servomotor is assigned as one axis to one Axis variable. For an encoder input slave,
one counter is assigned as one axis to one Axis variable.
Accessing Servo Drive, Encoder Input, and General-purpose Slaves That Are
Not Assigned to Axes
These slaves are accessed through I/O ports for device variables for EtherCAT slaves. PDO com-
munications are used to access data from I/O ports.
CPU Unit
Example: General-purpose slave
Device variables
for EtherCAT slaves I/O ports
PDO communications
Variable 00
InBit00
to
to
PDO communications
15
Variable
InBit15
Accessing Servo Drive and Encoder Input Slaves That Are Assigned to Axes
Servo Drive and encode input slaves that are assigned to axes are accessed directly through the
Axis variable. PDO communications are used to access data from Axis variables.
For example, if a Servomotor is controlled with a Servo Drive, the control commands for the Servo-
motor that is assigned to an Axis variable are sent to the Servo Drive. The feedback from the Servo-
motor is sent from the Servo Drive to the CPU Unit by using the Axis variable.
CPU Unit
Servo Drive
System-defined variables
PDO communications
Axis variable
Servomotor
Servo Drive
PDO communications
Axis variable
Servomotor
Refer to 3-5-2 Axis Variables and Axes Group Variables for details on Axis variables.
Version Information
With the Sysmac Studio version 1.09 or higher, device variables can be assigned to the I/O ports
of Servo Drive and encoder input slaves to which axes are assigned.
The I/O port to which a device variable can be assigned must meet either of the following condi-
tions.
• The value of the R/W attribute is R (Read only).
• The value of the R/W attribute is W (Write only), and <Not assigned> is set for the process
data field under Detailed Settings on the Axis Basic Settings Display in the Sysmac Studio.
Additional Information
There are two types of EtherCAT communications, PDO communications and SDO communica-
tions. PDO communications are used for commands to refresh I/O data, such as data for Servo-
motor position control, on a fixed control period. SDO communications are used for commands
to read and write data at specified times, such as for parameter transfers.
Refer to the NJ/NX-series CPU Unit Built-in EtherCAT Port User’s Manual (Cat. No. W505) for
details.
Variable 00
Output Bit 00
…
…
Variable mm
Output Bit mm
Variable 00
Input Bit 00
…
…
Variable nn
Input Bit nn
CPU Unit
Object
Axis variable
Servomotor
Device variables Example: Digital Input Unit
for NX Units I/O ports
Variable 00
Input Bit 00
to
to
Variable 01
Input Bit 01
Refer to 3-5-2 Axis Variables and Axes Group Variables for details on Axis variables.
Variable 00
Output Bit 00
…
… mm
2
Variable
Output Bit mm
…
…
Variable nn
Input Bit nn
Variable 00
Ch1 Analog Output Value
…
…
Variable mm
Ch2 Analog Output Value
Variable 00
Ch1 Analog Input Value
…
…
Variable nn
Ch2 Analog Input Value
Variable 00
Ch1_In00
…
…
Variable 15
Ch1_In15
Variable 00
Ch2_In00
…
…
Variable 15
Ch2_In15
Accessing Special Units through I/O ports by Using Device Variables for CJ-
2
series Units
The operating data and setup data are accessed through the I/O ports for the device variables for
%3201.00
Variable 3201.00 Slave
Refer to A-8 Contents of Memory Used for CJ-series Units for information on the memory used for
CJ-series Units. Refer to 6-3-8 Variable Attributes for information on AT specifications.
The NX Bus Function Module of the NX1P2 CPU Unit performs the data exchange cyclically with the
NX Units on the CPU Unit.
Module
The data exchange is executed by I/O refreshing in the primary periodic task. Therefore, the period of
I/O refreshing is the task period of the primary periodic task.
Note NX Units with different I/O refreshing methods can be mixed on the NX1P2 CPU Unit.
Note You cannot change the I/O refreshing methods for NX Units on the NX1P2 CPU Unit.
An outline of the I/O refreshing methods that are actually operated in the NX1P2 CPU Unit is listed
below.
The I/O refreshing methods that you can use depend on the model of the NX Unit. Select the NX Units
according to the I/O refreshing method to use.
Refer to the manuals for the specific Units for the I/O refreshing methods that are supported by individ-
ual NX Units.
Primary Output data Input data UPG MC Output data Input data UPG MC
periodic task Refreshing Refreshing
processing processing processing processing
Synchronized
NX Unit (N1)
ON/OFF response time ON/OFF response time +
Input filter time
Synchronized
NX Unit (N2)
DA conversion time All Units with synchronous All Units with AD conversion time
for each Unit input refreshing read their synchronous output for each Unit
inputs simultaneously refreshing refresh their
outputs simultaneously
Module
the DC times when inputs change (called input changed times). Then, the input changed times are
read at the time that is synchronized with the I/O refreshing in the primary periodic task. The most
recent values are always read as the input values.
2
Additional Information
Primary Output data Input data UPG MC Output data Input data UPG MC
periodic task processing Refreshing processing processing Refreshing processing
Primary Output data Refreshing Input data UPG MC Output data Refreshing Input data UPG MC
periodic task processing processing processing processing
Free-run Internal processing of NX Unit (N1) Internal processing of NX Unit (N1) Internal processing of NX Unit (N1)
NX Unit (N1)
other than
a motion Built-in I/O
control
instruction Option Boards
Command
Motion
control NX Units on the CPU
processing Unit that are assigned to
axes
Note You can use CJ-series Units only with NJ-series CPU Units.
Note You can use the NX Bus Function Module, built-in I/O, and Option Boards only with the NX1P2 CPU Units.
Additional Information
For details on motion control instructions, refer to the NJ/NX-series Motion Control Instructions
Reference Manual (Cat. No. W508). For details on other instructions, refer to the NJ/NX-series
Instructions Reference Manual (Cat. No. W502).
Version Information
With the Sysmac Studio version 1.09 or higher, device variables can be assigned to the I/O ports
of Servo Drive and encoder input slaves to which axes are assigned.
The I/O port to which a device variable can be assigned must meet either of the following condi-
tions.
• The value of the R/W attribute is R (Read only).
• The value of the R/W attribute is W (Write only), and <Not assigned> is set for the process
data field under Detailed Settings on the Axis Basic Settings Display in the Sysmac Studio.
*1 With the Sysmac Studio version 1.09 or higher, a Servo Drive and encoder input slave to which an axis is
assigned can also be a part of sequence controls if you assign the device variable to the I/O port of the slave.
*2 The data refresh period in the slave depends on settings in the slave.
*3 You can use NX Units on the CPU Unit only with the NX1P2 CPU Units. An NX Unit on the CPU Unit to which
an axis is assigned can also be a part of sequence controls if you assign the device variable to the I/O port of
the NX Unit.
*4 The I/O refresh cycles of the NX Units that operate with Free-Run refreshing and the control period of the CPU
Unit are asynchronous.
*5 You can use the built-in I/O only with the NX1P2 CPU Units.
*6 You can use Option Boards only with the NX1P2 CPU Units.
*7 The primary periodic task and the data exchange period of Option Boards are asynchronous.
*8 You can use CJ-series Units only with NJ-series CPU Units.
*9 The data exchange period with a CJ-series Unit is the task period to which I/O refreshing for the CJ-series Unit
is assigned.
Servo Drive, encoder input, and general-purpose slaves that are not assigned to axes are refreshed in
the process data communications cycle. This means that I/O refreshing takes place in the task period of
the primary periodic task or the priority-5 periodic task. However, execution of the programs and
refreshing of the device variables take place in the task period of the task to which the programs are
assigned. Therefore, the slave values are not reflected and not controlled by the device variables until
the task period of the task to which the programs are assigned.
If it is necessary to control a slave in the process data communications cycle, assign the program that
controls the slave to the primary periodic task or the priority-5 periodic task.
For details, refer to 5-11-3 System Input and Output Response Times.
I/O ports
Device variables
Option Board
Executed.
Instruction CJ-series Unit Servo Drive, encoder
input, and general-pur-
pose slaves that are not
assigned to axes
EtherCAT
Master PDO communications
Function
Module
Sequence control period (task I/O refreshing in the process data communi-
period of the primary periodic task cations cycle (i.e., task period of the primary Data refresh
or the periodic task) periodic task or the priority-5 periodic task) period in slave
Additional Information
• You can use the priority-5 periodic task only with the NX701 CPU Units.
• With an NX701 CPU Unit, you can perform process data communications in the primary peri-
odic task and the priority-5 periodic task. If these two process data communications cycles
need to be identified, the communications cycle for the primary periodic task is called process
data communications cycle 1, while the communications cycle for the priority-5 periodic task is
called process data communications cycle 2.
• The NX1P2 CPU Units and NJ-series CPU Units perform process data communications only in the
primary periodic task.
• You can use NX Units on the CPU Unit, built-in I/O, and Option Boards only with the NX1P2 CPU
Units.
• You can use CJ-series Units only with NJ-series CPU Units.
control processing
instruction Command
Axis variable
Additional Information
• You must use the Sysmac Studio to assign an axis to an EtherCAT slave or an NX Unit on the
NX1P2 CPU Unit to control it from the Motion Control Function Module. This allows the PLC
Function Module to send commands to the Motion Control Function Module for motion control
instructions that are executed in the user program. It also allows the PLC Function Module to
obtain information from the Motion Control Function Module through the Axis variables.
• The task to which the program that contains the motion control instructions is assigned deter-
mines the I/O response time of the motion control system. For details, refer to 5-11-3 System
Input and Output Response Times.
Additional Information
• Relationship among motion controls, tasks, and process data communications cycles for the
NX701 CPU Units
The normal operation state has these three states for operation: PROGRAM mode, RUN mode, and
downloading. A CPU Unit in the normal operation state changes to the other states due to user interac-
tion. This status is defined as follows:
State Definition
PROGRAM mode The operating mode is PROGRAM mode.
RUN mode The operating mode is RUN mode.
Downloading Data is being downloaded from the Sysmac Studio.
Note Refer to 2-7-3 Operating Modes for details on PROGRAM mode and RUN mode.
Power ON
Normal operation
PROGRAM
Controller error occurs
mode
Error state
Downloading Controller error is reset.
RUN mode
Additional Information
• You can check the operating status of the CPU Unit with the status indicators on the front
panel of the CPU Unit. Refer to 12-1 Operation after an Error for troubleshooting procedures
using the status indicators.
• Refer to A-7 Attributes of CPU Unit Data for information on data operations when the CPU Unit
status changes.
• Refer to 6-3-9 Changes to Variables for Status Changes for the values that variables take
when the status of the CPU Unit changes.
*1 Refer to the manual for each slave for information on the slave settings that apply until EtherCAT communi-
cations starts after the power supply is turned ON.
*2 When the download is completed, initialization of the EtherCAT slaves starts. When initialization is in prog-
ress, the outputs reflect the settings for the slave.
*3 Device outputs are retained even when the operating mode changes or when downloading if the device
output hold configuration is set to enable (16#A5A5) in the _DeviceOutHoldCfg (Device Output Hold Con-
figuration) system-defined variables. Refer to 6-3-9 Changes to Variables for Status Changes for details. A
CPU Unit with unit version 1.13 or later and Sysmac Studio version 1.17 or higher are required to use the
_DeviceOutHoldCfg (Device Output Hold Configuration) system-defined variable.
*4 When the download is completed and when the operating mode is changed: the values in the device vari-
ables for CJ-series Units are initialized to the values of the Initial Value attributes.
Refer to 6-3-8 Variable Attributes for information on the Initial Value attribute for variables.
Refer to Device Output Hold Configurations on page 6-67 for details on the device output hold con-
figurations.
Additional Information
*1 For the default setting, the CPU Unit will enter RUN mode when the CPU Unit changes from startup state to
normal operation.
The CPU Unit performs various operations when the operating mode is changed, i.e., the axes
are stopped, and motion control instructions are aborted. For details on how the Motion Control
Function Module operates when the operating mode is changed, refer to the NJ/NX-series
Motion Control Instructions Reference Manual (Cat. No. W508).
*1. You can use memory for CJ-series Units only with NJ-series CPU Units and NX1P2 CPU Units.
*1 The system-defined initial values of variables depend on the data types of the variables. Refer to When the Ini-
tial Value Specification Is Left Blank on page 6-61.
Refer to 6-3-9 Changes to Variables for Status Changes for the values that variables take when the sta-
tus of the CPU Unit changes.
RUN indicator
Operating mode
status
Not lit PROGRAM mode
Lit RUN mode
Additional Information
With an NX701 CPU Unit or NJ-series CPU Unit, if you want to output a signal when the CPU
Unit is in RUN mode, use the RUN output on the Power Supply Unit. Refer to the NX-series CPU
Unit Hardware User’s Manual (Cat. No. W535) and the NJ-series CPU Unit Hardware User’s
Manual (Cat. No. W500) for details on the RUN output on the Power Supply Unit.
Step 4. Wiring
Configurations
uration
EtherCAT
CPU
Unit
Step 3 Create the axes and assigning them to the slaves or Units (if motion con- Reference
trol is used).
1. Create the axes. 3-5 Creating
2. Assign the axes to the slaves or Units in the EtherCAT configuration or Unit configuration. the Axes and
Axis Setup EtherCAT slave configuration/Unit configuraton Assigning
Servo Drives
Them to the
Axes Assigned.
CPU
Servo
A
Sysmac Studio Axis variable a Unit Drives/Encoder
EtherCAT
Input
Axis variable b B Slaves/NX
A B C D Units
Axis variable c C
Configurations
3-2-1 Creating the EtherCAT Slave Configuration
In the EtherCAT Tab Page of the Sysmac Studio, create the EtherCAT slave configuration that is
detected as “correct” by the CPU Unit.
CPU Unit 3
EtherCAT master
The I/O ports are automatically registered for the slaves in the configuration. Later, the user assigns
device variables to the I/O ports. You can specify device variables in the user program to access the
slaves.
Refer to EtherCAT Configuration and Settings in the Sysmac Studio Version 1 Operation Manual (Cat.
No. W504) for specific procedures to create the EtherCAT slave configuration.
Additional Information
• If you connect EtherCAT Slave Terminals, create the EtherCAT slave configuration, create the
Slave Terminal configuration, and set the operation settings. Refer to the NX-series EtherCAT
Coupler Unit User’s Manual (Cat. No. W519) for information on the Slave Terminal configura-
tion and operation settings.
• If you use the built-in I/O or Option Boards with an NX1P2 CPU Unit, make the configuration
settings and other settings in the Controller Setup.
Version Information
A CPU Unit with unit version 1.05 or later and Sysmac Studio version 1.06 or higher are required
to use EtherCAT Slave Terminals.
Additional Information
If the EtherCAT slaves are Servo Drives or encoder input slaves, after they are registered in the
EtherCAT slave configuration, Axis Variables are registered automatically by creating the axes.
Refer to 3-5 Creating the Axes and Assigning Them to the Servo Drives/Encoder Input
Slaves/NX Units for details.
Unit Configuration
CPU Unit
Basic I/O Unit
Special Unit
Special Unit
When the power is turned ON, an automatic check is performed to determine whether the “correct” Unit
configuration matches the physical Unit configuration. The I/O ports are automatically registered for
Units that are specified in the Unit configuration. Later, the user assigns device variables to the I/O
ports. The device variables are used in the user program to access the Units in the Unit configuration.
Refer to CPU/Expansion Rack Configuration and Setup in the Sysmac Studio Version 1 Operation Man-
ual (Cat. No. W504) for specific procedures to create the Unit configuration.
Configurations
same. You can compare the Unit configuration on the Sysmac Studio with the physical Unit configura-
tion to see if they are the same before the first time you download the Unit configuration to the CPU Unit
from the Sysmac Studio.
Compared.
3
CPU Unit
Variables
Device variables
I/O ports are logical interfaces used by
the CPU Unit to exchange data with
external devices.
I/O ports
I/O ports are automatically registered in the I/O Map when you create the EtherCAT slave configuration,
Unit configuration, and other configurations on the Sysmac Studio, or when you read either of these
configurations from the physical Controller from the Sysmac Studio. You can check the I/O ports that
were registered in the I/O Map of the Sysmac Studio.
I/O Map
Ch_In Ch_Out
Slave and Unit Configuration I/O ports Variables assigned to I/O ports:
Information created. created. Device variables
Assigned.
ch1_In00 J01_ch1_In00
ch1_In01 J01_ch1_In01
ch1_In02 J01_ch1_In02
You can specify device variables in the user program or in external communications to access the
devices (slaves or Units).
CPU Unit
Device variables
I/O ports
Refer to 2-3-1 Types of Variables for the relationship of device variables to other variables. 3
Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for details on registering
device variables with the Sysmac Studio.
Note You can use CJ-series Units only with NJ-series CPU Units.
Note You can use NX Units on the CPU Unit, built-in I/O, and Option Boards only the with NX1P2 CPU Units.
Note You can use device variables for NX Units, built-in I/O, and Option Boards only with the NX1P2 CPU Units.
Note The physical port number indicates a physical location for an I/O port. 0 is given for the option board slot 1
and 1 is given for the option board slot 2.
Additional Information
• You can specify forced refreshing for I/O ports in the I/O Map. You can force real I/O to turn ON
Version Information
A CPU Unit with unit version 1.05 or later and Sysmac Studio version 1.06 or higher are required
to assign variables to Units.
Additional Information
You can assign variables to EtherCAT slaves other than Slave Terminals. This applies to Ether-
CAT slaves from other manufacturers. The variables are assigned to the EtherCAT slaves in the
same way as they are assigned to EtherCAT Coupler Units and NX Units.
1 On the Sysmac Studio, select Configurations and Setup − EtherCAT or Configurations and
Setup - CPU/Expansion Racks - CPU Rack and make configuration settings for EtherCAT
Slave Terminals or NX Units on the CPU Unit.
2 Select Configurations and Setup − I/O Map to display the I/O Map.
The I/O Map is displayed for the Units of the set EtherCAT Slave Terminals.
3 Right-click the model of Unit to which you want to assign variables and select Display Node
Location Port from the menu.
The Node location information port will be added on the I/O Map.
4 Right-click the Node location information and select Create Device Variable.
The variable name will be written automatically to the Variable Field of the Node location
information port.
The data type of variables assigned to the Units is _sNXUNIT_ID structure. The details on the _sNX-
UNIT_ID structure data type are given in the following table.
Additional Information
The data type of variables assigned to EtherCAT slaves other than Slave Terminals is _sECAT_ID
structure. The details are given in the following table.
Designating Units
The variables assigned to the Units are passed as parameters to the instructions for which specify the
Units.
NX_SaveParam_instance
A NX_SaveParam B
Execute Done
NX1 UnitProxy Busy
UINT#0 TimeOut Error
ErrorID
ErrorIDEx
Example: The following programming example changes multiple NX Units to the mode that enables
writing data.
NX0, NX1, and NX2 are the variables that were assigned to the NX Units. The variables are assigned to
the elements of the NXTable[0..2] and then the NX_ChangeWriteMode instruction is executed in order
for each.
• Variable Table
• ST Program
FOR i:= 0 TO 2 DO
NX_ChangeWriteMode_instance[i](Execute:=FALSE);
END_FOR;
NXTable[0] := NX0;
NXTable[1] := NX1;
NXTable[2] := NX2;
FOR i:= 0 TO 2 DO
NX_ChangeWriteMode_instance[i](Execute:=TRUE, UnitProxy:=NXTable[i]);
END_FOR;
3-5-1 Introduction
When you use the Motion Control Function Module for operation with EtherCAT Servo Drive, encoder
input slaves, or NX Units, create axes in the Sysmac Studio and define them as EtherCAT servo Drive,
encoder input slaves, or NX Units. At a result, Axis Variables are automatically created as system- 3
defined variables.
3-5-1 Introduction
Controlled by the Motion Control Function Module.
CPU Unit NX Unit NX Unit
Axis A
Motion Control Function Module
Created. Created.
Assigned. Assigned.
EtherCAT
EtherCAT
slave
You can specify an Axis Variable in a motion control instruction in the user program to easily access and
perform operations with Servo Drive, encoder input slaves, and NX Units.
Refer to the NJ/NX-series Motion Control Instructions Reference Manual (Cat. No. W508) for details on
Axis Variables and Axes Group Variables.
Application
There are two ways to use Axis Variables and Axes Group Variables.
1) Specifying Axes and Axes Groups in Motion Control Instructions:
If you specify an axis or axes group for an I/O variable for a motion control instruction, you can
perform operations for the OMRON Servo Drive, encoder input slave, or NX Unit.
2) Monitoring Axis Variable Members:
You can use instructions to monitor the actual position, error information, or other information
on the Servo Drive, encoder input slaves, and NX Units.
3. You can monitor the members of the axis variable with instructions.
Assigned
axis
Control operations
OMRON Servo Drives or
EtherCAT
encoder input slaves, or
supported Servo Drives or
encoder input slaves from
other companies
1 Right-click Axis Settings under Configurations and Setup − Motion Control Setup in the
Multiview Explorer and select Add − Axis Settings from the menu.
If necessary, you can change the axis variable names from the default names of MC_Axis***.
(“***” is incremented from 000 in the order that the axis variables are created.)
2 Assign the axes that you created to Servo Drives or encoder input slaves in the EtherCAT slave
configuration of the Sysmac Studio.
Set the Axis Basic Settings from the Sysmac Studio.
Classification Parameter name Setting
Axis Basic Axis Number Axis numbers are automatically set in the order that the axes
Settings are created.
Motion Control*1 Select Primary periodic task.
Axis Use Select Used axis.
Axis Type Select a servo axis or encoder axis.
Input Device/ Specify the node address of the EtherCAT slave that is
Output Device assigned to the axis.
*1 You can select this parameter for NX701 CPU Units.
3 Use the Sysmac Studio to specify the settings required for Test Mode operation (Unit Conver-
sion, Count Mode, Limits, etc.) and the settings required for actual system operation. Then
transfer the settings to the CPU Unit with the project.
4 In the user program, an axis variable name is specified for the in-out variable Axis in motion con-
trol instructions.
For the axis variable name, specify the axis name (axis variable name) that was specified in the
Motion Control Setup or a system-defined variable. You can execute motion control for the
assigned Servo Drive, encoder input slave, or NX Unit. An example that specifies the axis vari-
able name MyAxis1 is shown below.
Enable Status
ServoOn Busy MyAxis1OnBusy
Error MyAxis1OnError
ErrorID MyAxis1OnErrorID
Refer to 3-5-2 Axis Variables and Axes Group Variables for information on Axis Variables.
Step 4. Wiring
Refer to 1-3 Overall Operating Procedure for the NJ/NX-series Controller for details.
Initial Settings Related to the PLC Function Module: 4-2 Initial Set-
tings for the
Controller Setup: Startup Mode, Write Protection, System Service Moni-
PLC Function
toring Settings, and other settings Module
Initial Settings for the Motion Control Function Module: 4-5 Initial Set-
tings for the
• Axis Parameters: Motion control parameters for single-axis operation
Motion Control
• Axes Group Parameters: Motion control parameters for multi-axes coor- Function Mod-
dinated operation ule
• Cam data: Phase and displacement setting tables for cam motions 4
Initial Settings for the EtherCAT Master Function Module: 4-6 Initial Set-
tings for the
EtherCAT Master Parameters in the EtherCAT Configuration:
EtherCAT Mas-
Parameter settings for the EtherCAT master process data communications ter Function
cycle, and other settings Module
Initial Settings for the EtherNet/IP Function Module: 4-7 Initial Set-
tings for the
Ethernet Port Setup: EtherNet/IP Port TCP/IP Settings, Ethernet Settings,
EtherNet/IP
and other settings Function Mod-
ule
4-2-1 Introduction
The initial settings for the PLC Function Module are listed below.
• Controller Setup
• Task Settings
Select Configurations and Setup − Controller Setup and Configurations and Setup − Task Set-
tings on the Sysmac Studio to make these settings
*1 This setting is enabled when an NS-series PT is connected to the built-in EtherNet/IP port on the CPU Unit, and the
power supplies for these devices are turned ON simultaneously.
A CPU Unit with unit version 1.10 or later and Sysmac Studio version 1.12 or higher are required to set the NS start wait
time at startup.
*2 The processing time for verifying tags of an NS-series PT can be reduced with this setting. Set the value to 10 if you want
to give priority to the tag verifications. Otherwise, set the value to 0.
If you set the value to 10, after the power supply is turned ON, the CPU Unit gives priority to the tag verifications of the
NS-series PT for approximately 10 seconds during startup before the Unit changes the startup state to the normal opera-
tion state. The time to complete the tag verifications can be reduced by performing a part of processing of the tag verifica-
tions with priority during startup.
If you specify the value between 1 and 10, the time until the CPU Unit changes the state to the normal operation state is
increased because the Unit gives priority to the tag verifications for the specified time regardless of whether an NS-series
PT is used. Set the value to 0 if an NS-series PT is not connected, or if you do not turn ON the power supplies for the NS-
series PT and the CPU Unit simultaneously.
*3 These settings are only provided for the NX1P2 CPU Units.
*4 For NX-series CPU Units, the System Service Monitoring Settings are not provided.
*5 A CPU Unit with unit version 1.11 or later and Sysmac Studio version 1.15 or higher are required to use the SD Memory
Card Program Transfer Setting.
*6 A CPU Unit with unit version 1.14 or later and Sysmac Studio version 1.18 or higher are required to use the SD Memory
Card Restore Setting.
*7 A CPU Unit with unit version 1.02 or later and Sysmac Studio version 1.03 or higher are required to use the Event Log
Settings.
*8 A CPU Unit with unit version 1.03 or later and Sysmac Studio version 1.04 or higher are required to disable backups.
*1 You can use the priority-5 periodic task only with the NX701 CPU Units.
*2 You cannot use the priority-16 periodic task with the NX1P2 CPU Units.
*3 For an NX1P2 CPU Unit and NJ101 CPU Unit, the default of the primary periodic task is 2 ms.
*1 A CPU Unit with unit version 1.08 or later and Sysmac Studio version 1.09 or higher are required.
4-2-4 Unit Configuration and Unit Setup for NX1P2 CPU Units
This section describes the Unit configurations and settings for the NX1P2 CPU Units. These settings
are not provided for the NX701 CPU Units and NJ-series CPU Units.
Create the NX Unit configuration on the CPU Unit, and set up each Unit.
Make the settings on the CPU and Expansion Racks Tab Page on the Sysmac Studio.
The settable items for the selected CPU Unit are listed below.
_NXB_UnitRegTbl (NX Unit Registration Status) and _NXB_UnitErrFlagTbl (NX Unit Error Status)
are examples of the system-defined variables to specify the NX Unit number.
The system-defined variable for this status information uses BOOL arrays, and the NX Unit number
is specified as the subscript.
For example, if an NX Unit D is added to the CPU Unit, the NX Unit numbers of all NX Units to the
right of the new NX Unit will change. 4
NX Unit Number 1 2 3
4-2-4 Unit Configuration and Unit Setup for NX1P2 CPU Units
NX Unit Registration Status _NXB_UnitRegTbl[1] _NXB_UnitRegTbl[2] _NXB_UnitRegTbl[3]
NX Unit Number 1 2 3 4
NX Unit Registration Status _NXB_UnitRegTbl[1] _NXB_UnitRegTbl[2] _NXB_UnitRegTbl[3] _NXB_UnitRegTbl[4]
If you specify the subscripts of arrays directly with numbers, the subscripts in the program must be cor-
rected to specify the same NX Unit as before the addition.
If you use _sNXUNIT_ID data type variables that are assigned to the Units to specify the array sub-
scripts, you do not need to correct the program even if the Unit configuration changes. The NX Unit
number of a Unit is stored in the UnitNo member of the _sNXUNIT_ID structure variable.
For example, if the _sNXUNIT_ID variable NXUnitB is assigned to NX Unit B in the above figure, the
program would not need to be corrected even if the Unit configuration changed as long s the array sub-
script is specified with _NXB_UnitRegTbl[NXUnitB.UnitNo].
Additional Information
4-2-5 Unit Configuration and Unit Setup for NJ-series CPU Units
This section describes the Unit settings for NJ-series CPU Units. These settings are not provided for
Unit Information
4-2-5 Unit Configuration and Unit Setup for NJ-series CPU Units
We recommend that you change the name to one that is suitable to the device.
Additional Information
The device names that are set here are placed before the I/O port name when device variables
are automatically created.
Special Units
Set the unit numbers of the Special Units.
The settable items for the selected NX Unit are listed below.
Item Description Set values Default
Device name The name of the NX Unit. Any value*1 *2
NX Unit Mounting Set- This setting enables or disables the mounting of an NX Enabled or Enabled
ting Unit. Refer to 8-2-2 Mounting Settings of NX Units on the Disabled
CPU Unit for details on this setting.
I/O allocation settings These are the settings for which I/O data in the NX Unit to --- Refer to the
exchange.*3 manual for
the specific
Click the Edit I/O Allocation Settings Button to edit these
NX Unit.
settings. You cannot change this setting for System Units.
Refer to 4-3-2 I/O Allocation Settings for an overview of I/O
allocation settings and how to edit the settings.
Unit operation settings These are the Unit operation settings for the NX Unit.*4 --- Refer to the
Click the Edit Unit Operation Settings Button to edit manual for
these settings. You cannot change this setting for System the specific
Units. Refer to 4-3-3 Unit Operation Settings for the Unit NX Unit.
operation settings.
Unit application data This data controls the functionality that is specific to each --- Refer to the
NX Unit. Not all NX Units have Unit application data. manual for
the specific
NX Unit.
*1 The device name that is set here is placed before the I/O port name when device variables are automatically
created.
*2 “N” followed by serial numbers that start from 1.
*3 The NX Units contain default values for the I/O settings. You do not need to edit the default values for a stan-
dard exchange. Change the settings as necessary.
*4 The settings are available depend on the type of the NX Unit. For example, Digital Input Units have a setting
for the input filter value, and Digital Output Units have a setting for the output value at load rejection. Refer to
the manual for the specific NX Unit for the settings and their meanings.
I/O data C
Selected. Not possible. I/O entry mapping B Not possible.
I/O data D
I/O data E
Not selected. Possible. I/O entry mapping C Not possible.
I/O data F
*The shaded I/O data is not exchanged with process data communications.
Name/Label Description
I/O Allocation The usage of I/O allocation for the entire CPU Unit is displayed here.
Status • (1)I/O data size: The size of the I/O data that is allocated for the entire CPU Unit is given. The
denominator is the maximum allocatable size.
The I/O data size gives the amount of memory that is used by the I/O data. This value will
not necessarily be the same as the total sum of all I/O entry sizes.
• (2)Number of I/O entry mappings: The number of I/O entry mappings that are allocated to the entire
CPU Unit is given. The denominator is the maximum number of allocatable I/O data.
I/O Entry This is a mapping list of the I/O entries in the corresponding Unit.
Mapping List The I/O entry mapping list shows up to four inputs and outputs respectively.
The I/O entry mapping list shows the following items.
• Selection: This column is used to select the I/O entry mappings that you wish to allocate.
Select the I/O entry mapping that you wish to allocate.
If you do not want to allocate the I/O entry mapping as part of the I/O allocation information, select No
option.
• Input/Output: This column shows whether the data is an input or an output in terms of the CPU Unit.
• I/O entry mapping name: This column gives the name of the I/O entry mapping.
• Flag: If the I/O entry is editable, this column says “Editable.”
• If the I/O entry is not editable, this column says “---.”
I/O entries This pane allows you to view and edit the I/O entries for the I/O entry mappings that are selected in the I/O
Entry Mapping List.
Each I/O entry contains the following information.
• Index: This is the index number for the NX object.
The index is displayed after “0x” as index_number: subindex_number.
• Size: This column gives the size of the I/O entry data.
• Data Type: This column gives the data type of the I/O entry.
• I/O entry name: This column gives the name of the I/O entry.
• Comment: This column gives a description of the I/O entry.
Control buttons • Add I/O Entry Button: This button adds an I/O entry to the selected I/O entry mapping.
for the Edit I/O • Delete I/O Entry Button: This button deletes the selected I/O entry from the selected I/O entry mapping.
Allocation • OK Button: This button confirms the settings in the Edit I/O Allocation Settings Pane, and returns the
Settings Pane display to the CPU and Expansion Racks Tab Page.
• Cancel Button: This button cancels the settings in the Edit I/O Allocation Settings Pane, and returns the
display to the CPU and Expansion Racks Tab Page.
• Apply Button: This button confirms the settings in the Edit I/O Allocation Settings Pane, and allows you
to edit other I/O entries.
Method 1: Setting from the Unit Setting Pane of the Sysmac Studio
1 Select the Unit in the Unit Configuration and Setup.
2 Specify the settings in the Unit Settings Tab Page shown below.
3 Connect the CPU Unit online and transfer the settings to the CPU Unit.
Method 2: Using the Sysmac Studio to Specify Initial Settings for the
I/O Ports in the I/O Map
1 Use the I/O Map in the Sysmac Studio to set values for the I/O ports.
2 Restart the Unit, reset the Controller, or cycle the power supply to the Controller.
Method 3: Using the Sysmac Studio to Specify Initial Settings for the
Device Variables of the CJ-series Units
1 Use the Sysmac Studio to specify the initial values for the device variables of the CJ-series
Units.
3 Restart the Unit, reset the Controller, or cycle the power supply to the Controller.
Method 4: Using Instructions to Set the Device Variables for the CJ-
series Units
1 Set the values for the device variables for the CJ-series Unit at the start of operation from the
user program (e.g., use the MOVE instruction) and then restart the Unit.
Example:
P_First_RunMode MOVE
4
EN ENO
First RUN
Period Flag
UINT#16#0101 In Out Unit0_RangeCfg
Instance
ResetUnit
Execute Done
_SIO_No00 UnitNo Busy
Error
ErrorID
Instance.Done
Processing after restarting
4-5-1 Introduction
The initial settings for the Motion Control Function Module are called motion control parameters. Motion
control parameters include the following parameters.
• Axis Parameters: Settings for single-axis control
• Axes Group Parameters: Settings for multi-axes coordinated control
Sysmac Studio
Set the parameters in the
Motion Control Setup. CPU Unit
Motion control
parameters
Built-in non-vola-
tile memory When power is turned ON Main memory
When downloaded.
User program
Axes Group
Upload. Axes group
Parameter Settings
parameter settings MC_Write instruction
Temporarily changes
some parameters.
The initial settings for the EtherCAT Master Function Module are listed below.
• Device names
• Total Cable Length
• Fail-soft Operation Settings
• Wait Time for Slave Startup
• PDO Communications Timeout Detection Count
• Revision Check Method
• Serial Number Check Method
Double-click EtherCAT under Configurations and Setup and then select the master on the Sysmac
Studio. The Initial Setting Tab Page for the EtherCAT Master Function Module is displayed.
Refer to the NJ/NX-series CPU Unit Built-in EtherCAT Port User’s Manual (Cat. No. W505) for details.
The initial settings for the EtherNet/IP Function Module are listed below.
• TCP/IP Settings
• Link Settings
• FTP Settings
• NTP Settings
• SNMP Settings
• SNMP Trap Settings
• FINS Settings*1
*1 For the NX701 CPU Unit, FINS Settings are not provided. 4
Select Configurations and Setup − Controller Setup − Built-in EtherNet/IP Port Settings on the
Sysmac Studio to make these settings.
Refer to the NJ/NX-series CPU Unit Built-in EtherNet/IP User’s Manual (Cat. No. W506) for details.
The initial settings for the built-in I/O are listed below.
• Input Filter Setting
• Load Rejection Output Setting
Select Configurations and Setup − Controller Setup − Built-in I/O Settings on the Sysmac Studio to
make these settings.
Refer to the NX-series NX1P2 CPU Unit Built-in I/O and Option Board User's Manual (Cat. No. W579)
for details.
Select Configurations and Setup − Controller Setup − Option Board Settings on the Sysmac Stu-
dio to make these settings.
Refer to the NX-series NX1P2 CPU Unit Built-in I/O and Option Board User's Manual (Cat. No. W579)
for details.
4
The initial settings for memory for CJ-series Units are listed below. Set whether to enable or disable
memory for CJ-series Units and set the memory size when it is enabled.
• CIO
• WR
• HR
• DM
Additional Information
You cannot use the EM Area for the NX1P2 CPU Units.
Select Configurations and Setup − Controller Setup − Memory Settings for CJ-series Units on the
Sysmac Studio to make these settings.
Refer to the NX-series NX1P2 CPU Unit Built-in I/O and Option Board User's Manual (Cat. No. W579)
for details.
5-6-3 Processing Performed in and Execution Timing of the Option Board Service 5-78
5-6-4 Processing Performed in and Execution Timing of the System Services . . . . 5-79
5-7 Assignment and Settings Related to Tasks . . . . . . . . . . . . . . . . . . . . . . . . 5-82
5-7-1 Assigning I/O Refreshing to Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-82
5-7-2 Assigning Tasks to Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-90
5-7-3 Parameters for Primary Periodic Task and Periodic Tasks . . . . . . . . . . . . . . . 5-91
5-8 Ensuring Concurrency of Variable Values . . . . . . . . . . . . . . . . . . . . . . . . . 5-94
5-8-1 Ensuring Concurrency of Variable Values between Tasks . . . . . . . . . . . . . . . 5-94
5-8-2 Variable Access from Outside the Controller . . . . . . . . . . . . . . . . . . . . . . . . 5-100
5-9 Errors Related to Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-104
5-10 Monitoring Task Execution Status and Task Execution Times . . . . . . . . 5-107
5-11 Task Design Methods and I/O Response Times . . . . . . . . . . . . . . . . . . . . 5-111
5-11-1 Checking the Task Execution Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-111
5-11-2 Examples of Task Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-114
5-11-3 System Input and Output Response Times . . . . . . . . . . . . . . . . . . . . . . . . . 5-115
Step 4. Wiring
5-2-1 Tasks
Tasks are used to assign an execution condition and execution order to a series of processes, such as
I/O refreshing and user program execution.
There are three kinds of tasks, as shown in the following table. They are defined by their execution con-
ditions and execution priorities.
Version Information
A CPU Unit with unit version 1.03 or later and Sysmac Studio version 1.04 or higher are required
to use event tasks.
Additional Information
With an NX701 CPU Unit, you can execute motion control in the primary periodic task and in the
priority-5 periodic task. If these two motion controls need to be identified, the motion control in
the primary periodic task is called motion control 1, while the motion control in the priority-5 peri-
odic task is called motion control 2.
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. 5
You can assign I/O refreshing for each slave and Unit to the primary periodic task or the priority-5 or pri-
ority-16 periodic task. By default, I/O refreshing for all slaves and Units is assigned to the primary peri-
5-2-1 Tasks
odic task.
Event Tasks
An event task is executed only once when the specified execution condition is met. There are the fol-
lowing two types of execution conditions for event tasks.
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.
Additional Information
Tasks operate differently between the NX701 CPU Units, NX1P2 CPU Units, and NJ-series CPU
Units. Refer to 5-3 Specifications and Basic Operation of Tasks for NX701 CPU Units, 5-4 Spec-
ifications and Basic Operation of Tasks for NX1P2 CPU Units, and 5-5 Specifications and Basic
Operation of Tasks for NJ-series Controllers for details.
Data
Variable name Meaning Description R/W
type
_TaskName_Active Task Active Flag TRUE during task execution. BOOL R
FALSE from the completion of task execu-
tion until the end of the task period.
_TaskName_LastExecTime Last Task Execu- Gives the last execution time of the task. TIME R
tion Time
_TaskName_MaxExecTime Maximum Task Gives the maximum value of the task exe- TIME R
Execution Time cution time.
_TaskName_MinExecTime Minimum Task Gives the minimum value of the task exe- TIME R
Execution Time cution time.
Data
Variable name Meaning Description R/W
type
_TaskName_ExecCount Task Execution Contains the number of executions of the UDINT R
Count task.
If the present value exceeds the maximum
value of the data type, the present value
returns to 0 and the count is continued.
_TaskName_Exceeded Task Period TRUE when task execution is completed if BOOL R
Exceeded Flag the task period is exceeded.
FALSE if task execution was completed
within the task period.
_TaskName_ExceedCount Task Period Contains the number of times that the task UDINT R
Exceeded Count period was exceeded.
If the present value exceeds the maximum
Note Example: The Task Period Exceeded Flag for the task named MainTask is _MainTask_Exceeded.
Flag Operation
Task Active Flag (_TaskName_Active)
Task period
5
Primary
periodic task:
IO UPG MC IO UPG MC IO UPG MC
_TaskA_Active
Event task
(execution priority
UPG
of 8): Task B
_TaskB_Active
Task execution
condition is met.*
Task period
Priority-16
periodic task:
IO UPG IO UPG
Task C
_TaskC_Active
Primary
periodic task: IO IO IO UPG M
IO UPG M
Task A M
C C
UPG C
Period exceeded.
_TaskA Exceeded
5-3 Specifications and Basic Operation of Tasks for NX701 CPU Units
5-3 Specifications and Basic Operation
of Tasks for NX701 CPU Units
This section describes the specifications and basic operation of tasks for the NX701 CPU Units with a
multi-core processor.
Item Specification
Type of task • Primary periodic task
• Periodic task (priority 5, 16, 17, or 18)
• Event task (priority 8 or 48)
Numbers of tasks • Primary periodic task: 1
• Periodic tasks: 0 to 4 tasks*1
• Event tasks: 0 to 32 tasks*2
Number of programs per task 128 max.
Task period of the primary periodic task 125 µs
250 µs to 8 ms (in 250-µs increments) 5
Task periods of periodic tasks • Priority 5
125 µs
Set the task period of each periodic task to an integer multiple of the task
period of the primary periodic task.
You cannot select any combination of task periods whose least common
multiple exceeds 600 ms.
*1 There can be no more than one task with each of the following execution priorities: 5, 16, 17, and 18.
*2 There can be up to 32 tasks with each of the following priorities as long as there are no more than a total of 32
tasks with these priorities: 8 and 48.
Additional Information
With an NX701 CPU Unit, you can execute multiple tasks, the tag data link service, and system
services in parallel.
5-3 Specifications and Basic Operation of Tasks for NX701 CPU Units
Task Execution Priority
The type of the task determines its execution priority. The CPU Unit executes the task with the highest
execution priority first.
If the execution condition is met for another task, Tb, that has a higher execution priority while task Ta
execution is in progress, the NX-series CPU Unit will assign Tb to the available core for processing on a
priority basis.
The execution priority for each task type is given in the following table. The smaller the value of the exe-
cution priority, the higher the priority.
Execution pri-
Task Tasks with the same execution priority
ority
Primary periodic task 4 ---
Periodic task 5, 16, 17, or 18 You cannot set the same execution priority for more than one task.
Event task 8 or 48 You can set the same execution priority for more than one event
task. Refer to 5-3-5 Event Task Execution Timing for NX701 CPU
Units for the order of execution.
5
Primary
4 1
periodic task
Event tasks 0 to 32
8
Execution priority
(0 to 63)
16 Periodic task 0 or 1
A total of up to 32
tasks for both
priority levels.
17 Periodic task 0 or 1
18 Periodic task 0 or 1
Event tasks 0 to 32
48
Low
Task Periods for the Primary Periodic Task and Periodic Tasks
The CPU Unit repeatedly and cyclically executes the primary periodic task and periodic tasks. The task
periods for periodic tasks must be assigned as integer multiples of the task period of the primary peri-
odic task (called the primary period). Therefore, execution of both tasks will start at the same time every
few cycles.
For example, if the primary period is set to 1 ms and the task period of the priority-16 periodic task is set
to 4 ms, the execution timing of the primary periodic task and the priority-16 periodic task is
synchronized after each four executions of the primary periodic task.
Additional Information
An event task is not executed periodically. Instead, it is executed only once when the specified
execution condition is met. Therefore, execution of an event task depends on when its execution
condition is met and on its execution priority.
Low
IO: Indicates I/O refreshing (data outputs and then data inputs).
UPG: User program execution.
MC: Indicates motion control.
SS: Indicates system services.
Project with the Primary Periodic Task, Priority-5 Periodic Task, Priority-16
5-3 Specifications and Basic Operation of Tasks for NX701 CPU Units
Periodic Task, and Priority-17 Periodic Task
• The tasks are classified into the following two groups and executed.
• Each task in the same group is preferentially executed in descending order of execution priority.
• The primary periodic task has the highest execution priority, so it is always executed in the primary
period.
• The priority-5 periodic task is executed in parallel with the primary periodic task.
• The priority-16 periodic task is executed after completion of the primary periodic task.
• The priority-17 periodic task has a lower execution priority than the priority-5 periodic task, so it is
executed when the priority-5 periodic task is not being executed.
• In this example, the task period for the priority-5 periodic task is set to twice the primary period.
Also, the task period for the priority-16 periodic task is set to four times the primary period. This
means that the timing at which execution of a task starts coincides with that of the primary peri-
odic task once every two primary periods for the priority-5 periodic task and once every four pri-
mary periods for the priority-16 periodic task. 5
• The system services are executed at the required time without being affected by the tasks.
High Primary
periodic task IO UPG MC IO UPG MC IO UPG MC IO UPG MC IO UPG MC
Task execution Task Task execution Task Task execution Task Task execution Task Task execution Task
condition is execution condition is execution condition is execution condition is execution condition is execution
met. is completed. met. is completed. met. is completed. met. is completed. met. is completed.
Task period Task period
Priority-5
IO UPG MC IO UPG MC IO UPG MC
periodic task
Priority-16
UPG UPG
periodic task
Priority-17
UPG
periodic task
Task Specification
Primary periodic task • These tasks are executed in both RUN mode and PROGRAM mode.
Periodic tasks • The user program is executed only in RUN mode.
Event tasks Event tasks are executed only in RUN mode.
5-3 Specifications and Basic Operation of Tasks for NX701 CPU Units
The Processing Performed in Each Task
processing
processing 2
processing
processing 1
Input data
Motion
control
common
common
System
System
*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.
*1 The Axis Current Values (Position, Velocity, and Torque) and Drive Status in the system-defined variables for
motion control are updated.
*2 When there are motion control instructions in user program execution in the primary periodic task, the CPU Unit
executes the results from those instructions immediately afterward in motion control processing as shown below.
The CPU Unit outputs the results to the Servo Drives during I/O refreshing in the next primary periodic task.
Note The processes in each cell in the above table are executed in the order of description.
System common
processing 1
Output data
Output data
processing
processing
processing
User
processing
Input data
Input data
processing 2
common
System
Motion
control
program
Refreshing execution Refreshing
MC_
The system-defined variables for motion control When the CPU Unit executes a motion
are updated for use in the following motion control instruction, it executes the result of During output data processing in the next primary
control instructions. that instruction in motion control processing period, the CPU Unit sends the results of motion
immediately afterward. control processing to the Servo Drive via EtherCAT.
When there is a motion control instruction in user program execution in the priority-16 periodic task,
the CPU Unit executes the result from that instruction in the motion control processing (MC) of the
next primary periodic task.
Refer to 5-11-3 System Input and Output Response Times for details.
processing
processing 2
processing
processing 1
Input data
Motion
control
common
common
System
System
5-3 Specifications and Basic Operation of Tasks for NX701 CPU Units
Processing Processing contents
System common processing 2 • Processing for exclusive control of variables in tasks is performed (when
refreshing tasks are set).
• Processing for variables accessed from outside of the Controller is per-
formed to maintain concurrency with task execution (executed for the
variable access time that is set in the Task Settings).
• If there is processing for EtherNet/IP tag data links and refreshing tasks
are set for the tags (i.e., variables with a Network Publish attribute), vari-
able access processing is performed.
*1 The Axis Current Values (Position, Velocity, and Torque) and Drive Status in the system-defined variables for
motion control is updated.
*2 When there are motion control instructions in user program execution in the priority-5 periodic task, the CPU
Unit executes the results from those instructions immediately afterward in motion control processing as
shown below. The CPU Unit outputs the results to the Servo Drives during I/O refreshing in the next priority-
5 periodic task.
Note The processes in each cell in the above table are executed in the order of description.
Output data
processing
processing
processing
User
processing
Input data
Input data
processing 2
common
System
Motion
control
program
Refreshing execution Refreshing
MC_
System
User
System
Note The processes in each cell in the above table are executed in the order of description.
System
User
System
Note The processes in each cell in the above table are executed in the order of description.
Event Tasks
5-3 Specifications and Basic Operation of Tasks for NX701 CPU Units
An event task is executed only once when the specified execution condition is met. You can use 0 to
32 event tasks. The processing details for event tasks are shown in the following figure.
System common
of tasks in the NX-series CPU Unit
processing 1
processing 2
User program
execution will not refer to the pausing task
scenario.
Task execution
condition is met.
* Refer to Execution Timing When the Execution Condition Is a Condition Expression for a Variable on page 5-28
for the timing of when the value of the specified variable is checked to see if the specified condition expression is
met.
5-3 Specifications and Basic Operation of Tasks for NX701 CPU Units
BoolVar @ActEventTask
EN ENO
'Task1' TaskName
Execution
priority
Primary period
High
Primary
periodic task
Task1
event task
Low
TRUE
BoolVar
FALSE
Example 2: Executing an Event Task Repeatedly While the Value of a Variable Matches a Specified 5
Value
In the following example, the upward differentiation option is not used for the ActEventTask instruc-
BoolVar ActEventTask
EN ENO
'Task1' TaskName
Execution
priority
Primary period
High
Primary
periodic task
ActEventTask instruction
is executed.
Task1
event task
Task1 is already in execution so any ActEventTask After the execution of the event
instructions that specify Task1 are ignored. task has started, it is executed
to the end even if the value of
Low
The event task is executed repeatedly the BoolVar variable changes
while the BoolVar variable is TRUE. to FALSE.
TRUE
BoolVar
FALSE
*1 The following variables cannot be used. EN, ENO, P_Off, P_CY, P_First_RunMode, P_First_Run and
P_PRGER
*2 In-out variables cannot be used.
Classification of data
Data type Specification
type
Boolean, bit string, integer, and real Possible.
Basic data types Duration, date, time of day, date and time, or Not possible.
text string data
Data type specifica- Arrays Not possible.
Array specification
tions Elements Possible.*1
Structures Not possible.
Structures
Members Possible.*2
Derivative data type Unions Not possible.
Unions
Members Possible.*2
Enumerations Possible.
*1 The elements of the array must be Boolean variables, bit strings, integer data, or real data.
*2 The members must be Boolean, bit strings, integer data, or real data.
5-3 Specifications and Basic Operation of Tasks for NX701 CPU Units
The condition expressions that you can specify depend on the data type of the variable that you
specify for the condition expression. If the variable that you specify for a condition expression is bit
string data, integer data, or real data, you must set a comparison constant to compare to the value
of the variable.
Execution
priority
Primary period
High
Event task
TRUE is assigned to
Program1.trigger1 variable.
Low
TRUE
Program1.trigger1
FALSE
Example 2: Execution Condition for an Event Task Set to When Program1.curVal (INIT variable) ≥ 10
The event task is executed only once when the value of Program1.curVal changes from less
than 10 to 10 or higher.
Execution
priority
Primary period
High
Primary
IO UPG MC IO UPG MC IO UPG MC IO UPG MC IO UPG MC
periodic task
Program1.curVal 0 9 10 11 9
5-3 Specifications and Basic Operation of Tasks for NX701 CPU Units
5-3-5 Event Task Execution Timing for NX701 CPU Units
The execution priority of event tasks is 8 or 48. With a multi-core processor, the NX701 CPU Units exe-
cute event tasks for which the execution condition is met according to the task execution priority.
Depending on the user program, however, the CPU Unit may execute an event task in parallel with the
primary periodic task, periodic tasks, or other event tasks with different execution priorities.
If you have multiple tasks that read and write to the same variables, make sure to use the following
functions to control how an event task is executed with the primary periodic task, periodic tasks, or
other event tasks with different execution priorities.
Refer to 5-8-1 Ensuring Concurrency of Variable Values between Tasks for details.
5
The execution of an event task also depends on its execution conditions. You can also set the same
execution priority for more than one event task. You must be careful when the execution conditions are
Event task
(execution priority of 8)
Task period
Priority-16
periodic task
ActEventTask instruction
Low is executed.
Example 2: Executing an Event Task with an Execution Priority Lower Than the Task That Executes
an Instruction
Execution
Primary period
priority
High
Primary
periodic task
ActEventTask instruction
is executed.
Event task
(execution priority of 8)
Low
Execution
priority
High Primary period
Primary periodic
IO UPG MC IO UPG MC IO UPG MC IO UPG MC IO UPG MC
task
Priority-16
periodic task
Low
Example 2: Project with a Priority-16 Periodic Task and an Event Task Execution with a Priority of 48
Execution
priority
Primary period
High
Primary periodic
IO UPG MC IO UPG MC IO UPG MC IO UPG MC IO UPG MC
task
Priority-16
periodic task Event task is executed
only once.
Low
5-3 Specifications and Basic Operation of Tasks for NX701 CPU Units
Precautions for Correct Use
• For the NX701 CPU Units, the timing at which the execution condition for an event task is met
is the same regardless of whether the condition expression match is triggered by I/O refresh-
ing in the primary periodic task, or by execution of a program that is assigned to the primary
periodic task. This difference is described in the following table.
Timing at which the execution condi-
Trigger for condition expression to match
tion for an event task is met
I/O refreshing in the primary periodic task Evaluation in the next primary periodic
task
Execution of the programs in the primary periodic Evaluation in the next primary periodic
task task
• In order for an event task to be executed, the condition expression must be met in the evalua-
tion after the previous evaluation where the condition expression was not met. This means that
even if the status of the condition expression changes from not met to met, if the condition
returns to not met before the next evaluation, the event task will not be executed.
• For an NX701 CPU Unit, specify an internal variable defined in the program that is assigned to
the primary periodic task if you specify an internal variable with a data size of 64 bits or more
to the condition expression. If an internal variable that is not defined in the primary periodic
task is specified, the concurrency of variable values may not be ensured. As the result, the
match evaluation may not be correctly performed.
5
Execution Timing for Event Tasks with the Same Execution Priority
Execution
priority
High Primary period
Primary
periodic task
Execution priority
is the same.
T2 event task
(execution priority of 8)
Low
Example 2: When Both Condition Expressions for Variables and the ActEventTask Instruction Are Used
In this example, the execution conditions of the T1, T2, and T3 event tasks are set as given below.
• T1: Condition expression for the VarA variable
• T2: Condition expression for the VarB variable
• T3: ActEventTask instruction
The operation would proceed as described below if the condition expression for VarA was met during
I/O refreshing, the ActEventTask instruction was executed in the user program, and the condition
expression for VarB was met during execution of the user program all in the same primary period.
(1) The condition expression for VarA is met during I/O refreshing.
(2) The condition expression for VarB is met during execution of the user program.
(3) At this point, T1 and T2 are not executed because the condition expressions are not yet
evaluated.
(4) The ActEventTask instruction is executed in the user program, so T3 is executed.
(5) When I/O refreshing is executed in the primary periodic task, the match is detected that the
condition expressions for VarA and VarB are met, so T1 and T2 are executed.
If the match is detected that more than one condition expression is met in the same execu-
tion period, the order of execution of event tasks is undefined. The following figure shows
an example when T1 is executed first.
Execution
priority
High Primary period
Primary periodic
IO UPG MC IO UPG MC
task
T2 event task
(execution priority of 8)
T3 event task
(execution priority of 8)
Low
5-3 Specifications and Basic Operation of Tasks for NX701 CPU Units
5-3-6 Operation When Execution Condition Is Met Again before
Execution of the Event Task Is Completed
If the execution condition for an event task is met again before the execution of that event task is com-
pleted, the second match of the execution condition is ignored. “Before an event task is completed”
includes the duration of execution of the event task and the time waiting for execution. After the execu-
tion of the event task has started, it is executed to the end even if the condition expression is no longer
met.
Execution
priority
High Primary period
Primary
periodic task
ActEventTask ActEventTask
instruction is instruction is
executed for T1. executed for T1.
Execution of the event task has not completed yet,
so the second ActEventTask instruction is ignored.
T1 event task
(execution priority of 8)
Low
Execution
5
priority
High Primary period
Task Is Completed
5-3-6 Operation When Execution Condition Is Met Again before Execution of the Event
Primary periodic
task
T1 event task
(execution priority of 8)
Low
Item Specification
Type of task • Primary periodic task
• Periodic task (priority 17 or 18)
• Event task (priority 8 or 48)
Numbers of tasks • Primary periodic task: 1
• Periodic tasks: 0 to 2 tasks*1
• Event tasks: 0 to 32 tasks*2
Number of programs per task 128 max.
Task period of the primary periodic task 2 ms to 8 ms (in 250-µs increments)
Task periods of periodic tasks • Priority 17 or 18
2 ms to 100 ms (in 250-µs increments)
Set the task period of each periodic task to an integer multiple of the task
period of the primary periodic task.
You cannot select any combination of task periods whose least common
multiple exceeds 600 ms.
*1 There can be no more than one task with each of the following execution priorities: 17and 18.
*2 There can be up to 32 tasks with each of the following priorities as long as there are no more than a total of 32
tasks with these priorities: 8 and 48.
5-4 Specifications and Basic Operation of Tasks for NX1P2 CPU Units
5-4-2 Guidelines for Separating Tasks for NX1P2 CPU Units
All programs must be assigned to one of the tasks. Use the guidelines in the following table to deter-
mine which tasks to assign your programs to based on the requirements of the programs.
With an NX1P2 CPU Unit, you can execute the tag data link service, option board service, and
system services without being affected by the task execution.
Execution pri-
Task Tasks with the same execution priority
ority
Primary periodic task 4 ---
Periodic task 17 or 18 You cannot set the same execution priority for more than one task.
Event task 8 or 48 You can set the same execution priority for more than one event
task. Refer to 5-4-5 Event Task Execution Timing for NX1P2 CPU
Units for the order of execution.
Primary
4 1
periodic task
Event tasks 0 to 32
8
Execution priority
(0 to 63)
A total of up to 32
tasks for both
priority levels.
17 Periodic task 0 or 1
18 Periodic task 0 or 1
Event tasks 0 to 32
48
Low
5-4 Specifications and Basic Operation of Tasks for NX1P2 CPU Units
Task Periods for the Primary Periodic Task and Periodic Tasks
The CPU Unit repeatedly and cyclically executes the primary periodic task and periodic tasks. The task
periods for periodic tasks must be assigned as integer multiples of the task period of the primary peri-
odic task (called the primary period). Therefore, execution of both tasks will start at the same time every
few cycles.
For example, if the primary period is set to 2 ms and the task period of the priority-17 periodic task is set
to 8 ms, the execution timing of the primary periodic task and the priority-17 periodic task is
synchronized after each four executions of the primary periodic task.
Additional Information
An event task is not executed periodically. Instead, it is executed only once when the specified
execution condition is met. Therefore, execution of an event task depends on when its execution
condition is met and on its execution priority.
Low
IO: Indicates I/O refreshing (data outputs and then data inputs).
UPG: User program execution.
MC: Indicates motion control.
SS: Indicates system services.
Project with the Primary Periodic Task and Priority-17 Periodic Task
• The primary periodic task has the highest execution priority, so it is always executed in the primary
period.
• The priority-17 periodic task has a lower execution priority than the primary periodic task, so it is
executed when the primary periodic task is not being executed.
• In this example, the task period for the priority-17 periodic task is set to four times the primary
period. This means that execution of the priority-17 periodic task will start at the same time once
every four primary periods.
• The system services are executed at the required time without being affected by the tasks.
Primary period Primary period Primary period Primary period Primary period
Execution priority
High Primary
periodic IO UPG MC IO UPG MC IO UPG MC IO UPG MC IO UPG MC
task
Task execution Task Task execution Task Task execution Task Task execution Task Task execution Task
condition is execution condition is execution condition is execution condition is execution condition is execution
met. is completed. met. is completed. met. is completed. met. is completed. met. is completed.
Task period
Priority-17
periodic task
Pausing UPG Pausing Pausing UPG
System
SS
services
Low
Task Specification
Primary periodic task • These tasks are executed in both RUN mode and PROGRAM mode.
Periodic tasks • The user program is executed only in RUN mode.
Event tasks Event tasks are executed only in RUN mode.
5-4 Specifications and Basic Operation of Tasks for NX1P2 CPU Units
The Processing Performed in Each Task
processing
processing 2
processing
processing 1
Input data
Motion
control
common
common
System
System
*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.
*1 The Axis Current Values (Position, Velocity, and Torque) and Drive Status in the system-defined variables for
motion control are updated.
*2 When there are motion control instructions in user program execution in the primary periodic task, the CPU Unit
executes the results from those instructions immediately afterward in motion control processing as shown below.
The CPU Unit outputs the results to the Servo Drives during I/O refreshing in the next primary periodic task.
Note The processes in each cell in the above table are executed in the order of description.
System common
processing 1
Output data
Output data
processing
processing
processing
User
processing
Input data
Input data
processing 2
common
System
Motion
control
program
Refreshing execution Refreshing
MC_
The system-defined variables for motion control When the CPU Unit executes a motion
are updated for use in the following motion control instruction, it executes the result of During output data processing in the next primary
control instructions. that instruction in motion control processing period, the CPU Unit sends the results of motion
immediately afterward. control processing to the Servo Drive via EtherCAT.
processing 2
common
common
System
System
Note The processes in each cell in the above table are executed in the order of description.
5-4 Specifications and Basic Operation of Tasks for NX1P2 CPU Units
Event Tasks
An event task is executed only once when the specified execution condition is met. You can use 0 to
32 event tasks. The processing details for event tasks are shown in the following figure.
Task execution time (varies)
* The CPU Unit will temporarily interrupt the execution of a
task in order to execute a task with a higher execution
priority.
* *
Control processing
processing 1
processing 2
common
common
System
System
User program execution
Task execution
condition is met.
5
5-4-4 Event Task Execution Conditions for NX1P2 CPU Units
An event task is executed only once when the specified execution condition is met. There are the follow-
* Refer to Execution Timing When the Execution Condition Is a Condition Expression for a Variable on page 5-28
for the timing of when the value of the specified variable is checked to see if the specified condition expression is
met.
BoolVar @ActEventTask
EN ENO
'Task1' TaskName
Execution
priority
Primary period
High
Primary
periodic task
Task1 Interrupted.
event task
Low
TRUE
BoolVar
FALSE
5-4 Specifications and Basic Operation of Tasks for NX1P2 CPU Units
Example 2: Executing an Event Task Repeatedly While the Value of a Variable Matches a Specified
Value
In the following example, the upward differentiation option is not used for the ActEventTask instruc-
tion. This causes the Task1 event task to be executed as long as the BoolVar BOOL variable is
TRUE. Any ActEventTask instructions that specify Task1 will be ignored if Task1 is already in execu-
tion. After the execution of the event task has started, it is executed to the end even if the value of
BoolVar changes to FALSE during execution.
BoolVar ActEventTask
EN ENO
'Task1' TaskName
Execution
priority
Primary period
High
Primary
periodic task
ActEventTask instruction
is executed.
*1 The following variables cannot be used. EN, ENO, P_Off, P_CY, P_First_RunMode, P_First_Run and
P_PRGER
*2 In-out variables cannot be used.
Classification of data
Data type Specification
type
Boolean, bit string, integer, and real Possible.
Basic data types Duration, date, time of day, date and time, or Not possible.
text string data
Data type specifica- Arrays Not possible.
Array specification
tions Elements Possible.*1
Structures Not possible.
Structures
Members Possible.*2
Derivative data type Unions Not possible.
Unions
Members Possible.*2
Enumerations Possible.
*1 The elements of the array must be Boolean variables, bit strings, integer data, or real data.
*2 The members must be Boolean, bit strings, integer data, or real data.
5-4 Specifications and Basic Operation of Tasks for NX1P2 CPU Units
Example of Executing Event Tasks When Condition Expressions for Variables
Are Met
Example 1: Execution Condition for Event Task Set to a Change to TRUE of the Program1.trigger1
Boolean Variable
When the value of Program1.trigger1 changes to TRUE, the event task is executed only once.
Execution
priority
High Primary period
Condition expression Condition expression The event task is executed only once.
is not met. is met.
Event task
TRUE is assigned to
Program1.trigger1 variable.
Low
TRUE
Program1.trigger1
FALSE 5
Execution
priority
Primary period
High
Primary
IO UPG MC IO UPG MC IO UPG MC IO UPG MC IO UPG MC
periodic task
Program1.curVal 0 9 10 11 9
The execution priority of event tasks is 8 or 48. If the execution conditions for an event task are met
while another task is in execution, the task with the higher execution priority is given priority. The task
with the lower execution priority is interrupted. This is the same as with the primary periodic task and
periodic tasks.
If you have multiple tasks that read and write to the same variables, make sure to use the following
functions to control how an event task is executed with the primary periodic task, periodic tasks, or
other event tasks with different execution priorities.
Refer to 5-8-1 Ensuring Concurrency of Variable Values between Tasks for details.
The execution of an event task also depends on its execution conditions. You can also set the same
execution priority for more than one event task. You must be careful when the execution conditions are
met for more than one event task that has the same execution priority.
Task period
Priority-17 Interrupted.
periodic task
ActEventTask
Low instruction is executed.
5-4 Specifications and Basic Operation of Tasks for NX1P2 CPU Units
Example 2: Executing an Event Task with an Execution Priority Lower Than the Task That Executes
an Instruction
Execution
Primary period
priority
High
Primary
periodic task
ActEventTask instruction
is executed.
Event task
(execution priority of 8)
Low
Task period
Priority-17 Interrupted.
periodic task
Low
Example 2: Project with a Priority-17 Periodic Task and an Event Task Execution with a Priority of 48
The execution priority of the event task is lower than the execution priority of the priority-17 peri-
odic task. The event task is therefore executed after the priority-17 periodic task is executed.
Execution
priority
Primary period
High
Low
• In order for an event task to be executed, the condition expression must be met in the evalua-
tion after the previous evaluation where the condition expression was not met. This means that
even if the status of the condition expression changes from not met to met, if the condition
returns to not met before the next evaluation, the event task will not be executed.
Execution Timing for Event Tasks with the Same Execution Priority
You can also set the same execution priority for more than one event task. If the execution conditions for
more than one event task with the same execution priority are triggered by an ActEventTask instruction,
the event tasks will be executed in the order that the instruction is executed.
Example 1: When Two ActEventTask Instructions Are Executed
In the example given below, two ActEventTask instructions are used to execute two event tasks. The T1
event task is executed before the T2 event task because the ActEventTask instruction that triggered T1
was executed first.
5-4 Specifications and Basic Operation of Tasks for NX1P2 CPU Units
Execution
priority
High Primary period
Primary
periodic task
Execution priority
is the same.
T2 event task
(execution priority of 8)
Low
Example 2: When Both Condition Expressions for Variables and the ActEventTask Instruction Are Used
In this example, the execution conditions of the T1, T2, and T3 event tasks are set as given below.
• T1: Condition expression for the VarA variable
• T2: Condition expression for the VarB variable
• T3: ActEventTask instruction
The operation would proceed as described below if the condition expression for VarA was met during 5
I/O refreshing, the ActEventTask instruction was executed in the user program, and the condition
expression for VarB was met during execution of the user program all in the same primary period.
Condition expression
for VarA is met. ActEventTask
Condition expression instruction The match for the condition
for VarB is met. is executed. expression for VarA and
T1 event task VarB is detected.
(execution
priority of 8)
T2 event task
(execution
priority of 8)
T3 event task
(execution
priority of 8)
Low
Execution
priority
High Primary period
Primary
periodic task
ActEventTask ActEventTask
instruction is instruction is Execution of the event task has not completed yet,
executed for T1. executed for T1. so the second ActEventTask instruction is ignored.
T1 event task
Interrupted.
(execution priority of 8)
Low
Execution
priority
Primary period
High
Primary
periodic task
T1 priority-17
periodic task Interrupted. Interrupted.
Low
Item Specification
Type of task • Primary periodic task
• Periodic task (priority 16, 17, or 18)
• Event task (priority 8 or 48)
Numbers of tasks • Primary periodic task: 1
• Periodic tasks: 0 to 3 tasks*1
• Event tasks: 0 to 32 tasks*2
Number of programs per 128 max.
task
Task period of the primary 500 µs*3, 1 ms, 2 ms, or 4 ms 5
periodic task
Task periods of periodic Set the task period of each periodic task to an integer multiple of the task period of
*1 There can be no more than one task with each of the following execution priorities: 16, 17, and 18.
*2 There can be up to 32 tasks with each of the following priorities as long as there are no more than a total of 32
tasks with these priorities: 8 and 48.
*3 With the NJ301-, you can use this setting with unit version 1.03 or later.
You cannot use this setting with the NJ101-.
Task period of the primary periodic task Task periods that you can set for periodic tasks
500 µs*1 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 ms, 75 ms, or 100 ms
1 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 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
*1 With the NJ301-, you can use this setting with unit version 1.03 or later.
You cannot use this setting with the NJ101-.
The CPU Unit cannot execute more than one task at the same time. The order in which tasks are exe-
cuted depends on the execution priority that is set for each task.
Execution pri-
Task Tasks with the same execution priority
ority
Primary periodic task 4 ---
Periodic task 16, 17, or 18 You cannot set the same execution priority for more than one task.
Event task 8 or 48 You can set the same execution priority for more than one event
task. Refer to 5-5-5 Event Task Execution Timing for NJ-series
Controllers for the order of execution.
Event tasks 0 to 32
8
Execution priority
(0 to 63)
16 Periodic task 0 or 1
A total of up to 32
tasks for both
priority levels.
17 Periodic task 0 or 1
18 Periodic task 0 or 1
Event tasks 0 to 32
48
Low
5
Task Periods for the Primary Periodic Task and Periodic Tasks
The CPU Unit repeatedly and cyclically executes the primary periodic task and periodic tasks. The task
Additional Information
An event task is not executed periodically. Instead, it is executed only once when the specified
execution condition is met. Therefore, execution of an event task depends on when its execution
condition is met and on its execution priority.
Low
IO: Indicates I/O refreshing (data outputs and then data inputs).
UPG: User program execution.
MC: Indicates motion control.
SS: Indicates system services.
Execution priority Primary period Primary period Primary period Primary period Primary period
High Primary
IO UPG MC IO UPG MC IO UPG MC IO UPG MC IO UPG MC
periodic task
Task execution Task Task execution Task Task execution Task Task execution Task Task execution Task
condition is execution is condition is execution is condition is execution is condition is execution is condition is execution is
met. completed. met. completed. met. completed. met. completed. met. completed.
Task period
Task period
Task execution
Task execution
condition is met.
is completed.
System SS
Low services
Task period
Priority-17 Interrupted.
UPG UPG
periodic task
Task Specification
Primary periodic task • These tasks are executed in both RUN mode and PROGRAM mode.
Periodic tasks • The user program is executed only in RUN mode.
Event tasks Event tasks are executed only in RUN mode.
processing
processing 2
processing
processing 1
Input data
Motion
control
common
common
System
System
*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.
5
Processing Processing contents
I/O refresh- Output data • Output refresh data is created for Output Units that refresh I/O.
*1 The Axis Current Values (Position, Velocity, and Torque) and Drive Status in the system-defined variables for
motion control are updated.
*2 When there are motion control instructions in user program execution in the primary periodic task, the CPU
Unit executes the results from those instructions immediately afterward in motion control processing. The CPU
Unit outputs the results to the Servo Drives during I/O refreshing in the next primary periodic task.
Note The processes in each cell in the above table are executed in the order of description.
System common
processing 1
Output data
Output data
processing
processing
processing
User
processing
Input data
Input data
processing 2
common
System
Motion
control
program
Refreshing execution Refreshing
MC_
The system-defined variables for motion control When the CPU Unit executes a motion
are updated for use in the following motion control instruction, it executes the result of During output data processing in the next primary
control instructions. that instruction in motion control processing period, the CPU Unit sends the results of motion
immediately afterward. control processing to the Servo Drive via EtherCAT.
When there is a motion control instruction in user program execution in the periodic task, the CPU
Unit executes the result from that instruction in the motion control processing (MC) of the next pri-
mary periodic task.
Refer to 5-11-3 System Input and Output Response Times for details.
Periodic Tasks
A periodic task executes its programs every task period. The task period is specified as 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.
Processing for periodic tasks that do not control I/O is different from processing for periodic tasks
that do control I/O.
common
common
System
User
System
program
execution
Note The processes in each cell in the above table are executed in the order of description.
Output data
processing
processing
Input data
processing 1
processing 2
common
common
System
User
System
Refreshing program
execution
Note The processes in each cell in the above table are executed in the order of description.
Event Tasks
An event task is executed only once when the specified execution condition is met. You can use 0 to
32 event tasks. The processing details for event tasks are shown in the following figure.
Task execution time (varies)
* The CPU Unit will temporarily interrupt the
execution of a task in order to execute a
* * task with a higher execution priority.
Control processing
processing 1
System common
processing 2
System common
User program
execution
Task execution
condition is met.
* Refer to Execution Timing When the Execution Condition Is a Condition Expression for a Variable on page 5-28
for the timing of when the value of the specified variable is checked to see if the specified condition expression is
met.
Execution
priority
Primary period
High
Primary
periodic task
Task1 Interrupted.
event task
Low
TRUE
BoolVar
FALSE
Example 2: Executing an Event Task Repeatedly While the Value of a Variable Matches a Specified
Value
In the following example, the upward differentiation option is not used for the ActEventTask instruc-
tion. This causes the Task1 event task to be executed as long as the BoolVar BOOL variable is
TRUE. Any ActEventTask instructions that specify Task1 will be ignored if Task1 is already in execu-
tion. After the execution of the event task has started, it is executed to the end even if the value of
BoolVar changes to FALSE during execution.
BoolVar ActEventTask
EN ENO
'Task1' TaskName
Execution
priority
Primary period
High
Primary
periodic task
ActEventTask instruction
is executed.
Task1 is already in execution so any ActEventTask After the execution of the event
instructions that specify Task1 are ignored. task has started, it is executed
to the end even if the value of
Low
The event task is executed repeatedly the BoolVar variable changes
while the BoolVar variable is TRUE. to FALSE.
TRUE
BoolVar
FALSE
*1 The following variables cannot be used. EN, ENO, P_Off, P_CY, P_First_RunMode, P_First_Run and
P_PRGER 5
*2 In-out variables cannot be used.
Classification of data
Data type Specification
type
Boolean, bit string, integer, and real Possible.
Basic data types Duration, date, time of day, date and time, or Not possible.
text string data
Data type specifica- Arrays Not possible.
Array specification
tions Elements Possible.*1
Structures Not possible.
Structures
Members Possible.*2
Derivative data type Unions Not possible.
Unions
Members Possible.*2
Enumerations Possible.
*1 The elements of the array must be Boolean variables, bit strings, integer data, or real data.
*2 The members must be Boolean, bit strings, integer data, or real data.
Execution
priority
Primary period
High
Event task
TRUE is assigned to
Program1.trigger1 variable.
Low
TRUE
Program1.trigger1
FALSE
Execution
priority
Primary period
High
Primary
IO UPG MC IO UPG MC IO UPG MC IO UPG MC IO UPG MC
periodic task
Program1.curVal 0 9 10 11 9
The execution priority of event tasks is 8 or 48. If the execution conditions for an event task are met
while another task is in execution, the task with the higher execution priority is given priority. The task
with the lower execution priority is interrupted. This is the same as with the primary periodic task and
periodic tasks. The execution of an event task also depends on its execution conditions.
You can also set the same execution priority for more than one event task. You must be careful when
the execution conditions are met for more than one event task that has the same execution priority.
Event task
(execution priority of 8)
Task period
Priority-16 Interrupted.
periodic task
ActEventTask instruction
Low is executed.
Execution
Primary period
priority
High
Primary
periodic task
ActEventTask instruction
is executed.
Event task
(execution priority of 8)
Low
Execution
priority
High Primary period
Primary periodic
IO UPG MC IO UPG MC IO UPG MC IO UPG MC IO UPG MC
task
Task period
5
Priority-16 Interrupted.
Interrupted.
periodic task
Example 2: Project with a Priority-16 Periodic Task and an Event Task Execution with a Priority of 48
The execution priority of the event task is lower than the execution priority of the priority-16 peri-
odic task. The event task is therefore executed after the priority-16 periodic task is executed.
Execution
priority
Primary period
High
Primary periodic
IO UPG MC IO UPG MC IO UPG MC IO UPG MC IO UPG MC
task
Priority-16
Interrupted. Interrupted.
periodic task
Low
• In order for an event task to be executed, the condition expression must be met in the evalua-
tion after the previous evaluation where the condition expression was not met. This means that
even if the status of the condition expression changes from not met to met, if the condition
returns to not met before the next evaluation, the event task will not be executed.
• For an NJ-series CPU Unit, specify an internal variable defined in the program that is assigned
to the primary periodic task if you specify an internal variable with a data size of 64 bits or
more to the condition expression. If an internal variable that is not defined in the primary peri-
odic task is specified, the concurrency of variable values may not be ensured. As the result,
the match evaluation may not be correctly performed.
Execution Timing for Event Tasks with the Same Execution Priority
You can also set the same execution priority for more than one event task. If the execution conditions
are met for more than one event task that has the same execution priority, the event tasks will be exe-
cuted in the order that their execution conditions are met.
Example 1: When Two ActEventTask instructions Are Executed
In the example given below, two ActEventTask instructions are used to execute two event tasks. The T1
event task is executed before the T2 event task because the ActEventTask instruction that triggered T1
was executed first.
Execution
priority
High Primary period
Primary
periodic task
Execution priority
is the same.
T2 event task
(execution priority of 8)
Low
Execution
priority
High Primary period
Primary periodic
task
IO UPG MC IO UPG MC 5
Condition expression
for VarA is met. ActEventTask
T2 event task
(execution priority of 8)
T3 event task
(execution priority of 8)
Low
Execution
priority
High Primary period
Primary
periodic task
ActEventTask ActEventTask
instruction is instruction is Execution of the event task has not completed yet,
executed for T1. executed for T1. so the second ActEventTask instruction is ignored.
T1 event task
Interrupted.
(execution priority of 8)
Low
Execution
priority
High Primary period
Primary periodic
task
Priority-16
Interrupted. Interrupted.
periodic task: T1
Low
Item Tag data link service Option board service System services
Execution prior- The tag data link service is The option board service is System services are executed
ity executed in parallel with the executed in parallel with the in parallel with the task execu-
task execution. It is prioritized task execution. However, tion. However, during execu-
than the option board service during execution of the tag tion of the tag data link
and system services. data link service, the option service or option board ser-
board service is not exe- vice, system services are not
cuted. It is prioritized than executed.
system services.
Processing Data is exchanged by using I/O refreshing for Analog I/O System services include ser-
tags with other controllers and Option Boards is executed. vices with low execution prior-
devices on an EtherNet/IP ity, such as the USB port
network. You can use the service and SD Memory Card
built-in EtherNet/IP port in the service.
CPU Unit.*1
Execution timing The execution interval and the The option board service is System services are executed
time that is required for each executed depends the exe- depend on the execution pri-
execution depend on the cution priority if a request ority if a request comes from
model of the CPU Unit and on comes from the Option the hardware or from outside
the tag data link settings.*2 Board. of the CPU Unit.
*1 For details on the processing that is performed for tag data links, refer to the NJ/NX-series CPU Unit
Built-in EtherNet/IP Port User’s Manual (Cat. No. W506).
*2 Refer to 5-6-2 Processing Performed in and Execution Timing of the Tag Data Link Service for details on
the execution interval and the time that is required for execution of tag data links.
5-6-1 Execution Priorities and Execution Orders of Services Other Than Tasks
High
Numbers of tasks
Primary periodic
4 1
task
8 Event tasks 0 to 32
16 Periodic task 0 or 1
18 Periodic task 0 or 1
Event tasks 0 to 32
48
System services
Low
Execution
Primary period
priority
High
Primary IO UPG MC IO UPG MC IO UPG MC IO UPG MC IO UPG MC
periodic task
Task period
Priority-16
periodic task
IO UPG Execution period of the IO UPG
tag data link service
Task period
Low
Option board
service
Task period
Priority-17
UPG Interrupted.
periodic task
System
services
Low
Execution
Primary period
priority
High
Primary IO UPG MC IO UPG MC IO UPG MC IO UPG MC IO UPG MC
periodic task
Task period
Task period
Priority-17
UPG Interrupted.
periodic task
5-6-1 Execution Priorities and Execution Orders of Services Other Than Tasks
tasks and tag data link service.
The execution interval and the execution time for one execution depend on the model of the CPU Unit
and on the tag data link settings. Refer to 5-6-2 Processing Performed in and Execution Timing of the
Tag Data Link Service for details.
Additional Information
Differences in the Timing of Processing Tag Data Links Depending on Whether a Refresh-
ing Task Is Set
The process to write values to and read values from variables is different depending on whether
a refreshing task is set. If a refreshing task is set, the values are read and written in that task. If a
refreshing task is not set, the values are read and written in a system service. This means there
is a difference in the execution timing of processing tag data links.
The difference in the execution timing when data is received for tag data links with an NJ-series
CPU Unit is shown below.
• When a Refreshing Task Is Specified
Execution
Primary period
priority
High
Primary IO UPG MC IO UPG MC IO UPG MC IO UPG MC IO UPG MC
periodic task
Task period
Priority-16
IO UPG IO UPG
periodic task
5
Tag data link
service
5-6-2 Processing Performed in and Execution Timing of the Tag Data Link Service
Task period
Priority-17
UPG Interrupted.
periodic task
Tag data is read
from the tag set.
System
service
Low
High
Primary IO UPG MC IO UPG MC IO UPG MC IO UPG MC IO UPG MC
periodic task
Task period
Priority-16
IO UPG IO UPG
periodic task
Task period
Priority-17 Interrupted.
UPG
periodic task
Tag data is read
from the tag set.
System
services
Low The values are written to the variables
in a system service.
Task period
Priority-16
periodic task
IO UPG Execution interval of the tag data IO UPG
link service
Task period
Priority-17
UPG Interrupted.
periodic task
Additional Information
For an NX-series CPU Unit, the priority-17 and priority-18 periodic tasks and the system service
are not affected by execution of the tag data link service.
5-6-2 Processing Performed in and Execution Timing of the Tag Data Link Service
Version Information
Execution of processing for tag data links depends on the unit version of the CPU Unit and the
Sysmac Studio version as given below.
Option Board
Option board
service
Primary
MC
MC
MC
MC
Primary period
When you output data, the output data is processed in the option board service after user program
execution is completed. When the processing in the option board service is completed, the output
data is output in the next internal processing of the Option Board.
Option Board
Option board
service
Primary
MC
MC
MC
MC
Primary period
For the NX1P2 CPU Units, the system services are executed without being affected by the tasks.
However, during execution of the tag data link service or option board service, system services are
not executed.
For NJ-series CPU Units, the system services are executed in the unused time between execution of
the tasks and tag data link service.
If sufficient time cannot be obtained to execute the system services, the processing of tasks with an
execution priority of 17 or higher will be interrupted to allocate sufficient time.
You can set the time for execution of the system services in the System Service Monitoring Settings
on the Sysmac Studio.
There is no priority in the processing of system services. All of the processing is executed in parallel
with time slicing.
Execution Timing When Sufficient Execution Time for the System Services
Cannot Be Obtained
With an NJ-series CPU Unit, if there is not enough unused time between execution of the tasks and
tag data link service to execute the system services, the execution of tasks with an execution priority
of 17 or higher will be interrupted to allocate sufficient time.
If the system service execution time cannot be obtained even if execution of tasks with an execution
priority of 17 or higher is temporarily interrupted, an Insufficient System Service Time Error occurs
and user program execution stops.
You can set the time for execution of the system services in the System Service Monitoring Settings
on the Sysmac Studio.
Execution
Task period
priority
High Primary IO UPG MC IO UPG MC IO UPG MC IO UPG MC IO UPG MC
periodic task
Task period
Priority-16
IO UPG
periodic task
Task period
Priority-17
periodic task Interrupted.
Low
System
services
If the time that is specified in the System Service Monitoring Execution of the primary periodic task and
Settings cannot be allocated, execution of the priority-17 periodic priority-16 periodic task is not interrupted.
task is interrupted.
Changes
Access Setting Setting Set val- Update
Description Default in RUN
point group [unit] ues timing
mode
Operation System System Ser- Sets the interval of sys- 10 ms to 10 ms When Not
Settings, Service vice Execu- tem service execution. 1s down- allowed.
Operation Monitoring tion Interval loaded to
Settings Settings [ms] CPU Unit
Tab, Basic System Ser- Sets the ratio for moni- 5% to 10% When Not
Settings vice Execu- toring system service 50% down- allowed.
tion Time execution. loaded to
Ratio [%] CPU Unit
Additional Information
NX-series CPU Units are designed to always secure sufficient time for system service execution,
so the System Service Monitoring Settings are not provided. Also an Insufficient System Service
Time Error will not occur.
Unit of assign-
I/O refreshing target Assignable task
ment
Communications Coupler Unit with an NX-series Safety Primary periodic task or priority-5 By Slave Termi-
Control Unit on the Slave Terminal and priority-16 periodic nal
tasks*1*2*3
Communications Coupler Unit with an NX Unit assigned to Primary periodic task or priority-5
an axis on the Slave Terminal periodic task*3
Communications Coupler Unit without an NX Unit assigned Primary periodic task or priority-5
to an axis on the Slave Terminal and priority-16 periodic tasks*2*3
EtherCAT slaves to which axes are assigned Primary periodic task or priority-5 By slave
periodic task*2*3
Other EtherCAT slaves Primary periodic task or priority-5
and priority-16 periodic tasks*2*3
NX Units on the CPU Unit and I/O built in the CPU Unit*4 Primary periodic task ---
CJ-series Basic I/O Units*5 Primary periodic task and priority- By Unit
16 periodic task
CJ-series Special I/O Units*5
CJ-series CPU Bus Units*5
*1 If multiple Slave Terminals with mounted NX-series Safety Control Units exist, you cannot assign Slave Termi-
nals to a combination of the periodic tasks other than priority-5 periodic task and priority-5 periodic task.
*2 You can use the priority-5 periodic task only with the NX701 CPU Units.
*3 You can use the primary periodic task only with the NX1P2 CPU Units.
*4 You can use NX Units on the CPU Unit and I/O built in the CPU Unit only with the NX1P2 CPU Units.
*5 You can use various CJ-series Units only with NJ-series CPU Units.
Additional Information
When using both EtherCAT slaves and CJ-series Units, you can shorten the task execution time
of the primary periodic task by assigning the I/O refreshing for EtherCAT slaves to a different task
than the I/O refreshing for CJ-series Units. Assign I/O refreshing for EtherCAT slaves to the pri-
mary periodic task and assign I/O refreshing for CJ-series Units to the priority-16 periodic task.
Unit Configuration
A Slave Terminal is used. The following table shows the Unit configuration of the Slave Terminal.
I/O Map
The following I/O map is used. The table below shows the bits that are used in the sample program-
ming.
Data Variable
Position Port Description R/W Variable Variable type
type comment
Unit1 NX-ID3317
Input Bit 00 Input bit 00 R BOOL ComIn Common input Global variable
value
Unit2 NX-OD3256
Output Bit 00 Output bit 00 W BOOL OutA1 Output value A1 Global variable
Output Bit 01 Output bit 01 W BOOL OutA2 Output value A2 Global variable
Output Bit 02 Output bit 02 W BOOL OutB1 Output value B1 Global variable
Output Bit 03 Output bit 03 W BOOL OutB2 Output value B2 Global variable
I/O Specifications
The I/O specifications are as follows:
• OutA1 changes from FALSE to TRUE one second after the value of ComIn changes from FALSE
to TRUE. In the same way, OutA2 changes to TRUE two seconds, OutB1 three seconds and
OutB2 four seconds after the value of ComIn changes to TRUE.
• When the value of ComIn changes from TRUE to FALSE, the values of OutA1, OutA2, OutB1 and
OutB2 change from TRUE to FALSE.
TRUE
ComIn
FALSE
1s
TRUE
OutA1
FALSE
2s
OutA2 TRUE
FALSE
3s
OutB1 TRUE
FALSE
4s
OutB2 TRUE
FALSE
Task Processing 5
The primary periodic task and priority-16 periodic task are used. The I/O refreshing is assigned to
the primary periodic task.
For controls of OutB1 and OutB2, the processing from input of ComIn to calculations is performed in
the periodic task. The calculation results of the periodic task are assigned to the temporary global
variables tmp_OutB1 and tmp_OutB2. In the primary periodic task, the values of tmp_OutB1 and
tmp_OutB2 are assigned to OutB1 and OutB2. Then, OutB1 and OutB2 are output.
The Controller may pause the periodic task in order to execute the primary periodic task. The
assignment of calculation results to tmp_OutB1 and tmp_OutB2 may be performed before or after
the pause of the periodic task. And the timing of assignment determines the timing of output of cal-
culation results in the primary periodic task.
The following figure shows an example of processing flow. The task period of the periodic task is set
to twice as long as that of the primary periodic task.
Task period
Primary
periodic task IO UPG IO UPG IO UPG IO UPG
Task period
If the values are assigned to tmp_OutB1 If the values are assigned to tmp_OutB1
and tmp_OutB2 in step (4), they are and tmp_OutB2 in step (7), they are
output in step (8). output in step (10).
(1) ComIn is input during I/O refreshing in the primary periodic task.
(2) The calculation is performed during the user program execution in the primary periodic task
and the values are assigned to OutA1 and OutA2.
Also, the values of tmp_OutB1 and tmp_OutB2 are assigned to OutB1 and OutB2. How-
ever, the values of tmp_OutB1 and tmp_OutB2 are the initial values because the values are
not assigned to tmp_OutB1 and tmp_OutB2 in the periodic task. Therefore, the values of
OutB1 and OutB2 are also the initial values.
(3) ComIn is input during I/O refreshing in the periodic task.
(4) The calculation is performed during the user program execution in the periodic task.
If the primary periodic task is executed while the periodic task execution is in progress, the
periodic task is paused. Depending on the timing of processing in the periodic task, the
assignment of the values to tmp_OutB1 and tmp_OutB2 may be performed before or after
the pause of the periodic task.
(5) OutA1, OutA2, OutB1 and OutB2 are output during I/O refreshing in the primary periodic
task.
Also, ComIn is input again.
(6) The calculation is performed during the user program execution in the primary periodic task
and the values are assigned to OutA1 and OutA2.
Also, the values of tmp_OutB1 and tmp_OutB2 are assigned to OutB1 and OutB2. If the
values are assigned to tmp_OutB1 and tmp_OutB2 in step (4), the calculation results of the
periodic task are reflected in OutB1 and OutB2. If the values are not assigned to
tmp_OutB1 and tmp_OutB2 in step (4), the values of tmp_OutB1 and tmp_OutB2 are the
initial values. Therefore, the values of OutB1 and OutB2 are also the initial values.
(7) The calculation is performed during the user program execution in the periodic task that fol-
lows step (4).
If the values are not assigned to tmp_OutB1 and tmp_OutB2 in step (4), they are assigned
here.
(8) OutA1, OutA2, OutB1 and OutB2 are output during I/O refreshing in the primary periodic
task.
If the values are assigned to tmp_OutB1 and tmp_OutB2 in step (4), the calculation results
of the periodic task are output as OutB1 and OutB2.
If the values are assigned to tmp_OutB1 and tmp_OutB2 in step (7), the initial values of
OutB1 and OutB2 are output.
(9) The calculation is performed during the user program execution in the primary periodic task
and the values are assigned to OutA1 and OutA2.
Also, the values of tmp_OutB1 and tmp_OutB2 are assigned to OutB1 and OutB2. If the
values are assigned to tmp_OutB1 and tmp_OutB2 in step (7), the calculation results of the
periodic task are reflected in OutB1 and OutB2.
(10) OutA1, OutA2, OutB1 and OutB2 are output during I/O refreshing in the primary periodic
task.
If the values are assigned to tmp_OutB1 and tmp_OutB2 in step (7), the calculation results
of the periodic task are output as OutB1 and OutB2.
You can use the Lock and Unlock instructions to perform the task exclusive controls to prevent the
values of tmp_OutB1 and tmp_OutB2 from being overwritten by the periodic task before they are
Data
Name Comment
type
ComIn BOOL Common input value
OutA1 BOOL Output value A1
OutA2 BOOL Output value A2
OutB1 BOOL Output value B1
OutB2 BOOL Output value B2
tmp_OutB1 BOOL Temporary variable for B1
tmp_OutB2 BOOL Temporary variable for B2
Algorithm
Input of ComIn, calculations and outputs and output of OutA1 and OutA2
A1_Wait
ComIn OutA1
TON
In Q
T#1s PT ET
A2_Wait
TON OutA2
In Q
T#2s PT ET
Assignment of the values tmp_OutB1 and tmp_OutB2 to OutB1 and OutB2, and output of OutB1 and OutB2
P_On
Lock
En ENO
USINT#1 Index
tmp_OutB1 OutB1
tmp_OutB2 OutB2
Unlock
En ENO
USINT#1 Index
Data
Name
type
B1_Wait TON
B2_Wait TON
Data
Name Comment
type
ComIn BOOL Common input value
tmp_OutB1 BOOL Temporary variable for B1
tmp_OutB2 BOOL Temporary variable for B2
USINT#1 Index
T#3s PT ET
B2_Wait
TON tmp_OutB2
In Q
T#4s PT ET
Unlock
En ENO
USINT#1 Index
5
Version Information
The CPU Unit with unit version 1.08 or later and Sysmac Studio version 1.09 or higher are
required to use the Initial Status setting for programs at the start of operation, the PrgStart
instruction and the PrgStop instruction.
*1 The process data communications cycle (process data communications cycle 1) in the EtherCAT settings will
be the same as this period.
*2 With the NJ301-, you can use this setting with unit version 1.03 or later.
You cannot use this setting with the NJ101-.
*3 For an NX1P2- CPU Unit and an NJ101- CPU Unit, the default of the primary periodic task is 2
ms.
Changes
Update
Parameter Setting range Default in RUN
timing
mode
Task Type Specify the priority-5 periodic task.*1 --- When Not
Execution pri- Automatically set to 5. --- down- allowed.
ority loaded to
CPU Unit
Task Name Text string Periodic
Task0
Period/ Task period*2 • NX701 CPU Units 2 ms
Execution 125 µs, 250 µs to 100 ms (in 250-µs
Conditions increments)
Task Period Exceeded The same as for the primary periodic task. The same
Detection as for the
Task Timeout Detection primary
Time periodic
Variable Access Time [%] task.
*1 You can use the priority-5 periodic task only with the NX701 CPU Units.
*2 The process data communications cycle 2 in the EtherCAT settings will be the same as this period.
Change
Update s in
Parameter Setting range Default
timing RUN
mode
Task Type You can set any of the following. --- When Not
down- allowed.
Priority-16 periodic task*1
loaded to
Priority-17 periodic task CPU Unit
Priority-18 periodic task
Execution Automatically set to 16, 17, or 18. ---
priority
Task Name Text string Periodic-
Task0
Period/ Task period • NX701 CPU Units 10 ms
Execution Refer to 5-3-1 Specifications of Tasks for
Conditions NX701 CPU Units.
• NX1P2 CPU Units
Refer to 5-4-1 Specifications of Tasks for
NX1P2 CPU Units.
• NJ-series CPU Units
Refer to 5-5-1 Specifications of Tasks for
NJ-series Controllers.
Task Period Exceeded The same as for the primary periodic task. The same
Detection as for the
Task Timeout Detection primary
Time periodic
Variable Access Time [%] task.
*1 You cannot use the priority-16 periodic task with the NX1P2 CPU Units.
Changes
Update
Parameter Setting range Default in RUN
timing
mode
Task Type You can set any of the following. --- When Not
Priority-8 event task down- allowed.
Introduction
You can specify the task that refreshes a global variable and the tasks that access the global vari-
able. This ensures the concurrency of the value of the global variable from the point of view of the
tasks that access the variable.
A single task is set to read and write the value of a specified global variable. That task is called the
refreshing task. Tasks that only read the value of the global variable are also specified. These tasks
are called accessing tasks. This ensures the concurrency of the value of the global variable.
Accessing
Read only
task: Task B
Read/write
Refreshing
Global variable
task: Task A
Refreshing task is specified.
Refreshing task: Task A
Accessing
Read only
task: Task C
Application Example
The refreshing task specification is used to ensure the concurrency of the value of a global variable
within a periodic task when the variable is written in the primary periodic task.
Program Program
Read/write Read only
External variable GVar1 Global variable GVar1 External variable GVar1
System
If a refreshing task is set for a global variable, the accessing task, at the start of accessing task exe-
cution, always reads the most recent value of the variable that was written at the completion of
refreshing task execution.
Task period of task A Task period of task A Task period of task A
This will allow you to maintain the concurrency of the values of global variables within the tasks with-
out performing any special programming.
If an instruction that writes the value to a global variable is used in the accessing task, an error will
occur when you check the program on the Sysmac Studio.
5
Execution of
ActEventTask
The value that is written The value that the event task
here is not reflected in writes cannot be accessed.
the event task.
Because of this, do not use exclusive control of variables in tasks to pass the values of global
variable if you are using the ActEventTask instruction to execute event tasks. To ensure the
concurrency of global variables when using the ActEventTask instruction, you should use the
Task_IsActive (Determine Task Status) instruction. The Task_IsActive instruction determines
whether the specified task is in execution or waiting to be executed. Use this instruction to pre-
vent other tasks from accessing variables that the event task writes to while it is in execution.
Refer to the NJ/NX-series Instructions Reference Manual (Cat. No. W502) for details on the
Task_IsActive instruction.
Restrictions
• Only one refreshing task can be set for each global variable. If it is necessary to write a global
variable from more than one task, use the task exclusive control instructions described below to
ensure concurrency.
• If you specify a refreshing task for a structure or union variable, you must specify only one refresh-
ing task for the entire structure or union variable. You cannot specify a different refreshing task for
different structure or union members.
• If you specify a refreshing task for an array variable, you must specify only one refreshing task for
the entire array variable. You cannot specify a different refreshing task for different array elements.
Additional Information
You can use a data trace to sample an external variable for a global variable for which settings for
exclusive control of variables in tasks are used. This allows you to sample the values of the
global variable in the refreshing and accessing tasks in a data trace. Refer to 8-6-4 Data Tracing
for information on data tracing.
Task A
Program
Executed.
Lock instruction Global variable
Refreshed. Higher priority
Task B
Lock region 1
Executed. Executed.
Program
Unlock instruction Lock instruction
Execution is not
started until
execution of region Lock region 1
1 in task A is
completed.
Unlock instruction
When execution of lock region 1 in task A is completed, task A is paused again and the remainder of
lock region 1 in task B is executed. The concurrency of the value of the global variable is maintained
by implementing exclusive control of the write processing of the global variable between the tasks.
Task A
Program
Lock instruction
Task B
Lock region 1
Program
Lock instruction
Unlock instruction
Executed.
Lock region 1
Refreshed.
Global variable
Unlock instruction
A sample programming that uses the task exclusive control instructions (i.e., the Lock and Unlock
instructions) to perform exclusive control is shown.
Global Variables
• ST Program
Lock(1); (* Start an exclusive lock between tasks. *)
IF gReq=TRUE AND ReqBusy=FALSE THEN (* Access the exclusive flag. *)
ReqBusy:=TRUE;
UserDefFB_ins.PutData:=gPar1; (* Read the parameter from MainTask. *)
UserDefFB_ins.PutDate:=gPar2; (* Read the parameter from MainTask. *)
gReq:=FALSE; (* Reset the exclusive flag. *)
UserDefFB_ins.Execute:=TRUE;
END_IF;
Unlock(1); (* Stop an exclusive lock between tasks. *)
UserDefFB_ins();
IF UserDefFB_ins.Done:=TRUE THEN
UserDefFB_ins.Execute:=FALSE;
ReqBusy:=FALSE;
END_IF;
Accessing Variables from Outside the Controller during the System Service
Whether you use an NX-series CPU Unit or an NJ-series CPU Unit, access to multiple variables
may not be completed in the same task period.
NX-series CPU Unit
Accessing Variables from Outside the Controller during the System Common
Processing 2
Whether you use an NX-series CPU Unit or an NJ-series CPU Unit, access to multiple variables is
executed in the same period.
Primary period Primary period
This section particularly describes how to execute the variable access from outside the Controller
during the system common processing 2 of the task.
If the Sysmac Studio is used to access variables, it can only refresh the variable values during the sys-
tem common processing 2 of the task. Values are accessed during the system services.
Note You can use CJ-series Units only with NJ-series CPU Units.
Note You can use memory for CJ-series Units only with NJ-series CPU Units and NX1P2 CPU Units.
*1 The constant value is 0.58 for a CPU Unit with unit version 1.02 or earlier.
*2 The constant value is 0.0009 for a CPU Unit with unit version 1.02 or earlier.
*3 The constant value is 1.03 for a CPU Unit with unit version 1.02 or earlier.
Using the equation, the variable access time for Access No.1 is calculated as follows.
Variable access time for Access No.1 = 600 * 0.001 + 8 * 0.49 + 1 * 1.41 + 6.68
= 12.61 [µs]
In the same way, you can calculate the access time for the other accesses and get the following val-
ues.
If only one of these accesses occurs in one task period, you set the Variable Access Time to the one
for Access No.1, which requires the longest access time.
The variable access time for Access No.1 is 12.61 µs. Therefore, when the task period is 500 µs, the
Variable Access Time is set to 12.61/500 ≈ 3%.
If every access occurs once in one task period, the Variable Access Time is calculated with the
equation as follows.
Variable access time = (600 + 200 + 1000) * 0.001 + (8 + 4 + 1) * 0.49 + (1 + 1 + 1) * 1.41 + 6.68
= 19.08 [µs]
5
When the task period is 500 µs, the Variable Access Time is set to 19.08/500 ≈ 4%.
Processing in the case that actual variable access time became longer than
Number of vari-
able accesses in Processing
one task period
Multiple times Variable accesses are executed for the number of times that can be completed within
the set variable access time. The rest of accesses that could not be done will be exe-
cuted in the next task period.
This means, the multiple variable accesses cannot be completed within the same task
period.
Once Variable accesses continue even after the set variable access time is exceeded. This
means, the task execution time gets longer.
Primary
periodic task
IO UPG MC IO IO IO UPG MC
UPG MC
Even if the Task Period Exceeded Detection setting is disabled, information will be output to the follow-
ing system-defined variables if task processing is not completed within the period: Task Period
Exceeded Flag (_TaskName_Exceeded), Task Period Exceeded Count (_TaskName_ExceedCount),
Controller Error Status (_ErrSta), and the event log.
I/O is refreshed as follows according to what the I/O is for if task processing is not completed within the
task period.
I/O refresh operation if task processing is not completed within the task
I/O is for
period
EtherCAT slave*1 Outputs: The values from the previous period are output.
NX Units on the CPU Inputs: Inputs are refreshed, but the input data is not updated in the executed user
Unit*2 program.
Built-in I/O*3
CJ-series Unit I/O is not refreshed until execution of the task is completed.
*1 This includes NX Units on EtherCAT Slave Terminals.
*2 You can use NX Units on the CPU Unit only with the NX1P2 CPU Units.
*3 You can use the built-in I/O only with the NX1P2 CPU Units.
Primary
periodic task IO IO
UPG
Primary M M
IO UPG C IO UPG C
periodic task
Additional Information
NX-series CPU Units are designed to always secure sufficient time for system service execution,
so the System Service Monitoring Settings are not provided. Also an Insufficient System Service
Time Error will not occur.
Additional Information
To check or estimate the system service execution time, the task execution time ratio, system ser-
vice execution ratio, estimated CPU usage rate, tag data service execution ratio, expanded number
of I/O points for CJ-series Unit, and built-in EtherNet/IP are displayed for NJ-series CPU Units.
The above information are not displayed for NX-series CPU Units because the system services
are executed at the required time without being affected by the tasks.
Period exceeded If the task execution time exceeds the task period
(i.e., if the Task Period Exceeded Flag system-
defined variable is TRUE), the amount by which
the time was exceeded is displayed in the bar.*2
Task execution count Displays the number of executions of the task.
The value of the Task Execution Count system-
defined variable is displayed.
Real processing time of The time ratios are displayed with bars for the Not dis- Displayed.
tasks *3 system common processing, I/O refreshing, user played.
program execution, and motion control process-
ing. (Specific time values are not displayed.)
Average esti- The estimated average value of the real pro-
mation cessing time of task is displayed.
Max estimation The estimated maximum value of the real pro-
cessing time of task is displayed.
Task execution time ratio*4 The percentage of the total task execution time Displayed. Not dis-
per unit time. played.
*1 This is the actual time required from the point that task execution was started until it was completed. This
interval includes both the time to execute other tasks and the time for system services that were executed
from when task execution was started until it was completed.
Only the primary periodic task is displayed when a Simulator for an NX701 CPU Unit is connected.
*2 This item is not displayed for event tasks.
*3 This interval is the time required to execute only the task itself. It is the same as the task execution time for
the primary periodic task. For periodic tasks, this is the task execution time minus the time to execute other
tasks and the time for system services that were executed between the point that the execution condition is
met until execution is completed.
Task period (fixed)
Real processing time of task (varies) Real processing time of task (varies)
System common
System common
Output data
processing
processing
Input data
processing 1
processing 2
Refreshing User program
execution
*4 This item was added for version 1.12 of the Sysmac Studio. It is not displayed for an NX-series CPU Unit.
Meaning of the Task Execution Time and the Real Processing Time
of the Task
The Task Execution Time and Real Processing Time of Tasks that are displayed in the Monitor View for
the execution time of tasks are described in the following table. The Real Processing Time of Tasks
shows only the time the Simulator was connected.
Execution
priority Task period of primary periodic task
High
Primary
periodic task
a
c d
Low b
Desktop Calculations
First, refer to A-2 Calculating Guidelines for the Real Processing Times of Tasks for the NX701 Sys-
tem, A-3 Calculating Guidelines for the Real Processing Times of Tasks for the NX1P2 System and
A-4 Calculating Guidelines for the Real Processing Times of Tasks for the NJ-series System to
make a rough estimate of the average task execution time on paper. You cannot estimate the maxi-
mum value on paper.
1 Create the Unit and slave configurations, create the global variables and device variables, and
create the axes (to create the Axis Variables).
5 Select the relevant hardware revision in the Unit that the hardware revision is displayed.
6 With an NJ-series CPU Unit, set the Expanded number of I/O points in the CJ-series Unit
parameters in the Task Execution Time Monitor to create user-defined variables for specified
CJ-series Special Units. Also set the sizes of the expansion areas (e.g., fixed I/O allocation
areas for the DeviceNet Unit) for AT specifications (i.e., the number of output words and the
number of input words). These sizes are used to calculate the I/O refresh time for the specific
Special Units.
7 Estimate the task execution times in the Task Execution Time Monitor.
You can check the following values in the Task Execution Time Monitor when you start the Simulator
in Execution Time Estimation Mode.
• The average and maximum values of the task execution time
• The average and maximum values of the real processing times of the tasks
• Bar graph that shows the system common processing time, I/O refreshing time, user program exe-
cution time, and motion control time
• CPU usage
Note Only the primary periodic task is displayed for an NX-series CPU Unit.
Additional Information
You can check the following values when connected to the Simulator of the Sysmac Studio. You
cannot check these values when connected to the physical Controller.
• CPU usage: Displays how much of the task period is used by the total of the maximum esti-
mated task processing time, the tag data link service execution time ratio, and the system ser-
vice processing time of an NJ-series CPU Unit (as specified in the system service monitoring
settings). If CPU usage exceeds 100%, it means that there is not sufficient time for task pro-
cessing and the system service monitoring settings.
This information is not displayed for an NX-series CPU Unit.
• Real processing time of tasks: This is the time that was required for the task from when task
execution is started until it is completed. The time to execute other tasks that were executed
from when task execution was started until it was completed is not included.
The maximum values that are displayed on the Sysmac Studio are the results of operation on the
physical Controller. As described previously, the maximum value of the task execution time varies
depending on the internal status of the physical Controller. As a result, the maximum values
obtained here may be exceeded in actual operation. Use the obtained values or the larger values in
the following calculating results as guidelines of maximum values.
Version Information
• The task execution time ratio is displayed when an NJ-series CPU Unit is used with Sysmac
Studio version 1.12 or higher.
• Use an NJ101- CPU Unit with Sysmac Studio version 1.13 or higher. You cannot use
an NJ101- CPU Unit with Sysmac Studio version 1.12 or lower.
Additional Information
The average values of the task execution times that are displayed for task execution time moni-
toring are the averages for 10 task execution times.
1 Find the I/O response times that are required for the system from the equipment specifications.
2 From the system I/O response times, determine the task period for the primary periodic task.
3 See if the task execution time fits into the task period that you determined.
Then, work on paper or use the Task Execution Time Monitor of the Sysmac Studio to estimate
the average and maximum values of the task execution time.
4 For NJ-series CPU Units, see if the system service times are within the monitor settings.
If you use the Sysmac Studio, check the CPU usage.
5 Use the physical Controller to see if the task execution time fits into the task period.
Place the Sysmac Studio online with the physical Controller and use Task Execution Time Mon-
itor to check the task execution times.
If only the primary periodic task is too large to fit within the specified task period,
consider separating it into periodic tasks as follows.
• For the NX701 CPU Units, among processes required for device control, assign those which
require the high-speed control to the primary periodic task and other processes to the priority-5
periodic task.
• To reduce the task execution time, use the Enable Program (PrgStart) and Disable Program
(PrgStop) instructions to execute the program assigned to the primary periodic task only when
necessary.
• If the primary periodic task will still not fit within the specified task period after these measures,
among the processes of primary periodic task, assign those which do not require the high-speed
or high-accuracy control to the priority-16 periodic task or the priority-17 periodic task.
However, if variables such as the Axis Variables are accessed between the primary periodic task
and the priority-16 periodic task, the task execution time for the primary periodic task may be lon-
ger. For details, refer to the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No.
W507).
• If the primary periodic task will still not fit within the specified task period even after you take all of
these measures, change the task period for the primary periodic task.
If a task is separated, the periodic task will vary greatly with the unused time
for primary periodic task execution.
For a periodic task, use twice the average and maximum values calculated for the task execution
time to set the task period and then fine-tune the setting from there.
Example: Controlling Unit A and Unit B with the Primary Periodic Task 5
Unit A Unit B
Primary IO UPG
M
IO UPG
M
IO UPG
M
periodic task C C C
Priority-16 UPG
periodic task
Note: The above diagram shows only one input and one output.
However, the I/O response time may be as follows depending on the timing of the input from the
Unit.
Example: Controlling Unit A and Unit B with the Priority-16 Periodic Task
Unit A Unit B
IN OUT
Primary period
Task period
Note: The above diagram shows only one input and one output.
However, the I/O response time may be as follows depending on the timing of the input from the
Unit.
Minimum I/O response time = Primary period (= process data communications cycle)
Example: Controlling EtherCAT Input Slave A and EtherCAT Output Slave B with the Primary Peri-
odic Task
Slave A Slave B
Process data
communications period =
Primary period (t)
Primary M M M
IO UPG IO UPG IO UPG
periodic task C C C
Priority-16 UPG
periodic task
Note: The above diagram shows only one input and one output.
However, the I/O response time may be as follows depending on the timing of the input from the
slave.
Maximum I/O response time = Primary period (= process data communications cycle) × 2
Maximum I/O response time = Priority-5 periodic task period (= process data communications cycle 2)
Slave A Slave B
Process data
communications cycle 2 =
Task period
Priority-5 IO UPG
M
IO UPG
M
IO UPG
M
periodic task C C C
Note: The above diagram shows only one input and one output.
However, the I/O response time may be as follows depending on the timing of the input from the
slave.
Maximum I/O response time = Priority-5 periodic task period (= process data communications cycle 2) × 2
5
Performing Control with the Programs in the Priority-16 Periodic Task
Example: Controlling EtherCAT Input Slave A and EtherCAT Output Slave B with the Priority-16 Peri-
odic Task
Slave A Slave B
IN
OUT
Process data
communications cycle
= Primary period (t)
Task period
Note: The above diagram shows only one input and one output.
However, the I/O response time may be as follows depending on the timing of the input from the
slave.
Additional Information
Refer to the NX-series EtherCAT Coupler Units User’s Manual (Cat. No. W519) for the I/O
response times for an EtherCAT Slave Terminal that the NX Units are mounted after the Ether-
CAT Coupler Unit.
For NX Units on the CPU Unit, the following describes both of the I/O response times for the CPU Unit
inside and I/O response times that include NX Unit processing times.
The I/O response times for the CPU Unit inside are given below.
Example: Controlling Input Unit A and Output Unit B with the Primary Periodic Task
Unit A Unit B
Primary
MC
MC
MC
Note: The above diagram shows only one input and one output.
However, the I/O response time may be as follows depending on the timing of the input from the
Unit.
Example: Controlling Input Unit A and Output Unit B with the Priority-17 Periodic Task
Unit A Unit B
IN
OUT
Primary period (t)
Task period
Note: The above diagram shows only one input and one output.
However, the I/O response time may be as follows depending on the timing of the input from the
Unit.
Next, the I/O response times that include NX Unit processing times are given below.
The I/O response time is the time required for the following processing: The CPU Unit processes an
external signal input to one NX Unit, and another NX Unit outputs the processed result as an external
signal.
For each element, there is a unique value for each type of NX Unit. Refer to the appendix of the NX-
series Data Reference Manual (Cat. No. W525-E1-07 or later) for the value of each element.
5
Synchronous I/O Refreshing
With synchronous I/O refreshing, when there is more than one NX Unit that is connected to the CPU
Minimum I/O response time = Tnx-InDelay + Tnx-InProc + Primary period + Tnx-OutDelay + Tnx-OutProc
Example: Controlling Input Unit A and Output Unit B with the Primary Periodic Task
Unit A Unit B
IN OUT
I/O response times that include
Signals to input NX Unit processing times
terminals on NX Unit
Input Unit A
Tnx-Indelay Tnx-InProc
Signals from output
terminals on NX
Output Unit B
Tnx-OutProc
Note: The above diagram shows only one input and one output.
However, the I/O response time may be as follows depending on the timing of the input from the
Unit.
Maximum I/O response time = Tnx-InDelay + Tnx-InProc + Primary period x 2 + Tnx-OutDelay + Tnx-OutProc +
NX Unit processing time*1
*1 Refer to NX Unit Processing Time on page A-31 for information on the NX Unit processing time.
With input refreshing with input changed times for time stamp refreshing, when there is more than
one NX Unit that is connected to the CPU Unit, the inputs for all NX Units that support synchronous
input refreshing and the changed times for all NX Units that support input refreshing with input
changed times. Therefore, Tnx-InProc (input data processing time of the NX Unit) and Tnx-OutProc
(output data processing time of the NX Unit) are the longest time of the NX Units that support syn-
chronous I/O refreshing.
The Controller makes a response in the following I/O response time.
Minimum I/O response time = Tnx-InDelay + Tnx-InProc + Primary period + Tnx-OutDelay + Tnx-OutProc
Example: Controlling Input Unit A and Output Unit B with the Primary Periodic Task
Unit A Unit B
IN OUT
I/O response times that include
Signals to input NX Unit processing times
terminals on NX Unit
Input Unit A
Tnx-Indelay Tnx-InProc
Signals from output
terminals on NX
Output Unit B
Tnx-OutProc
Note: The above diagram shows only one input and one output.
However, the I/O response time may be as follows depending on the timing of the input from the
Unit.
Maximum I/O response time = Tnx-InDelay + Tnx-InProc + Primary period x 2 + Tnx-OutDelay + Tnx-OutProc +
NX Unit processing time*1
*1 Refer to NX Unit Processing Time on page A-31 for information on the NX Unit processing time.
Free-Run Refreshing
With Free-Run refreshing, the refresh cycle of the NX bus and the I/O refresh cycle of the NX Units
operate asynchronously.
The Controller makes a response in the following I/O response time.
Example: Controlling Input Unit A and Output Unit B with the Primary Periodic Task
Unit A Unit B
IN OUT
I/O response times that include
Signals to input NX Unit processing times
terminals on NX Unit
Input Unit A
Tnx-Indelay Tnx-InProc
Signals from output
terminals on NX
Output Unit B
Tnx-OutProc
Note: The above diagram shows only one input and one output.
However, the I/O response time may be as follows depending on the timing of the input from the Unit 5
and the timing of the output to the Unit.
Additional Information
With Free-Run refreshing, the Input Unit, CPU Unit and Output Unit operate asynchronously.
Therefore, an offset of timing that the Input Unit reads signals from input terminals, an offset of
timing that the CPU Unit reads the input data from the Input Unit, and an offset of timing that the
Output Unit outputs signals to output terminals will occur.
Tnx-InProc, primary period, and Tnx-OutProc will be the longest time of an offset of timing for
each Unit.
Slave A Servo A
IN Execution command
Process data
communications cycle
= Primary period (t) Primary period (t)
Motion control
Processing is performed in the Commands to Servo A are sent via
instructions
motion control processing (MC) EtherCAT communications when I/O is
executed.
section in the same primary period. refreshed in the next primary period.
Priority-16 UPG
periodic task
Note: The above diagram shows only one input and one output.
However, the I/O response time may be as follows depending on the timing of the input from the
slave.
Maximum I/O response time = Primary period (= process data communications cycle) × 2
Slave A Servo A
IN Execution comand
Process data
communications cycle 2
= Task period
Task period Task period
Motion control
Processing is performed in the instructions Commands to Servo A are sent via EtherCAT
motion control processing (MC) executed. communications when I/O is refreshed in the next
section in the same task period. task period.
Note: The above diagram shows only one input and one output.
However, the I/O response time may be as follows depending on the timing of the input from the
slave.
Maximum I/O response time = Priority-5 periodic task period (= process data communications cycle 2) × 2 5
Slave A Servo A
IN
Execution command
Process data
communications cycle
= Primary period (t)
Processing is performed in
the motion control processing Commands to Servo A are sent via
(MC) section of the next EtherCAT communications when I/O
primary periodic task. is refreshed in the next primary period.
Priority-16 UPG
UPG
periodic task FB FB
Note: The above diagram shows only one input and one output.
However, the response time may be as follows depending on the timing of the input from the slave.
Motion control
instructions
Axis A
Motion control
Axis C instructions
Additional Information
You can access the values of Axis Variables in the tasks other than those for axis control.
For detailed usage and precautions, refer to the NJ/NX-series CPU Unit Motion Control User’s
Manual (Cat. No. W507).
Step 4. Wiring
Separate variables into those that you use in more than one 6-3-3 Types of
POU (global variables) and variables that you use in only User-defined
Variables in
specific POUs (local variables).
Respect to
POUs
Determine if you need to automatically generate the variable 3-3 I/O Ports
names for the device variables that you use to access slaves and Device
Variables
and Units or if you need to define them yourself.
Design the attributes for the variables. 6-3-4 Attributes
of Variables
Variable Name, Data Type, AT Specification, Initial Value, Retain, Constant, and Network
Publish 6-3-5 Data
Types
Decide the data types of your variables (including array specifications, range specifications,
structures, and enumerations). 6-3-6 Deriva-
tive Data Types
Keep the following precautions in mind when you design 6-3-4 Attributes
variables. of Variables
6-3-5 Data
• Retention:
Types
Set the Retain attributes to determine the values that are used for variables when the power
supply is turned ON or when the operating mode changes. 6-3-6 Deriva-
• Structures: tive Data Types
When a structure is used for a variable in an instruction, design the program to use the same
structure data type for the input parameter, output parameter, or in-out parameter.
Example: Communications Instructions
• Array Specifications:
When an array variable is used for the variable for an instruction, design the program to use
an array variable for the input parameter, output parameter, or in-out parameter.
Examples: Shift Instructions, Stack Instructions, and Table Instructions
• AT Specifications:
Use AT specifications for the variables used for input parameters to certain instructions.
Example: Fixed or user I/O allocations for DeviceNet Units
• Network Publishing:
Design the variables for EtherNet/IP tag data links.
Programs
Executing Programs and Execution Conditions
• You execute a task to execute the programs that are assigned to that task.
• Programs are always executed.
Notation
• The POUs must include at least one program. You can assign up to 128 programs to a single task.
Notation
• You can use any instruction, user-defined function, or user-defined function block in the algorithm
of a function block.
• You can retain the values of internal variables. Therefore, you can retain status, such as for timers
and counters.
• There are both user-defined and system-defined function blocks.
User-defined function blocks are called user-defined function blocks. System-defined function
blocks are sometimes called FB instructions.
For details on function blocks, refer to 6-2-5 Details on Function Blocks.
Functions
Executing Functions and Execution Conditions
• You can call functions from programs, other functions, or function blocks to execute them.
• The EN input variable specifies the execution condition. A function is executed only once each
time EN changes to TRUE.
Notation
• You cannot use FB instructions or user-defined function blocks in algorithms.
• The values of internal variables are not retained. Therefore, the output value remains constant if
the input values are the same.
• There are both user-defined and system-defined function blocks.
User-defined functions are called user-defined functions. System-defined functions are some-
times called FUN instructions.
For details on functions, refer to 6-2-6 Details on Functions.
The hierarchical relationships between programs, functions, and function blocks are shown in the fol-
lowing figure.
Task
Program 1
Program 2
Function blocks
Program Structure
Programs consist of a local variable table and an algorithm.
You can use any function or function block in the algorithm of a program.
Program
Task
Program
Local variable table Assigned.
Program
Algorithm
FUN
FB
Order of Execution
You can set the order of execution of all programs in a task. You specify this order under Task
Settings - Program Assignment Settings in the Sysmac Studio.
*1 A CPU Unit with unit version 1.08 or later and Sysmac Studio version 1.09 or higher are required.
*2 To enable or disable the program, use the PrgStart or PrgStop instruction. You can make setting for the Prg-
Start instruction so that it executes the program without changing P_First_Run to TRUE.
Instance name
Function block name or instruction name
In-out variable
MyFB_instance Output variable
TRIG MyFB OUT
In Q
Algorithm
Instance name
6
Function block name
Algorithm
• Written as a ladder diagram or in ST.
• You can use any instructions,
user-defined functions, and user-
defined function blocks.
Instance Name
You give an instance name to a function block instance in a program to enable managing it. You
specify an instance name when you call a function block definition from a program or another func-
tion block.
Algorithm
You can code the algorithm either as a ladder diagram or in ST. You can use any instruction, user-
defined function, or user-defined function block in the algorithm.
Parameters
Input Parameters to Input Variables
An input parameter passes a value to an input variable in a function block when function block exe-
cution begins. An input parameter can be either a variable or a constant.
Additional Information
You can omit input and output parameters. Refer to information on operation when parameters
are omitted in Operation When Parameters Are Omitted on page 6-23 for details.
TON_instance
a TON c
In Q
b PT ET d
Instance name
Refer to Function Block Calls in ST Language Statement on page 6-117 for details.
*1 In the Sysmac Studio version 1.01 or lower, at least one BOOL input variable is required when you use function
blocks in a ladder diagram or in ST.
*2 In the Sysmac Studio version 1.07 or lower, it is impossible to change the value of an input variable from out-
side the function block. However, accessing it from outside the function block is possible.
*3 At least one BOOL output variable (including ENO) is required when you use function blocks in a ladder dia-
gram.
In the Sysmac Studio version 1.01 or lower, at least one BOOL output variable (including ENO) is required
when you use function blocks in ST.
Refer to 6-3-4 Attributes of Variables for details on setting variable attributes.
Additional Information
If you define an external variable with the same name as a global variable in a function block, it is
defined automatically based on that global variable.
ENO
• When ENO is FALSE, the previous values of all other output variables are retained.
Program POU
Variable
declarations Memory area reserved.
Algorithm
Instances cannot be read from other programs or function blocks. If an instance with the same name
as another instance is placed in a different program or another function block, that instance will oper-
ate as a completely separate instance.
timer2 NEXT
EN ENO
TON
IN[2] OUT[2]
In Q
PT[2] PT ET
timer3
Variable Table
TON
IN[3] OUT[3] Variable name Data type
In Q
IN ARRAY [0..4] OF BOOL
PT[3] PT ET OUT ARRAY [0..4] OF BOOL
PT ARRAY [0..4] OF TIME
timer ARRAY [0..4] OF TON
timer4
i UINT
TON
IN[4] OUT[4]
In Q
PT[4] PT ET
Refer to 6-5-2 Ladder Diagram Language for details on power flow output and parameter output.
You can specify the edge for an input variable to make the variable TRUE only when the input
parameter changes to TRUE.
Instance
Variable A FB
A
X
6
Instance X
Instance
Variable A FB
A
X
Instance X
Specifies detecting a change to FALSE.
Program P1
FB1_Instance
FB1
Cannot be
accessed.
FB2_Instance
FB2
C D
Program P2
Cannot be
accessed.
FB2_Instance.B
The following variables cannot be accessed from external devices. If these variables are accessed, a
building error will occur.
• In-out variables for function blocks
• Input variables for FB instructions for which the default value is not applied if an input parameter is
omitted
Structure of Functions
In a ladder diagram, functions are represented as rectangular boxes as shown below. Refer to Express-
ing Functions in ST on page 6-18 for details about how to express functions in ST. A function consists of
the following parts.
Function in Ladder Diagram:
EN input
Instance Name
Algorithm
You can code the algorithm either as a ladder diagram or in ST. You can use function instructions or
user-defined functions in the algorithm of a function. You cannot use any FB instructions or user-
defined function blocks. You also cannot use a differentiated instruction (e.g., R_TRIG or UP).
You cannot use the P_First_RunMode and P_First_Run system-defined variables.
Function
Algorithm
FUN instruction
User-defined
function
Parameters
Input Parameters to Input Variables
An input parameter passes a value to an input variable in a function when function execution begins.
An input parameter can be either a variable or a constant.
Expressing Functions in ST
The following example shows how to call functions from ST.
return_value:=function_name (input_variable_1:=input_parameter_1, ... input_variable_N:=input_pa-
rameter_N,in-out_variable_1:=in-out_parameter_1, ... in-out_variable_N:=in-out_parameter_N,output_-
variable_1=>output_parameter_1, ... output_variable_N=>output_parameter_N);
However, you can also omit the return value.
You can also omit input variable names and other variable names, and give only the parameters. (If you
do, the parameters must be given in the order that they are given in the function definition.) Also, the
number of parameters must match the number of input variables and other variables in the function
definition.
Functions Expressed in ST:
MAX
EN ENO
Para1 In1 Para_MAX
Para2 In2
Function name
Function name
name or
or instruction
instructionname
name Value is assigned.
Input Internal
Input parameter Output Output parameter
variable variables
Variable assignment variable Variable assignment
itself is passed. itself is passed.
Additional Information
You can register global variables as external variables in a function variable table to access
global variables. We recommend that you create your functions so that they produce output val-
ues uniquely based on their input parameter values. Algorithms that access global variables and
use them to affect the output values are not recommended. When you check the program on the
Sysmac Studio, a message will appear that says that it is not recommended to use global vari-
ables in functions. Take appropriate measures if necessary.
ENO
• When ENO is FALSE, the previous values of all other output variables are retained.
Return Values
• Return values are blank in ladder diagrams.
Case Ladder diagram notation ST language notation
Using return values variable_q:= MyFUN1(vari-
MyFUN1 able_i);
EN ENO
Variable i Variable q
IN
Variable i2 Variable q1
In2 OutEQ
OutGT
OutGE
Variable q4
OutNE
OutLT
OutLE
• The calling instruction is not required to use the return value in either a ladder diagram or ST. 6
• If you set the return value within a function algorithm, set the value to a variable with the same
name as the function.
Example:
BOOL variable B
in
Function
execution
BOOL variable A
BOOL variable B
* You can access the input and output variables of a function block from outside of the function block (but only
within the same program) with InstanceName.VariableName. However, you cannot access the input and output
variables of a function from outside the function.
FBinstance
FB
Omitted.
Done
Function
EN ENO
FALSE
x[i] IN1
Function
EN ENO
Example when variable i is outside the
range of the elements in array variable x
IN1 OUT1 x[9]
Function
OFF
EN ENO
x[i] x[i]
INOUT-- --INOUT
xyz Retained.
X
Recursive Calling
The following recursive calls are not allowed for functions or function blocks. They will result in an error
when you build the user program on the Sysmac Studio.
• A function or function block cannot call itself.
• A called function or function block cannot call the calling parent.
Names
Refer to 6-3-12 Restrictions on Variable Names and Other Program-related Names for restrictions on
POU names and function block instance names.
Additional Information
FB
x Do not assign INT variable x [0..199] to the function block input variable
IN1 OUT1
IN1 (Data type of the IN1 input variable in the function block:
ARRAY[0..199] OF INT).
FB
Instead, assign INT variable x [0..199] to the INOUT in-out variable of
x INOUT INOUT the function block. (Data type of INOUT in-out variable in the function
block: ARRAY[0..199] OF INT)
6
Example 2: Specifying a Structure Variable
FB
Do not assign MyStructure variable x to the IN1 input
x IN1 OUT1 variable of the function block (Data type of IN1 input
variable of the function block: MyStructure).
FB
Instead, assign MyStructure variable x to the INOUT in-out
x INOUT INOUT variable of the function block. (Data type of INOUT in-out
variable of the function block: MyStructure)
Nesting Levels
Calling another function or function block from a function or function block that was called from a pro-
gram is called nesting. The limits that are given in the following table apply to the POUs that you can
call from a user-defined function or function block and the number of nesting levels. A building error will
occur if these limits are exceeded.
Example 1: From a program, you can call function blocks to a depth of 8 levels. You can then call func-
tions to a depth of 16 levels.
6-3 Variables
In the NJ/NX-series System, variables are used to exchange I/O information with external devices, to
perform data calculations, and to perform other processes. This section describes variable designations
in detail.
Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for details on setting variables
with the Sysmac Studio.
6-3-1 Variables
Variables store I/O data for exchange with external devices or temporary data that is used for internal
POU processing. In other words, a variable is a container for data with a name, data type, and other
attributes.
You do not need to assign a memory address to a variable. However, you can assign a specific memory
address if necessary (see note). The NJ/NX-series CPU Unit automatically allocates memory
addresses in the memory area for variables.
* This is done to use specific functions for some CJ-series Special Units or perform the serial communications
using the host link (FINS) protocol. You must specify the CJ-series Unit memory address in the AT Specification
6-3 Variables
attribute of the variable. Refer to AT Specification on page 6-56 for details.
* You can use CJ-series Units only with NJ-series CPU Units.
User-defined Variables
6-3-1 Variables
The user defines all of the attributes of a user-defined variable. The rest of this section describes
user-defined variables.
Semi-user-defined Variables
These variables are used to access specific devices and data. There are two types of semi-user-
defined variables: device variables and cam data variables. Refer to 2-3-1 Types of Variables and 3-
3-1 I/O Ports for details on device variables.
System-defined Variables
System-defined variables are provided in advance in an NJ-series CPU Unit. The names and all
attributes are defined by the system. They have specific functions. System-defined variables are
supplied for each function module. Refer to A-5 System-defined Variables for details.
Refer to 2-3-1 Types of Variables for details on the different types of variables.
* You can define global variables as external variables to access the global variables through the external vari-
ables.
Local Variables
Local variables can be read and written only in the POU (program, function, or function block) in which
it is defined. Local variables are the same as internal variables if the POU is a program. If the POU is a
function block or a function, “local variable” is a collective term for internal variables, input variables,
output variables, in-out variables, and external variables.
Internal Variables
A local variable can be used only within one POU. An internal variable is declared in the local vari-
able table for the POU. You cannot access the values of internal variables from outside of the POU.
You can declare internal variables with the same names in different POUs. Each of those variables
is assigned to a different memory area.
Input Variables
When a POU is called, the input variables are assigned to the values of the input parameters from
the calling POU. An input variable is declared in the local variable table of the POU.
Output Variables
Before processing a POU is completed, the output parameters returned to the calling POU are
assigned to the output variables. An output variable is declared in the local variable table of the
POU.
In-Out Variables
When a POU is called, the in-out variables are assigned to the in-out parameters themselves (vari-
able designations) from the calling POU. If you change the value of an in-out variable within a POU,
the value of the in-out parameter changes at that time. An in-out variable is declared in the local vari-
able table of the POU.
External Variables
External variables are used to access data outside of a POU. You can access global variables from
POUs.
Global Variables
A global variable is declared in the global variable table.
Device variables that are automatically generated from the Unit configuration and slave configuration
and axis/axes group variables that are generated from the Axis Setting Table are automatically regis-
tered as global variables.
6-3 Variables
mode to initial value.
• When a major fault level Controller
error has occurred.
You can select to set or not set an initial Initial Value Depends on the
value. • Yes data type. (Refer to
Initial value setting: Specify the value of the section on initial
• None
the variable in the following cases and do values.) 6
not specify the Retain attribute.
Initial Value • When power turned ON
Additional Information
Classification Definition
Time of day A data type that represents a specific time of day (hour, minutes, and seconds).
Date A data type that represents a date (year, month, and day).
A data type that represents a date and time (year, month, day, hour, minutes,
Date and time
seconds, and milliseconds).
Text string A data type that contains a value that represents a text string.
There are a total of twenty different basic data types. The specifications are given in the following
table.
The meanings of the data size and alignment columns in the following table are as follows:
• Data size: The actual size of the value.
• Alignment: The unit used to allocate memory.
Classification Data type Data size Alignment Range of values Notation
Boolean BOOL 16 bits 2 bytes FALSE or TRUE BOOL#1, BOOL#0, TRUE or FALSE
BYTE 8 bits 1 byte BYTE#16#00 to FF BYTE#2#01011010
WORD 16 bits 2 bytes WORD#16#0000 to FFFF BYTE#2#0101_1010
32 bits 4 bytes DWORD#16#00000000 to BYTE#16#5A
Bit strings DWORD
FFFFFFFF You can also use the “_” character as a
64 bits 8 bytes LWORD#16#0000000000000000 separator.
LWORD
6-3 Variables
to FFFFFFFFFFFFFFFF
SINT 8 bits 1 byte SINT#-128 to +127 100
INT 16 bits 2 bytes INT#-32768 to +32767 INT#2#00000000_01100100
32 bits 4 bytes DINT#-2147483648 to INT#8#144
DINT
+2147483647 INT#10#100
64 bits 8 bytes LINT#-9223372036854775808 to INT#16#64
Integers
LINT
+9223372036854775807 −100
6
USINT 8 bits 1 byte USINT#0 to +255
UINT 16 bits 2 bytes UINT#0 to +65535
*1 Use the NanoSecToTime and TimeToNanoSec instructions to convert between durations and integer data. Refer to the
NJ/NX-series Instructions Reference Manual (Cat. No. W502) for detailed instruction specifications.
*2 Variables are compared with nanosecond precision for comparison instructions. To change the precision for comparison,
use the TruncTime, TruncDt, or TruncTod instruction. Refer to the NJ/NX-series Instructions Reference Manual (Cat. No.
W502) for detailed instruction specifications.
*3 A NULL character (1 byte) is added to the end of text strings. Therefore, reserve memory for one more character than the
number of handled characters. For example, if a maximum of 10 single-byte characters are handled, define a STRING
variable for 11 characters (11 bytes). STRING[11]
*4 If you want to insert tabs, line break codes, or other special characters, you can use a single-byte dollar sign ($) as an
escape character before them. Refer to Text Strings on page 6-85 for a list of the escape characters.
You must be aware of the alignment values for different data types when you exchange data
such as structure variables between devices so that you can properly align the position of the
data in memory. Refer to A-9 Variable Memory Allocation Methods for details.
Additional Information
• You cannot compare the sizes of bit string data types (BYTE, WORD, DWORD, and LWORD).
If value comparisons are necessary, use instructions such as the WORD_TO_UINT instruction
to convert to integer data and compare the values of the integer data variables.
Example:
BCD_data: WORD
IF WORD_BCD_TO _UINT (BCD_data) > UINT#1234 THEN
• You cannot perform logic processing on integer data types (SINT, INT, DINT, LINT, USINT,
UINT, UDINT, and ULINT). If logic processing is necessary, use instructions such as the
INT_TO_WORD instruction to convert to bit string data and perform the logic processing on
the bit string data variables.
Example:
In the following sample programming, 1 is added to variable a if the value of INT variable a is
an odd number.
6-3 Variables
Derivative Data Types
A derivative data type is a data type with user-defined specifications. Derivative data types are reg-
istered in the Data Type View in the Sysmac Studio. The following is a list of the derivative data
types.
Type Description
Structures This data type consists of multiple data types placed together into a single lay-
6
ered structure.
Unions This data type allows you to handle the same data as different data types
Refer to 6-3-7 Array Specifications and Range Specifications for Data Types for details.
Additional Information
In addition to basic data types and derivative data types, there are also POU instance data
types. A POU instance data type is the data type of a function block instance. To create a func-
tion block instance, the instance name is registered as a variable and the function block definition
name is registered as a data type in the local variable table.
6-3 Variables
Data Formats
The floating-point format is a way to express a real number as a combination of a sign, an exponent,
and a mantissa. To express a real number as shown below, the value of s is the sign, the value of e
is the exponent, and the value of f is the mantissa.
• REAL Data
Number = (−1)s2e−127(1+f × 2−23) 6
• LREAL Data
Number = (−1)s2e−1023(1+f × 2−52)
4 From the above expression we can determine that e−127 = 6, so e = 133 (or 10000101 in
binary).
5 Next we take the value after the decimal part of 1.010110101, which is 010110101. This is not
enough for the 23-bit mantissa, so f is this number with the required amount of zeroes added to
the end. Therefore, f = 01011010100000000000000.
Therefore, you can express −86.625 as shown in the following figure.
Sign Exponent Mantissa
REAL data (32 bits) 1 10000101 01011010100000000000000
31 30 23 22 0
Valid Ranges
The valid ranges for REAL and LREAL data are shown in the following table. There are a range of
values that you cannot express as you approach 0.
Data type −∞ Negative numbers 0 Positive numbers +∞
REAL −∞ −3.402823e+38 to −1.175495e-38 0 +1.175495e−38 to +∞
+3.402823e+38
LREAL −∞ −1.79769313486231e+308 to 0 +2.22507385850721e−308 to +∞
−2.22507385850721e−308 +1.79769313486231e+308
−∞ 0 +∞
Special Values
Values such as positive infinity, negative infinity, +0, −0, and nonnumeric data are called special val-
ues. Nonnumeric data refers to data that you cannot express as a floating-point number and there-
fore cannot be treated as a numeric value. Although +0 and −0 both mathematically mean 0, they
are different for the purpose of data processing. This is discussed later in this section. The values for
the sign s, exponent e, and mantissa f of special numbers are given in the following table.
Data type name Special values Sign s Exponent e Mantissa f
REAL +∞ 0 255 0
−∞ 1 255 0
+0 0 0 0
−0 1 0 0
Nonnumeric --- 255 Not 0
−∞ 1 2047 0
+0 0 0 0
−0 1 0 0
Nonnumeric --- 2047 Not 0
Subnormal Numbers
You cannot use the floating-point format to express values close to 0 (i.e., values with an extremely
small absolute value). Therefore, you can use subnormal numbers to expand the valid range of num-
bers near 0. You can use subnormal numbers to express values with a smaller absolute value than
with the normal data format (normal numbers). Any number where the exponent e = 0 and the man-
tissa f ≠ 0 is a subnormal number and its value is expressed as shown below.
• REAL Data
Number = (−1)s2−126(f × 2−23)
• LREAL Data
Number = (−1)s2−1022(f × 2−52)
Example: Expressing 0.75 × 2−127 as REAL Data
3 From (0.11)2 × 2−127 = 2−126(f × 2−23) we can see that f = (0.11)2 × 222.
6-3 Variables
Sign Exponent Mantissa
REAL data (32 bits) 0 00000000 01100000000000000000000
31 30 23 22 0
Subnormal numbers have less effective digits than normal numbers. Therefore, if a calculation with 6
normal numbers results in a subnormal number or if a subnormal number results in the middle of
such a calculation, the effective digits of the result may be less than the effective digits of a normal
number.
Rounding
If the real value exceeds the effective digits of the mantissa, the value is rounded off according to the
following rules.
• The result of the calculation will be the closest value to the value that can be expressed as a float-
ing-point number.
• If there are two values that are the closest to the real value (e.g., if the real value is the median
value of two approximate values), the mantissa with a least significant bit value of 0 is selected as
the result of the calculation.
In order to assign the data in var1 to the data type of var3, the data must first be converted. This type
of conversion is called “data type conversion” or just “type conversion” for short.
6-3 Variables
When Data Type Conversion Occurs
Converting between data types occurs in the following two cases.
(1) Conversion by User Execution of Data Type Conversion Instructions
(2) Automatic Conversion for Assignments and Instructions
• ST assignments 6
• Connecting lines in ladder diagrams
Use the NanoSecToTime and TimeToNanoSec instructions to convert between INT and TIME
data. Refer to the NJ/NX-series Instructions Reference Manual (Cat. No. W502) for details.
Additional Information
NJ/NX-series Controllers come with three different types of system-defined derivative data
types.
• System-defined variables that are structures
• Structures used for input, output, and in-out variables for instructions
• Structures for Special Unit expansion memory (You must register these in the Unit Editor to
use them.)
Structures
A structure is a derivative data type that groups together data with the same or different variable types.
You can easily change data and add new data if you place your data into a structure.
For example, you can define a “Box” structure that has three members (Width, Height, and Depth) in
order to organize and group your data.
You can then use this structure data type to add a variable called Box1. You can then use it to access
the different levels of the data by placing a period after the variable name followed by the name of the
data you want to access. For example, Box1.Width or Box1.Height.
If you need to create a new variable to store more box data, you can perform the same steps to add a
new variable called Box2 to the variable table.
When a structure is used for a variable in an instruction, it is necessary to select a structure for the input
parameter, output parameter, or in-out parameter, and register the variable.
Example: Communications Instructions
Specifying Members
The individual pieces of data that make up a structure are called “members.” You can express indi-
vidual members of a structure by putting a period after the variable name that represents the entire
structure followed by the member name that you want to access. You can even have a structure that
is the member of another structure.
Example: abc.x: Member x of structure variable abc
abc.Order.z: Member z of member structure variable Order of structure variable abc
Creating a Structure
1 Create a structure data type in the Data Type Table.
Specify the data type name, members, and the data type.
6-3 Variables
Name Member Data type
RGB red INT
green INT
blue INT
ITEM ItemNo INT
Color RGB
6
Structure Specifications
The specifications of structure data types are given in the following table.
Item Specification
Structure names Names are not case sensitive. Prohibited characters and character length restrictions
are the same as for variable names.
Member data types Refer to the table on the data types of structure members that is given below for details.
Member attributes Member Name
Comment
Number of mem- 1 to 2,048
bers
Nesting depth of Maximum of 8 levels (however, a member name must be 511 bytes or less, including the
structures variable name)
Maximum size of NX701-: 8 MB
one structure vari- NX1P2-: 1 MB
able NJ501-: 4 MB
NJ301-: 2 MB
NJ101-: 2 MB
Note Recursions and loops are not allowed. (An error will occur
when the program is checked.)
Array specifications for structures, unions, and enumerations Supported.
POU instances Not sup-
ported.
Version Information
The following table gives the unit version of the CPU Units and the Sysmac Studio version that
are required to specify member offsets.
6-3 Variables
* You cannot select the memory offset type. You can set member offsets.
Setting Offsets
If you set the memory offset type to User, you can set memory offsets for each member of the struc-
ture. There are byte offsets and bit offsets. If you set the memory offset type to NJ or CJ, the mem- 6
ory configuration is determined automatically. You do not need to set offsets.
The meanings of the offsets are as follows:
Example:
This example shows the memory configuration when the following settings are made with the Struc-
ture Editor.
Bit 7 Bit 0
Memory
First byte Byte offset: 0
First byte + 1 Bit offset: 0
First byte + 2 VarA
First byte + 3
First byte + 4 Byte offset: 4
First byte + 5 VarB Bit offset: 0
First byte + 6
First byte + 7 Byte offset: 6
First byte + 8 VarC Bit offset: 0
First byte + 9
First byte + 10
First byte + 11
6-3 Variables
Memory Configuration The same memory location is User Change the values of
Overlap Error allocated to more than one the offsets to suitable
member. values.
Initial Value Setting Error An initial value was set for a CJ or User Do not set an initial
structure member for which an value.
offset was specified when cre-
ating the variable table.
6
1 The system-defined data type for the instruction is registered in the Sysmac Studio in advance.
Select that system-defined data type in the Sysmac Studio and add a user-defined structure
variable to the variable table.
2 Use the user program or initial values to set the member values of that structure.
3 Specify the structure variable for the input parameter to the instruction.
Unions
A union is a derivative data type that enables access to the same data with different data types. You can
specify different data types to access the data, such as a BOOL array with 16 elements, 16 BOOL vari-
ables, or a WORD variable.
Specifying Members
When you define a union, you must name each data type that can be accessed. These names are
called members. You can express individual members of a union by putting a period after the vari-
able name that represents the entire union followed by the member name that you want to access.
Example:
Define the data type as a union as shown for My Union in the following example.
Data Type Definition
Variable Table
Output.bit[0]: This notation specifies the 0th element, or value at bit 00, of union Output when it is treated
as a 16-bit BOOL array variable.
Output.data: This notation specifies the value when union Output is treated as a single WORD variable.
Creating Unions
1 Create a union data type in the Union Table.
Specify the data type names and different data types of the members of the union.
2 Specify the union data type from above as the data type and register the variable in the variable
table.
Example:
Here, OUT16_ACCESS is defined as the data type of a union. The members of this union are a
BOOL array with 16 elements and a WORD variable. The variable Output is registered with a data
type of OUT16_ACCESS. You can now read/write variable Output as a BOOL value for any of the 16
bits and as a WORD value.
6-3 Variables
Output.WordData := WORD#16#1234;
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BoolData 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
ByteData 16#12 16#34
WordData 16#1234
Output.BoolData[11] :=TRUE; 6
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BoolData * * * * 1 * * * * * * * * * * *
Union Specifications
Item Specification
Data types that can be Refer to the table on the valid data types for union members that is given below.
specified for members
Number of members 4 max.
Setting initial values Not supported. Always zero.
Restrictions
• The initial values for unions are always zero.
• You cannot move unions.
• You cannot specify unions for parameters to POUs.
Enumerations (ENUM)
An enumeration is a derivative data type that uses text strings called enumerators to express variable
values. To use an enumeration, you must first set the values that can be obtained from that variable as
enumerators (text strings). Use enumerations to make it easier for humans to understand the meaning
behind the values of a variable.
Expressing Enumerations
When you define an enumeration, you must define the possible values of the variable as enumera-
tors and give the enumeration a name.
Creating Enumerations
1 Create an enumeration data type in the Enumeration Table.
Set the enumerators and their values for the enumeration.
2 Specify the enumeration data type from above as the data type and register the variable in the
variable table.
Example:
Here, Color is defined as the data type of an enumeration. For this example, we will set three
enumerators: red, yellow, and green. The numbers associated with these enumerators are as fol-
lows: red = 0, yellow = 1, green = 2. The variable DiscColor will change to one of the following:
red (0), yellow (1), or green (2).
Enumeration Table
FB Data type
Color ENUM
(Color)
Enumerator Value
Color#red IN
red 0
yellow 1
green 2
Variable Table
Variable name Data type
DiscColor Color
Enumeration Specifications
Item Specification
Enumerator names Enumerator names consist of single-byte alphanumeric characters. They are not case
sensitive. A building error will occur if you specify the same enumerator more than
once. A building error will occur if you specify an enumerator with the same name as a
variable in the user program or if you specify an enumerator that already exists in
another enumeration.
Values Valid range: Integers between −2,147,483,648 and 2,147,483,647
Values do not have to be consecutive.
A compiling error will occur if you specify the same value more than once.
Note You cannot perform size comparisons with enumeration variables. You can only
test to see if the enumerators are the same.
Number of enumera- 1 to 2,048
tors
BinToBCDs_WORD
EN ENO
INT#1234 In BCDdata
_BCD1 Format
Enumeration#Enumerator Notation
For a function or function block for which the data type of the parameter is not specified, specifying
just the enumerator is not valid. A building error will occur. To clarify that the parameter is an enu-
merator, the following notation is used: Enumeration#Enumerator.
6-3 Variables
Example: Passing an Enumerator to the MOVE Instruction
MOVE
EN ENO
Color#red In Out ColorA
For a function or function block for which the parameter specifies an enumerator, you can also
use the Enumeration#Enumerator notation. Therefore, for the above BinToBCDs_WORD instruc-
tion, the following notation can be used to pass the parameter to Format: _eBCD_FORMAT#
_BCD1.
Value Checks
When a value is written to an enumerated variable through execution of an instruction, an error will
not occur even if that value is not defined as one of the enumerators of that variable. Therefore, if it
is necessary to confirm that a value is defined as an enumerator of an enumeration, write the user
program to check the value.
Specifying Elements
The individual pieces of data that make up an array are called “elements.”
The elements of an array are expressed by adding a subscript (element number) from the start of
the array to the name of the variable that represents the entire array.
Enclose the subscript in single-byte braces []. Subscripts can be either constants or variables. In ST,
you can also use expressions to express subscripts.
Examples:
Variable Table
Variable name Data type
Mem ARRAY[0..99] OF INT
x:=10;
Mem[x]: This expression specifies the xth element of the array variable Mem (the variable x
has a value of 10, so this would point to the 10th element).
Variable Table
Variable name Data type
Data ARRAY[0..99] OF INT
x:=10;
y:=20;
Data[x+y]: This expression specifies the x+yth element of the array variable Data (the variable
x has a value of 10 and variable y has a value of 20, so this would point to the 30th element).
Creating an Array
1 Enter “A” into the Data type Column of the variable table and select ARRAY[?..?] OF ? from the
list of possible data type name candidates.
2 Enter the number of the first element in the array for the left question mark and the last number
for the right question mark in the “[?..?]” section. Next, enter the data type for the question mark
in the “OF ?” section and register the variable.
Variable Table
Variable name Data type
abc ARRAY [ 0 .. 4 ] OF INT
6-3 Variables
abc[3]
abc[4]
Variable Table 0 1 2 3
0
Variable name Data type
1
abc ARRAY [0..5 , 0..3 ] OF INT 2 abc[ 2 , 3 ]
3
4
5
Variable Table
Variable name Data type
Y( 0 . 2 ) 2
ITEM ARRAY [ 0..1, 0..2, 0..3 ] OF INT
1
Z( 0 . 3 ) 0 3
2
1
0 1 0
X( 0 . 1 )
Restrictions:
When you specify an array variable, it must be moved to a variable of the same data type with the same range of element numbers.
Additional Information
6-3 Variables
MOVE
× EN ENO Variable Table
x[0] y[0] Variable name Data type
In Out
x ARRAY [ 0..9 , 0..9 , 0..9 ]OF INT
y ARRAY [ 0..9 , 0..9 , 0..9 ]OF INT
× MOVE
6
EN ENO
x[0,1] y[0,1]
In Out
You can check to make sure that the entered value is within the allowed range in the following cases.
• When you specify an initial value for a variable
• When you write a value to a variable with CIP message communications
Making a Range Specification
Input the start point and end point after the data type name in the Data type Column in the variable
table.
Start point: The minimum value that you can store in the variable.
End point: The maximum value that you can store in the variable.
Example:
Variable Table
Variable name Data type
abc INT (0 ..100)
Case Operation
An error does not occur and the value is written.
The CPU Unit does not perform a range check
User program when the value of a variable changes due to the
execution of an instruction.
When the value is A command error occurs.
an integer
For an element of
an integer array
Write from the variable
Sysmac Studio
Operation for or a CIP mes- For a member of an
attempts to write sage integer structure
out-of-range Communi-
value cations For an integer struc- A command error does not
ture occur and the value is writ-
ten.
For an integer array
Tag data links An error occurs if you attempt to write to a single
(both via built- member that specifies a range. An error does not
in EtherNet/IP occur if you attempt to write to a structure that
ports and Eth- contains a member for which a range is specified.
erNet/IP Units)
Input refreshing from slaves An error does not occur and the value is written.
and Units
Forced refreshing values An error does not occur and the value is written.
Variable Table
Variable name Data type
Variable x INT(10 .. 100)
ChkRange MOVE
EN EN ENO
Variable x
In Variable i In Out Variable x
Variable i
Val
You cannot perform any checks beforehand if you set data with arithmetic processing results. In
this case, check the range of values after arithmetic processing (e.g., ADD).
Variable Table
6-3 Variables
ADD Variable name Data type
EN ENO
Variable A INT(10 .. 100)
In1 Variable tmp
In2
6
ChkRange MOVE
EN EN ENO
Variable A Val
Make sure that the initial value is within the range specified for the Range Specification. If the ini-
tial value field on the Sysmac Studio is left blank, an initial value of 0 is used. This applies even if
a range that does not include 0 is set for a Range Specification.
Variable Name
The variable name is used to identify the variable. Each variable in a POU must have a unique name.
However, you can declare local variables with the same variable name in different POUs. These are
treated as two separate variables.
Refer to 6-3-12 Restrictions on Variable Names and Other Program-related Names for restrictions on
variable names.
AT Specification
Use the AT Specification attribute to specify the internal I/O memory address of a variable in memory
used for CJ-series Units. AT specifications are used mainly to specify specific memory addresses for
the following Special Units.
• Addresses in fixed allocations for DeviceNet Units
• Addresses in user-specified allocations for DeviceNet Units or CompoNet Master Units from the CX-
Integrator (A CompoNet Master Unit must be set to communications mode 8 to use the CX-Integra-
tor.)
• Addresses in expansion memory for High-speed Counter Units
• Addresses in expansion memory for Process I/O Units
• Addresses in target node information and user-defined status areas that are used with EtherNet/IP
Units
If this attribute is not set, the variable is automatically assigned to an address in variable memory.
Additional Information
When you assign a device variable to an I/O port, they are automatically given an AT specifica-
tion internally.
Allocation Areas
You can specify addresses in the following areas.
Area Expression
CIO CIO 0 to CIO 6143
Work W0 to W511
Holding H0 to H1535
DM D0 to D32767*1
NJ501-: E0_0 to E18_32767
EM*2 NJ301-: E0_0 to E3_32767
NJ101-: E0_0 to E3_32767
The following table gives the data assignments by variable data type.
Variable data type Assignment position
BOOL You can specify an assignment for each bit.
You can specify bit 0 or bit 8 of the specified CJ-series address as the start
position of the data assignment.
Example 1: AT Specification at Bit 0 of D100 (%D100)
BYTE/SINT/USINT
D100: 16#**12....One-byte data (12) is stored from bit 0.
Example 2: AT Specification at Bit 8 of D100 (%D100.8)
D100: 16#12**....One-byte data (12) is stored from bit 8.
WORD/INT/UINT Stored in increments of the data size from bit 0 of the specified CJ-series
DWORD/DINT/UDINT address.
REAL
LWORD/LINT/ULINT
LREAL
You can specify bit 0 or bit 8 of the specified CJ-series address as the start
STRING
position of the data assignment.
TIME Stored in increments of the data size from bit 0 of the specified CJ-series
DATE address.
TIME_OF_DAY
DATER_AND_TIME
6-3 Variables
Variables for Which You Can Set AT Specifications
AT specifications are made separately for each variable. Set them for all elements and members of
array, structure, and union variables.
The following variables are also allocated an address internally. The following is displayed in the
Allocated Address Box.
Type of variable Displays in the AT field. Example
IOBus://rack#[rack_num- Basic I/O Units:
ber]/slot#[slot_num- IOBus://rack#0/slot#1/Ch1_In/C
Device variables for CJ-series ber]/[I/O_port_number] h1_In00
Units Special Units:
IOBus://rack#0/slot#1/PeakHold-
Cmd/ch1_PeakHoldCmd
For NX Units on EtherCAT Slave ECAT://node#[10.15]/Input1
Terminals: ECAT://node#[node_ad-
dress.NX_Unit_num-
Device variables for EtherCAT ber]/[I/O_port_name]
slaves
Other device variables: ECAT://node#1/Input1
ECAT://node#[node_ad-
dress]/[I/O_port_name]
• IOBus://unit#[NX_Unit_num- IOBus://unit#8/Input Bit 00
Device variables for NX Units*1
ber]/[I/O_port_name]
Device variables for built-in I/O*1 • BuiltInIO://cpu/#0/[I/O_port_name] BuiltInIO://cpu/#0/Input Bit 00
• BuiltInIO://opt/#[physi- BuiltInIO://cpu/#1/Ch1 Analog
Device variables for Option
cal_port_num- Input Value
Boards*1
ber*2]/[I/O_port_name]
MC://_MC_AX[] MC://_MC_AX[1]
Axis Variables MC://_MC1_AX[]*3
MC://_MC2_AX[]*3
MC://_MC_GRP[] MC://_MC_GR[1]
Axes Group Variables MC://_MC1_GRP[]*3
MC://_MC1_GRP[]*3
*1 These system-defined variables are available only for the NX1P2 CPU Unit.
*2 The physical port number indicates a physical location for an I/O port. 0 is given for the option board slot 1
and 1 is given for the option board slot 2.
*3 These system-defined variables are available only for the NX701 CPU Unit.
You can assign the same address to more than one variable. However, this is not recommended
as it reduces readability and makes the program more difficult to debug. If you do this, set an ini-
tial value for only one of the variables. If you set a different initial value for each individual vari-
able, the initial value is undefined.
Retain
Use the Retain attribute to specify whether a variable should retain its value in the following cases.
• When power is turned ON after power interruption
• When the operating mode is changed
• When a major fault level Controller error occurs
If the Retain attribute is not set, the value of the variable is reset to its initial value in the above situa-
tions.
You can specify the Retain attribute when you need to retain the data that is stored in a variable (such
as the manufacturing quantities) even after the power to the Controller is turned OFF.
For a variable with an AT specification, the setting of the Retain attribute must agree with address in the
memory area where the address is assigned.
(Retained areas: Holding, DM, and EM Areas
Non-retained areas: CIO and Work Areas)
6-3 Variables
Case Retain attribute speci- Retain attribute not
fied specified
When power is turned ON after power interruption Retained. Not retained.
When the operating mode is changed
When a major fault level Controller error occurs
When the Clear the pres- 6
ent values of variables
When you download the with Retain attribute
Initial Value
The variable is set to the initial value in the following situations.
• When power is turned ON
• When changing between RUN mode and PROGRAM mode
• When you select the Clear the present value of variables with Retain attribute Check Box, and down-
load the user program
• When a major fault level Controller error occurs
You can set an initial value for a variable in advance so that you do not have to write a program to initial-
ize all of the variables. For example, you can preset data such as a recipe as initial values. You do not
have to set any initial values.
Additional Information
Some Basic I/O Units have more than one access method for the same I/O port, such as bit
string data and BOOL data. If you use initial values for this type of I/O port, set the initial values
for one of the access types to None.
6-3 Variables
blank for each element.
Constant
If you specify the Constant attribute, the value of the variable cannot be written by any instructions, ST
operators, or CIP message communications. Setting the Constant attribute will prevent any program
from overwriting the variable. The values of variables with a Constant attribute cannot be written from
instructions after the initial value is set. If there is an instruction in a POU that attempts to write a value
to a variable with the Constant attribute, an error will occur when the user program is compiled.
Operation
If there is an instruction or operator in a POU that attempts to write a value to a variable with the
Constant attribute, the following operations will occur.
Source Operation for attempts to write the value
An error is detected during the program check. The Sysmac
User program Studio checks the program when it is built. A building error
occurs at that time.
Writing from Sys- Not supported.
mac Studio
CIP messages A command error occurs.
Communications
An error occurs when a tag data link starts. The tag data link will
Tag data links continue to operate. However, the values of variables with the
Constant attribute are not written.
Input refreshing from slaves and Units An error does not occur and the value is written.
Forced refreshing
Additional Information
You cannot write to variables with the Constant attribute from the user program.
Network Publish
The Network Publish attribute allows a variable to be read/written from external devices (other Control-
lers, host computers, etc.) through CIP message communications or tag data links. If this attribute is not
set, you can read/write the variable from the Controller that declared the variable and external devices
(other Controllers, host computers, etc.) cannot read/write that variable.
Variables that have been published to the network are called network variables.
Edge
The Edge attribute makes the variable pass TRUE to a function block when a BOOL variable changes
from FALSE to TRUE or from TRUE to FALSE. You can specify the Edge attribute only for BOOL input
variables to function blocks.
Application
Use the Edge attribute when you want the function block to accept the input only when the input
parameter changes from FALSE to TRUE or from TRUE to FALSE. For example, you can use this
attribute when you want to execute the function block any time there is a change detected in an input
parameter.
Operation
• If you specify a change to TRUE, the input variable changes to TRUE only when the input param-
eter connected to that input variable changes from FALSE to TRUE.
• If you specify a change to FALSE, the input variable changes to TRUE only when the input param-
eter changes from TRUE to FALSE.
Specification Value of input parameter Value of variable
FALSE to TRUE TRUE
6-3 Variables
Change to TRUE
Other FALSE
TRUE to FALSE TRUE
Change to FALSE
Other FALSE
--- Changes according to the input
None
parameter value.
6
Version Information
With the combination of a CPU Unit with unit version 1.13 or later and Sysmac Studio version
1.17 or higher, you can set the operations when the operating mode changes or when download-
ing according to the setting of the _DeviceOutHoldCfg (Device Output Hold Configuration) sys-
tem-defined variable.
The values of variables in the CPU Unit will change as shown in the following table when the power is
turned ON, when the operating mode changes, or when downloading.
After downloading
When the Clear the
Retain present values of
When power is When operating When the check
attribute of Type of variable variables with
turned ON mode changes box is not
variable Retain attribute
selected.
Check Box is
selected.
User-defined vari- • If initial values are set, the variables change to the initial values.
ables • If initial values are not set (None), the variables change to 16#00.*1
AT specifi- • If initial values are set, the variables • If initial values are set, the variables
cations for change to the initial values. change to the initial values.
CIO and • If initial values are not set (None), the • If initial values are not set (None), the
Work Area variables change to 16#00.*1 previous value is retained.
addresses
in the mem-
ory used
for CJ-
series Units
Device variables for • If initial values are set, the variables change to the initial values.
EtherCAT slaves*2 • If initial values are not set (None), the variables change to 16#00.*1
Device variables for • If initial values are set, the variables change to the initial values.
Non-retain
NX Units*2 • If initial values are not set (None), the variables change to 16#00.*1
Device variables for • If initial values are set, the variables change to the initial values.
built-in I/O*2 • If initial values are not set (None), the variables change to 16#00.*1
Device variables for • If initial values are set, the variables change to the initial values.
Option Boards*2 • If initial values are not set (None), the variables change to 16#00.*1
• If initial values are set, the variables • If initial values are set, the variables
Device variables for change to the initial values. change to the initial values.
CJ-series Units*2 • If initial values are not set (None), the • If initial values are not set (None), the
variables change to 16#00.*1 previous value is retained.
CIO and Work Area 16#00 The previous values are retained.
addresses in the
memory used for CJ-
series Units*2*3
After downloading
When the Clear the
Retain present values of
When power is When operating When the check
attribute of Type of variable variables with
turned ON mode changes box is not
variable Retain attribute
selected.
Check Box is
selected.
Retain No change (retains No change (i.e., • If initial values are The values from
condition is value before power the values in RUN set, the variables before the download
met.*4 interruption). mode are change to the ini- are retained.
retained). tial values.
• If initial values are
• If initial values are
set, the variables
not set (None),
change to the ini-
the variables
Retain con- tial values.
change to
dition is not • If initial values are
16#00.*1
met.*3 not set (None),
the variables
User- change to
defined 16#00.*1
vari-
ables • If initial values are
AT specifi- set, the variables
cations for change to the ini-
Holding, tial values.
DM, and EM • If initial values are
Area not set (None),
6-3 Variables
addresses the variables
in the mem- change to the val-
ory used ues of the mem-
for CJ- ory addresses in
series Units the AT specifica-
tions.
• If initial values are The variables
Retain set, the variables change to the val- 6
change to the ini- ues of the memory
tial values. addresses in the AT
• If initial values are specifications.
*1 Values other than 16#00 may be used depending on the data type. For details, refer to When the Initial Value
Specification Is Left Blank on page 6-61.
*2 Device outputs are retained even when the operating mode changes or when downloading if the device output
hold configuration is set to enable (16#A5A5) in the _DeviceOutHoldCfg (Device Output Hold Configuration)
system-defined variable. Refer to Device Output Hold Configurations on page 6-67 for the device output hold
configurations.
*3 This does not include user-defined variables and device variables for CJ-series Units if they have AT specifica-
tions.
*4 Refer to Retain Condition on page 6-69 for the retain conditions.
The values of variables in the CPU Unit will change as shown in the following table when a major fault
level Controller error occurs, or during online editing.
If the device output hold configuration is set to disable (other than 16#A5A5), device outputs will change
as given in 6-3-9 Changes to Variables for Status Changes.
Device outputs are retained even when the operating mode changes or when downloading if the device
output hold configuration is set to enable (16#A5A5).
6-3 Variables
• Device variables for EtherCAT slaves
• Device variables for NX Units
• Device variables for built-in I/O
• Device variables for Option Boards
• Device variables for CJ-series Units (operating data)
• CIO and Work Area addresses in the memory used for CJ-series Units
6
Item
EtherCAT Backup Parameter Settings of EtherCAT slaves
CPU/Expansion Racks Special Unit Settings of CJ Units
I/O Map Variable Name
Variable Comment
Variable Type
Event Settings
Task Settings Program Assignment Settings
Programming - POUs Program
Section
Internal/ External Variable
Function
Function Block
Programming - Data Data Type
Global Variable
EtherNet/IP Connection Settings
DB Connection Settings
If items other than those given in the above table are changed and downloaded, device outputs are
not retained.
Also, in the Synchronization Window of the Sysmac Studio, select the check box for the Do not
transfer the following. (All items are not transferred.) - CJ-series Special Unit parameters and
EtherCAT slave backup parameters. If you do not select the check box, device outputs are not
retained.
Perform the following procedure if you want to retain device outputs, and change EtherCAT slave
backup parameters or NX bus Unit operation settings.
3 Click the Edit Backup Parameter Settings Button in the Slave Parameter Settings Area on the
right of the network configuration.
4 Click the Transfer to Slave Button in the Edit Backup Parameter Settings Tab Page.
5 Right-click a Unit in the CPU and Expansion Racks Tab Page and select Edit Unit Operation
Settings.
6 Click the Transfer to Unit Button for the Unit operation settings.
If you execute Transfer to Slave or Transfer to Unit, the slave or Unit is restarted after the data is
transferred. In this case, device outputs of the slave or Unit are not retained. However, device outputs
are retained for the slave or Unit that the data is not transferred.
Retain Condition
Retain condition indicates that all of the following conditions are met both before and after the down-
load.
• The variable name is the same.
• The data type (name) is the same.
• The Retain attribute is set to retain the value of the variable.
Refer to Values of Retain Variables After New Creations or Changes of POU Names on page 6-69 for
the value of a variable with a Retain attribute after its POU name is changed. Also refer to Variable
Values When Data Types of Retained Variables Are Changed on page 6-72 for the value of a variable
when its data type is changed.
Version Information
For the CPU Unit with unit version 1.10 or earlier, the retain condition indicates that all of the fol-
lowing conditions are met both before and after the download.
• The variable name is the same.
6-3 Variables
• The data type name and data type size are the same.
• The Retain attribute is set to retain the value of the variable.
6
Values of Retain Variables After New Creations or Changes of POU Names
When you download a project that you created with the Sysmac Studio to a Controller, the Controller
This section describes how the Controller treats POU names and the values of local variables with a
Retain attribute when POU names are changed or newly created on the Sysmac Studio and
downloaded.
The present value of the local variable VarB does not change on the Controller if you create a local
variable VarB that was nonexistent in the Project_A when the Project_A was copied, add VarB to the
Project_A and download it while you add a local variable VarB of the same definition to the Pro-
ject_A_copy and download it.
In the same manner, the present value of the local variable VarB does not change on the Controller
if you copy the local VarB from the Project_A or merge the variable table.
6-3 Variables
Project name: Project_A_copy Project name: Project_A_copy
POU name: POU_A POU name: POU_XXX
Variable name: VarA Variable name: VarA
Initial value of VarA: 0 Present value of VarA: 20
Variable name: VarB Variable name: VarB
Initial value of VarB: 0 Present value of VarB: 50
6
*1 Pattern 1 applies for a CPU Unit with unit version 1.10 or earlier. The pattern difference depends only on
the unit version of the CPU Unit. It does not depend on the unit version settings for project devices.
The following section gives further description on the treatments of pattern 1 and 2 for each data type.
Assume the Retain attribute of each variable is set to retain, and the following present values are
given.
Assume the following present values are given for the memory used for CJ-series Units, DM100 and
DM101.
6-3 Variables
D100 20
D101 50
The relationship between changes in the data types and how the controller treats the variables are
given below. 6
Change description Pattern 1 Pattern 2
*1 The variable value will be the initial value when the Retain attribute of the variable is changed from Non-
retain to Retain.
Changes in a Structure
Assume the structure before changes on the Sysmac Studio is defined as in below.
Assume the data type of the variable ABC is STR_1, the Retain attribute is set to retain, and the
members have the following present values.
The relationship between changes in the data types and how the controller treats the variables are
given below.
If the condition applies both to retain and to change to the initial value, the variable value changes to
the initial value.
6-3 Variables
ABC.z = Initial value
ABC.z = Initial value
ABC.y = Initial value
ABC.y = -200
Changing the number of array The member value will be the initial The value of the existing member is
elements for the member x value.* 2 retained. The value of the member
from 1 to 3 whose number of array elements was
ABC.x[0] = Initial value
changed will be retained from the 6
ABC.x[1] = Initial value top, and the value of the expanded
ABC.x[2] = Initial value member will be the initial value.
ABC.y = Initial value ABC.x[0] = 100
*1 Implicit casting applies for changes in data types. Refer to Implicit Casts on page 6-123 for details on
implicit casting.
*2 You can retain the value of the existing member if you upload the variable value before downloading and
then download the variable value after downloading.
Changes in a Union
Assume the union before changes on the Sysmac Studio is defined as in below.
Assume the data type of the variable ABC is UNI_1, the Retain attribute is set to retain, and the
members have the following present values.
The relationship between changes in the data types and how the controller treats the variables are
given below.
If the condition applies both to retain and to change to the initial value, the variable value changes to
the initial value.
*1 Implicit casting applies for changes in data types. Refer to Implicit Casts on page 6-123 for details on
implicit casting.
Assume the Retain attribute of the variable ABC is set to retain, and the elements have the following
present values.
The relationship between changes in the data types and how the controller treats the variables are
given below.
If the condition applies both to retain and to change to the initial value, the variable value changes to
the initial value.
6-3 Variables
Change description Pattern 1 Pattern 2
No change The element value is retained.
ABC[1] = 100
ABC[2] = 200
ABC[3] = 300 6
Changing the variable name The element value will be the initial value.
from ABC to DEF
*1 Implicit casting applies for changes in data types. Refer to Implicit Casts on page 6-123 for details on
implicit casting.
*2 The result will be the same for basic and derivative data types.
*3 If the number of elements is expanded or decreased, all values of the elements will be the initial values.
Changes in an Enumeration
Assume the enumeration before changes on the Sysmac Studio are defined as in below.
Assume the data type of the variable ABC is ENU_1, the Retain attribute is set to retain, and the
variable has the following present value.
The relationship between changes in the data types and how the controller treats the variables are
given below.
6-3 Variables
Additional Information
A function block instance is treated as a local variable of the program in which the instance is
created. As such, the instance is added to and displayed in the local variable table of the pro-
gram. You cannot treat these instances as global variables.
6
1 Select Watch Tab Page from the View Menu. The Watch Tab Page is displayed.
2 Establish an online connection with the Controller and register the variables in one of the follow-
ing ways.
(1) Enter the variable in the name cell in the Watch Tab Page.
(2) Drag variables to the Watch Tab Page from an editor or variable table.
The present values of the variables are displayed.
Character Restrictions
Multibyte Maximum
Case Charac-
Program-related Reserved character size (not
Applicable characters sensitiv- ter
name words compatibil- including
ity encoding
ity NULL)
Variable name Usable characters Refer to Supported. Not case 127 bytes UTF-8*
(including POU • 0 to 9, A to Z, and a to z Reserved sensitive.
instance names) • Single-byte kana Words
• _ (underlines) below.
POU definition
names • Multibyte characters (e.g., Japa-
nese)
Data type
Refer to Reserved Words below
Structure member for a list of the reserved words.
names and union
member names Characters that cannot be used
together
Enumerators
• A text string that starts with a
Task names number (0 to 9) 63 bytes
Namespaces • Strings that start with “P_” 93 bytes
• A text string that starts in an
Full paths of vari- underline (_) character Network vari-
able names • A text string that contains more able: 255
than one underline (_) character bytes
• A text string that ends in an Other: 511
underline (_) character bytes
Device names • Any text string that consists of 127 bytes
an identifier and has a prefix or
Section names Case
postfix which contains more
than one extended empty space sensitive.
Axis names character (i.e., multi-byte spaces Not case
or any other empty Unicode sensitive.
Axes group names
space characters)
Cam table names
* For UTF-8, single-byte alphanumeric characters each use 1 byte. Multibyte characters each use more than 1
byte. Japanese characters require approximately 3 bytes.
Reserved Words
An error is detected during the program check for the following names.
• A name that is the same as any of the instructions that are described in NJ/NX-series Instructions
Reference Manual (Cat. No. W502)
• A name that is the same as any of the instructions that are described in NJ/NX-series Motion Control
Instructions Reference Manual (Cat. No. W508)
• Words that are reserved by the system
6-3 Variables
6
6-4-1 Constants
The value of a variable changes depending on the data that is assigned to that variable. The value of a
constant never changes.
Unlike variables, constants are not stored in memory. You can use constants in the algorithm of a POU
without the need to declare them.
In the NJ/NX-series Controllers, constants have a data type in the same way as variables,
Boolean Data
“BOOL” is used as the data type name for Boolean data. You can use the following values: 1, 0, TRUE,
and FALSE. The meanings of the notations are given in the following table.
Notation Meaning
TRUE or FALSE All of the following are equivalent: TRUE, BOOL#1,
BOOL#1 or BOOL#0 BOOL#TRUE, and 1.
BOOL#TRUE or BOOL#FALSE All of the following are equivalent: FALSE, BOOL#0,
BOOL#FALSE, and 0.
1 or 0*1
*1 Sysmac Studio version 1.03 or higher is required to use 1 and 0. A building error will occur if you use 1 or 0 on
Sysmac Studio version 1.02 or lower.
Bit Strings
You can use any of the following data type names for bit string data: BYTE, WORD, DWORD, and
LWORD. You can use any of the following bases: 2, 8, 10, and 16. The notations and notation examples
are given in the following table.
{base}#{numeric_value}*1 16#0064
{numeric_value}*1, *2 100
*1 Sysmac Studio version 1.03 or higher is required to omit the data type name. A building error will occur if you
omit the data type name on Sysmac Studio version 1.02 or lower.
*2 A base of 10 (i.e., a decimal number) is assumed.
Version Information
Sysmac Studio Version 1.03 or higher is required to use base 10 for bit string data. A building
error will occur if you use base 10 on Sysmac Studio version 1.02 or lower.
Integer Data
You can use any of the following data type names for integer data: SINT, USINT, INT, UINT, DINT,
UDINT, LINT, and ULINT. You can use any of the following bases: 2, 8, 10, and 16.
The notations and notation examples are given in the following table.
Real Numbers
Dates
You can use any of the following data type names for date data: DATE and D. The notations and nota-
tion examples are given in the following table.
Times of Day
You can use any of the following data type names for time of day data: TIME_OF_DAY and TOD. The
notations and notation examples are given in the following table.
TOD#{hour}:{minutes}:{seconds} TOD#23:59:59.999999999
Text Strings
To give text string data, enclose the text string in single-byte single quotation marks ('). You can also
use “STRING” as the data type name. The notations and notation examples are given in the following
table.
Additional Information
To pass an enumerator to a function or function block for which the parameter specifies an enu-
merator, you can omit the enumeration data type name and give only the enumerator.
For example, the _eBCD_FORMAT enumeration is specified for the Format input variable in the
BinToBCDs instruction. Therefore, you can give either the enumeration data type name and enu-
merator as _eBCD_FORMAT#_BCD0 or omit the enumeration data type name and give only
_BCD0.
Rungs
Logic blocks
Bus Bars
The vertical lines on the left and right sides of a ladder diagram are called the bus bars. These bus
bars always have a status of either TRUE or FALSE. If you think of the ladder diagram as an electri-
cal circuit, these states represent the flow of current through the circuit. When a POU that is written
as a ladder diagram is executed, the value of the left bus bar changes to TRUE. As a result, all
inputs and other configuration elements connected to the left bus bar also become TRUE. Execution
progresses as elements to the right are also changed to TRUE based on the operation of these con-
figuration elements. This cascade of the TRUE state is called the “power flow.” The left bus bar is the
source of this power flow.
Connecting line
The straight horizontal lines that connect the bus bar and the configuration elements are called con-
necting lines. Connecting lines can be either TRUE or FALSE and can transfer the power flow from
the left to the right.
Inputs
Inputs are placed along the connecting line to receive the power flow and operate accordingly. There
are several different types of inputs and, depending on their specifications, they will either transfer
the power flow from the left to the right or prevent the power flow from passing through. When an
input transfers the power flow to the right, the connecting line to the right of the input will become
TRUE. If the power flow is inhibited, the connecting line to the right of the input will remain FLASE.
For detailed specifications on inputs, refer to the NJ/NX-series Instructions Reference Manual (Cat.
No. W502).
Output
Outputs are placed along the connecting line to receive the power flow and operate accordingly. An
output writes the TRUE or FALSE value to a variable. There are different types of outputs. For
detailed specifications on outputs, refer to the NJ/NX-series Instructions Reference Manual (Cat.
No. W502).
Input a
Label: ExceptionProcessing
Input b Input c
Label: ExceptionProcessing
Input d Input e
IN1 OUT1
x2 IN2 OUT2 y2
IN1 OUT1
x2 IN2 OUT2 y2
As shown below, you can specify either variables or constants for input and output parameters.
Function/function block variables Input parameters Output parameters
Input variables You can specify variables or con- ---
stants.
Output variables --- You can specify only variables.
In-out variables You can specify only variables. You can specify only variables.
Power flow
There is only one power flow input and one power flow output for each function or function block. All
other BOOL variables that are not at the top are for parameter inputs and parameter outputs.
MyFB
(BOOL) (INT)
IN1 Val_Out
BOOL variable BOOL variable that is not
(INT) (BOOL)
that is not at the at the top
Val_In Q1
top
(BOOL) (BOOL)
a b
IN2 Q2
Parameter output
Parameter input
You cannot connect multiple BOOL variables to the left bus bar or the right bus bar as shown below.
RS
(BOOL) (BOOL)
NG Set Q1
(BOOL)
Reset1
MyFB
(BOOL) (INT)
IN Val_Out
(INT) (BOOL)
Val_In Q1
(BOOL)
NG
Q2
You do not have to connect an OUT instruction to the right bus bar. You can connect the function or
function block directly.
MyFB
(BOOL) (BOOL)
OK
IN Q
(INT)
Val_In
A LD instruction is not necessarily required. You can also connect directly to the left bus bar.
OK MyFB
(BOOL) (BOOL)
IN Q
(INT)
Val_In
Cascade Connections
Cascade connections in which the output of a function or function block is connected to the input of
another function or function block are allowed only for power flow outputs and inputs.
Example:
CIPRead CIPRead
GO (BOOL) (BOOL) (BOOL) (BOOL)
Execute Done Execute Done
(BOOL) (BOOL) (BOOL) (BOOL)
Handle Busy Handle Busy
(BOOL) (BOOL) (BOOL) (BOOL)
SrcDat Error SrcDat Error
(BOOL) (BOOL) (BOOL) (BOOL)
Size ErrorID Size ErrorID
(BOOL) (BOOL)
DstDat DstDat
(BOOL) (BOOL)
MyFB
(BOOL) (INT)
IN Val_Out
MyFB
(INT) (BOOL) (BOOL) (INT)
Val_In Q IN Val_Out
(INT) (BOOL)
Val_In Q
6
You can branch the power flow output.
Example:
CIPRead
(BOOL) (BOOL)
Execute Done
(BOOL) (BOOL)
Handle Busy
(BOOL) (BOOL)
SrcDat Error
(BOOL) (BOOL)
Size ErrorID
(BOOL)
DstDat
(BOOL)
ErrorIDEx
(BOOL)
RecvSize
Restriction
• You cannot create closed loops or intersect connecting lines.
Example:
FB1 FB2
EN ENO EN ENO
IN2 OUT2
NG
No closed loops
Reversing Inputs
You can reverse the value of a BOOL input variable when you input it to an instruction.
NOT input
FB
(BOOL) (BOOL)
IN Q
TRUE→FALSE
FALSE→TRUE
Inline ST
Introduction
Inline ST is a ladder diagram programming element in which you can write ST language code in a
box called an inline ST box (a blank text input area) within a ladder diagram. This allows you to eas-
ily code numeric data processing and text string processing within ladder diagrams. The connecting
line to an inline ST box becomes its execution condition. The ST code inside of the box is executed
based on that connecting line. Refer to the following figure.
Inline ST box
i1 i2
taiseki := 4.0 * 3.14 * radius *radius * radius / 3.0;
Inline ST is treated as a rung element in a ladder diagram. Therefore, unlike functions and function
blocks, they have no input, output, or in-out variables.
Structure of ST
ST code consists of one or more statements. One statement is the equivalent of one process. State-
ments are executed from top to bottom, one line at a time, until the process is completed. Statements
are made up of keywords and expressions. A keyword is a symbol or string that expresses assignment
or execution control. An expression is a code that calculates a value from variables, constants, function
return values, and/or a combination of those, along with various operators. A statement represents a
process that completes by itself. Expressions form a statement by using a combination of values and
keywords.
Example of an Assignment Statement:
A:= B + 100 * ABC (10, 20) ; (*Assign A to B + 100 * ABC (10, 20)*)
Expression
Example of an IF Construct:
IF keyword IF keyword
Expression
G := H ; (*TRUE if D and E+100*DEF(10,20) are equal, otherwise FALSE*)
Statement IF keyword
END_IF ;
ST Language Expressions
Statement Separators
• Statements must end with a single-byte semicolon (;). Statements are not considered complete
with only a carriage return at the end. This allows you to write long statements across multiple
lines.
• One statement must end with one single-byte semicolon (;). In the following example, the IF con-
struct contains a single assignment statement. Each statement must be ended with a single-byte
semicolon (;).
IF A=B THEN
C := D; Assignment
IF construct
statement
END_IF;
Comment
• You can write comments in your program to make the code easier to understand.
• Statements written as comments are not executed.
Text Strings
Refer to 6-3-12 Restrictions on Variable Names and Other Program-related Names for restrictions
on text strings.
WHILE(Var <>0) DO
; (* Empty statement *)
END_WHILE;
(* Text *) Comments (* Commenting out multiple lines
IF MyFun (ErrorCode) = 3
THEN ReturnValue := GetDetail();
END_IF;
down to here. *)
//Text Comment A := SIN( X ) ^ 2 + COS ( Y ) ^2 + 10;
// A := SIN( X ) ^ 2 + COS ( Y ) ^2 + 5;
Operators
The following table gives the operators and their order of priority.
If operators with different priorities are mixed in one expression, the operators with the highest prior-
ities are executed first. You can use up to 64 operators in one expression.
Example: X:=(1+2)−3*4; In this case, variable X is assigned a value of −9.
2**3**2
Value: 64
If there is more than one exponent operator, calculations
are performed for them left to right. Therefore, 2**3**2 in
the above example is the same as (2**3)**2, so the value is
64.
Multiplication * 100*200 5
Value: 20,000
Division / 100/200
Value: 0.5
Remainder MOD 10 MOD 7
Value: 3
−17 MOD 6
Value: −5
17 MOD 6
Value: 5
17 MOD (−6)
Value: 5
0101 OR 1100
Value: 1101
Additional Information
Calculations are performed based on the data types. For example, the result of calculations with
integer data will be integer data. Therefore, if the expression A/B is calculated with INT variables
A = 3 and B = 2, the result would not be 1.5 because all values after the decimal point are trun-
cated. In this case, the expression (A/B)*2 would evaluate to 2 instead of 3.
*1 For an NX701 CPU Unit and NJ-series CPU Unit, integer variables are calculated as real number variables
even if they set as operands. If a rounding error is included in the result of calculations, the result may not be
an intended value because all values after the decimal point are truncated. Use the EXPT and TO_** (Inte-
ger Conversion Group) instructions together to round values after the decimal point.
Example: TO_INT(EXPT(X,Y))
*2 Do not use operators to compare text string variables. Use instructions (such as EQascii) instead.
ST Language Statements
Assignment
Overview:
This statement assigns the right side (i.e., the value of the expression) to the left side (i.e., the vari-
able).
Reserved Words:
:=
Combination of a colon (:) and an equals sign (=)
Statement Structure:
<variable>:=<expression>;
<variable>:=<variable>;
<variable>:=<constant>;
Application:
Use this statement to assign a value to a variable. For example, use it to set initial values or to store
the results of a calculation.
Description:
This statement assigns (or stores) the <expression_value> to the <variable>.
Example:
Example 1: The following statement assigns the result of the expression X+1 to variable A.
A:=X+1;
Precautions:
• Either the source data type must match the destination data type, or the combination of data types
must allow implicit casting. A building error will occur if you do not use this notation.
• If the value that is assigned is STRING data, make the size of the destination STRING variable
larger than that of the source string. Otherwise, an error will occur.
• For STRING variables, assignment is allowed if the size of left-hand variable is greater than the
size of the text string stored in right-hand variable.
Example:
Assignment is allowed in the following case.
• Variable Table:
Variable
Data type Size
name
Var1 STRING 10
Var2 STRING 20
• User Program:
Var2 :='ABC';
Var1 := Var2;
You cannot make assignments to union variables. You must make the assignments to individual
members of the unions.
RETURN
Overview:
The following actions occur depending on where the ST statement is used.
ST
The ST program is ended during operation and the next program is executed.
ST in a Function Inside a Function Block Instance
The function or function block is ended during operation and the next instruction after the calling
instruction is executed.
Reserved Words:
RETURN
Statement Structure:
RETURN;
Application: 6
Use this statement to force the current program, function, or function block to end.
Overview:
The construct executes the specified statement when a condition is met. If the condition is not met,
another statement is executed. The following expressions are used to specify whether the condition
is met.
TRUE: The condition is met.
FALSE: The condition is not met.
Reserved Words:
IF, THEN, (ELSE), END_IF
Note You can omit ELSE.
Construct Structure:
IF <condition_expression> THEN
<statement_1>;
ELSE
<statement_2>;
END_IF;
Condition FALSE
expression
TRUE
Statement 1 Statement 2
Application:
Use this construct to perform one of two processes depending on evaluation of a condition (condi-
tion expression).
Description:
If <condition_expression> is TRUE, <statement_1> is executed.
If <condition_expression> is FALSE, <statement_2> is executed.
Precautions:
• IF must always be used together with END_IF.
• Write a statement that evaluates to TRUE or FALSE (for example IF A>10) or a BOOL variable (for
example IF A) for the condition expression.
• You can write <statement_1> and <statement_2> on multiple lines. Separate statements with a
semicolon (;).
Example: Another IF Statement before <statement_1>
IF <condition_expression_1> THEN
IF <condition_expression_2> THEN
<statement_1>;
ELSE
<statement_2>;
END_IF;
END_IF;
Process Flow Diagram:
Condition FALSE
expression 1
TRUE
Condition FALSE
expression 2
TRUE
Statement 1 Statement 2
• You can omit the ELSE statement. If it is omitted, nothing is executed when <condition_expres-
sion> is FALSE.
Process Flow Diagram:
FALSE
Condition
TRUE
Statement
Example:
Example 1: A value of 10 is assigned to variable X when the statement A > 0 is TRUE. A value
IF A>0 THEN
X:=10;
ELSE
X:=0;
END_IF;
Example 2: A value of 10 is assigned to variable X and a value of 20 is assigned to variable Y
when the statements A > 0 and B > 1 are both TRUE. A value of 0 is assigned to
variable X and variable Y when the statements A > 0 and B > 1 are both FALSE.
IF A THEN X:=10;
ELSE X:=0;
END_IF;
Overview:
The construct executes the specified statement when a condition is met. If a condition is not met but
another condition is met, another statement is executed. If neither condition is met, another state-
ment is executed.
The following expressions are used to specify whether the condition is met.
TRUE: The condition is met.
FALSE: The condition is not met.
Reserved Words:
IF, THEN, ELSIF, (ELSE), END_IF
Note You can omit ELSE.
Construct Structure:
IF <condition_expression_1> THEN <statement_1>;
ELSIF <condition_expression_2> THEN <statement_2>;
ELSIF <condition_expression_3> THEN <statement_3>;
·
·
·
ELSIF <condition_expression_n> THEN <statement_n>;
ELSE<statement_m>;
END_IF;
Condition FALSE
expression 1
Statement 3
Statement m
Application:
Use this construct to perform a process depending on evaluation of multiple conditions (condition
expressions).
Description:
If <condition_expression_1> is TRUE, <statement_1> is executed.
If <condition_expression_1> is FALSE and <condition_expression_2> is TRUE, then
<statement_2> is executed.
If <condition_expression_2> is FALSE and <condition_expression_3> is TRUE, then
<statement_3> is executed.
·
·
·
If <condition_expression_n> is TRUE, <statement_n> is executed.
If none of the conditions is TRUE, <statement_m> is executed.
CASE
Overview:
This construct executes a statement that corresponds to an integer set value that matches the value
of an integer expression.
Reserved Words:
CASE
Construct Structure:
CASE <integer_expression> OF
<integer_expression_value_1>:<statement_1>;
<integer_expression_value_2>:<statement_2>;
·
·
·
<integer_expression_value_n>:<statement_n>;
ELSE<statement_m>;
END_CASE;
Equal to Yes
value 1?
No
Yes
Equal to
value 2?
No
Yes
Equal to
value n?
No
Application:
Use this construct to perform different actions based on the value of an integer.
Description:
If <integer_expression> matches <integer_expression_value_n>, <statement_n> is executed.
If <integer_expression> does not match any of the integer values, <statement_m> is executed.
Precautions:
• CASE must always be used together with END_CASE.
• Use one of the following for the <integer_expression>:
• An integer or enumeration variable (example: abc)
• An integer expression (example abc+def)
• A function that returns an integer value (example: xyz())
• You can write any of the statements on multiple lines. Separate statements with a semicolon (;).
CASE A OF
1: X:=1; A value of 1 is assigned to variable X when variable A is 1.
2: X:=2; A value of 2 is assigned to variable X when variable A is 2.
3: X:=3; A value of 3 is assigned to variable X when variable A is 3.
ELSE 6
X:=0; If none of the values is matched, a value of 0 is assigned to
the variable X.
END_CASE;
Example 2: You can give an integer variable, integer expression, integer function return value,
enumeration variable, or enumeration function return value for the <integer_expres-
sion>. An example is shown below.
• Example for an Integer Enumeration Variable
CASE ColorVar OF
RED:
X := 0;
BLUE:
X := 1;
ELSE
X := 2;
END_CASE;
CASE FUN( ) OF
0: Branches depending on the return value of FUN( ).
X := 10;
1:
X := 11;
ELSE
X := 12;
END_CASE;
FOR
Overview:
This construct repeatedly executes the same statements until a variable (called the FOR variable)
changes from one value to another value.
The following expressions are used to specify whether the condition is met.
TRUE: The condition is met.
FALSE: The condition is not met.
Reserved Words:
FOR, TO, (BY), DO, END_FOR
Note You can omit BY.
Construct Structure:
FOR <FOR_variable>:= <initial_value> TO <end_value> BY <increment/decrement> DO
<statement>;
END_FOR;
TRUE
FOR variable >
end value?
Repeated
FALSE
Statement
FOR variable +
Increment/decrement value
Application:
Use this construct when you know in advance how many times you want to repeat a process.
This type of repeat construct is particularly effective to specify each element of an array variable
based on the value of a FOR variable.
Description: 6
A decision is made based on the evaluation of <initial_value>, <end_value>, and <increment/decre-
ment>.
Precautions:
• If the FOR variable is signed, <increment/decrement> can be a negative number.
• FOR must always be used together with END_FOR.
• The FOR variable becomes the end value plus increment/decrement after execution of the pro-
cess is completed for the end value. This ends the FOR construct.
Example: When the FOR construct is completed in the following ST statements, the value of i is
101.
• Do not write code that directly modifies the FOR variable inside the FOR construct. Unintended
operation may result.
Example:
FOR n := 0 TO 50 BY 5 DO
SP[n] := 100;
END_FOR;
Example 2: The total of elements DATA[1] through DATA[50] of array variable elements DATA[n]
is calculated and the result is assigned to the variable SUM.
IF a THEN
FOR n := 0 TO 50 BY 1 DO
DATA[n]:= 1 ;
END_FOR;
FOR n := 0 TO 50 BY 1 DO
SUM:= SUM + DATA[n] ;
END_FOR;
a:=FALSE;
END_IF;
Example 3: The maximum and minimum values of elements DATA[1] through DATA[50] of array
variable elements DATA[n] are found. The maximum value is assigned to the MAX
variable, and the minimum value is to the MIN variable. The value of DATA[n] is from
0 to 1,000.
MAX :=0;
MIN :=1000;
FOR n :=1 TO 50 BY 1 DO
IF DATA[n] > MAX THEN
MAX :=DATA[n];
END_IF;
IF DATA[n] < MAX THEN
MIN :=DATA[n];
END_IF;
END_FOR;
• If the total execution time of the statements in the FOR construct from when the FOR variable is
incremented/decremented from the initial value until it reaches the end value exceeds the task
period, a Task Period Exceeded error occurs.
• When the FOR Variable Cannot Logically Reach the End Value
Example:
FOR i := 0 TO 100 BY 1 DO
intArray[i] := i;
i := INT#50; An infinite loop occurs and results in a Task
END_FOR; Period Exceeded error.
Example:
• When an Overflow or Underflow Occurs Because the FOR Variable Exceeds the End Value
Example:
FOR i := 0 TO 254 BY 2 DO
INTArray[i] := i;
END_FOR;
Version Information
With the Sysmac Studio version 1.08 or higher, you can specify arithmetic expressions for
6
<end_value> and <increment/decrement>.
A := INT#1;
B := INT#2;
C := INT#10;
FOR i := 0 TO C BY A+B DO
INTArray[i] := i;
A := B + i;
C := C + i;
END_FOR;
WHILE
Overview:
This construct repeatedly executes the specified statements as long as a condition expression is
TRUE.
Reserved Words:
WHILE, DO, END_WHILE
Construct Structure:
WHILE <condition_expression> DO
<statement>;
END_WHILE;
Repeated
Condition FALSE
expression
TRUE
Statement
End
Application:
Use this type of repeat construct when you do not know how many times to repeat a process (i.e.,
when you do not know how many times based on the condition) and you want to repeat a process
for as long as a certain condition is met. You can also use this type of repeat construct to execute a
process only when a condition expression is TRUE (pre-evaluation repeat construct).
Description:
The <condition_expression> is evaluated before <statement> is executed.
If <condition_expression> is TRUE, <statement> is executed. Then the <condition_expression> is
evaluated again. This process is repeated.
If the <condition_expression> is FALSE, <statement> is not executed and the <condition_expres-
sion> is no longer evaluated.
Precautions:
• WHILE must always be used together with END_WHILE.
Example:
Example 1: The first multiple of 7 that exceeds 1,000 is calculated and assigned to variable A. 6
A := 0;
WHILE A <= 1000 DO
Example 2: The value of variable X is doubled if X is less than 3,000 and the value is assigned
to array variable element DATA[1]. Next, the value of X is doubled again and the
value is assigned to the array variable element DATA[2]. This process is repeated.
n := 1;
X := 1;
WHILE X < 3000 DO
X:= X*INT#10#2;
DATA[n]:= X;
n := n+INT#1;
END_WHILE;
• If you do not write correct condition expressions, the program execution time increases and may
cause a Task Period Exceeded error.
Example:
boolVar := TRUE;
WHILE boolVar DO
intVar := intVar + INT#1;
END_WHILE;
REPEAT
The following expressions are used to specify whether the condition is met.
TRUE: The condition is met.
FALSE: The condition is not met.
Overview:
This construct repeatedly executes one or more statements until a condition expression is TRUE.
Reserved Words:
REPEAT, UNTIL, END_ REPEAT
Construct Structure:
REPEAT
<statement>;
UNTIL <condition_expression>
END_REPEAT;
Statement
Repeated
Condition FALSE
expression
TRUE
End
Application:
Use this type of repeat construct when you do not know how many times to repeat a process (i.e.,
when you do not know how many times based on the condition) and you want to repeat a process
for as long as a certain condition is met after processing. Use this type of repeat construct to deter-
mine repeat execution based on the result of the execution of a process (post-evaluation repeat con-
struct).
Description:
First, <statement> is executed unconditionally. Then the <condition_expression> is evaluated.
If <condition_expression> is FALSE, <statement> is executed.
If <condition_expression> is TRUE, <statement> is not executed and the REPEAT construct is
exited.
Precautions:
• REPEAT must always be used together with END_REPEAT.
• Even if the <condition_expression> is TRUE before <statement> is executed, <statement> is exe-
cuted.
In other words, <statement> is always executed at least one time.
• <statement> can contain multiple lines of code for the statement. Separate statements with a
semicolon (;).
• You can also specify a BOOL variable (including functions that return a BOOL value) for the condi-
tion expressions instead of an actual expression.
Example:
Example 1: Numbers from 1 to 10 are added and the values are assigned to the variable TOTAL.
A := 1;
TOTAL := 0;
REPEAT
TOTAL := TOTAL + A;
A := A+INT#1;
UNTIL A>10
END_REPEAT;
• If you do not write correct condition expressions, the program execution time increases and may
cause a Task Period Exceeded error.
Example:
intVar := INT#1;
REPEAT
EXIT
Overview:
Use this statement only inside a repeat construct (FOR construct, WHILE construct, or REPEAT
construct) to exit the repeat construct.
Use this statement inside an IF construct to exit from the repeat construct when a condition is met.
Reserved Words:
EXIT
Application:
Use EXIT to end a repeating process before the end condition is met.
Example:
Variable n is repeatedly incremented by 1 from 1 to 50 while the value of n is added to array vari-
able elements DATA[n]. However, if DATA[n] exceeds 100, the repeat construct is exited.
IF A THEN
DATA[3] :=98;
FOR n := 1; TO 50 BY 1 DO
DATA[n] := DATA[n] + n;
IF DATA[n] > 100 THEN EXIT;
END_IF;
END_FOR;
A :=FALSE;
END_IF;
Overview:
This statement calls a function block.
Statement Structure:
Give the argument specifications (to pass the values of the specified variables to the input variables
of the called function block) and the return value specification (to specify the variable that will receive
the value of the output variable of the called function block) in parenthesis after the instance name of
the function block. There are two methods of writing this statement, as shown in (1) and (2) below.
We recommend method 1 for program readability.
Notation Method 1:
ABC
y1
x1 MyFB 6
A C
• You can give the arguments and return values in any order.
• You can omit the input variable names and input parameter names. If you omit these names, the
values assigned to the input variables for the previous call are assigned to the input variables
again. If this is the first time that the function block is called, the input variables are set to their ini-
tial values.
• You can omit the output variables and output parameters. If they are omitted, the value of the out-
put variable is not assigned to anything.
Notation Method 2:
Omit the variable names of the called function block and give the parameter names of the calling
POU.
ABC(x1, x2, y1);
ABC: Function block instance name
A and B: Omitted. (Input or in-out variable of called function block)
x1 and x2: Input or in-out parameter of calling POU (can be a constant)
C: Omitted. (Output variable of called function block or constant)
y1: Output parameter of calling POU
• Ladder Diagram Expression
ABC
y1
x1 MyFB
A C
x2 B
• The order of parameters is based on the function block definition. The order is the same as the
local variable definition for the function block, from top to bottom.
Application:
This statement calls a function block.
Example
• Programming
Notation 1
ChangeFixToFloat(Execute:=Exe,Data32_1:=FixPointData1, Data32_2:=FixPointData2,
NoOfDigit_1:=FixPointPos1,
NoOfDigit_2:=FixPointPos2,OK=>Done,Double_1=>RealData1,
Double_2=>RealData2);
Notation 2
ChangeFixToFloat(Exe, FixPointData1, FixPointData2, FixPointPos1, FixPointPos2,
Done, RealData1, RealData2);
• Ladder Diagram Expression
ChangeFixToFloat
Exe ConvData32ToDouble Done
Execute OK
• Program Variables
Variable name Data type Comments
ChangeFixToFloat ConvData32ToDouble Convert from fixed-point to
Function Calls
Overview:
This statement calls a function.
Statement Structure:
Give the output parameter to which the return value is assigned on the left side of the assignment
keyword (:=). On the right side, give the argument specifications (to pass the values of the specified
variables to the input variables of the called function) inside the parenthesis after the function name.
There are two methods of writing this statement, as shown in (1) and (2) below.
We recommend method (1) for program readability.
Notation Method 1:
IF (x0=TRUE) THEN
y1 := MyFUN(A:=x1, B:=x2, C=>y2);
END_IF;
• Ladder Diagram Expression
MyFUN
x0
EN ENO
x1 y1
A
x2 y2
B C
Notation Method 2:
Omit the variable names of the called function and give the parameter names of the calling POU.
IF (x0=TRUE) THEN
y1 := MyFUN(x1, x2, y2);
END_IF;
• Ladder Diagram Expression
MyFUN
x0
EN ENO
x1 y1
A
x2 y2
B C
• The order of parameters is based on the function definition. The order is the same as the local
variable definition for the function, from top to bottom.
6
Example:
• Programming
• Notation 2
ConvData32ToDouble(FixPointData1, FixPointData2, FixPointPos1, FixPointPos2,
RealData1, RealData2);
P_On ConvData32ToDouble
EN
• Function Definition
Function name: ConvData32ToDouble
Function Variables
I/O Variable name Data type
Input variables Execute BOOL
Data32_1 DINT
Data32_2 DINT
NoOfDigit_1 INT
NoOfDigit_2 INT
Output variables Double_1 LREAL
Double_2 LREAL
Return value --- BOOL
• Program Variables
Variable name Data type Comment
ChangeFixToFloat ConvData32ToDouble Convert from fixed-point to
floating-point.
Exe BOOL Execution trigger
FixPointData1 DINT Decimal point position specifi-
cation data 1
FixPointPos1 INT Number of digits below deci-
mal point 1
FixPointData2 DINT Decimal point position specifi-
cation data 2
FixPointPos2 INT Number of digits below deci-
mal point 2
Done BOOL Normal end
RealData LREAL Floating-point data 1
RealData LREAL Floating-point data 2
Application:
This statement calls a function.
Omitting Parameters
When you call a function, you can omit parameters that are not required. The following table shows
when you can omit parameters.
Implicit Casts
If the data types of the operands do not match, as shown below, the data types are converted auto-
matically according to the implicit cast rules. If the implicit cast rules are not satisfied, a building error
occurs.
(1) When the data types of the operands in the expression on the right side of the
assignment statement are not the same
Example:
A: = INT#10 + SINT#2;
(2) When the data types of the operands on the right and left sides of the assignment
statement are not the same
A: = B + C;
REAL INT
(3) When the data types of the operands in statement are not the same
Example:
INT LINT
CASE A+B OF
6
INT#1:
def:=INT#10;
Casting Rules When You Assign the Right-hand Value to the Left-hand Side
In the following chart, a cast is performed if an arrow connects the data type of the source to the
data type of the assignment destination. Any combination that is not connected will cause a building
error.
REAL LREAL
When you assign the value, the sign and absolute value of the number do not change.
When you assign the value, the sign and absolute value of the number may change.
Example: intVar := -1; (* intVar := 16#FFFF *)
uintVar := 1;
uintVar := intVar; (* uintVar:= 16#FFFF, or −1 was
assigned but the result is 65535 *)
Even if the arrow does not connect directly to a data type, you can still perform assignments for the
data types. For example, SINT->USINT->UINT->UDINT->ULINT are all connected, so you can write
an assignment such as ULINT:=SINT.
Example: For the following assignment statements, the result of the addition in the third state-
ment exceeds the range of 32-bit data. An overflow will result and 0 will be assigned
to LintVar.
UdintVar := UDINT#16#FFFF_FFFF; // Upper limit of 32-bit data
DintVar := DINT#1; // 1
LintVar := (UdintVar + DintVar)/DINT#2; // (Upper limit of 32-bit data + 1)/2
In a case like this one, convert the data to 64-bit data before you perform the calculation. To do
this for the above example, change the assignment status as shown below.
LintTmp1 := UDINT_TO_LINT(UDINT#16#FFFF_FFFF); //Convert UDINT to LINT data.
LintTmp2 := DINT_TO_LINT(DINT#1); // Convert DINT to LINT data.
LintVar := (LintTmp1 + LintTmp2) / DINT#2;
Expressions That Contain More Than One Function That Access the Same
Global Variable
In the following example, the order of execution of the three functions is not necessarily the same as
the order of execution of the calculations, which is determined by the priority of the operators. There-
fore, it is possible that the functions are executed in the following order: FUN2, FUN3, and then
FUN1. 6
result := FUN1() + FUN2() * FUN3();
Notation of Constants
If a constant is given without a decimal point, such as 100, it is processed as an integer. If a constant
is given with a decimal point, such as 100.0, it is processed as a real number.
START
No
No
END
start Clk Q do
• Method 3
Up
start In do
start Clk Q do
• Method 3
Down
start In do
Func- Add a circle to indicate reversal at the intersec- Add a NOT operator to the argument.
tion/function tion of the BOOL argument and the func- * You can add NOT operators to any BOOL
block argu- tion/function block. variable, not just arguments.
ment rever-
Func2
EN ENO
6
tmp in
6-6 Instructions
This section describes the instructions that are pre-defined by the NJ/NX-series Controller.
For details on these instructions, refer to the NJ/NX-series Instructions Reference Manual (Cat. No.
W502) and NJ/NX-series Motion Control Instructions Reference Manual (Cat. No. W508).
6-6-1 Instructions
Instructions are the smallest unit of the processing elements that are provided by OMRON for use in
POU algorithms. Instructions are classified as shown below.
FB instructions
Instructions
FUN instructions
ST language statements
Programs, user-defined functions, and user-defined function blocks consist of these instructions.
Instruction Options
Some ladder diagram instructions for inputs also detect changes to TRUE or changes to FALSE if
you add an upward arrow or downward arrow to them.
Output
The output power flow changes to FALSE
in the next task period (after it is TRUE
for one task period).
1 task period 1 task period
Time Chart
6-6 Instructions
1 task period 1 task period
Time Chart
Instruction Options
Instruction options cannot be specified.
FUN Instructions
Execution Conditions
All FUN instructions have EN inputs as execution conditions. The FUN instruction is executed each
task period as long as EN is TRUE.
Instruction Options
In a ladder diagram, you can add the following instruction options to specify a change to TRUE or a
change to FALSE as the execution condition for that instruction. ST statements do not have options.
@ MAX
EN ENO
In1
In2
6-6 Instructions
Errors detected before or after instruction execution
The followings are the errors detected before or after instruction execution.
• Reading or writing an array variable from or to an element beyond the array range.
• Assigning a string that is longer than the defined byte length to a STRING variable.
• Assigning a string that does not end with a NULL character to a STRING variable. 6
• Dividing an integer variable by 0.
Output variable ENO, output variable Error, and output variable ErrorID
ENO (enable out), Error, and ErrorID (error code) are the output variables that indicate whether an
error exists or not. Each instruction has different output variables. The meaning of each variable and
its value on an instruction error are shown below. The values vary by the timing when an instruction
error occurs.
Events
When an instruction error occurs, an event is created for it. For details on events, refer to Events for
Instruction Errors on page 6-138.
Version Information
A CPU Unit with unit version 1.02 is required to create events for instruction errors.
6-6 Instructions
6
5 a = b / (c + d) + e ∗ f + ABS(g);
6 x := 1;
For example, if a division by zero error occurs
in (b/(c+d)) on line 5, execution of line 5 is
cancelled (the value of a is not changed) and
line 6 is executed.
This operation is the same as when the output ENO of a user-created function is FALSE.
5 a = User-created_function_block (b) + c;
6 x := 1;
When the ENO output from the user-created
function is FALSE, execution of line 5 is
cancelled (the value of a is not changed) and
line 6 is executed.
Errors in IF Constructs
If a syntax error occurs in ST, perform error processing for the syntax error.
When the value of (c+d), below, is zero, the lines between the IF and END_IF are not executed.
POU"AA"
5 IF a = b / (c + d) THEN
6 x := 1;
7 ELSE
8 x := 2;
9 END_IF;
10 y := 10;
: : The user must include a safety
IF P_PRGER = TRUE THEN processing for possible errors.
x:= initial_value; (*Processing when an error occurs*)
y:= initial_value;
END_IF;
Syntax Errors in ST
The following syntax errors can occur in ST.
• Exceeding the number of elements in an array.
• No parameter set for in-out variable.
• STRING assignment: When the text string size (bytes) of the left side is less than the text string
length (bytes) of the right side
• Division by zero (excluding floating-point number calculations)
* When the value of a floating-point number is nonnumeric, the result of the calculation will also be nonnumeric.
This is not considered an error.
Read
Variable Data
Meaning Function Range of values Initial value /writ
name type
6-6 Instructions
e
P_PRGER Instruction Error Flag This flag changes to and BOOL TRUE or FALSE FALSE Read
remains TRUE when an /write
instruction error occurs. After
this flag changes to TRUE, it
stays TRUE until the program
changes it back to FALSE.
The user can write the P_PRGER Flag. You can temporarily set the value of this flag to FALSE through
a user operation to determine if the error occurs within a specific range, for example. After this flag 6
changes to TRUE, it remains TRUE until the operating mode is changed or the flag is overwritten by a
program.
User Program
P_PRGER
Initial process
R
The P_PRGER Flag also changes to TRUE when an instruction error occurs inside a user-defined
function block that is used by the program.
Example:
Program
P_PRGER : OFF
Inside function block definition
User-defined P_PRGER : OFF
function block
Instruction error
P_PRGER : ON
P_PRGER : ON
Version Information
• A CPU Unit with unit version 1.02 is required to create events for instruction errors.
• A CPU Unit with unit version 1.02 or later and Sysmac Studio version 1.03 or higher are
required to specify whether to output instruction errors when they occur.
Additional Information
• If an error occurs in a motion control instruction, two events are created, one for the instruction
error and one for the motion control instruction. For details on events for motion control instruc-
tions, refer to the NJ/NX-series Motion Control Instructions Reference Manual (Cat. No.
W508).
• Events for motion control instruction are created even if you select Do not use for Event Log
Settings − Instruction Error Output in the Controller Setup on the Sysmac Studio.
6-7 Namespaces
This section provides the specifications for namespaces and the procedures to use them. Refer to the
Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for the procedures to manipulate them.
Version Information
A CPU Unit with unit version 1.01 or later and Sysmac Studio version 1.02 or higher are required
to use namespaces.
6-7-1 Namespaces
Namespaces are a system for grouping function block definitions and other entities to manage them in
nested structures. They are similar to grouping files in folders to manage them in a directory structure. If
you do not use namespaces, the name of each function block definition or other entity must be unique.
If you use namespaces, you can use the same name more than once by setting namespaces. Using
namespaces is not required.
6-7 Namespaces
Features of Namespaces
Namespaces provide the following features.
6-7-1 Namespaces
different programmer will program each of them. Here, it would be likely that the same names would
be used for different function block definitions or other entities. If you did not use namespaces, you
would have to create naming rules to prevent the duplication of names. However, if you set a differ-
ent namespace for each system, programming would be possible without worrying about duplicating
names with other systems.
Namespace Usage
You can use namespaces for the entities that are listed in the following table. You cannot use them for
local variables.
Library object Details
POU definitions Function definition names and function block definition names
Data types Structure data type names, union data type names, and enumeration data
type names
Namespace Notation
Separate the levels in a namespace with backslashes (\). To use a namespace in a POU algorithm,
place two backslashes (\\) at the front of the namespace.
Examples:
Location of namespace Expression
Outside of an algorithm System_A\Read_recipe
Inside of an algorithm \\System_A\Read_recipe
Character
Name Maximum size
encoding
Names of name- 93 bytes UTF-8
spaces
Short names 127 bytes
System_A\Read_recipe\System_A\Process_A
Not The same name is used twice within the overall name of
allowed.
the namespace.
• You can use the short name of a POU definition in the algorithm of a POU definition if it is in
the same namespace. However, an error will occur when you build the program if there is a
POU definition or data type with the same short name at a higher level in that namespace.
For example, assume that the following POU definitions are used. You can use the short name
to call System_A\Read_recipe\Process_A from within the algorithm of the Process_B function
block definition (which is in the System_A\Read_recipe namespace) because Process_A is in
the same namespace.
POU Definitions
6-7 Namespaces
System_A\Read_recipe\Process_A
System_A\Read_recipe\Process_B
Process_A 6
POUPOU Definitions
Process_A (no namespace)
System_A\Process_A
• If any names are the same as a reserved word, an error will occur when you check the pro-
gram.
Namespace Declarations
To program with namespaces, you can declare the namespaces in advance before you use them in the
algorithm of a POU definition.
After you declare the namespace in the POU definition, you can use the short name of any POU defini-
tion or other entity that has the same namespace. You can also use the fully qualified name even if you
declare the namespace.
In the algorithm in a POU definition, you can use the short name of any function definition or function
block definition that has the same namespace as the POU definition of the algorithm even if you do not
declare the namespace.
You can declare more than one namespace for the same POU definition.
Notation Examples
Notation examples are provided below for creating a function block definition when declaring the name-
spaces to use in the function block definition and when not declaring the namespaces.
Examples:
In this example, the Read_recipe and Calculate_upper_limit function block definitions are used in the
algorithm for the Lifter function block definition. Each of these function block definitions is in a different
namespace. In the Lifter function block definition, only the System_C namespace is declared. The fully
qualified name must be given for the Read_recipe function block, which is not in the System_C name-
space. The short name can be given for the Calculate_upper_limit function block, which is in the Sys-
tem_C namespace.
Calculate_upper_limit
Restrictions of Declarations
• You can use short names only in the algorithm of a POU definition.
6-7 Namespaces
Not
None Function block definition Process_A allowed. The name is used without a namespace.
6
Additional Information
You cannot set a namespace for a program name. However, you can declare namespaces for
1 In the Data Type Editor, set the namespace for the data type.
2 Set the namespace in the properties of the function definition or function block definition.
3 In the Ladder Editor or ST Editor, declare the namespace in the properties of the function defini-
tion or function block definition.
4 Use the data types, function definitions, and function block definitions in the user program.
Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504-E1-03 or later) for specific
procedures.
6-8 Libraries
This section describes the specifications of libraries. Refer to the Sysmac Studio Version 1 Operation
Manual (Cat. No. W504-E1-03 or later) for specific procedures.
Version Information
A CPU Unit with unit version 1.01 or later and Sysmac Studio version 1.02 or higher are required
to use libraries.
The following figure illustrates the use of library objects. Here, program A uses FUN:A1 and FB:B1 from
the objects in the library, and program B uses Type:C1 and FB:B1.
Library
Sysmac Studio
Library objects
FUN:A2 FB:B2
Type:C1 FB:B3
Type:C2
Reuse objects.
FUN:A1 Type:C1
FB:B1 FB:B1
Program A Program B
Library Settings
The following settings are supported for libraries.
Setting Description
Name The name of the library.
Version The version of the library.
Author The creator of the library. (optional)
Creation date The date that the library was created.
Update date The date that the library was last updated.
Comment A comment on the library. (optional)
Company name The name of the company that created the library. (optional)
ID A unique ID that is used to access the library. The ID is generated automatically.
You cannot change it.
6-8 Libraries
Display/hide source You can specify whether to display or hide the source.*
Attached files You can attach one or more files.
* If data protection is set for a library object, a password is required to display the source code.
You can also access other libraries to create library objects. When you do, you can select whether to
include the library data from the accessed library.
6
When you select to include accessed library data, the accessing library is created so that it con-
tains a copy of the accessed library data. This means that only one library file is required. How-
ever, if there is more than one accessing library, you must change each one of them to make any
changes. When you select not to include accessed library data, the accessing library is created
without the accessed library data. This means that there will be two library files, the accessing
file and the accessed file. However, even if there is more than one accessing library, you need to
change only the accessed library to make changes.
Library Synchronization
You can download a library to a Controller, upload a library from a Controller, or verify a Controller
library against one on the computer.
Additional Information
• If you transfer a project for which transferring the source program is disabled from the Sysmac
Studio to a Controller that contains libraries for which the source is displayed, the source data
for the library is not transferred.
• The libraries in the Controller are deleted for the Clear All Memory operation.
* Data types are always included in the library object selections on the Sysmac Studio.
Property Definition
Name The name of the library object.
Namespace The namespace of the library object.
Version* The version of the library object.
Author* The creator of the library object. (optional)
Creation date* The date that the library object was created.
Update date* The date that the object library was last updated.
Comment A comment on the library object. (optional)
* These items can be set only for functions and function blocks. They are set in the POU definition properties on
the Sysmac Studio.
6-8 Libraries
Save the project in a library file in the Create Library File Dialog Box.
Additional Information
• You can change an existing project to a library project as long as the only device that is regis-
tered in the project is a Controller. Simply change the project type in the project properties to a 6
library project.
• You can create data that cannot be used as library objects in a library project. However, you
SetBlock
EN ENO
INT#0 In Out
data[0] AryOut data[0]
UINT#5 Size
SerialRcv_instance
Operating SerialRcv
Execute Done
InPort Port Busy
UINT#13 Size Error
DstDat
RecvDat[0] RecvDat[0]
ErrorID
ErrorIDEx
RcvSize RecvSize
In this case, you must create a structure variable for the input, output, and in-out parameters, then use
the MOVE instruction to set the values.
Example:
Variable Table
Variable name Data type
InPort _sPORT
SerialRcv_instance
SerialRcv
Execute Done
Introduction 6
Master control is used to make output FALSE for all processing between the MC (Master Control Start)
instruction and the MCR (Master Control End) instruction. Master control is useful to control the execu-
Step 4. Wiring
1 Select Simulation Pane from the View Menu of the Sysmac Studio.
The Simulation Pane is displayed on the lower right of the window.
Simulation Pane
3 After you complete checking operation, click the Stop Button in the Simulation Pane to stop the
Simulator.
1 Right-click Programs under Programming − POU in the Multiview Explorer and select Add for
Debugging − Multipart Ladder or Add for Debugging − Structured Text from the menu.
A debug program is created.
2 Enter the test program code into the debugging program that you just created.
You can also change a normal program that is already completed into a debug program in the same
way.
1 Right-click a program under Programming − POU − Programs in the Multiview Explorer and
select SettingsForDebugging − Enable.
7-3-1 Procedures
The procedures from checking operation on the actual system to starting actual operation are given
below.
Step 1. Going Online from the Sysmac Studio and Downloading the Project Reference
1. Turn ON the power supply to the Controller. Sysmac Studio Version 1
2. Place the Sysmac Studio online with the Controller. *1 Operation Manual (Cat.
No. W504)
3. Download the project (i.e., the user program, Unit configuration, and other
settings) from the Sysmac Studio.
*1 You cannot connect a computer and an NX1P2 CPU Unit because it does
not provide a peripheral USB port. Refer to 10-2 Connection with Sysmac
Studio for the procedure to connect to the Sysmac Studio.
Additional Information
Use the synchronization function to download the project from the Sysmac Studio to the Control-
ler. Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for information on
the synchronization function.
1 Go online with the Controller, and then select Synchronization from the Controller Menu.
The data on the computer and the data in the physical Controller are compared automatically.
1 After you complete the necessary wiring, connect the Sysmac Studio online to the Controller.
3 Open the MC Test Run Tab Page and perform the following.
Example:
• Monitoring and checking wiring
• Jogging to check the direction of the motor
• Check travel distances for relative positioning (electronic gear settings).
• Confirming the homing operation
2 Check the operation by changing the status of program inputs and program outputs, and the val-
ues of variables.
After you clear the memory, the CPU Unit operates in the same way as immediately after you create the
system configuration with the CPU Unit in the factory default condition.
8-1-2 Clock
8
Introduction
CPU Unit
Clock data
• Event logs
• Time and date of files that are
created on SD Memory Card
Battery backup
Battery
CJ1W-BAT01
Additional Information
When a Battery is not mounted or when the Battery voltage is low, the time zone setting is
retained, but the clock data is not retained and will not be correct.
Specifications
An NTP client is provided.
Refer to the NJ/NX-series Built-in EtherNet/IP User’s Manual (Cat. No. W506) for details.
Logging 8
When you change the clock data, an event is recorded in the event log. However, nothing is recorded in
8-1-2 Clock
the event log if the time is corrected for the NTP.
Introduction
The RUN output on NX-PA9001, NX-PD7001, or NJ-P3001 Power Supply Unit is ON while the CPU
Unit is operating.
RUN
output
The ratings of the RUN output on NX-PA9001, NX-PD7001, or NJ-P3001 Power Supply Unit are as
follows:
Item Description
Contact form SPST-NO
2 A at 250 VAC for resistive load
Switching capacity 0.5 A at 120 VAC for inductive load
2 A at 24 VDC for resistive load
Application
You can use the RUN output for the following purposes:
• Obtain a signal to notify the host that the CPU Unit is functioning normally and is currently operating.
• Synchronize the completion of startup of more than one CPU Unit
• Release interlocks when the CPU Unit starts operation.
For I/O data that are handled by the NX Bus Function Module, there are two kinds of I/O data, the sta-
tus of NX Units managed by the NX Bus Function Module as the NX bus master and I/O data for indi-
vidual NX Units. The variables are the assignable I/O ports for both of them.
The following describes the status of NX Units managed by the NX Bus Function Module as the NX bus
master, I/O data for individual NX Units, assigning device variables to I/O ports, and programming sam-
ple using device variables.
Name Description
NX Unit Registration Status This status tells whether the NX Units are registered in the Unit Configuration.
Each bit has the following meaning.
TRUE: Registered
FALSE: Not registered
If the Unit configuration information is registered, the status is TRUE for each Unit
that is registered.
If the Unit configuration information was automatically created (with only the
actual Unit configuration information and no registered information), the status is
FALSE for all Units.
The status is TRUE for NX Units that are set as unmounted Units.
The status says that message communications are enabled for NX Units that
meet the following conditions.
• The comparison shows no differences (only if the Unit configuration information
is registered).
• The NX Unit does not have a WDT error.
The status is FALSE for NX Units that are set as unmounted Units.
Each bit is updated when the message communications status changes on the
corresponding NX Unit.
NX Unit I/O Data Active Sta- This status tells whether the NX Units can process I/O data communications.
tus Each bit has the following meaning.
TRUE: The I/O data in the NX Unit can be used for control.
FALSE: The I/O data in the NX Unit cannot be used for control.
The status is FALSE for NX Units that are set as unmounted Units.
Each bit is updated when the operating status changes on the corresponding NX
Unit.
If both of NX Unit Registration Status and NX Unit I/O Data Active Status are
TRUE, the target NX Units operate normally.
Name Description
NX Unit Error Status This status tells whether an error exists on the NX Units.
Each bit has the following meaning.
TRUE: Error
FALSE: No error
Each bit is set to TRUE when the level of the error is as follows:
• Major fault
• Partial fault
• Minor fault
• Observation
The status is FALSE for NX Units that are set as unmounted Units.
8
Refer to A-6-4 NX Bus Function Module, Category Name: _NXB on page A-140 for details on the
related system-defined variables.
Refer to the user’s manual for the specific NX Units for details on I/O data for individual NX Units.
Data
Name I/O port name
type
NX Unit Registration Status Device name + NX Unit Registration Status BOOL
NX Unit Message Enabled Status Device name + NX Unit Message Enabled Status BOOL
NX Unit I/O Data Active Status Device name + NX Unit I/O Data Active Status BOOL
NX Unit Error Status Device name + NX Unit Error Status BOOL
Time Stamp of Synchronous Input Device name + Time Stamp of Synchronous Input ULINT
Time Stamp of Synchronous Output Device name + TimeStamp of Synchronous Output ULINT
I/O port names are determined by the model number of the NX Unit and the functionality for I/O data for
NX Units mounted on the CPU Unit.
Nx_Unit5_IOActive Nx_Unit5_Error
MemCopy1
MemCopy
EN ENO
In1[1] In Out
AryOut
AryOut1[1] AryOut1[1]
UINT#3 Size
Nx_Unit5_MessageActive
NX_WriteObj1
NX_WriteObj
8
Execute Done
UnitProxy1 UnitProxy Busy
Obj1 Obj Error
Nx_Unit5_MessageActive: This is a device variable to indicate the NX Unit Message Enabled Status with NX
Unit number 5.
Overview of Function
You can use this function to register NX Units that will be added to at a later time in the Unit configura-
tion information as unmounted Units. With this function, you can create the program in advance for NX
Units that are not mounted to the actual configuration.
You can use this function even if a specific Unit is temporarily unavailable such as when commissioning
the system.
• I/O memory area is reserved for these unmounted NX Units in the same way that it is reserved for NX
Units that are mounted to the actual configuration.
• Unmounted NX Units are also assigned NX Unit numbers. This prevents the NX Unit numbers of
other NX Units on the CPU Unit from changing when you change the setting of an NX Unit that is not
mounted to the setting of an NX Unit that is mounted to the actual configuration.
♯2 ♯3 ♯7
NX Unit NX Unit NX Unit
NX Units to add later
End Cover
CPU Unit ♯1 ♯4 ♯5 ♯6 ♯8
NX Unit NX Unit NX Unit NX Unit NX Unit
Current Unit
configuration
CPU Unit ♯1 ♯2 ♯3 ♯4 ♯5 ♯6 ♯7 ♯8
NX Unit NX Unit NX Unit NX Unit NX Unit NX Unit NX Unit NX Unit
Unit configuration (Set as an (Set as an (Set as an
information that is unmounted unmounted unmounted
Unit configuration
created Unit.) Unit.) Unit.)
information
The Unit configuration information includes information on unmounted Units so that I/O memory area is
also reserved for them.
Item Operation
Bandwidth reservation for I/O refresh data with the Bandwidth is reserved.
EtherCAT master
I/O refreshing with the EtherCAT master The I/O is not refreshed.
Detection of events Events are not detected.
Assignment of NX Unit numbers to NX Units Unit numbers are not assigned because the Units do
not exist.
Message communications Not possible because the Units do not exist.
Transfers for the synchronization function of the Sys- Not applicable.
mac Studio
Transfer of the Unit operation settings Not applicable.
Sysmac Studio Controller backup function Not applicable.
SD Memory Card backup function Not applicable.
NX Units that are set as unmounted Units are included in the calculations for total power consumption
and total Unit width when the Unit configuration is created on the Sysmac Studio.
Types of Restarts
The following table gives the types of restarts for individual NX Units.
Type Function
Restarting NX Bus Function Module All NX Units on the CPU Unit are restarted.
Restarting individual NX Units The specified NX Unit is restarted.
Refer to the NJ/NX-series Instructions Reference Manual (Cat. No. W502) for details on the RestartNX-
Unit instruction.
Refer to the NJ/NX-series Instructions Reference Manual (Cat. No. W502) for details on the RestartNX-
Unit instruction.
The NX Bus Function Module and all NX Units that were not specified for restarting continue to operate.
Restarting an NX Unit
Place the Sysmac Studio online. In the CPU and Expansion Racks Tab Page, right-click the CPU Unit
and select Restart for NX Bus/NX Unit - Yes. All NX Units on the CPU Unit are restarted.
In the same way, right-click the NX Unit to restart and select Restart for NX Bus/NX Unit - Yes. The
specified NX Unit is restarted.
You can use the Sysmac Studio to check the wiring between NX Units on the CPU Unit and I/O devices
during system commissioning even if the user program is not created.
Preparation
Create the NX Unit configuration information and check whether the Unit configuration on the Sys-
mac Studio agrees with the actual Unit configuration if the NX Unit configuration information was
transferred to the CPU Unit.
If the NX Unit configuration information was not transferred to the CPU Unit, go online, right-click
anywhere in the CPU an Expansion Racks Tab Page and select Compare and Merger with Actual
Unit Configuration. The configuration is automatically configured.
Additional Information
• For Position Interface Units and other NX Units that are assigned to axes, use the MC Test
Run of the Sysmac Studio. Refer to the NJ/NX-series CPU Unit Motion Control User’s Manual
(Cat. No. W507) for details.
• Use the I/O checking of EtherCAT Slave Terminals to check the wiring of NX Units on the Eth-
erCAT Coupler Unit. Refer to the NX-series EtherCAT Coupler Unit User’s Manual (Cat. No.
W519) for details.
This function allows the NX Bus Function Module to start or continue I/O refreshing only with the NX
Units on the CPU Unit that can operate normally when an error occurs for the NX Bus Function Module.
For example, you can use this function in the following cases.
• When it is dangerous to stop all NX Units on the CPU Unit at once
• To continue the operation of the NX Units on the CPU Unit until the system can be stopped safely
through the user program or user operation
• To not stop all devices, i.e., to continue operation for only some devices
End Cover
Error occurs.
End Cover
CPU Unit ♯1 ♯2 ♯3 ♯4 ♯5
8
NX Unit NX Unit NX Unit NX Unit NX Unit
Sample programming that determines whether NX Unit (NX Unit number: 5) I/O data on the CPU
Unit is given below.
R_HandSensor_Active R_HandSensor_Error
MemCopy1
MemCopy
EN ENO
In1[1] In Out
AryOut
AryOut1[1] AryOut1[1]
UINT#3 Size
R_HandSensor_Active: This is a device variable to indicate the NX Unit I/O Data Active Status with NX Unit number 5.
R_HandSensor_Error: This is a device variable to indicate the NX Unit Error Status with NX Unit number 5.
*1 When an error occurs, I/O refreshing for the NX Units on the CPU Unit that is not started, i.e., I/O refreshing for
the NX Units on the CPU Unit that is stopped is called “entire stop”.
Except for the I/O refreshing, the operation when an error occurs for the NX Bus Function Module is the
same regardless of whether fail-soft operation is used. Specially, error notification is provided and
errors are recorded in the event log.
Refer to 12-2-4 Error Descriptions for the errors to which fail-soft operation applies.
If an error occurs to which fail-soft operation does not apply, the NX Bus Function Module will stop I/O
refreshing for all NX Units even if you enable fail-soft operation.
8-2-6 Monitoring Total Power-ON Time for NX Units on the CPU Unit
This section describes how to monitor the total power-ON time for NX Units on the NX1P2 CPU Unit.
Each of the NX Units on the CPU Unit records the total time that the Unit power supply is ON to it. You
can display these times on the Sysmac Studio.
This section describes how to check the total power-ON times with the Sysmac Studio. Refer to the
NJ/NX-series Instructions Reference Manual (Cat. No. W502) for details on the NX_ReadTotalPow-
erOnTime instruction.
8-2-6 Monitoring Total Power-ON Time for NX Units on the CPU Unit
2 Right-click CPU Rack under Configurations and Setup - CPU/Expansion Racks in the Multi-
view Explorer and select Production Information.
The Production Information Dialog Box is displayed.
You can check the total power-ON times of each NX Unit when you change the view to the pro-
duction information details.
Display for Units That Do Not Support Monitoring the Total Power-ON Time
If a Unit does not support monitoring the total power-ON time, the total power-ON time for the Unit is
displayed as “---” on the Sysmac Studio.
Introduction
You can increase the input response time to reduce chattering and the effects of external noise. You
can decrease the input response time to enable detection of shorter input pulses. Do not set the ON
response time or OFF response time to less than the refresh time.
Input from a
proximity sensor
or other device
Input bit
Setting Methods
From the Multiview Explorer of the Sysmac Studio, double-click CPU/Expansion Racks under Config-
urations and Setup. Then select the input response times in the Unit information for the Basic I/O
Units.
ErrorID
If Special Unit settings are changed in any of the following ways, you must restart the Special Unit or 8
cycle the power supply to the Controller.
• Editing from the Special Unit Settings Tab Page of the Sysmac Studio
Sysmac Studio
SD Memory Card
Creating/reading files
from Sysmac Studio
Function Introduction
SD Memory Card operation You can access SD Memory Cards from instructions in the user program.
instructions
FTP client communications You can use these instructions to transfer files via FTP from the CPU Unit
instructions*1 to computers or Controllers at Ethernet nodes.
You can use FTP commands from an FTP client on the Intranet to read and
FTP server
write large files in the SD Memory Card through EtherNet/IP.
You can perform file operations from the Sysmac Studio for the SD Mem-
8
File operations from the Sysmac ory Card inserted in the CPU Unit.
Studio You can perform file operations for Controller files in the SD Memory Card
Capacity Number of
Model Card type Formatting Write protection
[GB] overwrites
HMC-SD291*1 SD card 2 FAT16 100,000 over- You can write-protect the SD
HMC-SD491 SDHC card 4 FAT32 writes Memory Card with a hardware
switch on the Card.
*1 You cannot use an HMC-SD291 for the NJ501- CPU Unit with the hardware revision A and unit version
1.15 or later.
The system-defined variable _Card1Err (SD Memory Card Error Flag) changes to TRUE (observation
level) in the following cases.
• When there is a format error
If an error occurs, the SD PWR indicator on the front of the CPU Unit goes out, and accessing the SD
Memory Card will not be possible.
Subdirectory Levels
You can create up to 5 levels (example: f1/f2/f3/f4/f5/abc.txt)
Version Information
A CPU Unit with unit version 1.08 or later and Sysmac Studio version 1.09 or higher are required
to use the FTP client communcations instructions.
CPU Unit
FTP Client
FTP
commands
File transfers
Note Refer to 9-2 SD Memory Card Backups for the system-defined variables that are used with the SD Memory
Card backup function.
Additional Information
SD Memory Card inserted. Card recognized. Power supply stopped with power switch.
_Card1Ready
_Card1Err
_Card1Access
*1 Self-diagnosis is not executed if write protection is set on the SD Memory Card itself.
Results of Self-diagnosis
Indicators
Case Error type Correction Remarks
RUN SD PWR SD BUSY
Self-diagnosis in Flashing. Not lit. Lit. --- --- ---
progress
1. When self-diag- --- Lit. Not lit. Normal None ---
nosis found no
problems
2. The format of --- Not lit. Not lit. Observa- Use the Sysmac ---
the SD Memory tion Studio to format
Card is not cor- the SD Memory
rect. Card.
3. An error was --- Not lit. Flashes Observa- Use file operations If a cor-
detected during during tion in the Sysmac Stu- rupted file
the file system restore dio or insert the SD is detected,
check and the operation. Memory Card into an attempt
file system was Not lit after the computer to is made to
automatically restore check whether any restore the
restored. operation is files were deleted file.
completed. by the restore
operation.
4. The SD Mem- --- Not lit. Not lit. Observa- Replace the SD ---
ory Card failed. tion Memory Card.
However, if the same file on the SD Memory Card is accessed from different sources, unintended oper-
ations such as reading a file while it is being written or writing a file while it is being read may occur.
It is necessary to perform exclusive controls in order to prevent multiple accesses to the same file.
The following table shows the combinations of operations that require exclusive controls.
When you use a combination of operations that requires exclusive controls, execute the later process-
ing only after checking that the first processing is finished.
First access
File Operations from the
Instructions*1 FTP server
Sysmac Studio
*1 The instructions include the SD Memory Card operation instructions and the FTP client communications
instructions.
8-5 Security
This section describes the security functions that are supported by the NJ/NX-series Controller.
To protect your assets, you can use security functions to protect the user program and data in the Con-
troller. To prevent incorrect operation, you can use security functions to restrict operations on the Sys-
mac Studio.
The NJ/NX-series Controller supports the following security functions.
* A CPU Unit with unit version 1.01 or later and Sysmac Studio version 1.02 or higher are required.
Introduction
You can set a specific ID (called a user program execution ID) in the CPU Unit in advance. If you do, you
can execute only a user program with the same ID.
Sysmac Studio
You can therefore prevent different CPU Units (hardware) from executing a user program.
8-5 Security
In contrast to the protection function, you can still display and edit the user program even if a user pro-
gram execution ID is set.
Operating Procedure
8
1 Always backup the project files before you assign a user program execution ID.
3 Connect the Sysmac Studio online and register the user program execution ID that was set in
step 2 in the CPU Unit.
The registration of the user program execution ID in the CPU Unit is recorded in the event log. At
this time, the user program execution ID in the CPU Unit is overwritten even if it is already regis-
tered.
4 Transfer the user program with the same user program execution ID to the CPU Unit.
If the user program execution ID in the user program does not match the user program execu-
tion ID in the CPU Unit or if one of them does not have an ID, an ID Verification Error (major fault
level Controller error) occurs when you attempt to change to RUN mode and the CPU Unit will
not operate.
When the User Program Execution ID in the CPU Unit Is Incorrect or Not
Registered:
Connect online to the CPU Unit from the Sysmac Studio and perform the following steps.
1 Overwrite or register the correct user program execution ID in the CPU Unit.
2 Cycle the power supply to the Controller, or reset the CPU Unit from the Sysmac Studio.
When the User Program Execution ID Is Not Assigned to the User Program or
Is Incorrect
1 Read the backed up project file from the Sysmac Studio, and assign the correct user program
execution ID.
2 Connect the Sysmac Studio to the CPU Unit online and transfer the user program.
3 Cycle the power supply to the Controller, or reset the Controller from the Sysmac Studio.
Other Situations
Specifications
User Program Execution ID Verification Specifications
Timing of Verification
At startup, the CPU Unit compares the user program execution ID that is registered in the CPU Unit
with the user program execution ID that is assigned to the user program.
8-5 Security
Verification Conditions
The conditions for verifications are given in the following table.
“A” and “B” indicate the IDs.
User program execution User program execution
ID that is registered in ID that is assigned to the Error Operation 8
the CPU Unit user program
A A None Possible
Introduction
Normally, when you transfer the user program from the Sysmac Studio to the CPU Unit, information is
transferred to restore it.
This function does not transfer information for restoration. That makes it impossible to read the user
program.
User program
Normally, both User program Restoration information
Readable (restoration are transferred. (restoration
is not transferred.
information) information)
Not readable
This function is used to prevent theft of user program data when on-site maintenance of the user pro-
gram is not required.
Operating Procedure
When you transfer the user program to the CPU Unit, select the Do not transfer program source Check
Box in the Synchronization Window of the Sysmac Studio and then click the Transfer to Controller
Button.
Operating Procedure
This section describes how to set a password for a project. When you use Save As to save the proj-
ect file, select the Enable password protection for the project file Check Box to enable setting a pass-
word.
Use the following procedure to open a project for which a password is set. If you try to open or
import a project file for which a password is set, the Enter a Password Dialog Box is displayed.
8-5 Security
Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for specific procedures.
Version Information
A CPU Unit with unit version 1.01 or later and Sysmac Studio version 1.02 or higher are required
to use data protection.
Introduction
You can place protection on part of the data in a project file to restrict access to that data. You can
select any of three levels of access restrictions when you set protection. Protection must be temporarily
cleared to access the restricted data. The length of time for which protection is cleared depends on the
operation that you use.
Protected Data
Protection can be set for the following data. Only change protection can be set for cam profiles.
• Ladder diagrams (applies to programs, functions, and function blocks)
• ST (applies to programs, functions, and function blocks)
• Cam profiles
Operating Procedure
This function is used when the Sysmac Studio is offline. The settings are saved in the project file. When
you use the synchronization function of the Sysmac Studio to transfer the project, the data protection
settings in the data in the computer or Controller are transferred to Controller or computer.
Select Security − Set/Release Data Protection from the Controller Menu of the Sysmac Studio to set
protection.
Select Security − Temporarily Change Prohibition of Data Protection from the Controller Menu
of the Sysmac Studio to temporarily clear protection.
Select Security − Finish Temporary Change Prohibition of Data Protection from the Controller
Menu of the Sysmac Studio to end temporary change protection.
8-5 Security
Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for specific procedures.
Introduction
Online operations are restricted by operation rights to prevent damage to equipment or injuries that may
be caused by operating mistakes. Examples are shown below.
• I/O Monitor: Writing, forced refreshing, etc.
• Controller operations: Changing the operating mode, online editing, MC Test Run, etc.
You can register passwords for operation authority for each CPU Unit in the Sysmac Studio. If a correct
password is entered when an online connection is made to a Controller, the online operations for the
operation authority category for the password that was entered will be allowed.
The Administrator sets a password for each operation authority. Users are notified of the operation
authority name and password according to their skills.
Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for specific operating proce-
dures for operation authorities.
Operation
For operation authority verification, select Security − Setting of Operation Authority from the Control-
ler Menu on the Sysmac Studio.
Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for specific procedures.
Specifications
Types of Operation Authorities
You can use the following five operation authorities on the Sysmac Studio. They are given in
descending order of authority.
English name Password
Administrator Required.
Designer*1 Optional*2
Maintainer*1 Whether a password is required is determined by the default operation authority that is set in the
Setting of Operation Authority Dialog Box. The default operation authority is used when a pass-
Operator*1 word is not input.
Observer*1 Not required.
*1 A CPU Unit with unit version 1.01 or later and Sysmac Studio version 1.02 or higher are required.
*2 Whether a password is required is determined by the default operation authority that is set in the Setting of
Operation Authority Dialog Box. A password must be entered to perform operations that require an operation
authority that is higher than the default operation authority. A password is not required to perform operations
that require an operation authority that is equal to or lower than the default operation authority.
8-5 Security
Adminis- Main-
I/O monitor operations (examples) Designer Operator Observer
trator tainer
I/O monitor: Reading OK OK OK OK NP
I/O monitor: Writing OK OK OK VR NP
Controlling BOOL variables OK OK OK VR NP 8
Forced refreshing OK OK OK NP NP
Password Specifications
Item Description
Valid number of characters 8 to 32
Applicable characters Single-byte alphanumeric characters (case sensitive)
At startup
Write protection Write Protection
Writing is not
possible.
Set whether to automatically enable write protection when the power supply is turned ON in the
Operation Settings under Configurations and Setup − Controller Setup of the Sysmac Studio.
CPU Unit
None
You can turn write
protection ON and
OFF.
Enabled
Introduction
Register a CPU Unit name in the CPU Unit. When going online to a CPU Unit from the Sysmac Studio,
the CPU Unit name in the project is compared to the name of the CPU Unit being connected to. This
helps prevent incorrect connections to the CPU Unit from the Sysmac Studio. It is particularly effective
for operations performed over an EtherNet/IP network.
Sysmac Studio
CPU Unit
name: A
In addition to the CPU Unit name, it is also possible to use serial ID identification based on the CPU
Unit production information (optional).
Setting Methods
8-5 Security
1 Set the CPU Unit name when you create a project on the Sysmac Studio.
The CPU Unit name is displayed as shown below.
8
2 When you first connect to the CPU Unit online, the Sysmac Studio prompts you to store the
CPU Unit name in the CPU Unit.
3 After that, when you connect to the CPU Unit online, the Sysmac Studio refers to the CPU Unit
name in the project and the CPU Unit name of the CPU Unit you connect to. A warning dialog
box is shown if they do not match, and you are asked whether to continue to connect.
Additional Information
Serial IDs
When the Sysmac Studio first connects online, you can obtain the serial ID from the CPU Unit’s produc-
tion information and store it in the project. After that, when the Sysmac Studio connects online, both the
CPU Unit name and the serial ID are compared. This enables stricter verification of the CPU Unit.
Sysmac Studio
CPU Unit
CPU Unit
8-6 Debugging
This section describes debugging.
The NJ/NX-series Controller provides the following debugging operations.
• Forced refreshing
• Changing present values
• Online editing
• Data tracing
• Differential monitoring
Description
Forced refreshing allows the user to refresh external inputs and outputs with user-specified values from
the Sysmac Studio to debug the system. Forced refreshing is executed not for the specified device vari-
ables, but for the I/O ports that are assigned to the device variables. The state that is specified with
forced refreshing is retained until forced refreshing is cleared from the Sysmac Studio. (Refer to Hold-
ing/Clearing Forced Refreshing on page 8-50 for information how forced refreshing is retained or
cleared according to changes in CPU Unit status.) All forced refreshing is cleared when a fatal error
occurs, when a Clear All Memory operation is performed, when the operating mode is changed, when
power is interrupted, or when the project is downloaded.
8-6 Debugging
Inputs
The I/O port and device variable change to the status that is specified with forced refreshing regard-
less of the status of the external input.
Sysmac Studio
I/O port
(1) I/O port changed to Device variable
TRUE with forced
refreshing. FALSE
TRUE TRUE
Outputs
The I/O port and the output to the external device change to the status that is specified with forced
refreshing. In the user program, the status of the device variable that is assigned to the I/O port will
not necessarily be the status that was specified with forced refreshing. It will change with the results
of user program execution.
Sysmac Studio
CPU Unit
I/O port
(1) Output changed to Device variable
TRUE with forced
refreshing.
TRUE
FALSE TRUE
Applicable Areas
You can execute forced refreshing for the following I/O ports and memory used for CJ-series Units.
• I/O ports for EtherCAT slaves
• I/O ports from data handled by the NX Bus Function Module of the NX1P2 CPU Unit
• I/O ports for I/O built in the NX1P2 CPU Unit
• I/O ports for Analog I/O Option Boards in the NX1P2 CPU Unit
• I/O ports for CJ-series Basic I/O Units
• I/O ports for CJ-series Special Units
• I/O bits for DeviceNet or CompoNet slaves that are specified for AT specifications from variables
If you execute forced refreshing from the Ladder Editor or the Watch Tab Page, the status of the I/O port
or memory element for a CJ-series Unit will change via the variable.
Note For I/O ports from data handled by the NX Bus Function Module of the NX1P2 CPU Unit, only the I/O ports
for I/O data for individual NX Units are applicable. The I/O ports for status of NX Units managed by the NX
Bus Function Module as the NX bus master are not applicable.
Note You can use memory for CJ-series Units only with NJ-series CPU Units and NX1P2 CPU Units.
Application
Inputs
• To apply a simulated input signal to debug the user program
• To create a status that would occur only when a failure occurs (e.g., two exclusive bits turning ON or
OFF at the same time)
Outputs
• To turn outputs ON and OFF to check wiring
• To intentionally turn OFF an output you do not want to operate regardless of results of user program
execution
Operating Procedure
Operations can be performed from the following panes.
• Program Panes (Ladder diagram language)
• I/O Map
• Watch Tab Page
2 Double-click the ladder program, ladder function, or ladder function block under Programming
in the Multiview Explorer.
8-6 Debugging
The rungs are displayed on the Ladder Editor in monitor status.
3 Right-click the input or output and select Forced Refreshing − TRUE. The input or output is
forced to TRUE. Right-click the input or output and select Forced Refreshing − FALSE. The
input or output is forced to FALSE.
4 The input or output in the Ladder Editor changes to TRUE or FALSE and the execution condition 8
changes accordingly.
A mark that indicates that the input or output has forced status is displayed as shown below.
Ladder diagram
The TRUE or FALSE mark for forced status indicates the status that was specified for forced
refreshing. It does not indicate the current value of the input or output.
Forced status mark Operation
TRUE specified with forced refreshing
Additional Information
If there are other variables that are assigned the same memory address as one that is specified
as the AT specification of a variable for which forced refreshing is specified, the forced status
mark is displayed for all of the variables with that AT specification.
a
x • a is FALSE in the program.
• When the output is refreshed, information from forced
OFF refreshing is reflected and the external output of a is
TRUE.
External output
of a: TRUE
8-6 Debugging
8
Description
You can change the present values of variables that are used in the user program and settings and you
can change program inputs and outputs to TRUE or FALSE. This allows you to check the operation of
the user program and settings.
Sysmac Studio
CPU Unit
Application
Changing Program Inputs and Outputs to TRUE or FALSE
You can change the value of any BOOL variable to TRUE or FALSE. The specified value is then
overwritten by the execution results of the user program. If the operating mode is changed or the
power supply is cycled, the initial value is restored. You can control BOOL variables in the Ladder
Editor, Watch Tab Page, or I/O Map.
Operating Procedure
Operations can be performed from the following panes to change the present values. Refer to the Sys-
mac Studio Version 1 Operation Manual (Cat. No. W504) for details on the operating procedures on the
panes.
• Program panes (ladder diagrams and ST)
• I/O Map
• Watch Tab Page
8-6 Debugging
Any value that is written to an I/O memory address that corresponds to an output bit that is assigned
to a CJ-series Basic Output Unit through a tag data link will be overwritten by the execution results of
the user program. The value that is written directly to the I/O memory address from the tag data link
will therefore not be output to the external device.
Note You can use memory for CJ-series Units only with NJ-series CPU Units and NX1P2 CPU Units.
8
Introduction
The online editing function is used to add to or change part of a program in the CPU Unit directly from
the Sysmac Studio.
You can select any of the following to perform online editing.
• POUs (programs, functions, and function blocks)
For a ladder diagram program, select a section.
• Global variables
Application
You can use online editing to change a user program without stopping the operation of the CPU Unit.
Caution
Execute online editing only after confirming that no adverse effects will occur
if the I/O timing is disrupted. If you perform online editing, the task execution
time may exceed the task period, I/O may not be refreshed with external
devices, input signals may not be read, and output timing may be changed.
8-6 Debugging
8
Triggered Tracing
Trigger conditions are set to record data before and after an event. Sampling stops automatically
when the maximum number of sampled variables is reached. Even if the Sysmac Studio is not
online, you can trace data when trigger conditions are met and then upload the data after placing the
Sysmac Studio online.
• You can check the flow of the program based on the status of changes in the present values of
variables.
• You can use the data to investigate the cause of unexpected changes in the values of variables.
Sysmac Studio
CPU Unit
Data to trace
Sampling
Sampled data
Uploaded once.
Continuous Tracing
Sampling starts without any trigger and continues on even after 10,000 samples are collected. Sam-
ple data is transferred to the computer as it is collected and saved to a file. When the display buffer
is full, the data is automatically saved to a CSV file. You can use this to store trace results data for a
long tracing period in multiple CSV files.
Sysmac Studio
CPU Unit
Data to trace
Sampling
Sampled data
Continues.
8-6 Debugging
The trigger position is set in respect to the overall trace
Setting trigger positions
time or quantity.
Basic data types except for times, durations, dates, and
text strings
Condition data types
Arrays (specify the element), structures (specify the
member), and unions (specify the member)
Tracing is started when one of the following conditions is
8
met.
BOOL: TRUE or FALSE
Item Description
Commands from Sys- Tracing is started when the Execute Button is clicked on
mac Studio the Sysmac Studio.
Starting a trace Tracing can be started when operation of the Controller
Starting tracing at start
starts (i.e., when the operating mode is changed from
of operation
PROGRAM mode to RUN mode).
• Tracing stops when the maximum value of 10,000
samples is reached.
Triggered traces
• Tracing is stopped when the Stop Button is clicked on
the Sysmac Studio.
*1 For an NJ-series CPU Unit and NX701 CPU Unit, if you perform an internal variable with a data size of 64 bits
or more to the sampled data, specify the task that assigns the program in which the target internal variable is
defined. If the different task is specified, the concurrency of variable values may not be ensured.
*2 You cannot perform data traces for the EN, ENO, P_off, P_on, P_CY, P_First_RunMode, P_First_Run and
P_PRGER system-defined variables, in-out variables that are used in function block instances, and variables in
functions.
*3 Data tracing will not start at the data trace starting point even if the trigger condition is met.
*4 Combinations of multiple condition expressions are not permitted. Also, the valid range for comparison con-
stants is determined by the valid range of the literal expressions for the variable type on the left side of the con-
dition expression.
*5 Trace numbers 0 to 3 are set for the NX701 and NJ501. Trace numbers 0 and 1 are set for the NX1P2, NJ301
and NJ101. These numbers are used to execute instructions and to access system-defined variables.
processing 2
processing 1
processing 2
Motion
control
Motion
control
Primary periodic I/O User program I/O User program
common
common
common
common
System
System
System
System
task refreshing execution refreshing execution
Display examples for data trace operations and execution results is given below for sampling in a spec-
ified task period.
8-6 Debugging
Additional Information
I/O refreshing, user program execution, and motion control processing are all executed in the
same task period. For data tracing, user program execution and motion control processing for
the current task period and I/O refreshing for the next task period are displayed at the same time.
The timing charts in the NJ/NX-series Motion Control Instructions Reference Manual (Cat. No. 8
W508) are based on the task periods, so the display are not the same as those for data tracing.
Example 1:
In this example, the SysRun variable is changed to TRUE in the user program when the Sensor1 vari-
able (assigned to the sensor input signal) changes to TRUE.
The data trace operations and display of the execution results are given below.
1. In data trace processing in System Common Processing 1, TRUE is obtained for Sensor1.
2. SysRun is changed to TRUE in the user program.
3. In data trace processing in System Common Processing 1 in the next primary period, TRUE is
obtained for SysRun.
Therefore, in the data trace display, SysRun is shown as TRUE one task period after Sensor1.
Data Trace Display
TRUE
Sensor1
Delayed.
TRUE
SysRun
1 task period
Additional Information
If the values of variables change during user program execution, the changes in the values and
changes for output processing for I/O refreshing are changed in the same task period.
Example 2:
When the Button2 variable (assigned to an input signal from a pushbutton) changes to TRUE during
velocity control, the user program in this example decelerates axis 0 (MC_Axis000) to a stop.
The data trace operations and display of the execution results are given below.
1. In data trace processing in System Common Processing 1, TRUE is obtained for Button2.
2. STP_BSY is changed to TRUE in the user program and the Motion Control Function Module per-
forms deceleration processing.
3. In data trace processing in System Common Processing 1 in the next primary period, TRUE is
obtained for STP_BSY and the status of the motion variable is obtained.
4. STP_ACT is changed to TRUE in the user program.
5. In data trace processing in System Common Processing 1 in the next primary period, TRUE is
obtained for STP_ACT.
The command value in the MC Function Module starts changing (B in the following diagram) when
STP_BSY changes to TRUE in the user program and the Motion Control Function Module starts to per-
form deceleration processing. The command value changes stepwise in synchronization with the pri-
mary periodic task. The data trace, however, interpolates the values to connect the values for the
previous and current periods. Therefore, the display shows that the command value for the Command
Velocity motion control variable (MC_Axis000.Cmd.Vel) changes one period early, i.e., when Button2
changes to TRUE (A in the following figure). The display also shows that STP_BSY changes to TRUE
one period after deceleration starts and then STP_ACT changes to TRUE after another period.
Button2
STP_D
STP_BSY
STP_ACT
Dotted lines: Command value in MC Function Module
MC_Axis000.Cmd.Vel
Task period
A B
Additional Information
8-6 Debugging
For function blocks that contain motion control instructions, the values of input parameters are
passed to the input variables when execution of the function block starts, and the values of the
output variables are passed to the output parameters when execution of the function block ends.
(Refer to Variable Designations for Function Blocks on page 6-11.) On the data trace displays,
input parameters and input variable, and output parameters and output variables, change in the
same task period.
8
Note You cannot use these system-defined variables in the user program. Use the GetTraceStatus instruction to
read the status of data tracing from the user program.
Sysmac Studio
CPU Unit
Version Information
A CPU Unit with unit version 1.03 or later and Sysmac Studio version 1.04 or higher are required
to use differential monitoring.
Application
You can use differential monitoring to check or count the number of times an external input signal turns
ON or OFF or a input in the user program changes to TRUE or FALSE. This is useful during system
commissioning and for troubleshooting operation failures during production.
Item Specification
Differential monitoring Number of variables 8 max.
condition Specified variables • BOOL
• Element of BOOL array
• BOOL member of structure or union
Condition expres- • Change to TRUE
sion • Change to FALSE
Conditional match Timing Once every primary period
evaluation Match count The number of times the specified variable matches the
condition is counted.
Starting and stopping Start condition Command from Sysmac Studio
Stop condition • Command from Sysmac Studio
• Occurrence of a major fault level Controller error
• User program download
• Clear All Memory operation
• Disconnecting online connection to Sysmac Studio
Operating modes • RUN mode
• PROGRAM mode
8-6 Debugging
The variables and the changes that you can monitor with differential monitoring are called differential
monitoring conditions. The specifications for the differential monitoring conditions are described below.
Number of Variables
You can specify a maximum of eight variables. This means differential monitoring can detect the
numbers of times conditions are met for eight variables in parallel.
8
Specified Variables
The data types of the variables that you can specify for differential monitoring are given below.
Condition Expressions
The condition of the change in the variable to detect is called the condition expression. There are
two types of condition expressions that you can select from. You specify a condition expression for
each variable.
• Change to TRUE
• Change to FALSE
Procedure
Use the following procedures to control differential monitoring. Refer to the Sysmac Studio Version 1
Operation Manual (Cat. No. W504) for details.
1 Select Differential Monitor from the View Menu on the Sysmac Studio.
2 Right-click a variable that can be specified for differential monitoring and select Add Differential
Monitor.
3 Set the differential monitoring condition expression for each variable in the Differential Monitor
Window.
8-6 Debugging
8
The GVar1 global variable is read and written by the P1 program that is assigned to the primary peri-
odic task. Therefore, it will be updated in the primary period as long as the program writes to it every
period. The P2.GVar1 external variable, however, is updated only when the CPU Unit executes the
P2 program that is assigned to the periodic task. This means the external variable is updated only in
the task period of the periodic task. Because the task period of the periodic task is longer than the
primary period, the count for P2.GVar1 is updated fewer times than the count for GVar1.
Number of times
condition for GVar1 is 0 1 2 3 4
met (change to TRUE)
Task period
Periodic task
(accessing task)
P2 P2 P2
P2.GVar1 TRUE
FALSE
(external
variable)
The value of the P2.GVar1 external variable is updated only when
P2 is executed.
Number of times
0 1 2
condition for P2.GVar1 is
met (change to TRUE)
8-7-1 Introduction
The event logs contain records of events,* such as errors, status changes, and user-defined events,
that occurred in the NJ/NX-series Controller.
* Here, events are unscheduled events that occur on the Controller, such as errors. “Event” refers to an error or to
information that does not indicate an error but for which the user must be notified by the Controller or for a user
definition. There are two types and four classifications of events.
• Controller events
Controller errors
Controller information
• User-defined events
User-defined errors
User-defined information
Battery
8-7-1 Introduction
backup *1
You can check the current EtherCAT slave EtherCAT
Controller events and the event Terminal slave
log of past events.
Event logs
*1. The event logs are saved in battery-backup memory in the NX701 CPU Unit. The event logs are saved in the non-volatile memory in the NX1P2 CPU Unit.
Or User program
Create User-defined
Error (SetAlarm)
Event logs instruction
Battery backup
You can check the current
Controller events and the event EtherCAT
slave
log of past events.
To use an NS-series PT to check events, connect the PT to the built-in EtherNet/IP port on the CPU
Unit.
Features
Event logs have the following features.
• In addition to error records, various records are recorded for events such as the time the power sup-
ply is turned ON or OFF, and the time when operation is started.
• You can check these records based on the time. You can therefore use them to isolate the causes of
errors when problems occur.
Types of Events
Events are classified as shown below.
User-defined Events
These are events that occur in applications that the user developed. You can execute instructions to
create the following types of events.
• User-defined errors
• User-defined information
You can read the event logs from the Sysmac Studio or from an HMI.
Event Sources
This information identifies where an event occurred in the Controller. The event sources are given 8
below for Controller events and user-defined events.
*1 The source details information does not show information from the error histories from within CJ-series CPU
Special Units or EtherCAT slaves. Read the error histories from the appropriate Support Software.
*2 Only the NX1P2 CPU Units have the NX Bus Function Module.
Category
This information displays the category of event log. It is used to access error logs from the Sysmac Stu-
dio or an HMI.
Event type Event log category Description
Controller events System log The Controller automatically detects
and records these events. CJ-series
Unit errors are also included.
Access log This is a record of events that have
affect Controller operation due to
user actions.
User-defined events User event log This is a log of events that are
defined by the user.
Number of Records
Each event log can contain the following number of records. If the number of events exceeds the num-
ber of records permitted, the CPU Unit overwrites the oldest events.
Number of records permitted
Event type Event log category
NX701 NX1P2 NJ501 NJ301 NJ101
Controller events System log 2,048 576 1,024 512 512
Access log 1,024 528 1,024 512 512
User-defined events User event log 1,024 512 1,024 512 512
Event Codes
Event codes are assigned to Controller events by the system in advance according to the type of event.
Event codes are assigned to user-defined events by the user. Controller event codes are 8-digit hexa-
decimal values. You can use the Get Error Status instruction to read the error codes of current errors.
You can assign a decimal number from 1 to 60,000 as the event code for a user-defined event.
Event Levels
Each event has an event level that indicates its level. The event level depends on the type of event. Lev-
els are defined separately for Controller events and user-defined events.
Controller Events
Controller events are classified into five levels according to the degree of the effect that the events
have on control, as shown in the following table.
No. Level Classification
1 High Controller errors Major fault level
2 Partial fault level
3 Minor fault level
4 Observation level
5 Low Controller information Information level
Errors with a higher level have a greater impact on the functions that the Controller provides, and are
more difficult to recover from.
When an event in one of these levels occurs, the Sysmac Studio or an HMI will display the error.
User-defined Events
User-defined events are classified into the following levels. These levels are defined by the NJ/NX-
series System.
Additional Information
If an event occurs in the Controller that is not supported by the version of the Sysmac Studio or
an HMI, the source is displayed as “Unknown” and the event name is displayed as “Unknown
Event.” The event code and attached information are displayed correctly.
Introduction
Controller errors and information are defined by the NJ/NX-series System.
These events occur when the NJ/NX-series System detects an error or information factor.
Controller Errors
These are system-defined errors.
“Controller error” is a collective term for major fault level, partial fault level, minor fault level, and
observation level Controller events.
Errors in the function modules of the CPU Unit, NX Units, NX-series Slave Terminals, EtherCAT
slaves, and CJ-series Units are detected. When one of these events occurs, a Controller error is
recorded in the event log.
To check the status of a Controller error on the user program, you execute the Get Error Status
instruction to access the status of the Error Status variable, which is a system-defined variable.
Note You can use NX Units on the CPU Unit only with the NX1P2 CPU Units.
Note You can use CJ-series Units only with NJ-series CPU Units.
Controller errors are not reset when the operating mode changes.
Refer to the NJ/NX-series Troubleshooting Manual (Cat. No. W503) for details on Controller errors.
Controller Information
Controller information is system-defined notification information. This information does not indicate
errors. It represents information level Controller events. Examples include events other than errors,
such as turning the power ON and OFF, starting and stopping operation, connecting the Sysmac
Studio online, and downloading user programs.
Function Modules
PLC Function
Module
Event logs
Motion Control
Function Module
An error or information occurs.
EtherCAT Controller events
Master Function
Module
EtherNet/IP
Function Module
System-defined variables
Errors in Special
Units Error status
Detected Controller errors
Errors in EtherCAT
slaves
Introduction
These errors and information are defined by the user. You can use instructions to create them.
User-defined Errors
These errors are defined by the user. Use the Create User-defined Error (SetAlarm) instruction to
create user-defined errors. When this instruction is executed, a user-defined error is recorded in the
event log.
The corresponding system-defined variable changes to TRUE. User-defined errors are not reset
when the operating mode changes.
User-defined Information
User-defined information is user-defined notification information. This information does not indicate
errors. Use the Create User-defined Information (SetInfo) instruction to create user-defined informa-
tion. When this instruction is executed, user-defined information is recorded in the event log.
System-defined Variables
Application Procedures
Use the following procedures.
User-defined Errors
1. Register a user-defined error in the Event Setting Table.
5. Check the user-defined error in the event log with the Sysmac Studio, an
instruction, or an HMI.
8
2. Execute the Create User-defined Information (SetInfo) instruction.
Programming Example
SetAlarm
Normal end
EN ENO
Code OutVal
UINT#102
Var1 Info1
Var2 Info2
You can set up to nine different languages for the same event code for different regions and
users. On the Sysmac Studio, you can import an Event Setting Table from a Microsoft Excel file
via the clipboard.
8
Additional Information
Related Instructions
There are instructions that you can use to create and check user-defined errors and to clear existing
user-defined errors.
Example:
Level
Code
Additional Information
You can use user-defined errors to add a message on possible corrections or other information
when a Controller error occurs. Use instructions such as the GetPLCError instruction to obtain
information about the error status or event code when a Controller error occurs. You can then
use the information to trigger a user-defined error.
Example 1
Example 2
Version Information
A CPU Unit with unit version 1.03 or later and Sysmac Studio version 1.04 or higher are required
to change event levels.
3 Change the levels of the required events in the Event Level column.
9-9-4 EtherCAT Slaves for Which You Can Back Up Data . . . . . . . . . . . . . . . . . . . . 9-53
9-10 Backup Functions When EtherCAT Slave Terminals Are Connected . . . 9-56
9-10-1 Backing Up Data in an EtherCAT Slave Terminal . . . . . . . . . . . . . . . . . . . . . . 9-56
9-10-2 Backup Support Depending on the EtherCAT Slave Terminal Status . . . . . . . 9-57
9-10-3 Conditions for Restoring EtherCAT Slave Terminal Data . . . . . . . . . . . . . . . . 9-57
9-11 Backup Functions When NX Units Are Connected . . . . . . . . . . . . . . . . . . 9-58
9-11-1 Backing Up Data in NX Units on the CPU Unit . . . . . . . . . . . . . . . . . . . . . . . . 9-58
9-11-2 Backup Support Depending on the Controller Status . . . . . . . . . . . . . . . . . . . 9-58
9-11-3 Conditions for Restoring NX Unit Data on the CPU Unit . . . . . . . . . . . . . . . . . 9-59
9-12 Backup Functions When CJ-series Units Are Connected . . . . . . . . . . . . . 9-60
9-12-1 Backed Up CJ-series Unit Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-60
9-12-2 Backup Support Depending on the Controller Status . . . . . . . . . . . . . . . . . . . 9-60
9-12-3 Conditions for Restoring CJ-series Unit Data . . . . . . . . . . . . . . . . . . . . . . . . . 9-60
9-13 Backup-related Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-62
9-13-1 Types of Backup-related Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-62
9-13-2 Specifications of a Backup File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-63
9-13-3 Specifications of a Restore Command File . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-63
9-13-4 Specifications of an Automatic Transfer Command File . . . . . . . . . . . . . . . . . 9-66
9-13-5 Specifications of a Controller Verification Results File . . . . . . . . . . . . . . . . . . 9-69
9-13-6 Specifications of an EtherCAT Verification Results File . . . . . . . . . . . . . . . . . 9-70
9-13-7 Specifications of an EtherCAT Slave Terminal Verification Results File . . . . . 9-71
9-13-8 Specifications of an NX Unit Verification Results File . . . . . . . . . . . . . . . . . . . 9-72
9-13-9 Specifications of CJ-series Unit Verification Results File . . . . . . . . . . . . . . . . 9-73
9-14 Compatibility between Backup-related Files . . . . . . . . . . . . . . . . . . . . . . . 9-75
9-14-1 Compatibility between Backup Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-75
9-14-2 Compatibility between CPU Unit Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-76
9-14-3 Compatibility between Unit Versions of CPU Units . . . . . . . . . . . . . . . . . . . . . 9-77
9-15 Functions That Cannot Be Executed during Backup Functions . . . . . . . 9-78
Function Description
Backing up You can back up all of the data in the Controller to an SD Memory Card or to a computer. The
data file that is saved is called a backup file.
Restoring data You can transfer the contents of a backup file on the SD Memory Card or computer to the
Controller. The data in the Controller is restored to the data at the time the backup file was
made.
Verifying data You can compare the contents of a backup file on the SD Memory Card or computer with the
data in the Controller to see if they are the same.
Item Description
Applications of backup functions Effective usage of the backup functions is described.
Examples of operating procedures for the The backup functions are executed with simple procedures.
backup functions Examples are provided.
Data that is backed up The data that can be saved with the backup functions from the
connected Units and slaves is described.
Types of backup functions There are different types of backup functions that differ in
where the data is saved. The types of backup functions and
the difference between them are described.
Relation between the different types of backup Different types of backup functions handle different data
functions and data groups groups. The relation between the different types of backup
Item Application
Program and setting changes When you change the user program and settings for equipment that is cur-
rently in operation.
Hardware replacements When you replace the hardware for the CPU Unit, other Units, or slaves.
Troubleshooting equipment fail- When you want to save data in the Controller to analyze the cause of an
ures error that occurs in the equipment.
Equipment backup and recovery When an error occurs in the equipment, and when you want to restore the
equipment with data from an normal operating status. When you want to
backup the data in the equipment while it is in operation.
Manufacture of equipment When you want to manufacture the same equipment and need to transfer
the data from the existing equipment to new equipment in its initial state.
Backup Procedure
Preparations
1 Insert the SD Memory Card into the CPU Unit.
2 Set pins 1 to 4 on the DIP switch on the CPU Unit as follows: 1: OFF, 2: OFF, 3: ON, and 4: OFF.
5 Press the SD Memory Card power supply switch to turn OFF the SD PWR indicator.
Restoration Procedure
Preparations
1 Turn OFF the power supply to the NJ/NX-series Controller and to the EtherCAT slaves.
2 Insert the SD Memory Card that contains the backup file into the CPU Unit.
3 Set pins 1 to 4 on the DIP switch on the CPU Unit as follows: 1: OFF, 2: OFF, 3: ON, and 4: ON.
Restoring Data
4 Turn ON the power supply to the NJ/NX-series Controller and to the EtherCAT slaves.
The restoration operation is started. The SD PWR indicator will flash, lighting for 3 seconds and
going out for 0.5 seconds.
When the restoration operation is completed, the SD PWR indicator will stop flashing and
remain lit.
6 Turn OFF the power supply to the NJ/NX-series Controller and to the EtherCAT slaves.
8 Set all of pins 1 to 4 on the DIP switch on the CPU Unit to OFF.
9 Turn ON the power supply to the NJ/NX-series Controller and to the EtherCAT slaves.
2 Set all of pins 1 to 4 on the DIP switch on the CPU Unit to OFF.
*1 For the NX Units on the NX1P2 CPU Unit, data of configuration information, Unit operation settings and Unit
application data is backed up.
*2 Data of Built-in I/O Settings, Option Board Settings, and Memory Settings for CJ-series Units is backed up only
for the NX1P2 CPU Units.
*3 With a combination of the CPU Unit with unit version 1.14 or later and Sysmac Studio version 1.18 or higher, IP
address of the Built-in EtherNet/IP Port Settings can be used as a data group. IP address is included in the
user program and settings other than the above combination.
*4 Of the system-defined variables with a Retain attribute, some variables are not applicable for the data backup
function. Refer to A-6 Specifications for Individual System-defined Variables for details on the specifications for
individual system-defined variables.
*5 You can use memory for CJ-series Units and parameters in the CJ-series Units only with NJ-series CPU Units
and NX1P2 CPU Units. You can use parameters in the CJ-series Units only with NJ-series CPU Units.
*6 A part or all of the set parameters are not backed up for some EtherCAT slave models. For the details on the
target EtherCAT slaves for the data backup function, refer to 9-9-4 EtherCAT Slaves for Which You Can Back
Up Data.
*7 Refer to the CJ-series CJ2 CPU Unit Hardware User’s Manual (Cat. No. W472) for details on the data that is
backed up.
Operating method
Operating method
CPU Unit.
Version Information
• A CPU Unit with unit version 1.03 or later and Sysmac Studio version 1.04 or higher are
required to use the following backup functions: SD Memory Card backups, automatic transfers
from SD Memory Cards, Sysmac Studio Controller backups, and importing and exporting Sys-
mac Studio backup file data.
• A CPU Unit with unit version 1.11 or later and Sysmac Studio version 1.15 or higher are
required to transfer programs from the SD Memory Card.
• A CPU Unit with unit version 1.14 or later and Sysmac Studio version 1.18 or higher are
required to use the restore of SD Memory Card backups by the system-defined variable.
Additional Information
The backup functions are executed as a system service. This means that if you perform a
backup or verification operation in RUN mode with an NJ-series CPU Unit, it may take time for
the operation to be completed. If you perform a backup or verification operation in RUN mode,
make sure that the sufficient execution time is allocated for the system service. You can reduce
the processing time by performing the system service in PROGRAM mode.
*1 You can use memory for CJ-series Units only with NJ-series CPU Units and NX1P2 CPU Units.
*2 With a combination of the CPU Unit with unit version 1.14 or later and Sysmac Studio version 1.18 or higher, IP
address of the Built-in EtherNet/IP Port Settings can be used as a data group. IP address is included in the
user program and settings other than the above combination.
*3 The backup data is processed only for the present values of variables that are specified for retention with the
Retain attribute.
*4 The backup data is processed only for the present values of addresses that are specified for retention with the
Retain attribute in the memory for CJ-series Units.
*5 Of the user program and setting data groups, the Data Trace Settings are not compared.
*6 For all of the data groups except for the user program and setting group, only the items that are specified to be
transferred in the automatic transfer command file are transferred.
*7 For all of the data groups, only the data that is specified as the transfer target by the system-defined variable is
transferred.
*8 If the CJ-series Units are specified for backup, the parameters in the CJ-series Units are backed up. If the Eth-
erCAT slaves are specified for the backup, parameters for the EtherCAT slaves are backed up.
*9 The following data is not processed: Tag data link settings for the built-in EtherNet/IP port, operation authority
verification, and the Data Trace Settings.
Additional Information
The files that are handled for backing up variables and memory from the Sysmac Studio are not
compatible with other backup files. Refer to 9-8 Sysmac Studio Variable and Memory Backup
Functions for details on the Sysmac Studio variable and memory backup functions.
The Units and slaves that are shown in the following figure are covered by the SD Memory Card
backup functions and Sysmac Studio Controller backup functions.
Computer HMI
NJ-series
CPU Unit NX Units or Expansion Rack CPU Unit NX Units or
CJ-series Units CJ-series Units
Slaves
EtherCAT slaves
Note You can use NX Units on the CPU Unit only with the NX1P2 CPU Unit.
Note You can use CJ-series Units and NJ-series Expansion Racks only with the NJ-series CPU Unit.
Version Information
A CPU Unit with unit version 1.05 or later and Sysmac Studio version 1.06 or higher are required
to connect EtherCAT Slave Terminals.
Backing up data
Restoring data Data that is
Verifying data backed up
Backup file
Restore command file
Automatic transfer command file
Verification results files
When you back up data, the backup file, restore command file, and automatic transfer command file
are created in the specified directory on the SD Memory Card. When you verify data, the verification
results files are created in the specified directory. All of these files are collectively referred to as backup-
related files. The functions of the backup-related files are given in the following table.
Function
File Backing Restor- Verifying
Contents
up data ing data data
*4 Make arrangements to prevent backup or verification operations from being performed on HMIs while a
backup, restore, or verification operation is in progress. Otherwise, the intended operation may not occur.
*5 Execution is not possible for the CPU Unit with unit version 1.13 or earlier because the restore by the system-
defined variable is not supported.
Processing Contents
• This backup operation processes all data groups.
• When you back up data, the backup file, restore command file, and automatic transfer command file
are created in the specified directory on the SD Memory Card.
• If the backup-related files are already in the specified directory, they are overwritten.
• If an error occurs while writing the backup-related files to the SD Memory Card, the previous backup-
related files will be deleted. Also, the new backup-related files will not be created.
• If an error occurs before the new backup-related files are created, the previous files are retained and
the new files are not created.
• The power is continued to supply even if the SD Memory Card power supply switch is pressed when
a backup is in progress.
• The SD Memory Card will remain mounted after completion of the backup.
Procedure
Backing Up Data with the CPU Unit Front-panel DIP Switch
Error End:
The SD PWR indicator will flash, lighting for 0.5 seconds and going out for 0.5 seconds.
The indicator stop flashing and stay lit when the SD Memory Card power supply switch is
pressed.*1
*1 For the NX701 CPU Unit, set all of pins 5 to 8 on the DIP switch to OFF.
*2 If an SD Memory Card is not inserted, the SD PWR indicator will not light.
Note You cannot access these system-defined variables from the user program.
Backing Up Data from the SD Memory Card Window on the Sysmac Studio
Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for specific procedures.
change to TRUE.
The value of the _BackupBusy (Backup Function Busy Flag) system-defined variable will
change to TRUE.
Execution results Normal End:
The value of the Done output variable from the BackupToMemoryCard instruction changes
to TRUE.
Error End:
The value of the Error output variable from the BackupToMemoryCard instruction changes
to TRUE.
The error code is stored in the ErrorID output variable from the BackupToMemoryCard
instruction.
Version Information
A CPU Unit with unit version 1.08 or later and Sysmac Studio version 1.09 or higher are required
to use the BackupToMemoryCard instruction.
Variable
Meaning Function Data type R/W
Member name
_Card1BkupCmd* SD Memory Card _sBKUP_CMD RW
Backup Commands
ExecBkup* Execute Backup Flag Change this variable to TRUE to back up BOOL RW
Controller data to an SD Memory Card.
CancelBkup* Cancel Backup Flag Change this variable to TRUE to cancel BOOL RW
backing up data to an SD Memory Card.
DirName* Directory Name Use this variable to specify the directory STRING(64) RW
name in the SD Memory Card for which to
back up data.
_Card1BkupSta* SD Memory Card _sBKUP_STA R
Backup Status
Done* Done Flag TRUE when a backup is completed. BOOL R
* You cannot access these system-defined variables from the user program.
Additional Information
• Refer to the NA-series Programmable Terminal Software User's Manual (Cat. No. V118) for
information on mapping variables when you connect an NA-series PT to the NJ/NX-series
Controller.
• Refer to A-10 Registering a Symbol Table on the CX-Designer for the procedure to register
these system-defined variables in the variable table of the CX-Designer when you connect an
NS-series PT to the NJ/NX-series Controller.
Timing Charts
The operation of the system-defined variables when they are used to backup data is shown below. In
the charts, “pre-execution checks” indicates processing to check whether there is a SD Memory Card in
the CPU Unit and other items before the backup starts. The value of _Card1BkupSta.Active (Active
Flag) changes to TRUE only after all of the pre-execution checks are cleared and the actual backup is
started.
Normal Operation
_Card1BkupCmd.ExecBkup TRUE
FALSE
_Card1BkupCmd.CancelBkup TRUE
FALSE
_Card1BkupSta.Done TRUE
FALSE
_Card1BkupSta.Active TRUE
FALSE
_Card1BkupSta.Err TRUE
FALSE
_BackupBusy TRUE
FALSE
Operation When the Backup Cannot Start Because Another Backup Function
Is in Progress
_Card1BkupSta.Done TRUE
FALSE
TRUE
_Card1BkupSta.Active
FALSE
TRUE
_Card1BkupSta.Err
FALSE
TRUE
_BackupBusy
FALSE
Backup cancel
command
Backup start Pre-execution Backup stopped
command checks cleared. with an error.
_Card1BkupCmd.ExecBkup TRUE
FALSE
TRUE
_Card1BkupCmd.CancelBkup
FALSE
_Card1BkupSta.Done TRUE
FALSE
_Card1BkupSta.Active TRUE
FALSE
TRUE
_Card1BkupSta.Err
FALSE
_BackupBusy TRUE
FALSE
Con-
Connected Con- Number User pro-
Operat- nected Backup
NX Units or nected of user- gram mem- Backup time
CPU Unit ing Ether- file size
CJ-series Option defined ory size (s)
mode CAT (Mbytes)
Units Boards POUs (Mbytes)
slaves
NX701- PRO- *1 --- --- 113 7.13 Approx. 30 29.45
GRAM
NX1P2- mode *2 *3 *4 15 0.35 Approx. 30 2.96
NJ501- *1 *5 --- 53 2.36 Approx. 50 20
NJ301- *6 --- 20 0.53 Approx. 30 9.85
NJ101- *2 --- 15 0.38 Approx. 30 9.94
*1 Thirty-two each of the following: R88D-KNA-ECT AC Servo Drives, GX-ID1611 Digital I/O Terminals, and GX-OD1611
Digital I/O Terminals.
*2 Two each of the following: R88D-KNA-ECT AC Servo Drives, GX-ID1600 Digital I/O Terminals, and GX-OD1611 Digital
I/O Terminals.
*3 One NX-PF0630 Additional I/O Power Supply Unit, three NX-ID5342 Digital Input Units, two NX-OD3153 Digital Output
Units, one NX-AD4608 Analog Input Unit, and one NX-DA3605 Analog Output Unit.
*4 Two NX1W-CIF01 Serial Communications Option Boards.
*5 Four CJ1W-SCU22 Serial Communications Units and one CJ1W-EIP21 EtherNet/IP Unit.
*6 Eight each of the following: R88D-KNA-ECT AC Servo Drives, GX-ID1611 Digital I/O Terminals, and GX-OD1611 Digital
I/O Terminals.
Processing Contents
The following describes the processing contents for restoring data with the CPU Unit front-panel DIP
switch and with system-defined variables.
• For the NX1P2 CPU Unit, memory for CJ-series Units is generated by the settings in the Memory
Settings for CJ-series CPU Units in the backup file.
• If the present values of memory for CJ-series Units are not set to be restored in the NX1P2 CPU Unit,
the previous present values in the DM and Holding Areas will be retained. However, when the DM
and Holding Areas are newly generated or the area is expanded, the values in those areas will be the
initial values.
• The SD Memory Card will remain mounted after completion of the restore operation.
• The write protection for the CPU Unit that is set in the Write Protection at Startup setting is used after
completion of the restore operation.
• With the _Card1RestoreCmd (SD Memory Card Restore Command) system-defined variable, you
can transfer the data saved in the SD Memory Card that is mounted on the CPU Unit to the Control-
ler.
• The backup file to be restored is the file stored in the directory specified with the system-defined vari-
able. The target backup file must be stored in a directory on the SD Memory Card in advance.
• If the password set on the Password of the SD Memory Card Restore Setting differs from the pass-
word set in the _Card1RestoreCmd.Password system-defined variable, the Restore Operation Failed
to Start error occurs.
• When the restore is started, the password set in the _Card1RestoreCmd.Password system-defined
variable is initialized.
• The Controller is automatically reset during the restore operation.
• After the Controller reset, the CPU Unit will be in startup state. After the restore operation is com-
pleted, the operating mode will change to PROGRAM mode. You cannot start operation in this state.
To start operation, cycle the power supply to the Controller or reset the Controller.
• Cycle the power supply to all of the EtherCAT slaves after you restore data.
• If an error occurs in the checks that are performed before starting the restore operation or in the pre-
execution checks, the previous data will be retained in the Controller.
• If the power supply to the Controller is interrupted while the data is being restored, a User Pro-
gram/Controller Configurations and Setup Transfer Error (a major fault level Controller error) will
occur. If that occurs, the data in the Controller is not dependable. Use one of the following methods to
clear the error.
• Perform the restore operation again.
• Clear all of memory and then download the project from the Sysmac Studio.
• All data items that are not specified for the restore will retain their present values.
• If the present values of variables that are set to be retained (with the Retain attribute) are not set to
be transferred, the previous present values of those variables will be retained. However, the values of
any variables that do not meet the retain conditions are initialized. These are the retain conditions for
the variable.
• The variable name, data type name, and data type size must be the same before and after trans-
ferring the data.
• If the present values of memory for CJ-series Units are not set to be restored in the NX1P2 CPU Unit,
the previous present values in the DM and Holding Areas will be retained. However, when the DM
and Holding Areas are newly generated or the area is expanded, the values in those areas will be the
initial values.
• The power is continued to supply even if the SD Memory Card power supply switch is pressed when
a restore operation is in progress.
• The SD Memory Card will remain mounted after completion of the restore operation.
• The write protection for the CPU Unit that is set in the Write Protection at Startup setting is used after
completion of the restore operation.
Procedure
Error End:
The SD PWR indicator will flash, lighting for 0.5 seconds and going out for 0.5 seconds.
The indicator stop flashing and stay lit when the SD Memory Card power supply switch is
pressed.*2
*1 For the NX701 CPU Unit, set all of pins 5 to 8 on the DIP switch to OFF.
*2 If an SD Memory Card is not inserted, the SD PWR indicator will not light.
The restore operation starts when you change the _Card1RestoreCmd.Exec (Execute
Restore Flag) system-defined variable to TRUE.
Executing The _BackupBusy (Backup Function Busy Flag) system-defined variable changes to TRUE.
*1 You cannot execute the restore by the system-defined variable after you transfer a backup file for which
Restore by system-defined variable is set to Do not use in the Controller Setup. If you intend to continue restor-
ing, transfer a backup file for which the above setting is set to Use.
*2 The password is initialized when the restore by the system-defined variable is started. Specify a password
every time you start a restore.
If a password is not set on the Password of the SD Memory Card Restore Setting on the Controller Setup, the
restore is started when the value of the _Card1RestoreCmd.Password system-defined variable is the initial
value. The restore is not started if the value is not the initial value.
*3 The IP address means setting type, IP address, subnet mask, and default gateway.
*4 If an SD Memory Card is not inserted, the SD PWR indicator will not light.
Variable name
Meaning Function Data type R/W
Member name
_Card1RestoreCmd SD Memory Card _sRE- RW
Restore Com- STORE_C
mand MD
Exec Execute Restore Change this variable to TRUE to restore the BOOL RW
Flag data in a backup file on the SD Memory Card
to the Controller.
DirName Directory Name Use this variable to specify the directory name STRING RW
in the SD Memory Card in which the backup (64)
file to be restored by the system-defined vari-
able is stored.
Additional Information
• Refer to the NA-series Programmable Terminal Software User’s Manual (Cat. No. V118) for
information on mapping variables when you connect an NA-series PT to the NJ/NX-series
Controller.
• Refer to A-10 Registering a Symbol Table on the CX-Designer for the procedure to register
these system-defined variables in the variable table of the CX-Designer when you connect an
NS-series PT to the NJ/NX-series Controller.
Timing Charts
The operation of the system-defined variables when they are used for the restart of SD Memory Card
backups is shown below.
In the charts, “checks performed before starting” indicates the processing performed before the restore
operation to check whether the password matches. The value of _Card1PrgRestoreSta.Active (Active
Flag) changes to TRUE only after the checks performed before starting result in OK.
Normal Operation
Restore Checks
start before starting
command a restore was Controller
OK. reset Normal end
TRUE
_Card1RestoreCmd.Exec FALSE
Setting Initial
_Card1RestoreCmd.Password Initial Setting value
value
TRUE
_Card1RestoreSta.Done FALSE
TRUE
_Card1RestoreSta.Active FALSE
TRUE
_Card1RestoreSta.Err FALSE
_BackupBusy TRUE
FALSE
TRUE 9
_Card1RestoreSta.Active FALSE
TRUE
_Card1RestoreSta.Err FALSE
9-2-2 Restore (SD Memory Card to Controller)
_BackupBusy TRUE
FALSE
TRUE
_Card1RestoreSta.Active FALSE
TRUE
_Card1RestoreSta.Err FALSE
_BackupBusy TRUE
FALSE
Processing Time
The time that is required to restore the data depends on factors such as the CPU Unit, Unit configura-
tion, and user program. Guidelines for the restoration time are given in the following table.
*1 Thirty-two each of the following: R88D-KNA-ECT AC Servo Drives, GX-ID1611 Digital I/O Terminals, and GX-OD1611
Digital I/O Terminals.
*2 Two each of the following: R88D-KNA-ECT AC Servo Drives, GX-ID1600 Digital I/O Terminals, and GX-OD1611 Digital
I/O Terminals.
*3 One NX-PF0630 Additional I/O Power Supply Unit, three NX-ID5342 Digital Input Units, two NX-OD3153 Digital Output
Units, one NX-AD4608 Analog Input Unit, and one NX-DA3605 Analog Output Unit.
*4 Two NX1W-CIF01 Serial Communications Option Boards.
*5 Four CJ1W-SCU22 Serial Communications Units and one CJ1W-EIP21 EtherNet/IP Unit.
*6 Eight each of the following: R88D-KNA-ECT AC Servo Drives, GX-ID1611 Digital I/O Terminals, and
GX-OD1611 Digital I/O Terminals.
You can compare the Controller data and the data in a backup file on the SD Memory Card in the CPU
Unit.
Processing Contents
• The Controller data and the data in a backup file that is saved in the specified directory of the SD
Memory Card are compared.
• The data groups that are processed by the verification operation are specified in the RestoreCom-
mand.ini file (restore command file).
• The present values of variables, the present values in memory used for the CJ-series Units, and the
absolute encoder home offsets are not compared because these values may change while the verifi-
cation is in process.
• When you verify the data, the verification results file (VerifyResult.log) is created in the specified
directory. The verification results are stored in this file. If a verification results file already exists in the
specified directory, it will be overwritten. However, if the SD Memory Card is write-protected, the veri-
fication results files will not be created.
• If there is not a restore command file in the specified directory of the SD Memory Card, all of the data
from the backup files in the specified directory that can be compared will be compared.
• If the Unit and slave configuration in the backup file is not the same as the actual configuration of the
Controller, a Verification Error will occur.
• The SD Memory Card will remain mounted after completion of the verification operation.
The value of the _BackupBusy (Backup Function Busy Flag) system-defined variable will
change to TRUE.
Execution results Normal End with No Differences Found:
The SD PWR indicator will light.
Error End:
The SD PWR indicator will flash, lighting for 0.5 seconds and going out for 0.5 seconds.
The indicator stop flashing and stay lit when the SD Memory Card power supply switch is
pressed.*1
*1 For the NX701 CPU Unit, set all of pins 5 to 8 on the DIP switch to OFF.
*2 If an SD Memory Card is not inserted, the SD PWR indicator will not light.
The verification operation starts when you change the _Card1BkupCmd.ExecVefy (Execute
Verify Flag) system-defined variable to TRUE.
Cancel command You can cancel the verification operation.
The verification operation ends in an error if you change the _Card1BkupCmd.CancelVefy
(Cancel Verify Flag) system-defined variable to TRUE.
Executing The _Card1VefySta.Active (Active Flag) system-defined variable changes to TRUE. The
value of the _BackupBusy (Backup Function Busy Flag) system-defined variable will
change to TRUE.
Execution results Normal End with No Differences Found:
The _Card1BkupSta.Done (Done Flag) and the _Card1BkupSta.VefyRslt (Verify Result
Flag) system-defined variables change to TRUE.
Error End:
The _Card1BkupSta.Err (Error Flag) system-defined variable changes to TRUE.
Note You cannot access these system-defined variables from the user program.
Verifying Data from the SD Memory Card Window on the Sysmac Studio
The SD PWR indicator will flash, lighting for 3 seconds and going out for 0.5 seconds.
The SD BUSY indicator will flash irregularly.
Execution results The results of the verification are displayed in the dialog box.
Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for specific procedures.
Variable name
Meaning Function Data type R/W
Member name
_Card1BkupCmd* SD Memory Card _sBKUP_CMD RW
Backup Commands
ExecVefy* Execute Verify Flag Change this variable to TRUE to compare the BOOL RW
Controller data to a backup file in the SD Mem-
ory Card.
CancelVefy* Cancel Verify Flag Change this variable to TRUE to cancel com- BOOL RW
paring the Controller data to a backup file in the
SD Memory Card.
DirName* Directory Name Use this variable to specify the directory name STRING(64) RW
in the SD Memory Card for which to back up
data.
_Card1VefySta* SD Memory Card Ver- _sVEFY_STA R
ify Status
Done* Done Flag TRUE when a verification is completed. BOOL R
* You cannot access these system-defined variables from the user program.
Additional Information 9
• Refer to the NA-series Programmable Terminal Software User's Manual (Cat. No. V118) for
9-2-3 Verify (between Controller and SD Memory Card)
Timing Charts
The operation of the system-defined variables when they are used to verify data is shown below. In
the charts, “pre-execution checks” indicates processing to check whether there is a SD Memory
Card in the CPU Unit and other items. The value of _Card1VefySta.Active (Active Flag) changes to
TRUE only after all of the pre-execution checks are cleared and the actual verification is started.
_Card1VefySta.Err TRUE
FALSE
_BackupBusy TRUE
FALSE
_Card1VefySta.Done TRUE
FALSE
_Card1VefySta.Active TRUE
FALSE
TRUE
_Card1VefySta.Rslt
FALSE
_Card1VefySta.ErrTRUE
FALSE
_BackupBusy TRUE
FALSE
_Card1VefySta.Done TRUE
FALSE
Use the following procedure to set the Prohibit data backup to the SD Memory Card setting.
Select the Use Option for the Prohibit data backup to the SD Memory Card setting in the Basic Set-
tings Display of the Operation Settings Tab Page under Configurations and Setup − Controller
Setup on the Sysmac Studio.
Version Information
A CPU Unit with unit version 1.08 or later and Sysmac Studio version 1.09 or higher are required
to use the BackupToMemoryCard instruction.
The automatic transfer uses a backup file that is created with the backup function and an automatic
File Function
Backup file This file contains the Controller data that is handled by the functions that are
related to data backup.
Automatic transfer command This file specifies the data groups to transfer when transferring data from a SD
file Memory Card. You can edit this file with a text editor on a computer to specify
the data groups to transfer.
The following tables gives the procedure, the applicable directory, and the timing at which the transfer is
executed.
Processing Contents 9
• When the power is turned ON, the data in the backup file in the /autoload directory on the SD Mem-
ory Card is automatically transferred to the Controller.
• The automatic transfer function transfers the data in the data groups that are specified in the Autload-
Command.ini file in the /autoload directory. Refer to 9-13-4 Specifications of an Automatic Transfer
Command File for details on the automatic transfer command file.
• If an AutoloadCommand.ini file is not in the /autoload directory on the SD Memory Card, all of the
data from the backup file in the /autoload directory that can be transferred will be transferred.
• The operating mode that is set in the Startup Mode setting in the Controller Setup is used after com-
pletion of the automatic transfer.
• While the data is being automatically transferred, the CPU Unit will be in startup state.
• If an error occurs in the checks that are performed before starting the automatic transfer, the previous
data will be retained in the Controller.
• If the power supply to the Controller is interrupted while the data is being automatically transferred, a
User Program/Controller Configurations and Setup Transfer Error (a major fault level Controller error)
will occur. If that occurs, the data in the Controller is not dependable. Use one of the following meth-
ods to clear the error.
Procedure
Transferring Data with the CPU Unit Front-panel DIP Switch
Error End:
The RUN indicator goes out, the ERR indicator lights, and a major fault level Controller
error occurs.
The SD PWR indicator will light.*2
*1 For the NX701 CPU Unit, set all of pins 5 to 8 on the DIP switch to OFF.
*2 If an SD Memory Card is not inserted, the SD PWR indicator will not light.
Backup file
File Function
Backup file This file contains the Controller data that is handled by the functions that are related
to data backup.
The execution method for the functions, applicable directory, and applicable operating modes are given
in the following table.
• If a variable on the Controller that was accessed before the transfer is deleted by the program
transfer, the system-defined variables may not be accessed because the deleted variable can-
not be recovered by an HMI. For example with an NS-series PT, if the tag verification result
finds any inconsistency, the list of tag verification result is displayed and the screen cannot be
changed to others. Confirm, in advance, no such error occurs on the HMI you will use.
• If the power is interrupted while this function is in progress, a User Program/Controller Config-
urations and Setup Transfer Error (event code 10200000 hex) or other errors may occur.
• You cannot transfer programs after you transfer a backup file for which Program transfer by
system-defined variable is set to Do not use in the Controller Setup. If you intend to continue
transferring programs, transfer a backup file for which the above setting is set to Use.
• You cannot execute other backup function while a program transfer is in progress.
Processing Contents
• With the _Card1PrgTransferCmd (SD Memory Card Program Transfer Command) system-defined
variable, you can transfer a program saved in the SD Memory Card that is mounted on the CPU Unit
to the Controller.
• The backup file of the programs to be transferred is the file stored in the directory specified with the
system-defined variable. The target backup file must be stored in a directory on the SD Memory Card
in advance.
• The data of the programs to be transferred is the group of data specified with the system-defined
variable. Refer to Related System-defined Variables on page 9-38 for details on the related system-
defined variables.
• If the password set on the Password of the SD Memory Card Program Transfer Setting differs from
the password set in the _Card1PrgTransferCmd.Password system-defined variable, the SD Memory
Card Program Transfer Failed to Start error occurs.
• When the program transfer is started, the password set in _Card1PrgTransferCmd.Password sys-
tem-defined variable is initialized.
• The Controller is automatically reset during the program transfer. The outputs during the Controller
reset behave according to the slave and Unit specifications.
• After the Controller reset, the CPU Unit will be in startup state. Then when the program transfer is
completed, the CPU Unit will be in normal operation state and operate in the operating mode set in
the Startup Mode setting in the Controller Setup, which was transferred by the program transfer func-
tion. However, the CPU Unit will operate in PROGRAM mode when the CPU Unit front-panel DIP
switch is set to the Safe Mode.
• If an error occurs in the checks that are performed before starting the user program transfer or in the
pre-execution checks, the previous data will be retained in the Controller.
• If the power supply to the Controller is interrupted while the program transfer is in progress, a User
Program/Controller Configurations and Setup Transfer Error (a major fault level Controller error) will
occur. If that occurs, the data in the Controller is not dependable. Use one of the following methods to
clear the error.
• Transfer the programs from the SD Memory Card again.
• Use the automatic transfer from SD Memory Card, or restore with SD Memory Card backup func-
tions.
• Clear all of memory and then download the project from the Sysmac Studio.
• All data items that are not specified for the program transfer will retain their present values.
• If the present values of variables that are set to be retained (with the Retain attribute) are not set to
be transferred, the previous present values of those variables will be retained. However, the values of
any variables that do not meet the retain conditions are initialized. These are the retain conditions for
the variable.
• The variable name, data type name, and data type size must be the same before and after trans-
ferring the data.
• For the NX1P2 CPU Unit, memory for CJ-series Units is generated by the settings in the Memory
Settings for CJ-series CPU Units in the backup file.
• If the present values of memory for CJ-series Units are not set to be restored in the NX1P2 CPU Unit,
the previous present values in the DM and Holding Areas will be retained. However, when the DM
and Holding Areas are newly generated or the area is expanded, the values in those areas will be the
initial values.
• The power is continued to supply even if the SD Memory Card power supply switch is pressed while
the program transfer is in progress.
• The SD Memory Card will remain mounted after completion of the program transfer operation.
• The write protection for the CPU Unit that is set in the Write Protection at Startup setting is used after
completion of the program transfer operation.
Operating Method
_Card1PrgTransferCmd (SD Memory Card Program Transfer Command)
System-defined Variable
*1 You cannot transfer programs after you transfer a backup file for which Program transfer by system-defined
variable is set to Do not use in the Controller Setup. If you intend to continue transferring programs, transfer a
backup file for which the above setting is set to Use.
*2 The password is initialized when transferring programs from the SD Memory Card is started. Specify a pass-
word every time you start a transfer.
If a password is not set on the Password of the SD Memory Card Program Transfer Setting on the Controller
Setup, the program transfer is started when the value of the _Card1PrgTransferCmd.Password system-
defined variable is the initial value. The transfer is not started if the value is not the initial value.
*3 The IP address means setting type, IP address, subnet mask, and default gateway.
*4 If an SD Memory Card is not inserted, the SD PWR indicator will not light.
Variable name
Meaning Function Data type R/W
Member name
_Card1PrgTransfer- SD Memory Card _sPRG- RW
Cmd Program Trans- TRANS-
fer Command FER_CMD
Exec Execute Program Change this variable to TRUE to transfer the BOOL RW
Transfer Flag data in a backup file on the SD Memory Card
to the Controller by using the function to trans-
fer programs from the SD Memory Card.
DirName Directory Name Use this variable to specify the directory name STRING RW
in the SD Memory Card for which to back up (64)
data.
Password Password Use this variable to specify the password that STRING(3 RW
is used for verification when you start transfer- 3)
ring the programs.
The password is initialized every time you
start transferring programs from the SD Mem-
ory Card.
Variable name
Meaning Function Data type R/W
Member name
TargetUserPro- User Program and Change this variable to TRUE to set a user BOOL RW
gram Settings Transfer program or setting as the transfer target.
Flag*1
Always set this variable to TRUE for transfer-
ring programs from SD Memory Card.
TargetIPAdr IP Address Change this variable to TRUE to include the BOOL RW
Transfer Flag IP address of the built-in EtherNet/IP port as
the transfer target.
The IP address means setting type, IP
address, subnet mask, and default gateway.
TargetVariable Present Values Change this variable to TRUE to set the pres- BOOL RW
of Variables with ent values of variables with the Retain attri-
the Retain Attri- bute as the transfer target.
bute Transfer
Flag
TargetMemory Present Values Change this variable to TRUE to set the pres- BOOL RW
of Memory Used ent values of the memory used for CJ-series
for CJ-series Units with the Retain attribute as the transfer
Units with the target.
Retain Attribute
Transfer Flag
_Card1PrgTransfer- SD Memory Card _sPRG- R
Sta Program Trans- TRANS-
*1 The data in the user program and setting data groups is the target of settings. However, the IP address for
the built-in EtherNet/IP port is set with the IP Address Transfer Flag.
9
Additional Information
• Refer to the NA-series Programmable Terminal Software User’s Manual (Cat. No. V118) for
information on mapping variables when you connect an NA-series PT to the NJ/NX-series
Controller.
• Refer to A-10 Registering a Symbol Table on the CX-Designer for the procedure to register
these system-defined variables in the variable table of the CX-Designer when you connect an
NS-series PT to the NJ/NX-series Controller.
Timing Charts
The operation of the system-defined variables when they are used to transfer programs from the SD
Memory Card is shown below.
In the charts, “checks performed before starting” indicates the processing performed before the pro-
gram transfer to check whether the password matches. The value of _Card1PrgTransferSta.Active
(Active Flag) changes to TRUE only after the checks performed before starting result in OK.
Normal Operation
Program Checks
transfer before starting
start a transfer was Controller
command OK. reset Normal end
TRUE
_Card1PrgTransferCmd.Exec FALSE
Setting Initial
_Card1PrgTransferCmd.Password Initial Setting value
value
TRUE
_Card1PrgTransferSta.Done FALSE
TRUE
_Card1PrgTransferSta.Active FALSE
TRUE
_Card1PrgTransferSta.Err FALSE
_BackupBusy TRUE
FALSE
TRUE
_Card1PrgTransferSta.Active FALSE
TRUE
_Card1PrgTransferSta.Err FALSE
_BackupBusy TRUE
FALSE
Operation When the Program Transfer Fails After a Normal Start of Program
Transfer
Program Checks before
transfer starting a
start transfer was Controller Error occurred before
command OK. reset or during execution.
TRUE
_Card1PrgTransferCmd.Exec FALSE
Setting Initial
_Card1PrgTransferCmd.Password Initial Setting value
value
TRUE
_Card1PrgTransferSta.Done FALSE
TRUE
_Card1PrgTransferSta.Active FALSE
TRUE
_Card1PrgTransferSta.Err FALSE
_BackupBusy TRUE
FALSE
Backing up data
Restoring data Data that is
Verifying data backed up
Backup file
Restore command file
Automatic transfer command file
Verification results files
When you back up data, the backup file, restore command file, and automatic transfer command file
are created in the specified directory in the computer. The functions of the backup-related files are
given in the following table.
Function
File Backing Restor- Verifying
Contents
up data ing data data
Backup file This file contains the Controller data that is handled Created. Accessed. Accessed.
by the functions that are related to data backup.
Restore command This file specifies the data groups to transfer when Created. Accessed. Accessed.
file restoring data. You can edit this file with a text editor
on a computer to specify the data groups to transfer.
Automatic transfer This file specifies the data groups to transfer when Created. Nothing is Nothing is
command file automatically transferring data from a SD Memory done. done.
Card. You can edit this file with a text editor on a
computer to specify the data groups to transfer.
Verification results These files contain the verification results after data Nothing is Nothing is Created.
files is verified. done. done.
Additional Information
You can change the operating mode of the CPU Unit while a backup or verification operation is in
progress. However, an error will occur if the backup or verification cannot be processed normally
due to faulty memory in the CPU Unit, or some other failure.
Processing Contents
• For the Units and slaves settings in the backup data, you must select all EtherCAT slaves that are
connected and all of the CJ-series Units that are connected.
• The backing up conditions for data groups are given in the following table.
Procedure
9-6-1 Backup (Controller to Computer)
1 Select Backup − Backup Controller from the Tools Menu on the Sysmac Studio.
2 Specify the folder in which to save the backup file, restore command file, and automatic transfer
command file.
The data in a backup file in the specified directory on the computer is transferred to the Controller. This
operation can only be performed in PROGRAM mode.
Processing Contents
• The data in a backup file in the specified directory on the computer is transferred to the Controller.
• You can select the data groups to restore from the Sysmac Studio. The conditions for restoring the
data are given in the following table.
*1 A CPU Unit with unit version 1.14 or later and Sysmac Studio version 1.18 or higher are required.
*2 You can select the present values of variables that are specified for retention with the Retain attribute only for
NJ-series CPU Units and NX1P2 CPU Units.
*3 You can select NX Units on the CPU Unit only for the NX1P2 CPU Units.
• If an error occurs in the checks that are performed before starting to restore the data, the previous
data will be retained in the Controller.
• If the power supply to the Controller is interrupted while the data is being restored, a User Pro-
gram/Controller Configurations and Setup Transfer Error (a major fault level Controller error) will
occur. If that occurs, the data in the Controller is not dependable. Use one of the following methods to
clear the error.
• Perform the restore operation again.
• Clear all of memory and then download the project from the Sysmac Studio.
• If the present values of variables that are set to be retained (with the Retain attribute) are not set to
be restored, the previous present values of those variables will be retained. However, the values of
any variables that do not meet the retain conditions are initialized. These are the retain conditions for
the variable:
• The variable name, data type name, and data type size must be the same before and after restor-
ing the data.
• The restore operation is possible even if the Option Board configuration in the backup file do not
match the actual configuration where data is restored. However, the Option Board does not operate.
Refer to the NX-series NX1P2 CPU Unit Built-in I/O and Option Board User's Manual (Cat. No.
W579) for details.
• For the NX1P2 CPU Unit, memory for CJ-series Units is generated by the settings in the Memory
Settings for CJ-series CPU Units in the backup file.
• If the present values of memory for CJ-series Units are not set to be restored in the NX1P2 CPU Unit,
the previous present values in the DM and Holding Areas will be retained. However, when the DM
and Holding Areas are newly generated or the area is expanded, the values in those areas will be the
initial values.
• Cycle the power supply to all of the EtherCAT slaves after you restore data.
Procedure
1 Select Backup - Restore Controller from the Tools Menu on the Sysmac Studio.
2 Specify the folder that contains the backup file and restore command file.
The Controller data and the data in a backup file in the specified directory on the computer are com-
pared.
Processing Contents
• The Controller data and the data in a backup file in the specified directory on the computer are com-
pared. You can select the data groups to verify from the Sysmac Studio. The conditions for verifying
the data are given in the following table. If you specify all data, all of the following data will be com-
pared.
*1 A CPU Unit with unit version 1.14 or later and Sysmac Studio version 1.18 or higher are required.
*2 You can select NX Units on the CPU Unit only for the NX1P2 CPU Units.
*3 You can select CJ-series Units only for NJ-series CPU Units.
• The results of the verification are displayed in the dialog box on the Sysmac Studio.
• The value of the _BackupBusy (Backup Function Busy Flag) system-defined variable will be TRUE
during the backup operation.
Procedure
1 Select Backup - Compare with Backup File from the Tools Menu on the Sysmac Studio.
You can create or read from a backup file in the specified directory on the computer from the Sysmac
Studio project without using the Controller. This following data is processed:
Data group
User program and Present
settings values of Absolute
Function Present Units and
IP address memory encoder
values of slaves
of built-in used for home off-
variables settings
EtherNet/IP CJ-series sets
port*2 Units*1
Importing and Exporting OK*3 OK OK OK × ×
*1 You can use memory for CJ-series Units only with NJ-series CPU Units and NX1P2 CPU Units.
*2 With a combination of the CPU Unit with unit version 1.14 or later and Sysmac Studio version 1.18 or higher, IP
address of the Built-in EtherNet/IP Port Settings can be used as a data group. IP address is included in the
user program and settings other than the above combination.
*3 The following data is not processed:
• The built-in EtherNet/IP port name in the Controller name
• The built-in EtherNet/IP tag data link settings in the Controller Setup
• Words allocated to CPU Bus Units in the Unit Configuration and Unit Settings
• Operation authority verification
• Data Trace Settings
*4 The following data is not processed. The data that is not processed depends on the version of the Sysmac Stu-
dio.
Using Sysmac Studio Version 1.16 or Higher
• The built-in EtherNet/IP port name in the Controller name
9
• Words allocated to CPU Bus Units in the Unit Configuration and Unit Settings
• Operation authority verification
• Data Trace Settings
Using Sysmac Studio Version 1.15 or Lower
• The built-in EtherNet/IP port name in the Controller name
• The built-in EtherNet/IP tag data link settings in the Controller Setup
• Words allocated to CPU Bus Units in the Unit Configuration and Unit Settings
• Operation authority verification
• Data Trace Settings
Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for more information on these
functions.
Sysmac Studio
CPU Unit
Restoring
Present values of
battery-backup memory
Backup
9-8-1 Applicable Data for Sysmac Studio Variable and Memory Backup
Functions
Applicable Data for Sysmac Studio Variable and Memory Backup Functions
• Present values of variables with a Retain attribute
• Present values in the DM, EM, and Holding Areas of memory used for CJ-series Units
• Absolute encoder home offsets
Note You can use memory for CJ-series Units only with NJ-series CPU Units and NX1P2 CPU Units.
Version Information
With a CPU Unit with unit version 1.04 or later and Sysmac Studio version 1.05 or higher, you
can select specific variables to back up or restore the present values of variables with a Retain
attribute.
Additional Information
Database Connection CPU Units, SECS/GEM CPU Units, and NJ Robotics CPU Units are not
compatible.
Refer to the relevant manuals for specific Units for details on the compatibility of these CPU
Units.
Version Information
The following precautions are required for the data that is being backed up and restored.
Present Values in the DM, EM, and Holding Areas of Memory Used
9
for CJ-series Units
For memory used for CJ-series Units, if the area data saved in the backup file and area data in the
9-8-3 Compatibility between CPU Unit Models
actual CPU Unit to restore to are different, only the duplicated area data is restored.
The following precautions are necessary for the present values in the DM, EM, and Holding Areas of
memory used for CJ-series Units for NJ-series CPU Units if the models of the backup and restore CPU
Units are different.
The following provides examples when the area data saved in the backup file and area data in the
actual CPU Unit to restore to are different.
If Area Data in the Backup File Is Larger Than Area Data in the Restore CPU
Unit
Size of DM Area data when backed up = 8 Size of DM Area data in the restore CPU Unit
words = 4 words
Address Value Address Value
DM0 0x0001 DM0 0x0001
DM1 0x0002 DM1 0x0002
DM2 0x0003 DM2 0x0003
DM3 0x0004 DM3 0x0004
DM4 0x0005 --- -
DM5 0x0006 - -
DM6 0x0007 - -
DM7 0x0008 - -
If Area Data in the Backup File Is Less Than Area Data in the Restore CPU
Unit
Size of DM Area data when backed up = 8 Size of DM Area data in the restore CPU Unit
words = 4 words
Address Value Address Value
DM0 0x0001 DM0 0x0001
DM1 0x0002 DM1 0x0002
DM2 0x0003 DM2 0x0003
DM3 0x0004 DM3 0x0004
--- --- DM4 No change
--- --- DM5 No change
--- --- DM6 No change
--- --- DM7 No change
Additional Information
To use the backup functions for EtherCAT Slave Terminals, refer to 9-10 Backup Functions
When EtherCAT Slave Terminals Are Connected.
Execution
Controller status
Backing up data Restoring data Verifying data
Slave disconnected Disconnected slaves Not possible.*1 Possible, but data Possible, but data
for “Disconnect” des- in actual configuration for disconnected for disconnected
ignation in network slaves is not slaves is not
configuration restored. restored.
No disconnected Not possible.*1 Not possible.*2 Possible.*3
slaves in actual con-
figuration
Slave Initialization Error Not possible.*1 Not possible.*2 Possible.*3
*1 EtherCAT Slave Backup Failed events are recorded in the event log.
*2 EtherCAT Slave Restore Operation Failed events are recorded in the event log.
*3 The verification results will show differences.
*4 This refers to the following errors: Duplicate Slave Node Address, Network Configuration Information Error,
Network Configuration Error, Slave Initialization Error, Network Configuration Verification Error for Operation
Setting of “Stop”, and Link OFF Error.
*5 This refers to the following errors: Network configuration mismatch with configuration when the backup was
performed (incorrect connection ports for slaves on branched networks are treated as a mismatch) and net-
work configuration information mismatch with actual network configuration (incorrect connection ports for
slaves on branched network are treated as a match).
*6 For a CPU Unit with unit version 1.04 or later and Sysmac Studio version 1.05 or higher, data for disabled
slaves is also covered by the backup functions. Data for disabled slaves is not backed up for other versions.
1 Import the Inverter parameters from the backup file with the backup file import function of the
Sysmac Studio.
Display the Inverter parameters on the Inverter Parameters Tab Page for the Controller Configu-
rations and Setup of the Sysmac Studio.
2 Confirm that the model number of the Inverter in the parameters that you imported agrees with
the model number of the Inverter that is actually connected.
3 Download the parameters to the Inverter using the “To Drive” menu on the Inverter Parameters
Tab Page for the Controller Configurations and Setup of the Sysmac Studio.
Additional Information
When the unit version of the CPU Unit is 1.10 or earlier, even if the restore operation for the
Inverter fails, all other data are restored including settings of Units and slaves, user program set-
tings, and present values of variables.
Version Information
A CPU Unit with unit version 1.05 or later and Sysmac Studio version 1.06 or higher are required
to use EtherCAT Slave Terminals.
Execution
EtherCAT Slave Terminal status Backing up
Restoring data Verifying data
data
Automatic creation of the Unit configuration information Possible.*1 Possible.*2 Possible.
Waiting for NX Unit participation Not possible.*3 Not possible.*4 Possible.*5
Watchdog time error in EtherCAT Coupler Unit or NX Not possible.*3 Not possible.*4 Possible.*5
Unit
• The hardware switch settings of the EtherCAT Coupler Unit from which the data was backed and the
hardware switch settings of the EtherCAT Coupler Unit to which the data is restored must be the
same.
• The unit version setting of the EtherCAT Coupler Unit from which the data was backed up and the
unit version of the actual EtherCAT Coupler Unit to which the data is restored must be the same.
• The unit version settings of the NX Unit from which the data was backed up and the unit versions of
the actual NX Units to which the data is restored must be the same.
Execution
Controller status Backing up
Restoring data Verifying data
data
Automatic creation of the Unit configuration information Possible.*1 Possible.*2 Possible.
Watchdog time error in NX Unit Not possible.*3 Not possible.*4 Possible.*5
During NX Bus Controller Error Not possible.*3 Not possible.*4 Possible.*5
During Unit Configuration Verification Error Not possible.*3 Possible. Possible.*5
The Unit configuration information does not agree with --- Not possible.*4 Possible.*5
the Unit configuration information in the backup data.
*1 The backup contains information saying that the Unit configuration information does not exist.
*2 After the data is restored, automatic Unit configuration status continues.
*3 An NX Unit Backup Failed event is recorded in the event log.
*4 An NX Unit Restore Operation Failed event is recorded in the event log.
*5 The verification results will show differences.
The following table shows when backup, restore, and verify operations can be performed for CJ-series
Units based on the Controller status.
Execution
Controller status
Backing up data Restoring data Verifying data
I/O Bus Check Error Not possible.*1 Not possible.*2 Possible.*3
End Cover Missing
Incorrect Unit/Expansion Rack Connection
Duplicate Unit Number Error
Too Many I/O Points
I/O Setting Check Error
Restarting the CJ-series Unit Not possible.*1 Possible. Possible.*3
*1 CJ-series Unit Backup Failed events are recorded in the event log.
*2 CJ-series Unit Restore Operation Failed events are recorded in the event log.
*3 The verification results will show differences.
Backup File
This file contains the Controller data that is handled by the backup-related functions. Backup files
are created when data is backed up.
Verification results
Description
files
Controller verification This file contains the verification results for all backup data specified by the restore
results file command file.
EtherCAT slave verifi- This file contains the verification results for each EtherCAT slave. It is created when
cation results file the Unit and slave settings are set to be restored in the restore command file and the
EtherCAT slave settings are contained in the backup file.
EtherCAT Slave Ter- This file contains the verification results for each EtherCAT Coupler Unit and NX Unit.
minal verification This file is created when all of the following conditions are met.
results file • The Unit and slave settings are specified for restoration in the restore command
file.
• The EtherCAT slave settings are included in the backup file.
• One or more EtherCAT Slave Terminals is connected.
If an EtherCAT Slave Terminal verification results file is created, an EtherCAT slave
verification results file is always created at the same time.
NX Unit verification This file contains the verification results for each NX Unit on the CPU Unit. It is cre-
results file*1 ated when the Unit and slave settings are set to be restored in the restore command
file and the NX Unit settings on the CPU Unit are contained in the backup file.
CJ-series Unit verifi- This file contains the verification results for each CJ-series Unit. It is created when the
cation results file*2 Unit and slave settings are set to be restored in the restore command file and the CJ-
series Unit settings are contained in the backup file.
*1 You can use NX Units on the CPU Unit only with the NX1P2 CPU Unit.
*2 You can use CJ-series Units only with NJ-series CPU Units.
File Name
A different backup file name is given depending on the CPU Unit series.
File Name
; --- IP Address of Built-in EtherNet/IP Port Settings. --- IP address of built-in EtherNet/IP port
Note 1 The default file contents when the restore command file is created are given above. All of the data groups
that are listed in the file are set to be restored. 9
2 The restore command file lists the restorable data groups that were in the backup file when the backup file
was created. 9-13-3 Specifications of a Restore Command File
3 Only single-byte alphanumeric characters are used. The text is not case sensitive.
4 An entry of IP Address of Built-in EtherNet/IP Port Settings is not created if the backup is performed in the
CPU Unit with unit version 1.13 or earlier. In the CPU Unit with unit version 1.14 or later, if an entry of IP
Address of Built-in EtherNet/IP Port Settings for which the restore command file is not created is used, the
operation is performed as “IPAdr=yes”. Refer to Compatibility between Restore Command Files on page
9-66 for compatibility between the restore command file with unit version 1.13 or earlier and the restore
command file with unit version 1.14 or later.
Unit version of CPU Unit that Unit version of CPU Unit where data is being restored
creates the restore command
file and backup file Version 1.13 or earlier Version 1.14 or later
File Name
File File name
Automatic transfer command file AutoloadCommand.ini
; --- IP Address of Built-in EtherNet/IP Port Settings. --- IP address of built-in EtherNet/IP port
; "yes":will be transferred, "no":will not be transferred yes/no: Transfer/Do not transfer.
IPAdr=yes
Present values of variables (only variables that are set to be
; --- Present values of variables (Retained variables only). --- retained with the Retain attribute)
Variable=yes
; --- Present values of memory used for CJ-series Units (Hold- Present values of memory used for CJ-series Units (only
ing, EM, and DM Area data). --- addresses that are set to be retained with the Retain attribute)
; "yes":will be transferred, "no":will not be transferred yes/no: Transfer/Do not transfer.
Memory=yes
Note 1 The default file contents when the automatic transfer command file is created are given above. All of the
data groups that are listed in the file are set to be automatically transferred.
the “yes” and “no” specifications for the selectable data groups. If you change anything else in
the file, the Controller may perform unexpected operation when you automatically transfer the
data.
Unit version of CPU Unit that Unit version of CPU Unit where data is being automatically trans-
creates the automatic transfer ferred
file and backup file Version 1.13 or earlier Version 1.14 or later
Version 1.13 or earlier Automatic transfer is possible. Automatic transfer is possible.
IP Address of Built-in EtherNet/IP IP Address of Built-in EtherNet/IP
Port Settings is automatically Port Settings is automatically trans-
transferred. ferred.
Version 1.14 or later Automatic transfer is not possible. Automatic transfer is possible.
In the CPU Unit with unit version IP Address of Built-in EtherNet/IP
1.13 or earlier, because the entry Port Settings corresponds to “yes/no”
of IP Address of Built-in Ether- of “IPAdr”.
Net/IP Port Settings cannot be
interpreted, an Error in Starting
Automatic Transfer in a major
fault level occurs. The error
details will be “0104 hex: The con-
tents of the automatic transfer
command file are not correct”.
File name
File File name
Controller Verification Results File VerifyResult.log
Note However, if the SD Memory Card is write-protected, the verification results files will not be created.
Note 1 The verification results are given only for the data groups that were compared.
2 The verification results of IP Address of Built-in EtherNet/IP Port Settings are including in an entry of user
program and settings even for the CPU Unit with unit version 1.14 or later.
File Name
File File name
EtherCAT Verification Results File VerifyResult_ECAT.log
Note However, if the SD Memory Card is write-protected, the verification results files will not be created.
[E002:NX]
Result=Matched
* If EtherCAT Slave Terminals are set for verification, the EtherCAT Slave Terminal verification results file is cre-
ated. The detailed verification results for the EtherCAT Slave Terminals are given in the EtherCAT Slave Terminal
verification results file.
Note The verification results are given only for the EtherCAT slaves that were compared.
File Name
File File name
EtherCAT Slave Terminal verification results file VerifyResult_ECAT_NX.log
[E005:UnitNo.0 NX-ECC201]
Result=Not matched
Factor=Verification error
File Name
File File name
NX Unit verification results file VerifyResult_NXUnit.log
File name
9
File
9-13-9 Specifications of CJ-series Unit Verification Results
Result=Matched
Rack No.:
[Rack0 Slot9: CJ1W-DRM21 UnitNo.0] Text string of decimal numbers. The value will
be between 0 and 3.
Result=Not matched
Slot No.:
Text string of decimal numbers. The value will
[Rack1 Slot0: CJ1W-EIP21 UnitNo.10] be between 0 and 9.
Result=Matched
Unit Model
Text string that identifies the Unit model.
[Rack1 Slot1: CJ1W-PRM21-DPV1 UnitNo.1] The Unit model is obtained from the cyclic ini-
Result=Not matched tialization data. Consecutive spaces at the end
of the model number are deleted.
Unit No.:
Text string of decimal numbers.
Leading zeros are suppressed. Range for a
CPU Bus Unit: 0 to 15. Special I/O Units: 0 to
95.
Note The verification results are given only for the EtherCAT slaves that were compared.
In this context, the term “restore” is used collectively for these backup functions: restore, automatic
transfer, program transfer, and read (back up).
Additional Information
The files that are handled for backing up variables and memory from the Sysmac Studio are not
compatible with other backup files. Refer to 9-8 Sysmac Studio Variable and Memory Backup
Functions for details on these functions.
*1 The Sysmac Studio variable and memory backup functions are compatible. However, a CPU Unit with unit ver-
sion 1.04 or later and Sysmac Studio version 1.05 or higher are required. Refer to 9-8-3 Compatibility between
CPU Unit Models for the compatibility between CPU Unit models for the Sysmac Studio variable and memory
backup functions.
Additional Information
Database Connection CPU Units, SECS/GEM CPU Units, and NJ Robotics CPU Units are not
compatible.
Refer to the relevant manuals for specific Units for details on the compatibility of these CPU
Units.
Even if the CPU Unit models are compatible, there may be restrictions between various CPU Unit models.
The following table shows which restoration function can be used based on whether the CPU Unit mod-
els are compatible.
(R: Restored, x: Not restored)
Function used to restore data
Restoring with Restoring with
Restoring with
Compatibility Sysmac Studio Sysmac Studio Importing Sys-
SD Memory Automatic
between CPU Controller variable and mac Studio
Card backup transfer and
Unit Models backup func- memory backup backup file data
functions (SD program trans-
tions (com- functions (com- (computer to
Memory Card to fer
puter to puter to Con- project)
Controller)
Controller)*1 troller)
Compatible R*2 R*2 R R R
Not compatible ×*3 ×*4 × × ×
*1 Only the files that were backed up using this function can be restored.
*2 If the contents of the backup file are outside the range of specifications where the data is restored, the Control-
ler will not operate normally. When you operate the Controller, a major fault level Controller error or a partial
fault level Controller error will occur. For example, this error occurs if the number of controlled axes that is used
is outside the specifications.
*1 The Error in Starting Automatic Transfer (a major fault level Controller error) occurs during an automatic trans-
fer. The SD Memory Card Program Transfer Failed to Start error (an observation level Controller error) occurs
during a program transfer.
Communications Setup
This section describes how to go online with the CPU Unit and how to connect to other
devices.
Step 4. Wiring
Overview
You can use the NX701 System to build the communications system shown below.
Sysmac Studio
NTP server
BOOTP server
10
DNS server
EtherNet/IP
10-1-1 Introduction
HMI CJ2 series
Sysmac Studio
USB
General-purpose slaves
NX1P2 System
You can use the NX1P2 System to build the communications system shown below.
NTP server
BOOTP server
DNS server
EtherNet/IP
CJ2 series
NX1P2
CPU Unit
EtherCAT
General-purpose slaves
Overview
HMI NJ-series Controller NJ-series Controller
Sysmac Studio
NTP server
BOOTP server
DNS server
EtherNet/IP EtherNet/IP
CJ2 Series
10
Example: Serial Communications Unit
Sysmac Studio
Example: EtherNet/IP Unit
10-1-1 Introduction
NJ-series Controller EtherNet/IP
USB
CompoNet
Built-in EtherNet/IP port
MS NS WORD NODE ADR 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 MS NS WORD NODE ADR 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
OUT OUT
Serial General-purpose
device with serial
Example: DeviceNet Unit communications
DeviceNet
EtherCAT
General-purpose slaves
Sysmac Studio
USB
A direct connection is made from the computer that runs Sysmac Studio. You do not need to specify
the connection device.
Note Connect a computer and the CPU Unit with a USB 2.0 certified cable. Do not use a USB hub to connect
them.
Note You cannot connect a computer and an NX1P2 CPU Unit because it does not provide a peripheral USB port.
EtherNet/IP
EtherNet/IP
• A direct connection is made from the com- • Specify the IP address of the remote node from the Sysmac
puter that runs Sysmac Studio. You do not Studio.
need to specify the IP address or connec- • You can use either a cross cable or a straight cable.
tion device.
• You can make the connection either with or
without a Ethernet switch.
• You can use either a cross cable or a
straight cable.
• For NX701 CPU Units, 1:1 connection is
supported only for port 1.
Studio
Sysmac Studio
USB 10
EtherNet/IP
Note Connect a computer and the CPU Unit with a USB 2.0 certified cable. Do not use a USB hub to connect them.
Note An NX1P2 CPU Unit does not provide a peripheral USB port.
Sysmac Studio
EtherNet/IP
CJ1W-EIP21
EtherNet/IP Unit
Note You cannot use a CJ1W-EIP21 EtherNet/IP Unit for NX-series CPU Units.
EtherNet/IP
Sysmac Studio
USB
DeviceNet network
DeviceNet Unit
Note You cannot connect a DeviceNet Unit with NX-series CPU Units.
Controllers or Slaves
Slaves
This section shows the connection configurations that are used between Controllers and between Con-
trollers and slaves.
10
10-3-1 Connection Configurations between Controllers
Note You cannot use a CJ1W-EIP21 EtherNet/IP Unit for NX-series CPU Units.
EtherNet/IP
Message Communications
You can send CIP messages from the user program.
EtherNet/IP
CIP communications
instruction
EtherNet/IP
FTP server
SD Memory Card
Socket Services
You can directly use TCP or UDP from the user program to send and receive any data with remote
nodes between a host computer and the Controller, or between Controllers. The socket services are
supported only for the built-in EtherNet/IP ports.
Communications
EtherNet/IP
Socket service
instruction
Controllers or Slaves
You can obtain clock information from an NTP server to update the built-in clock.
NTP server
Clock information
EtherNet/IP
10
NTP client
DNS server
IP address EtherNet/IP
Host name
DNS client
BOOTP server
IP address
EtherNet/IP
BOOTP commands
BOOTP client
SNMP manager
Administration
information
EtherNet/IP
SNMP messages
SNMP agent
EtherCAT
High-speed, high-precision communications are possible with Servo Drives and general-purpose
slaves.
Refer to the NJ/NX-series CPU Unit Built-in EtherCAT Port User’s Manual (Cat. No. W505) for details.
EtherCAT
Servo Drives
EtherNet/IP
Note You cannot use a CJ1W-EIP21 EtherNet/IP Unit for NX-series CPU Units.
Refer to the NJ/NX-series CPU Unit Built-in EtherNet/IP Port User’s Manual (Cat. No. W506) for
details on the built-in EtherNet/IP port and CJ-series EtherNet/IP Unit Operation Manual for NJ-
series CPU Unit (Cat. No. W495) for details on the CJ1W-EIP21 EtherNet/IP Unit.
Serial Communications
You can use a Serial Communications Unit to connect to an NS-series PT.
NS-series PT
RS-232C or
RS-422A/485
Note You cannot use a Series Communications Unit for NX-series CPU Units.
Refer to the CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit (Cat.
No. W494) for details on the Serial Communications Unit.
RS-232C or
RS-422A/485
RS-232C or
RS-422A/485
Sysmac Studio
USB
Displacement Sensor
Built-in EtherCAT port
EtherCAT
G5 EtherCAT
11-1-2 Operation
Interrupt feeding starts when the sensor signal changes to ON during velocity control.
The vertical position changes based on the analog input from the Displacement Sensor.
Variable Design
Consider the following:
• The separation of variables into those that you use in more than one POU (global variables) and vari-
ables that you use in only specific POUs (local variables)
• Defining the variable names for the device variables that you use to access slaves and Units
• Defining the attributes of variables, such as the Name and Retain attributes
• Designing the data types of variables
11
Additional Information
At this point, you can use forced resetting from the I/O Map to check the wiring.
2 In the I/O Map, assign the variables to the I/O ports. (The I/O ports are created automatically
from the Unit and slave configurations.)
You can automatically create device variable names with the Sysmac Studio. To do so, right-
click an I/O port and select Create Device Variable from the menu.
By default, device variables are registered in the global variable table. If necessary, you can
change the variable type from a global variable to a local variable (internal variable) for a POU.
1 Right-click Axis Settings under Configurations and Setups − Motion Control Setup and
select Add − Axis Settings from the menu.
2 Assign Servo Drives to the axes (axis variables) that you created in the EtherCAT configuration.
11
1 Right-click Programs under Programming − POU and select Add − Ladder or Add − ST from
the menu.
5 As required, right-click Functions or Function Blocks under Programming − POU and select
Add − Ladder or Add − ST from the menu.
Double-click the function or function block that you registered. Register local variables for each
function and function block. Create the algorithms.
Note For a ladder diagram, press the R Key and create the following rungs.
If necessary, review the task configuration, program assignments, and task periods.
Going Online
2 Connect the computer and the CPU Unit with a USB cable.
3 Select Communications Setup from the Controller Menu. Select the connection method for the
connection configuration in the Connection Type Field.
Checking Wiring
Check the wiring by performing forced-refreshing with user-specified values from the I/O Map or Ladder
Editor.
MC Test Run
Manual Operation
Change the CPU Unit to RUN mode.
• Turning the Servo ON and OFF: Execute the MC_Power motion control instruction.
• Jogging: Execute the MC_MoveJog motion control instruction.
Actual Operation
Select Operation Mode − RUN Mode from the Controller Menu. If an error occurs, investigate the
cause and edit the user program.
11
indicator BUSY
SHTDWN
ERROR SD PWR
SD BUSY
indicator
PORT1
L1 L1 EtherNet/IP
AC100-2 NET RUN
INPUT
NET ERR
L2/N L2/N
LINK/ACT
NX1P
The following table shows the status of front-panel indicators, the status of user program execution, and
the ability to connect communications to the Sysmac Studio or an HMI during startup, during normal
operation, and when errors occur.
Power
Supply
*1 Refer to 12-1-2 Fatal Errors in the CPU Unit for information on individual errors.
*2 This error can occur for NX701 CPU Units. If the status of indicators shown above continues 30 seconds or longer, this
error exists.
*3 This error can occur for NX1P2 CPU Units. If the status of indicators shown above continues 30 seconds or longer, this
error exists.
*4 Refer to 12-1-3 Non-fatal Errors in the CPU Unit for information on individual errors.
*5 The function module where the error occurred stops.
RUN
indicator
PWR
indicator ERROR
indicator
The following table shows the status of front-panel indicators, the status of user program execution, and
the ability to connect communications to the Sysmac Studio or an HMI during startup, during normal
operation, and when errors occur.
Power Communica-
CPU Unit User pro-
Supply Unit tions with Sys-
CPU Unit operating status gram execu-
mac Studio or an
PWR (green) RUN (green) ERROR (red) tion status
HMI
Lit Flashing Not lit Stopped. Not possible.
Startup
(1-s intervals)
Normal RUN mode Lit Lit Not lit Continues. Possible.
operation PROGRAM mode Lit Not lit Not lit Stopped.
Power Supply Error*1 Not lit Not lit Not lit Stopped. Not possible.
*1 Refer to 12-1-2 Fatal Errors in the CPU Unit for information on individual errors.
*2 Refer to 12-1-3 Non-fatal Errors in the CPU Unit for information on individual errors.
*3 The function module where the error occurred stops.
CPU Unit
Error name
NX701 NX1P2 NJ-series
Power Supply Error Yes Yes Yes
CPU Unit Reset Yes --- Yes
Hardware Initialization Error --- Yes --- 12
Incorrect Power Supply Unit Connected --- --- Yes
Indicator
Communications CPU Unit operating
PWR/POWER with Sysmac Studio status
RUN (green) ERROR (red)
(green)
Not lit Not lit Not lit Not possible.* Power Supply Error
Lit Not lit Not lit CPU Unit Reset/Hard-
ware Initialization Error
Lit Not lit or Flashing Lit CPU Unit Error
(2-s intervals or
0.5-s intervals)
Lit Flashing Not lit System Initialization
(2-s intervals) for Error
30 s or longer
* An online connection to the Sysmac Studio is necessary to differentiate between CPU Unit Resets/Hardware Ini-
tialization Errors, CPU Unit Errors, and non-fatal errors in the CPU Unit. Power Supply Errors and System Initial-
ization Errors can be differentiated with the indicators. There is no need to see if you can go online with the CPU
Unit from the Sysmac Studio.
* An online connection to the Sysmac Studio is necessary to differentiate between CPU Unit Resets, CPU Unit
Watchdog Timer Errors, and non-fatal errors in the CPU Unit. Power Supply Errors and Incorrect Power Supply
Unit Connected errors can be differentiated with the indicators. There is no need to see if you can go online with
the CPU Unit from the Sysmac Studio.
Event Levels
Level of event
Controller infor-
Controller errors
mation
Partial fault
Item Major fault level Minor fault level Observation Information
level
These errors are These errors Errors that pre- Errors that do Information level
serious errors prevent all of the vent a portion of not affect control. events are not
that prevent con- control in a func- control in one of errors, but infor-
Definition trol operations tion module the function mation provided
for the entire other than PLC modules. to the user in the
Controller. Function Mod- event log.
ule.
• Non-volatile • Motion Con- • Positive Limit • Packet Dis- • Power Turned
Memory Data trol Period Input Detected carded Due to ON
Event examples (Only a Corrupted Exceeded (Motion Con- Full Receive • Power Inter-
few examples are pro- (PLC Func- (Motion Con- trol Function Buffer (Ether- rupted
vided here. tion) trol Function Module) Net/IP Func- • Memory All
Refer to the NJ/NX- Module) • Low Battery tion Module) Cleared
series Troubleshooting • Communica- Voltage (PLC
Manual (Cat. No. W503) tions Control- Function Mod-
for a complete list of ler Error ule)
errors.) (EtherCAT
Master Func-
tion Module)
PWR/POW Lit. Lit. Lit. Lit. Lit.
ER (green)
Front-
RUN Not lit. Lit. Lit. Lit. Lit.
panel indi-
(green)
cators*1
ERROR Lit. Flashes at 1-s Flashes at 1-s Not lit. Not lit.
(red) intervals. intervals.
Level of event
Controller infor-
Controller errors
mation
Partial fault
Item Major fault level Minor fault level Observation Information
level
*1 If multiple Controller errors have occurred, the indicators show the error with the highest error level.
*2 Operation stops in the function module (NX Bus Function Module, Motion Control Function Module, EtherCAT Master
Function Module, or EtherNet/IP Function Module) in which the error occurred.
Major fault level Partial fault level Minor fault level Observation
Function module
User program --- Operation continues.
PLC Function Module
execution stops.
--- I/O refreshing for NX Operation continues. If Operation continues.
bus communica- an NX Unit error occurs,
NX Bus Function Mod- tions stops. operation depends on
ule (NX Unit operation the fail-soft operation
depends on the NX settings.
Unit settings.)
--- All axes stop. (The • The affected axis/axes • Axis operation contin-
stop method group stops. (The stop ues.
depends on the method depends on • The motion control
Motion Control Func- error.) the settings.) instructions that are
tion Module • The motion control not related to axis
instructions that are operation are not exe-
related to axis opera- cuted.
tion are not executed.
--- EtherCAT communi- I/O refreshing for Ether- I/O refreshing for Ether-
cations stop. (The CAT communications CAT communications
slaves operate stops or continues continues.
according to the set- according to the fail-soft
EtherCAT Master Func-
tings in the slaves.) operation settings in the
tion Module
master. (If I/O refreshing
stops, the slaves operate
according to the settings
in the slaves.)
--- EtherNet/IP commu- Part of EtherNet/IP com- EtherNet/IP communica-
nications stop. (A munications stop. (A tions continue.
software connection software connection from
EtherNet/IP Function from the Sysmac the Sysmac Studio or an
Module Studio or an HMI is HMI is possible if the
not possible.) communications connec-
tion is not the cause of
the error.)
Indicator
Event level
PWR/POWER (green) RUN (green) ERROR (red)
Lit Not lit Lit Major fault level
Lit Lit Flashing (1-s intervals) Partial fault level
Minor fault level
Lit Lit Not lit Observation
• Lit: An error for which normal status cannot be recovered through user
actions (i.e., errors for which you must replace the CPU Unit or contact your
OMRON representative) has occurred.
• Flashing: An error for which normal status can be recovered through user
actions has occurred.
• Not lit: An error that affects process data communications has not occurred.
EtherNet/IP NET ERR EtherNet/IP Port Status
• Lit: An error for which normal status cannot be recovered through user
actions (i.e., errors for which you must replace the CPU Unit or contact your
OMRON representative) has occurred.
• Flashing: An error for which normal status can be recovered through user
actions has occurred.
• Not lit: There is no minor fault level or higher-level error.
Current Errors
Open the Sysmac Studio’s Controller Error Tab Page to check the current error’s level, source,
source details, event name, event code, cause, and correction. Errors are not displayed for observa-
tions.
Error logs from CJ-series Special Units are displayed on the Controller Event Log Tab Page.
Detailed information is not displayed. To check detailed information, use the event codes that are
displayed and refer to the error codes that are given in the manual for the relevant Unit. Refer to the
NJ/NX-series Troubleshooting Manual (Cat. No. W503) for the relationship between error codes and
event codes.
Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for details on trouble-
shooting with the Sysmac Studio.
Current Errors
You can check the current error’s event name, event code, level, source, source details, details, and
attached information 1 to 4. Observations are not displayed as errors.
For details on the instructions that get error status, refer to the NJ/NX-series Instructions Reference
Manual (Cat. No. W502).
You can check the error status variables in the system-defined variables to determine the status of
errors in a Controller. You can read the error status variables from an external device by using commu-
12
12-2 Troubleshooting
This section provides basic error identification and troubleshooting flowcharts. Use them when an error
occurs in the NJ/NX-series Controller. This section also describes the software errors that are related to
the PLC Function Module and corrections for those errors.
Lit.
Not lit.
Possible.
Not lit.
12-2 Troubleshooting
PWR indicator (green)? Power Supply Error
Lit.
Not possible.
Flashing. Not lit. Communications
ERROR indicator (red)? with Sysmac CPU Unit Reset
Studio?
12
Lit. Possible.
Not lit.
Possible.
Lit. Flashing.
ERROR indicator (red)?
EtherNet/IP NET ERR indicator is lit or flashing. Both indicators are not lit.
Lit. Lit.
Major fault Observa- Error in the Error in the Error in the Error in the Error in PLC
EtherNet/IP port for EtherNet/IP port for EtherCAT port for EtherCAT port for Function Module or
level tion which you cannot which you can which you cannot which you can MC Function
restore normal status restore normal status restore normal restore normal Module
by yourself. by yourself. status by yourself. status by yourself.
Refer to the NJ/NX-series Troubleshooting Manual (Cat. No. W503) for the procedures to
check for errors and corrections with the Sysmac Studio or an HMI.
12-2 Troubleshooting
Prt: Partial fault level
Min: Minor fault level
Obs: Observation
Info: Information
A version in parentheses in the Event code column is the unit version of the CPU Unit when the event
occurs for only specific unit versions of the CPU Unit.
Refer to the NJ/NX-series Troubleshooting Manual (Cat. No. W503) for all NJ/NX-series event codes.
12
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
60050000 hex Task Period Task execution was • The task period setting is too √ page 12-42
Exceeded not completed short.
during the set task • A user program is too large.
period for the pri- • The number of times that pro-
mary periodic task
cessing is repeated is larger
or fixed periodic
than expected.
task.
• Task Priority Error for Periodic
Tasks and Event Tasks
• Frequent Event Task Execution
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
04100000 hex NX Bus Con- An error occurred in • An I/O communications error √ page 12-43
(Ver. 1.13 or troller Error the NX bus. occurred between the CPU Unit
later) and the NX Unit.
04110000 hex NX Bus A hardware error • A hardware error related to the √ page 12-43
(Ver. 1.13 or Hardware was detected in the NX bus was detected.
later) Error NX Bus Function
Module.
10600000 hex NX Bus An error was • An error was detected in the √ page 12-44
(Ver. 1.13 or Memory detected in the memory check for the internal
later) Check Error internal memory protection circuit.
check for the NX
Bus Function Mod-
ule.
10610000 hex Failed to Reading the NX • The NX Unit operation settings √ page 12-44
(Ver. 1.13 or Read NX Unit Unit operation set- are not saved normally in the
later) Operation tings failed. CPU Unit.
Settings Cycle the power
supply to the CPU
Unit to restore the
previous normally-
saved settings.
24D00000 hex Number of The number of • More than the maximum num- √ page 12-45
(Ver. 1.13 or Mountable mounted NX Units ber of NX Units are mounted on
later) NX Units exceeds the speci- the CPU Unit.
Exceeded fied value for the
CPU Unit.
24D20000 hex Total I/O Data The total size of I/O • The total size of I/O data in the √ page 12-45
(Ver. 1.13 or Size in NX data in the mounted mounted NX Units exceeds the
later) Units Exces- NX Units exceeds maximum specified value for
sive the maximum spec- the CPU Unit.
ified value for the
CPU Unit.
35900000 hex NX Unit Ver- There is a mounted • The unit version of an NX Unit √ page 12-46
(Ver. 1.13 or sion Not NX Unit with a unit mounted in the actual configu-
later) Matched version earlier than ration is earlier than that in the
that in the Unit con- Unit configuration information
figuration informa- registered in the CPU Unit.
tion registered in
the CPU Unit.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
35910000 hex Unregistered There is a mounted • There is a mounted Unit that √ page 12-47
(Ver. 1.13 or NX Unit NX Unit that does does not exist in the Unit con-
later) Mounted not exist in the Unit figuration information registered
configuration infor- in the CPU Unit.
mation registered in • There is a mounted Unit in
the CPU Unit. which the NX Unit Mounting
12-2 Troubleshooting
If there are more Setting is set to Disabled.
than one NX Unit
relevant to this
event, only the NX
Unit that is nearest
to the CPU Unit is
registered with the
event.
359300000 NX Unit There is a mounted • There is no mounted NX Unit √ page 12-48
hex (Ver. 1.13 Serial Num- NX Unit with a with the serial number that you
or later) ber Mismatch serial number differ- set in the Unit configuration 12
ent from that in the information registered in the
Unit configuration CPU Unit.
information regis-
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
85510000 hex NX Unit An error occurred in • An NX Bus Communications √ page 12-50
(Ver. 1.13 or Communica- I/O data communi- Error has occurred.
later) tions Timeout cations with the NX • An error occurred in an NX
Units. Unit.
85520000 hex NX Unit Ini- Initializing an NX • Initialization with the Unit con- √ page 12-51
(Ver. 1.13 or tialization Unit failed. figuration information registered
later) Error in the CPU Unit failed.
• An NX Bus Communications
Error has occurred.
• The Channel Enable/Disable
Setting for all channels of the
Analog Unit are set to Disable.
• Initialization of an NX Unit
failed.
85530000 hex NX Unit Starting an NX Unit • A startup error occurred in an √ page 12-51
(Ver. 1.13 or Startup Error failed. NX Unit.
later)
103C0000 hex NX Unit The backup opera- • There is also another error √ page 12-52
(Ver. 1.13 or Backup tion for an NX Unit related to the NX Bus Function
later) Failed ended in an error. Module.
• An NX Bus Communications
Error has occurred.
• Backup data cannot be
received from an NX Unit.
103D0000 hex NX Unit The restore opera- • There is also another error √ page 12-53
(Ver. 1.13 or Restore tion for an NX Unit related to the NX Bus Function
later) Operation ended in an error. Module.
Failed • An NX Bus Communications
Error has occurred.
• The backup data cannot be
sent to an NX Unit.
• The Unit configuration in the
backup file does not agree with
the actual Unit configuration.
10620000 hex NX Unit Saving or reading • Data in the NX Unit event log √ page 12-53
(Ver. 1.13 or Event Log the NX Unit event area are invalid.
later) Save Error log failed.
Continuing to oper-
ate with this error
may result in no
event log saved at
CPU Unit power
OFF although it has
no effect on the
control function.
44450000 hex NX Bus Sys- This event pro- • This event provides internal √ page 12-54
(Ver. 1.13 or tem Informa- vides internal infor- information from the NX Bus
later) tion mation from the NX Function Module.
Bus Function Mod-
ule.
95800000 hex NX Bus An NX bus restart • An NX bus restart command √ page 12-54
(Ver. 1.13 or Restart Exe- was executed. was received.
later) cuted
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
10200000 hex User Pro- The user program • The user program or Controller √ page 12-54
gram/Con- or Controller Con- Configurations and Setup are
12-2 Troubleshooting
troller figurations and not correct because the power
Configura- Setup were not supply to the Controller was
tions and transferred cor- interrupted during a download
Setup Trans- rectly. of the user program or the Con-
fer Error troller Configurations and
Setup.
• The user program or Controller
Configurations and Setup are
not correct because the power
supply to the Controller was
interrupted during online edit-
ing.
12
• The user program or Controller
Configurations and Setup are
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
10270000 hex Error in Start- An error was • An SD Memory Card is not √ page 12-58
(Ver. 1.03 or ing Automatic detected in pre- inserted.
later) Transfer execution checks • The SD Memory Card type is
for automatic trans- not correct.
fer.
• The format of the SD Memory
Card is not correct.
• There is no autoload folder on
the SD Memory Card.
• There are no backup files in the
autoload folder on the SD
Memory Card.
• Either the backup files in the
autoload folder on the SD
Memory Card are corrupted or
required data is not in the
backup files on the SD Memory
Card.
• The unit version of the CPU
Unit to which to transfer the
files is older than the unit ver-
sion of the backup files on the
SD Memory Card.
• The model of the CPU Unit to
which to transfer the files is not
the same as the model of the
CPU Unit of the backup files on
the SD Memory Card.
• Recovery was executed for the
SD Memory Card.
• The CPU Unit is write-pro-
tected.
• The settings in the automatic
transfer command file (Auto-
loadCommand.ini) are not cor-
rect.
• Reading the data for automatic
transfer failed because the SD
Memory Card is faulty or not
formatted correctly.
• The SD Memory Card is dam-
aged.
• The database connection ser-
vice version of the CPU Unit to
which to transfer the files is
older than the database con-
nection service version of the
backup files on the SD Memory
Card.
• The robot version of the CPU
Unit to which to transfer the
files is older than the robot ver-
sion of the backup files on the
SD Memory Card.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
10280000 hex Error in Exe- The automatic • It was not possible to read the √ page 12-60
(Ver. 1.03 or cuting Auto- transfer ended in an data for automatic transfer.
later) matic error. • The SD Memory Card was
Transfer removed during an automatic
transfer.
• There are no backup files in the
12-2 Troubleshooting
autoload folder on the SD
Memory Card.
• The backup files in the autoload
folder on the SD Memory Card
are corrupted.
• The SD Memory Card is dam-
aged.
12
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
10330000 hex SD Memory An error was • An SD Memory Card is not √ page 12-61
(Ver. 1.11 or Card Pro- detected in pre- inserted.
later) gram Trans- execution checks • The SD Memory Card type is
fer Pre- for transferring SD not correct.
execution Memory Card pro-
• The format of the SD Memory
Check Error grams.
Card is not correct.
• There is no such folder on the
SD Memory Card as specified
by the _Card1PrgTransfer-
Cmd.DirName system-defined
variable.
• There are no backup files in
such a folder on the SD Mem-
ory Card as specified by the
_Card1PrgTransferCmd.Dir-
Name system-defined variable.
• Either the backup files in the
folder specified by the
_Card1PrgTransferCmd.Dir-
Name system-defined variable
on the SD Memory Card are
corrupted or required data is
not in the backup files on the
SD Memory Card.
• The unit version of the CPU
Unit to which to transfer the
files is older than the unit ver-
sion of the backup files on the
SD Memory Card.
• The model of the CPU Unit to
which to transfer the files is not
the same as the model of the
CPU Unit of the backup files on
the SD Memory Card.
• The CPU Unit is write-pro-
tected.
• Required files are not set to
transfer in the setting of the
_Card1PrgTransferCmd sys-
tem-defined variable.
• Reading the data for the SD
Memory Card program transfer
failed because the SD Memory
Card is faulty or not formatted
correctly.
• The SD Memory Card is dam-
aged.
• The database connection ser-
vice version of the CPU Unit to
which to transfer the files is
older than the database con-
nection service version of the
backup files on the SD Memory
Card.
• The robot version of the CPU
Unit to which to transfer the
files is older than the robot ver-
sion of the backup files on the
SD Memory Card.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
10340000 hex Error in Exe- The SD Memory • It was not possible to read the √ page 12-64
(Ver. 1.11 or cuting SD Card program data for SD Memory Card pro-
later) Memory Card transfer ended in an gram transfers.
Program error. • The SD Memory Card was
Transfer removed during a SD Memory
Card program transfer.
12-2 Troubleshooting
• There are no backup files in
such a folder on the SD Mem-
ory Card as specified by the
_Card1PrgTransferCmd.Dir-
Name system-defined variable.
• The backup files in such a
folder on the SD Memory Card
as specified by the _Card1Prg-
TransferCmd.DirName system-
defined variable are corrupted.
• The SD Memory Card is dam- 12
aged.
40110000 hex PLC Function A fatal error was • An error occurred in the soft- √ page 12-65
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
10290000 hex Backup An error was • An SD Memory Card is not √ page 12-68
(Ver. 1.03 or Failed to detected in pre- inserted.
later) Start execution checks • The SD Memory Card type is
for a backup opera- not correct.
tion.
• The format of the SD Memory
Card is not correct.
• The SD Memory Card is write
protected.
• The Prohibiting backing up data
to the SD Memory Card param-
eter is set to prohibit backing up
data to an SD Memory Card.
• Another backup operation is in
progress.
• Synchronization, online edit-
ing, or the Clear All Memory
operation is in progress.
• The backup was canceled by
the user.
• The online connection with the
Sysmac Studio was discon-
nected.
• The SD Memory Card is dam-
aged.
102A0000 hex Backup The backup opera- • The capacity of the SD Memory √ page 12-70
(Ver. 1.03 or Failed tion ended in an Card is insufficient.
later) error. • It was not possible to save the
data that was specified for
backup.
• The SD Memory Card was
removed during a backup oper-
ation.
• Failed to back up Unit or slave.
• The backup was canceled by
the user.
• Execution of the Save Cam
Table instruction or changing
the CPU Unit name is in prog-
ress.
• The online connection with the
Sysmac Studio was discon-
nected.
• It was not possible to save the
data that was specified for
backup to the computer.
• The SD Memory Card is dam-
aged.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
102B0000 hex Restore An error was • An SD Memory Card is not √ page 12-71
(Ver. 1.03 or Operation detected in pre- inserted.
later) Failed to execution checks • The SD Memory Card type is
Start for a restore opera- not correct.
tion.
• The format of the SD Memory
Card is not correct.
12-2 Troubleshooting
• There are no backup files on
the SD Memory Card.
• Either the backup files on the
SD Memory Card are corrupted
or required data is not in the
backup files on the SD Memory
Card.
• The unit version of the CPU
Unit to which to restore the files
is older than the unit version of
the backup files on the SD
12
Memory Card.
• The model of the CPU Unit to
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
• Password of Restore by sys-
tem-defined variable in the
Controller Setup does not
agree with the _Card1Resto-
reCmd.Password system-
defined variable.
• The DIP switch on the CPU
Unit is not set to allow starting
the restore of SD Memory Card
backups by specification with
system-defined variables.
• There is no such folder as
specified by the system-defined
variable.
• Required files are not set to
transfer in the setting of the
system-defined variable.
102C 0000 hex Restore The restore opera- • It was not possible to read the √ page 12-75
(Ver. 1.03 or Operation tion ended in an data to restore.
later) Failed error. • The SD Memory Card was
removed during a restore oper-
ation.
• Failed to restore Unit or slave.
• The SD Memory Card is dam-
aged.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
10320000 hex SD Memory An error was • Program transfer by system- √ page 12-76
(Ver. 1.11 or Card Pro- detected in pre-start defined variable is set to Do not
later) gram Trans- checks for transfer- use in the Controller Setup.
fer Failed to ring SD Memory • Password of Program transfer
Start Card programs. by system-defined variable in
the Controller Setup does not
agree with the _Card1Prg-
12-2 Troubleshooting
TransferCmd.Password sys-
tem-defined variable.
• The DIP switch on the CPU Unit
is not set to allow starting the SD
Memory Card program transfer.
• An SD Memory Card is not
inserted.
• The SD Memory Card type is
not correct.
• The format of the SD Memory
Card is not correct. 12
• There is no such folder on the
SD Memory Card as specified by
the _Card1PrgTransferCmd.Dir-
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
• The robot version of the CPU
Unit to which to transfer the
files is older than the robot ver-
sion of the backup files on the
SD Memory Card.
103E0000 hex Restore Pre- An error was • An SD Memory Card is not √ page 12-79
(Ver. 1.14 or execution detected in pre- inserted.
later) Check Fail- execution checks • The SD Memory Card type is
ure for specification not correct.
with system-defined
• The format of the SD Memory
variables for the SD Card is not correct.
Memory Card
• There is no such folder on the
restore operation.
SD Memory Card as specified
by the _Card1RestoreCmd.Dir-
Name system-defined variable.
• There are no backup files in
such a folder on the SD Mem-
ory Card as specified by the
_Card1RestoreCmd.DirName
system-defined variable.
• Either the backup files in the
folder specified by the
_Card1RestoreCmd.DirName
system-defined variable on the
SD Memory Card are corrupted
or required data is not in the
backup files on the SD Memory
Card.
• The unit version of the CPU
Unit to which to transfer the
files is older than the unit ver-
sion of the backup files on the
SD Memory Card.
• The model of the CPU Unit to
which to transfer the files is not
the same as the model of the
CPU Unit of the backup files on
the SD Memory Card.
• The CPU Unit is write-pro-
tected.
• Required files are not set to
transfer in the setting of the
system-defined variable.
• Reading the data for the SD
Memory Card program transfer
failed because the SD Memory
Card is faulty or not formatted
correctly.
• The SD Memory Card is dam-
aged.
• The database connection ser-
vice version of the CPU Unit to
which to transfer the files is
older than the database con-
nection service version of the
backup files on the SD Memory
Card.
• The robot version of the CPU
Unit to which to transfer the
files is older than the robot ver-
sion of the backup files on the
SD Memory Card.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
40140000 hex PLC System This event pro- • This event provides internal √ page 12-82
Information vides internal infor- information from the PLC Func-
mation from the tion Module. It is recorded to
PLC Function Mod- provide additional information
ule. for another event.
40170000 hex Safe Mode The Controller • The Controller started in Safe √ page 12-82
12-2 Troubleshooting
(Ver. 1.03 or started in Safe Mode.
later) Mode.
80230000 hex NX Message An error has • The communications cable is √ page 12-83
(Ver. 1.05 or Communica- occurred in mes- broken.
later) tions Error sage communica- • The communications cable con-
tions. nector is disconnected.
• The NX message communica-
tions load is high.
40150000 hex PLC System This event pro- • This event provides internal √ page 12-83
Information vides internal infor- information from the PLC Func- 12
mation from the tion Module. It is recorded to
PLC Function Mod- provide additional information
ule. for another event.
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
90120000 hex Power Inter- The power supply • The power supply was inter- √ page 12-88
rupted was interrupted. rupted.
90130000 hex Operation Operation was • A command to start operation √ page 12-88
Started started. was received.
90140000 hex Operation Operation was • A command to stop operation √ page 12-89
Stopped stopped. was received.
90150000 hex Reset Exe- A reset was exe- • A reset command was √ page 12-89
cuted cuted. received.
90160000 hex User Pro- The user program • A user with Administrator rights √ page 12-89
gram Execu- execution ID was changed the user program exe-
tion ID Write set or changed in cution ID that is set in the CPU
the CPU Unit. Unit.
90180000 hex All Controller All current errors • All current errors were changed √ page 12-90
Errors were cleared. by the user.
Cleared
90190000 hex Forced Clearing a forced • Clearing a forced refreshing √ page 12-90
Refreshing refreshing value value was specified by the user.
Cleared was specified.
901A0000 hex Backup A backup operation • A backup operation was √ page 12-90
(Ver. 1.03 or Started was started. started.
later)
901B0000 hex Backup Com- The backup opera- • The backup operation ended √ page 12-91
(Ver. 1.03 or pleted tion ended nor- normally.
later) mally.
901C 0000 hex Restore A restore operation • A restore operation started. √ page 12-91
(Ver. 1.03 or Operation started.
later) Started
901D 0000 hex Restore The restore opera- • The restore operation ended √ page 12-92
(Ver. 1.03 or Operation tion ended nor- normally.
later) Completed mally.
90200000 hex SD Memory Transferring the SD • Transferring the SD Memory √ page 12-92
(Ver. 1.11 or Card Pro- Memory Card pro- Card programs was started.
later) gram Trans- grams was started.
fer Started
90210000 hex SD Memory Transferring the SD • Transferring the SD Memory √ page 12-93
(Ver. 1.11 or Card Pro- Memory Card pro- Card programs was completed.
later) gram Trans- grams was com-
fer pleted.
Completed
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
14010000 hex CPU Bus An error was • The power supply to the Con- √ page 12-94
Unit Setup detected in the troller was interrupted or com-
12-2 Troubleshooting
Area Error memory check of munications with the Sysmac
the Setup Area for Studio were disconnected while
CPU Bus Units. downloading the CPU Bus Unit
Settings.
34100000 hex IP Address The IP address • The IP address conversion √ page 12-94
Table Setting table settings are method is set to the combined
Error incorrect. method or the IP address table
method, but the IP address
table settings are incorrect.
34130000 hex FINS/TCP The FINS/TCP con- • The power supply to the Con- √ page 12-95
Connection nection table is troller was interrupted or com- 12
Table Setting incorrect. munications with the Sysmac
Error Studio were disconnected while
downloading the FINS/TCP
Level
Event code Event name Meaning Assumed cause Reference
Maj Prt Min Obs Info
80120000 hex Packet Dis- One or more pack- • A FINS response was received √ page 12-97
carded ets were discarded. with the destination network
address (DNA) set to the local
network and the destination
node address (DA1) not set to
the local node.
• A FINS command or response
was received with a hub net-
work address specification for
which the destination network
address (DNA) was greater
than or equal to 80 hex.
• There is insufficient space in
the internal buffer.
• A FINS command that does not
have the minimum command
length was received.
• A FINS command that
exceeded the maximum com-
mand length was received.
• Sending packets failed.
• FINS message routing failed
because the communications
load is too high. Or a command
that was addressed to the built-
in EtherNet/IP port was
received with the source net-
work address (SNA) set to 0.
• A FINS response that was
addressed to the built-in Ether-
Net/IP port was received.
• A FINS response or a com-
mand for which a response is
not required was received when
the routing tables were not reg-
istered.
• A FINS response or a com-
mand for which a response is
not required was received when
there was an error in the routing
tables.
• A FINS response or a com-
mand for which a response is
not required was received that
exceeded the number of relay
points.
• Transmission is not possible
because the destination
address is not set in the routing
tables.
• Routing is not possible because
the FINS node address setting
in the Built-in EtherNet/IP Port
Settings is set to 0 or 255.
12-2 Troubleshooting
The items that are used to describe individual errors (events) are described in the following copy of an
error table.
Event name Gives the name of the error. Event code Gives the code of the error.
Meaning Gives a short description of the error.
Source Gives the source of the error. Source details Gives details on Detection Tells when the
the source of the timing error is detected.
error.
Error attributes Level Tells the level of
influence on con-
Recovery Gives the recov- Log category Tells which log
the error is saved
12
ery method.*2
trol.*1 in.*3
Effects User program Tells what will hap- Operation Provides special information on the operation that results
* For details, refer to I/O Operation for Major Fault Level Controller Errors on page 12-11.
Event name I/O Refreshing Timeout Error Event code 60030000 hex
Meaning Consecutive I/O refresh failures occurred during the primary periodic task or periodic task period.
Source PLC Function Module Source details None Detection Continuously
timing
Error attributes Level Major fault Recovery Cycle the power Log category System
supply or reset
the Controller.
12-2 Troubleshooting
Effects User program Stops. Operation Stops.*
System-defined Variable Data type Name
variables
_<Task_name>_Exceeded BOOL Task Period Exceeded Flag
_<Task_name>_ExceedCount UDINT Task Period Exceeded Count
_<Task_name>_LastExecTime TIME Last Task Execution Time
_<Task_name>_MaxExecTime TIME Maximum Task Execution Time
Cause and Assumed cause Correction Prevention
correction The task period setting is too short. Check the task execution time and
change the task period to an appropri-
Design the tasks considering the cor-
rections that are given on the left.
12
ate value.
Task Priority Error for Periodic Tasks Increase the priorities of the periodic
* For details, refer to I/O Operation for Major Fault Level Controller Errors on page 12-11.
Event name Insufficient System Service Time Error Event code 60040000 hex
Meaning The specified system service execution time could not be obtained.
Source PLC Function Module Source details None Detection Continuously
timing
Error attributes Level Major fault Recovery Cycle the power Log category System
supply or reset
the Controller.
Effects User program Stops. Operation Stops.*
System-defined Variable Data type Name
variables
_<Task_name>_Exceeded BOOL Task Period Exceeded Flag
_<Task_name>_ExceedCount UDINT Task Period Exceeded Count
_<Task_name>_LastExecTime TIME Last Task Execution Time
_<Task_name>_MaxExecTime TIME Maximum Task Execution Time
Cause and Assumed cause Correction Prevention
correction There was not sufficient time to exe- Check the available time for task exe- Set the System Service Monitoring
cute the tasks and tag data link ser- cution and the tag data link settings. Settings according to the corrections
vice. Increase the task periods or the that are given on the left.
packet intervals (RPI) in the tag data
link settings to obtain enough time for
execution of the tasks and tag data
link service.
The system service execution interval Check the effect on the processes
is too short or the system service exe- executed by the system services with
cution time ratio is too long in the Sys- this operation and increase the sys-
tem Service Monitoring Settings. tem service execution interval or
reduce the system service execution
time ratio.
Attached None
information
Precautions/ None
Remarks
* For details, refer to I/O Operation for Major Fault Level Controller Errors on page 12-11.
12-2 Troubleshooting
• CJ-series Units: No I/O refresh is executed.
When task execution is completed, I/O refreshing for the
next period is executed.
• EtherCAT slaves: The same values are output as for the
previous output refresh.
If the task execution does not finish within the set task
period, overall control of the equipment may become
impossible.
System-defined Variable Data type Name
variables
_<Task_name>_Exceeded BOOL Task Period Exceeded Flag 12
_<Task_name>_ExceedCount UDINT Task Period Exceeded Count
_<Task_name>_LastExecTime TIME Last Task Execution Time
12-2 Troubleshooting
Controller reset,
or during NX bus
communications
Error attributes Level Partial fault Recovery Cycle the power Log category System
supply to the
CPU Unit or reset
the Controller.
Effects User program Continues. Operation I/O communications will not operate and message com-
munications cannot be performed.
System-defined Variable Data type Name
variables None --- --- 12
Cause and Assumed cause Correction Prevention
correction An I/O communications error Cycle the power supply to the CPU None
Event name NX Bus Memory Check Error Event code 10600000 hex *1
Meaning An error was detected in the internal memory check for the NX Bus Function Module.
Source NX Bus Function Module Source details Master Detection Continuously
timing
Error attributes Level Partial fault Recovery Cycle the power Log category System
supply to the
CPU Unit or reset
the Controller.
Effects User program Continues. Operation I/O communications will not operate and message com-
munications cannot be performed.
System-defined Variable Data type Name
variables None --- ---
Cause and Assumed cause Correction Prevention
correction An error was detected in the memory Cycle the power supply to the CPU None
check for the internal protection cir- Unit. If this error persists, replace the
cuit. CPU Unit.
Attached Attached information 1: System information
information
Precautions/ None
Remarks
*1 This event code occurs for unit version 1.13 or later of the CPU Unit.
Event name Failed to Read NX Unit Operation Settings Event code 10610000 hex *1
Meaning Reading the NX Unit operation settings failed.
Cycle the power supply to the CPU Unit to restore the previous normally-saved settings.
Source NX Bus Function Module Source details Master Detection At CPU Unit
timing power ON, at
Controller reset,
or at NX bus
restart
Error attributes Level Partial fault Recovery Cycle the power Log category System
supply to the
CPU Unit, reset
the Controller, or
restart the NX
bus.
Effects User program Continues. Operation I/O communications will not operate, but message com-
munications can be performed.
System-defined Variable Data type Name
variables None --- ---
Cause and Assumed cause Correction Prevention
correction The NX Unit operation settings are Check the NX Unit operation settings Do not turn OFF the power supply to
not saved normally in the CPU Unit. and correct the settings. the CPU Unit while transfer of the Unit
operation settings for the CPU Unit or
execution of the NX_SaveParam
instruction is in progress.
Attached Attached information 1: System information
information
Precautions/ None
Remarks
*1 This event code occurs for unit version 1.13 or later of the CPU Unit.
Event name Number of Mountable NX Units Exceeded Event code 24D00000 hex *1
Meaning The number of mounted NX Units exceeds the specified value for the CPU Unit.
Source NX Bus Function Module Source details Master Detection At CPU Unit
timing power ON, at
Controller reset,
or at NX bus
restart
Error attributes Level Partial fault Recovery Cycle the power Log category System
12-2 Troubleshooting
supply to the
CPU Unit or reset
the Controller.
Effects User program Continues. Operation • For NX Units within the range of the number of mount-
able Units, I/O communications will not operate, but
message communications can be performed.
• For NX Units outside the range of the number of mount-
able Units, I/O communications will not operate and
message communications cannot be performed.
System-defined Variable Data type Name
variables None --- ---
12
Cause and Assumed cause Correction Prevention
correction More than the maximum number of Keep the number of NX Units Mount the specified number of NX
Event name Total I/O Data Size in NX Units Excessive Event code 24D20000 hex *1
Meaning The total size of I/O data in the mounted NX Units exceeds the maximum specified value for the CPU Unit.
Source NX Bus Function Module Source details Master Detection At CPU Unit
timing power ON, at
Controller reset,
or at NX bus
restart
Error attributes Level Partial fault Recovery Cycle the power Log category System
supply to the
CPU Unit or reset
the Controller.
Effects User program Continues. Operation I/O communications will not operate, but message com-
munications can be performed.
System-defined Variable Data type Name
variables None --- ---
Cause and Assumed cause Correction Prevention
correction The total size of I/O data in the Reduce the number of NX Units Reduce the number of NX Units
mounted NX Units exceeds the maxi- mounted on the CPU Unit to keep the mounted on the CPU Unit to keep the
mum specified value for the CPU total size of I/O data at the maximum total size of I/O data at the maximum
Unit. specified value or less. specified value or less.
Attached None
information
Precautions/ None
Remarks
*1 This event code occurs for unit version 1.13 or later of the CPU Unit.
Event name NX Unit Version Not Matched Event code 35900000 hex *1
Meaning There is a mounted NX Unit with a unit version earlier than that in the Unit configuration information registered in the
CPU Unit.
Source NX Bus Function Module Source details Master Detection At CPU Unit
timing power ON, at
Controller reset,
or at NX bus
restart
Error attributes Level Partial fault Recovery Cycle the power Log category System
supply to the
CPU Unit, reset
the Controller, or
restart the NX
bus.
Effects User program Continues. Operation • For NX Units with this error, I/O communications will not
operate and message communications cannot be per-
formed.
• For NX Units without this error, I/O communications will
not operate, but message communications can be per-
formed.
System-defined Variable Data type Name
variables None --- ---
Cause and Assumed cause Correction Prevention
correction The unit version of an NX Unit To match the Unit configuration infor- Download Unit configuration informa-
mounted in the actual configuration is mation with the actual configuration, tion for which you confirmed that the
earlier than that in the Unit configura- download the Unit configuration infor- comparison result showed Not com-
tion information registered in the CPU mation that contains the unit version patible in the Compare and Merge
Unit. of the NX Unit mounted in the actual Window of the Sysmac Studio to the
configuration to the CPU Unit. To CPU Unit.
match the actual configuration with
the Unit configuration information,
replace the NX Unit in the actual con-
figuration with an NX Unit with a unit
version later than that in the Unit con-
figuration information.
Attached Attached information 1: Unit number of the NX Unit where the error occurred
information Attached information 2: Unit version in the Unit configuration information of the NX Unit where the error occurred
Precautions/ None
Remarks
*1 This event code occurs for unit version 1.13 or later of the CPU Unit.
Meaning There is a mounted NX Unit that does not exist in the Unit configuration information registered in the CPU Unit.
If there are more than one NX Unit relevant to this event, only the NX Unit that is nearest to the CPU Unit is registered
with the event.
Source NX Bus Function Module Source details Master Detection At CPU Unit
timing power ON, at
Controller reset,
12-2 Troubleshooting
or at NX bus
restart
Error attributes Level Partial fault Recovery Cycle the power Log category System
supply to the
CPU Unit, reset
the Controller, or
restart the NX
bus.
Effects User program Continues. Operation • For NX Units with this error, I/O communications will not
operate and message communications cannot be per-
formed.
12
• For NX Units without this error, I/O communications will
not operate, but message communications can be per-
Event name NX Unit Serial Number Mismatch Event code 35930000 hex *1
Meaning There is a mounted NX Unit with a serial number different from that in the Unit configuration information registered in
the CPU Unit.
Source NX Bus Function Module Source details Master Detection At CPU Unit
timing power ON, at
Controller reset,
or at NX bus
restart
Error attributes Level Partial fault Recovery Cycle the power Log category System
supply to the
CPU Unit, reset
the Controller, or
restart the NX
bus.
Effects User program Continues. Operation • For NX Units with this error, I/O communications will not
operate and message communications cannot be per-
formed.
• For NX Units without this error, I/O communications will
not operate, but message communications can be per-
formed.
System-defined Variable Data type Name
variables None --- ---
Cause and Assumed cause Correction Prevention
correction There is no mounted NX Unit with the To match the actual configuration with Read the serial numbers of the actu-
serial number that you set in the Unit the Unit configuration information, ally mounted Units into a project in
configuration information registered in match the serial number of the rele- the Sysmac Studio before you set the
the CPU Unit. vant NX Unit . To match the Unit con- Serial Number Verification setting to
figuration information with the actual verify the serial numbers.
configuration, download the Unit con-
figuration information with the serial
number of the relevant NX Unit to the
CPU Unit.
Attached Attached information 1: Unit number of the NX Unit where the error occurred
information Attached information 2: Serial number in the Unit configuration information of the NX Unit where the error occurred
Precautions/ None
Remarks
*1 This event code occurs for unit version 1.13 or later of the CPU Unit.
Event name NX Bus Function Processing Error Event code 44440000 hex *1
Meaning A fatal error was detected in the NX Bus Function Module.
Source NX Bus Function Module Source details Master Detection Continuously
timing
Error attributes Level Partial fault Recovery Cycle the power Log category System
supply to the
CPU Unit.
Effects User program Continues. Operation I/O communications will not operate and message com-
munications cannot be performed.
System-defined Variable Data type Name
variables None --- ---
Cause and Assumed cause Correction Prevention
correction An error occurred in the software. Contact your OMRON representative. None
Attached Attached information 1: System information
information Attached information 2: System information
Attached information 3: System information
Attached information 4: System information
Precautions/ None
Remarks
*1 This event code occurs for unit version 1.13 or later of the CPU Unit.
Event name NX Bus I/O Communications Stopped Due to Another Event code 85540000 hex *1
Event
Meaning The I/O communications on the NX bus were stopped based on the Fail-soft Operation Setting because an error that
triggers fail-soft operation occurred.
Source NX Bus Function Module Source details Master Detection Continuously
timing
Error attributes Level Partial fault Recovery Error reset Log category System
Effects User program Continues. Operation I/O communications will not operate, but message com-
12-2 Troubleshooting
munications can be performed.
System-defined Variable Data type Name
variables None --- ---
Cause and Assumed cause Correction Prevention
correction I/O refreshing was stopped based on Eliminate errors that trigger fail-soft To continue the I/O refreshing when
the Fail-soft Operation Setting. operation, which occurred before this an error that triggers fail-soft opera-
event. tion is encountered, change the Fail-
soft Operation Setting to Fail-soft.
Attached Attached information 1: Event code that triggered fail-soft operation
information Attached information 2: Unit number of the NX Unit where the error occurred 12
Precautions/ None
Remarks
Event name Registered NX Unit Not Mounted Event code 35920000 hex *1
Meaning There is no mounted NX Unit that exists in the Unit configuration information registered in the CPU Unit.
If there are more than one NX Unit relevant to this event, only the NX Unit that is nearest to the CPU Unit is registered
with the event.
Source NX Bus Function Module Source details Master Detection At CPU Unit
timing power ON, at
Controller reset,
or at NX bus
restart
Error attributes Level Minor fault Recovery Cycle the power Log category System
supply to the
CPU Unit, reset
the Controller, or
restart the NX
bus.
Effects User program Continues. Operation For NX Units with this error, I/O communications will not
operate and message communications cannot be per-
formed.
System-defined Variable Data type Name
variables None --- ---
Cause and Assumed cause Correction Prevention
correction There is no mounted NX Unit that To match the actual configuration with Match the project downloaded to the
exists in the Unit configuration infor- the Unit configuration information, CPU Unit with the system configura-
mation registered in the CPU Unit. mount the relevant NX Unit. To match tion.
the Unit configuration information with
the actual configuration, download to
the CPU Unit the Unit configuration
information from which you deleted
the relevant NX Unit.
The power supply to the Additional Turn ON the power supply to the Use the same Unit power supply to
NX Unit Power Supply Unit is not Additional NX Unit Power Supply supply the Unit power to the CPU
turned ON. Unit. Rack.
Attached Attached information 1: Unit number of the NX Unit where the error occurred
information
Precautions/ None
Remarks
*1 This event code occurs for unit version 1.13 or later of the CPU Unit.
12-2 Troubleshooting
Effects User program Continues. Operation For NX Units with this error, I/O communications will not
operate, but message communications can be performed.
System-defined Variable Data type Name
variables None --- ---
Cause and Assumed cause Correction Prevention
correction Initialization with the Unit configura- Connect the Sysmac Studio and Download the Unit configuration infor-
tion information registered in the CPU reconfigure the Unit configuration mation to the CPU Unit and the NX
Unit failed. information in the CPU Unit. Unit.
An NX Bus Communications Error Correct the NX Bus Communications Take preventive measures against
has occurred. Error. the NX Bus Communications Error. 12
The Channel Enable/Disable Setting Set the Channel Enable/Disable Set- For an Analog Unit, set the Channel
for all channels of the Analog Unit are ting to Enable for at least one chan- Enable/Disable Setting to Enable for
set to Disable. nel. at least one channel.
Event name NX Unit Restore Operation Failed Event code 103D0000 hex *1
Meaning The restore operation for an NX Unit ended in an error.
Source NX Bus Function Module Source details Master Detection During restore
timing operation
Error attributes Level Observation Recovery --- Log category System
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
12-2 Troubleshooting
None --- ---
Cause and Assumed cause Correction Prevention
correction There is also another error related to Check errors related to the NX Bus Restore the data when there are no
the NX Bus Function Module. Function Module and perform the NX bus errors.
required corrections.
An NX Bus Communications Error Implement countermeasures against
has occurred. the NX Bus Communications Error.
The backup data cannot be sent to an Reset the error for the relevant NX
NX Unit. Unit.
The Unit configuration in the backup Use an NX Unit revision that is the
file does not agree with the actual same or higher than the revision used
12
Unit configuration. when the data was backed up. If you
replace a slave with the Serial Num-
Event name NX Unit Event Log Save Error Event code 10620000 hex *1
Meaning Saving or reading the NX Unit event log failed.
Continuing to operate with this error may result in no event log saved at CPU Unit power OFF although it has no effect
on the control function.
Source NX Bus Function Module Source details Master Detection At CPU Unit
timing power ON or at
Controller reset
Error attributes Level Observation Recovery --- Log category System
Effects User program Continues. Operation Part or all of the past event log cannot be read.
System-defined Variable Data type Name
variables None --- ---
Cause and Assumed cause Correction Prevention
correction Data in the NX Unit event log area are If this error persists even after you None
invalid. cycle the power supply to the CPU
Unit, a hardware failure may occur in
the NX Unit event log area. Replace
the CPU Unit if you use the event logs
in the CPU Unit.
Attached Attached information 1: System information
information
Precautions/ None
Remarks
*1 This event code occurs for unit version 1.13 or later of the CPU Unit.
Event name User Program/Controller Configurations and Setup Trans- Event code 10200000 hex
fer Error
Meaning The user program or Controller Configurations and Setup were not transferred correctly.
Source PLC Function Module Source details None or I/O bus Detection At power ON or
master timing Controller reset
Error attributes Level Major fault Recovery Cycle the power Log category System
supply or reset
the Controller.
Effects User program Stops. Operation Stops.*
System-defined Variable Data type Name
variables
None --- ---
12-2 Troubleshooting
figurations and Setup are not correct Memory operation from the Sysmac the Controller during online editing.
because the power supply to the Con- Studio, transfer the project to the
troller was interrupted during online Controller with a restore operation
editing. from an SD Memory Card.
The user program or Controller Con- Do not interrupt the power supply to
figurations and Setup are not correct the Controller during a Clear All Mem-
because the power supply to the Con- ory operation.
troller was interrupted during a Clear
All Memory operation.
The user program or Controller Con- Do not interrupt the power supply to
figurations and Setup are not correct the Controller during a restore opera- 12
because the power supply to the Con- tion.
troller was interrupted during a
restore operation.
* For details, refer to I/O Operation for Major Fault Level Controller Errors on page 12-11.
Event name Illegal User Program Execution ID Event code 10210000 hex
Meaning The user program execution IDs set in the user program and in the CPU Unit do not match.
Source PLC Function Module Source details None Detection At user program
timing download, power
ON, or Controller
reset
Error attributes Level Major fault Recovery Cycle the power Log category System
supply or reset
the Controller.
Effects User program Stops. Operation Stops.*
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction
The user program execution IDs set Set the same user program execution Set the same user program execution
in the user program and in the CPU ID in the user program and CPU Unit. ID in the user program and CPU Unit.
Unit do not match. Keep a record of the user program
A user program execution ID is set in If user program execution ID is not set execution IDs set in the user program
and in the CPU Unit. They are not dis-
the CPU Unit but not in the user pro- in the user program, clear the user
played.
gram. program execution ID set in the CPU
Unit by clearing all memory in the
CPU Unit.
Attached None
information
Precautions/ None
Remarks
* For details, refer to I/O Operation for Major Fault Level Controller Errors on page 12-11.
* For details, refer to I/O Operation for Major Fault Level Controller Errors on page 12-11.
Event name Illegal User Program/Controller Configurations and Setup Event code 10250000 hex
Meaning The upper limit of the usable memory was exceeded or the user program or Controller Configurations and Setup is cor-
rupted.
Source PLC Function Module Source details None Detection At download,
timing power ON, or
Controller reset
Error attributes Level Major fault Recovery Cycle the power Log category System
12-2 Troubleshooting
supply or reset
the Controller.
Effects User program Stops. Operation Stops.*
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction
The upper limit of the data size was If an event on restrictions on the num- None
exceeded. ber of items used occurred at the
same time as this event, correct the
user program and settings so that the 12
number of items used is not
exceeded and then download the
* For details, refer to I/O Operation for Major Fault Level Controller Errors on page 12-11.
Event name Error in Starting Automatic Transfer Event code 10270000 hex*1
Meaning An error was detected in pre-execution checks for automatic transfer.
Source PLC Function Module Source details None Detection At power ON
timing
Error attributes Level Major fault Recovery Cycle the power Log category System
supply or reset
the Controller.
Effects User program Stops. Operation Stops.*2
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction An SD Memory Card is not inserted. Insert an SD Memory Card. Insert an SD Memory Card.
The SD Memory Card type is not cor- Replace the SD Memory Card with an Use an SD or SDHC card.
rect. SD or SDHC card.
The format of the SD Memory Card is Format the SD Memory Card with the Use a formatted SD Memory Card,
not correct. Sysmac Studio and then create an create an autoload folder on the SD
autoload folder and place the backup Memory Card, and place the backup
files in it. files in it. Also, do not remove the SD
Memory Card or turn OFF the power
There is no autoload folder on the SD Create an autoload folder on the SD
supply while the SD BUSY indicator is
Memory Card. Memory Card and place the backup
files in it. lit.
There are no backup files in the auto- Place the backup files in the autoload
load folder on the SD Memory Card. folder on the SD Memory Card.
Either the backup files in the autoload Replace the backup files in the auto-
folder on the SD Memory Card are load folder on the SD Memory Card. If
corrupted or required data is not in this error occurs again even after
the backup files on the SD Memory replacing the files, create the backup
Card. files again and place them in the auto-
load folder.
The unit version of the CPU Unit to Replace the CPU Unit with a CPU Make sure that the unit version of the
which to transfer the files is older than Unit that has a unit version that is the CPU Unit and the unit version of the
the unit version of the backup files on same as or newer than the unit ver- backup files are compatible.
the SD Memory Card. sion of the CPU that was used to cre-
ate the backup files. Or, place the
backup files with the correct unit ver-
sion for the CPU Unit in the autoload
folder.
Cause and The model of the CPU Unit to which Replace the CPU Unit with a CPU Make sure that the model of the CPU
correction to transfer the files is not the same as Unit that has the same model as the Unit is the same as the model of the
the model of the CPU Unit of the CPU Unit that was used to create the CPU Unit that was used to create the
backup files on the SD Memory Card. backup files. Or, place the backup backup files.
files with the same model of CPU Unit
in the autoload folder.
Recovery was executed for the SD If there are no backup files or no auto- None
Memory Card. matic transfer command file in the
autoload folder, place the files in the
12-2 Troubleshooting
folder again.
The CPU Unit is write-protected. If you use automatic transfers, select If you use automatic transfers, select
the Do not use Option for the Write the Do not use Option for the Write
protection at startup setting of the protection at startup setting of the
CPU Unit. CPU Unit.
The settings in the automatic transfer Make sure that the required files are Make sure that the required files are
command file (AutoloadCommand.ini) set to “Yes” in the automatic transfer set to “Yes” in the automatic transfer
are not correct. command file. command file.
Reading the data for automatic trans- Perform the same corrective mea- Perform the same preventive mea-
fer failed because the SD Memory sures as for when the format of the sures as for the following events: SD 12
Card is faulty or not formatted cor- SD Memory Card is not correct or the Memory Card Invalid Format or Faulty
rectly. SD Memory Card is damaged. SD Memory Card.
*1 This event code occurs for unit version 1.03 or later of the CPU Unit.
*2 For details, refer to I/O Operation for Major Fault Level Controller Errors on page 12-11.
Event name Error in Executing Automatic Transfer Event code 10280000 hex*1
Meaning The automatic transfer ended in an error.
Source PLC Function Module Source details None Detection At power ON
timing
Error attributes Level Major fault Recovery Cycle the power Log category System
supply or reset
the Controller.
Effects User program Stops. Operation Stops.*2
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction It was not possible to read the data for Format the SD Memory Card with the Do not remove the SD Memory Card
automatic transfer. Sysmac Studio and then create an or turn OFF the power supply while
autoload folder and place the backup the SD BUSY indicator is lit. Replace
files in it. the SD Memory Card periodically
according to the write life of the SD
Memory Card.
The SD Memory Card was removed Insert an SD Memory Card that con- Do not remove the SD Memory Card
during an automatic transfer. tains the backup files in an autoload during the automatic transfer.
folder, and then cycle the power sup-
ply to execute the automatic transfer
again.
There are no backup files in the auto- Create an autoload folder in the SD Use a formatted SD Memory Card,
load folder on the SD Memory Card. Memory Card and store the backup create an autoload folder in the SD
files in it. Memory Card, and store the backup
files in the folder. Do not turn OFF the
The backup files in the autoload Store the backup files in the autoload
folder on the SD Memory Card are folder again. If this error occurs again power supply or remove the SD Mem-
ory Card while the SD BUSY indicator
corrupted. even after replacing the files, create
is lit.
the backup files again and place them
in the autoload folder.
The SD Memory Card is damaged. If none of the above causes applies, Do not remove the SD Memory Card
replace the SD Memory Card. or turn OFF the power supply while
the SD BUSY indicator is lit. Replace
the SD Memory Card periodically
according to the write life of the SD
Memory Card.
Attached Attached Information 1: Error Details
information 0001 hex: The SD Memory Card was removed.
0102 hex: There are no backup files in the autoload folder on the SD Memory Card.
0103 hex: The backup files are corrupted.
0301 hex: Reading data for automatic transfer failed or the SD Memory Card is damaged.
Precautions/ None
Remarks
*1 This event code occurs for unit version 1.03 or later of the CPU Unit.
*2 For details, refer to I/O Operation for Major Fault Level Controller Errors on page 12-11.
Event name SD Memory Card Program Transfer Pre-execution Check Event code 10330000 hex *1
Error
Meaning An error was detected in pre-execution checks for transferring SD Memory Card programs.
Source PLC Function Module Source details None Detection Before SD Mem-
timing ory Card pro-
grams are
transferred after
a Controller reset
12-2 Troubleshooting
Error attributes Level Major fault Recovery Cycle the power- Log category System
supply or reset
the Controller.
Effects User program Stops. Operation Stops.*2
System-defined Variable Data type Name
variables
_Card1PrgTransferSta _sPRGTRANSFER_STA SD Memory Card Program Transfer
Status
Cause and Assumed cause Correction Prevention
correction
An SD Memory Card is not inserted. Insert an SD Memory Card. Insert an SD Memory Card.
12
The SD Memory Card type is not cor- Replace the SD Memory Card with an Use an SD or SDHC card.
rect. SD or SDHC card.
12-2 Troubleshooting
ferCmd.DirName system-defined variable.
0103 hex: The backup files are corrupted.
0104 hex: Required files are not set to transfer in the setting of the _Card1PrgTransferCmd system-defined vari-
able.
0105 hex: The required transfer data is not in the backup file.
0201 hex: The unit version of the CPU Unit is old.
0202 hex: The model numbers of the CPU Unit are not the same.
0203 hex: The CPU Unit is write-protected.
0211 hex: The database connection service or robot version of the CPU Unit is old.
0214 hex: The DIP switch on the CPU Unit is not set to allow starting the SD Memory Card program transfer. 12
0301 hex: Reading data for transferring the programs failed or the SD Memory Card is faulty.
Precautions/ None
*1 This event code occurs for unit version 1.11 or later of the CPU Unit.
*2 For details, refer to I/O Operation for Major Fault Level Controller Errors on page 12-11.
Event name Error in Executing SD Memory Card Program Transfer Event code 10340000 hex *1
Meaning The SD Memory Card program transfer ended in an error.
Source PLC Function Module Source details None Detection During SD Mem-
timing ory Card program
transfers
Error attributes Level Major fault Recovery Cycle the power- Log category System
supply or reset
the Controller.
Effects User program Stops. Operation Stops.*2
System-defined Variable Data type Name
variables _Card1PrgTransferSta _sPRGTRANSFER_STA SD Memory Card Program Transfer
Status
Cause and Assumed cause Correction Prevention
correction
It was not possible to read the data for Format the SD Memory Card with the Do not remove the SD Memory Card
SD Memory Card program transfers. Sysmac Studio, create a folder speci- or turn OFF the power supply while
fied by the _Card1PrgTransfer- the SD BUSY indicator is lit. Or,
Cmd.DirName system-defined replace the SD Memory Card periodi-
variable on the card, and store the cally according to the write life of the
backup files in the folder. SD Memory Card.
The SD Memory Card was removed Insert an SD Memory Card that con- Do not remove the SD Memory Card
during a SD Memory Card program tains the backup files in the folder during the SD Memory Card program
transfer. specified by the _Card1PrgTransfer- transfer.
Cmd.DirName system-defined vari-
able, and then cycle the power supply
to execute the SD Memory Card pro-
gram transfer again.
There are no backup files in such a Create a folder specified by the Use a formatted SD Memory Card,
folder on the SD Memory Card as _Card1PrgTransferCmd.DirName create a folder specified by the
specified by the _Card1PrgTransfer- system-defined variable on the SD _Card1PrgTransferCmd.DirName
Cmd.DirName system-defined vari- Memory Card and store the backup system-defined variable on the card,
able. files in the folder. and store the backup files in the
folder.
The backup files in such a folder on Replace the backup files in the folder
the SD Memory Card as specified by specified by the _Card1PrgTransfer- Also, do not remove the SD Memory
the _Card1PrgTransferCmd.DirName Cmd.DirName system-defined vari- Card or turn OFF the power supply
system-defined variable are cor- able. If this error occurs again even while the SD BUSY indicator is lit.
rupted. after replacing the files, create the
backup files again and place them in
the folder specified by the _Card1Prg-
TransferCmd.DirName system-
defined variable.
The SD Memory Card is damaged. If none of the above causes applies, Do not remove the SD Memory Card
replace the SD Memory Card. or turn OFF the power supply while
the SD BUSY indicator is lit. Or,
replace the SD Memory Card periodi-
cally according to the write life of the
SD Memory Card.
Attached Attached Information 1: Error Details
information 0001 hex: The SD Memory Card was removed.
0102 hex: There are no backup files in such a folder on the SD Memory Card as specified by the _Card1PrgTrans-
ferCmd.DirName system-defined variable.
0103 hex: The backup files are corrupted.
0301 hex: Reading data for transferring the SD Memory Card programs failed or the SD Memory Card is faulty.
Precautions/ None
Remarks
*1 This event code occurs for unit version 1.11 or later of the CPU Unit.
*2 For details, refer to I/O Operation for Major Fault Level Controller Errors on page 12-11.
Event name PLC Function Processing Error Event code 40110000 hex
Meaning A fatal error was detected in the PLC Function Module.
Source PLC Function Module Source details None Detection Continuously
timing
Error attributes Level Major fault Recovery Cycle the power Log category System
supply.
Effects User program Stops. Operation Stops.*
12-2 Troubleshooting
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction
An error occurred in the software. Contact your OMRON representative. None
Attached Attached information 1: System information
information Attached Information 2: System information
Attached information 3: System information
Attached information 4: System information
Precautions/ None 12
Remarks
* For details, refer to I/O Operation for Major Fault Level Controller Errors on page 12-11.
*1 This event code occurs for unit version 1.02 or earlier of the CPU Unit.
*2 For details, refer to I/O Operation for Major Fault Level Controller Errors on page 12-11.
Event name PLC Function Processing Error Event code 44420000 hex*1
Meaning A fatal error was detected in the PLC Function Module.
Source PLC Function Module Source details None Detection Continuously
timing
Error attributes Level Major fault Recovery Cycle the power Log category System
supply or reset
the Controller.
Effects User program Stops. Operation Stops.*2
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction An error occurred in the software. Contact your OMRON representative. None
Attached Attached information 1: System information
information Attached Information 2: System information
Attached information 3: System information
Attached information 4: System information
Precautions/ None
Remarks
*1 This event code occurs for unit version 1.05 or later of the CPU Unit.
*2 For details, refer to I/O Operation for Major Fault Level Controller Errors on page 12-11.
Event name PLC Function Processing Error Event code 40120000 hex
Meaning A fatal error was detected in the PLC Function Module.
Source PLC Function Module Source details None Detection Continuously
timing
Error attributes Level Partial fault Recovery Cycle the power Log category System
supply.
Effects User program Stops. Operation Stops.*
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction An error occurred in the software. Contact your OMRON representative. None
Attached Attached information 1: System information
information Attached Information 2: System information
Attached information 3: System information
Attached information 4: System information
Precautions/ None
Remarks
* Operation is the same as for a major fault level error. For details, refer to I/O Operation for Major Fault Level Controller
Errors on page 12-11.
Event name PLC Function Processing Error Event code 40130000 hex
Meaning A fatal error was detected in part of the PLC Function Module.
Source PLC Function Module Source details None Detection Continuously
timing
Error attributes Level Minor fault Recovery Cycle the power Log category System
supply or reset
the Controller.
12-2 Troubleshooting
Effects User program Continues. Operation Operation is not affected.
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction An error occurred in the software. Contact your OMRON representative. None
Attached Attached information 1: System information
information Attached Information 2: System information
Attached information 3: System information
Attached information 4: System information 12
Precautions/ None
Remarks
Event name Trace Setting Transfer Failure Event code 10260000 hex
Meaning The power supply was interrupted while transferring the trace settings.
Source PLC Function Module Source details None Detection At power ON or
timing Controller reset
Error attributes Level Observation Recovery Cycle the power Log category System
supply or reset
the Controller.
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction The power supply was interrupted Transfer the trace settings again. Do not interrupt the power supply
while transferring the trace settings. while transferring the trace settings.
Attached None
information
Precautions/ All trace settings are initialized when this error occurs.
Remarks
12-2 Troubleshooting
The SD Memory Card is write pro- Remove write protection from the SD Make sure that the SD Memory Card
tected. Memory Card. is not write protected.
The Prohibiting backing up data to the Change the setting of the Prohibiting Set the Prohibiting backing up data to
SD Memory Card parameter is set to backing up data to the SD Memory the SD Memory Card parameter to
prohibit backing up data to an SD Card parameter to enable backing up enable backing up data to an SD
Memory Card. data to an SD Memory Card. Memory Card.
Another backup operation is in prog- Wait for the other backup operation to Do not attempt to perform other
ress. end and then perform the backup backup operation during a backup
operation again. operation.
Synchronization, online editing, or the Wait for the synchronization, online Do not attempt to perform a backup
12
Clear All Memory operation is in prog- editing, or the Clear All Memory oper- operation during a synchronization,
ress. ation to end and then perform the online editing, or the Clear All Mem-
* This event code occurs for unit version 1.03 or later of the CPU Unit.
* This event code occurs for unit version 1.03 or later of the CPU Unit.
Event name Restore Operation Failed to Start Event code 102B0000 hex*
Meaning An error was detected in pre-execution checks for a restore operation.
Source PLC Function Module Source details None Detection When restoring
timing data is specified
by the user
12-2 Troubleshooting
Error attributes Level Observation Recovery --- Log category System
Effects User program --- Operation Not affected.
System-defined Variable Data type Name
variables
Specification with system-defined variables
_Card1RestoreSta _sRESTORE_STA SD Memory Card Restore Status
12
Cause and The SD Memory Card is damaged. If none of the above causes applies, Do not remove the SD Memory Card
correction replace the SD Memory Card. or turn OFF the power supply while
the SD BUSY indicator is lit. Replace
the SD Memory Card periodically
according to the write life of the SD
Memory Card.
The database connection service ver- Replace the CPU Unit with a CPU Make sure that the database connec-
sion of the CPU Unit to which to Unit that has a database connection tion service version of the CPU Unit
restore the files is older than the data- service version that is the same as or and the database connection service
12-2 Troubleshooting
base connection service version of newer than the database connection version of the backup files are com-
the backup files on the SD Memory service version of the CPU Unit that patible.
Card. was used to create the backup files.
Or, specify backup files with the cor-
rect database connection service ver-
sion for the CPU Unit.
The robot version of the CPU Unit to Replace the CPU Unit with a CPU Make sure that the robot version of
which to restore the files is older than Unit that has a robot version that is the CPU Unit and the robot version of
the robot version of the backup files the same as or newer than the robot the backup files are compatible.
on the SD Memory Card. version of the CPU Unit that was used
to create the backup files. Or, specify
12
backup files with the correct robot
version for the CPU Unit.
* This event code occurs for unit version 1.03 or later of the CPU Unit.
12-2 Troubleshooting
variables _Card1RestoreSta _sRESTORE_STA SD Memory Card Restore Status
Cause and Assumed cause Correction Prevention
correction
It was not possible to read the data to Format the SD Memory Card with the Do not remove the SD Memory Card
restore. Sysmac Studio and then place the or turn OFF the power supply while
backup files on it. the SD BUSY indicator is lit. Replace
the SD Memory Card periodically
according to the write life of the SD
Memory Card.
The SD Memory Card was removed Insert an SD Memory Card that con- Do not remove the SD Memory Card 12
during a restore operation. tains the backup files, and then exe- during the restore operation.
cute the restore operation again.
Failed to restore Unit or slave. Refer to the corrections for the follow- Refer to the prevention information for
* This event code occurs for unit version 1.03 or later of the CPU Unit.
Event name SD Memory Card Program Transfer Failed to Start Event code 1032 0000 hex *1
Meaning An error was detected in pre-start checks for transferring SD Memory Card programs.
Source PLC Function Module Source details None Detection When transfer-
timing ring SD Memory
Card programs is
started
Error attributes Level Observation Recovery --- Log category System
Effects User program --- Operation Not affected.
System-defined Variable Data type Name
variables
_Card1PrgTransferSta _sPRGTRANSFER_STA SD Memory Card Program Transfer
Status
Cause and Assumed cause Correction Prevention
correction Program transfer by system-defined Set Program transfer by system- Set Program transfer by system-
variable is set to Do not use in the defined variable to Use in the Control- defined variable to Use in the Control-
Controller Setup. ler Setup. ler Setup.
Password of Program transfer by sys- Set Password of Program transfer by Set Password of Program transfer by
tem-defined variable in the Controller system-defined variable in the Con- system-defined variable in the Con-
Setup does not agree with the troller Setup to the _Card1PrgTrans- troller Setup to the _Card1PrgTrans-
_Card1PrgTransferCmd.Password ferCmd.Password system-defined ferCmd.Password system-defined
system-defined variable. variable. variable.
The DIP switch on the CPU Unit is not Turn OFF all pins on the DIP switch of Turn OFF all pins on the DIP switch of
set to allow starting the SD Memory the CPU Unit, and then start the SD the CPU Unit, and then start the SD
Card program transfer. Memory Card program transfer. Memory Card program transfer.
An SD Memory Card is not inserted. Insert an SD Memory Card. Insert an SD Memory Card.
The SD Memory Card type is not cor- Replace the SD Memory Card with an Use an SD or SDHC card.
rect. SD or SDHC card.
The format of the SD Memory Card is Format the SD Memory Card with the Use a formatted SD Memory Card,
not correct. Sysmac Studio, create a folder speci- create a folder specified by the
fied by the _Card1PrgTransfer- _Card1PrgTransferCmd.DirName
Cmd.DirName system-defined system-defined variable on the card,
variable on the card, and store the and store the backup files in the
backup files in the folder. folder.
There is no such folder on the SD Create a folder specified by the Also, do not remove the SD Memory
Memory Card as specified by the _Card1PrgTransferCmd.DirName Card or turn OFF the power supply
_Card1PrgTransferCmd.DirName sys- system-defined variable on the SD while the SD BUSY indicator is lit.
tem-defined variable. Memory Card and store the backup
There are no backup files in such a files in the folder.
folder on the SD Memory Card as
specified by the _Card1PrgTransfer-
Cmd.DirName system-defined vari-
able.
Either the backup files in the folder Replace the backup files in the folder
specified by the _Card1PrgTransfer- specified by the _Card1PrgTransfer-
Cmd.DirName system-defined vari- Cmd.DirName system-defined vari-
able on the SD Memory Card are able.
corrupted or required data is not in the If this error occurs again even after
backup files on the SD Memory Card. replacing the files, create the backup
files again and place them in the
folder specified by the _Card1Prg-
TransferCmd.DirName system-
defined variable.
12-2 Troubleshooting
_Card1PrgTransferCmd.DirName
system-defined variable.
The model of the CPU Unit to which to Replace the CPU Unit with a CPU Make sure that the model of the CPU
transfer the files is not the same as Unit that has the same model as the Unit is the same as the model of the
the model of the CPU Unit of the CPU Unit that was used to create the CPU Unit that was used to create the
backup files on the SD Memory Card. backup files. backup files.
Or, place the backup files with the
correct model for the used CPU Unit,
in the folder specified by the
_Card1PrgTransferCmd.DirName 12
system-defined variable.
The CPU Unit is write-protected. If you transfer SD Memory Card pro- If you transfer SD Memory Card pro-
grams, select the Do not use Option grams, select the Do not use Option
*1 This event code occurs for unit version 1.11 or later of the CPU Unit.
Event name Restore Pre-execution Check Failure Event code 103E0000 hex*1
Meaning An error was detected in pre-execution checks for specification with system-defined variables for the SD Memory Card
restore operation.
Source PLC Function Module Source details None Detection Before the
timing restore operation
after a Controller
reset in Restore
by system-
12-2 Troubleshooting
defined variable
Error attributes Level Observation Recovery --- Log category System
Effects User program Continues. Operation Not affected.
Precautions/ None
Remarks
*1 This event code occurs for unit version 1.14 or later of the CPU Unit
12-2 Troubleshooting
12
* This event code occurs for unit version 1.03 or later of the CPU Unit.
12-2 Troubleshooting
Effects User program Continues. Operation ---
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction The communications cable is broken. Check the communications cable and Check the communications cable to
replace it if it is broken. see if it is operating properly.
Attached The communications cable connec- Reconnect the connector and make Make sure the communications cable
information tor is disconnected. sure it is mated correctly. is connected properly.
12
The NX message communications Reduce the number of times that Reduce the number of times that
load is high. instructions are used to send NX instructions are used to send NX
messages. Or, increase the value of messages. Or, increase the value of
* This event code occurs for unit version 1.05 or later of the CPU Unit.
* This event code occurs for unit version 1.05 or later of the CPU Unit.
Event name User Program/Controller Configurations and Setup Down- Event code 90050000 hex*
loaded
Meaning The user program and the Controller configurations and setup were downloaded.
Source PLC Function Module Source details None Detection During user pro-
timing gram/Controller
configurations
and setup down-
load
12-2 Troubleshooting
Error attributes Level Information Recovery --- Log category Access
Effects User program Continues. Operation Operation starts according to the user program and the
Controller setup data that were downloaded.
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction The user program and the Controller --- ---
configurations and setup were down-
loaded. 12
Attached Attached Information 1: Connection method
information 1: Direct USB connection
* This event code occurs for unit version 1.10 or later of the CPU Unit.
* This event code occurs for unit version 1.10 or later of the CPU Unit.
Event name Variable Changed to TRUE with Forced Refreshing Event code 90080000 hex
Meaning Changing a variable to TRUE with forced refreshing was specified.
Source PLC Function Module Source details None Detection Commands from
timing user
Error attributes Level Information Recovery --- Log category Access
Effects User program Continues. Operation Operation is performed according to the forced refreshing
values.
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction
Changing a variable to TRUE with --- ---
forced refreshing was specified by the
user.
Attached None
information
Precautions/ None
Remarks
Event name Variable Changed to FALSE with Forced Refreshing Event code 90090000 hex
Meaning Changing a variable to FALSE with forced refreshing was specified.
Source PLC Function Module Source details None Detection Commands from
timing user
Error attributes Level Information Recovery --- Log category Access
Effects User program Continues. Operation Operation is performed according to the forced refreshing
values.
System-defined Variable Data type Name
variables None --- ---
Cause and Assumed cause Correction Prevention
correction
Changing a variable to FALSE with --- ---
forced refreshing was specified by the
user.
Attached None
information
Precautions/ None
Remarks
Event name All Forced Refreshing Cleared Event code 900A0000 hex
Meaning Clearing all forced refreshing values was specified.
Source PLC Function Module Source details None Detection Commands from
timing user
Error attributes Level Information Recovery --- Log category Access
Effects User program Continues. Operation Forced refreshing values are all cleared and operation is
performed according to the user program.
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction
Clearing all forced refreshing values --- ---
was specified by the user.
Attached None
information
Precautions/ None
Remarks
12-2 Troubleshooting
variables None --- ---
Cause and Assumed cause Correction Prevention
correction
A user with Administrator rights --- ---
cleared all of the memory.
Attached None
information
Precautions/ None
Remarks
12
Event name Event Log Cleared Event code 900C0000 hex
* This event code occurs for unit version 1.03 or later of the CPU Unit.
12-2 Troubleshooting
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction
A command to stop operation was --- ---
received.
Attached Attached information 1: Device Output Hold Status
information 1: Retained.
2: Not retained.
12
Precautions/ None
Remarks
Event name User Program Execution ID Write Event code 90160000 hex
Meaning The user program execution ID was set or changed in the CPU Unit.
Source PLC Function Module Source details None Detection When download-
timing ing
Error attributes Level Information Recovery --- Log category Access
Effects User program Continues. Operation Not affected.
System-defined Variable Data type Name
variables None --- ---
Cause and Assumed cause Correction Prevention
correction
A user with Administrator rights --- ---
changed the user program execution
ID that is set in the CPU Unit.
Attached None
information
Precautions/ None
Remarks
Event name All Controller Errors Cleared Event code 90180000 hex
Meaning All current errors were cleared.
Source PLC Function Module Source details None Detection Commands from
timing user
Error attributes Level Information Recovery --- Log category Access
Effects User program Continues. Operation Clearing all errors for which the causes have been
removed.
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction
The user cleared all current errors. --- ---
Attached None
information
Precautions/ None
Remarks
* This event code occurs for unit version 1.03 or later of the CPU Unit.
12-2 Troubleshooting
variables None --- ---
Cause and Assumed cause Correction Prevention
correction
The backup operation ended nor- --- ---
mally.
Attached Attached information 1: Operation type
information 0101 hex: Controller to SD Memory Card for switch operation on front of CPU Unit
0102 hex: Controller to SD Memory Card for system variable operation
0103 hex: Controller to SD Memory Card for Sysmac Studio operation 12
0104 hex: Controller to SD Memory Card for instruction operation
0201 hex: Controller to computer
* This event code occurs for unit version 1.03 or later of the CPU Unit.
* This event code occurs for unit version 1.03 or later of the CPU Unit.
* This event code occurs for unit version 1.03 or later of the CPU Unit.
Event name SD Memory Card Program Transfer Started Event code 90200000 hex *1
Meaning Transferring the SD Memory Card programs was started.
Source PLC Function Module Source details None Detection When transfer-
timing ring SD Memory
Card programs is
started
Error attributes Level Information Recovery --- Log category System
Effects User program --- Operation Not affected.
System-defined Variable Data type Name
variables None --- ---
Cause and Assumed cause Correction Prevention
correction Transferring the SD Memory Card --- ---
programs was started.
Attached None
information
Precautions/ None
Remarks
*1 This event code occurs for unit version 1.11 or later of the CPU Unit.
Event name SD Memory Card Program Transfer Completed Event code 90210000 hex *1
Meaning Transferring the SD Memory Card programs was completed.
Source PLC Function Module Source details None Detection When transfer-
timing ring SD Memory
Card programs is
completed
Error attributes Level Information Recovery --- Log category System
12-2 Troubleshooting
Effects User program --- Operation Not affected.
System-defined Variable Data type Name
variables _Card1PrgTransferSta _sPRGTRANSFER_STA SD Memory Card Program Trans-
fer Status
Cause and Assumed cause Correction Prevention
correction
Transferring the SD Memory Card --- ---
programs was completed.
Attached None
information
Precautions/ None 12
Remarks
*1 This event code occurs for unit version 1.11 or later of the CPU Unit.
Event name CPU Bus Unit Setup Area Error Event code 14010000 hex
Meaning An error was detected in the memory check of the Setup Area for CPU Bus Units.
Source PLC Function Module Source details None Detection At power ON, at
timing Controller reset,
or when writing
CPU Bus Unit
Setup Area
Error attributes Level Minor fault Recovery Error reset or Log category System
cycling power
supply
Effects User program Continues. Operation The CPU Bus Unit may stop.
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction The power supply to the Controller Clear all memory or download the Do not interrupt the power supply to
was interrupted or communications CPU Bus Unit Settings. If this error the Controller or disconnect commu-
with the Sysmac Studio were discon- persists, replace the CPU Unit. nications with the Sysmac Studio
nected while downloading the CPU while downloading the CPU Bus Unit
Bus Unit Settings. Settings.
Attached None
information
Precautions/ None
Remarks
Event name IP Address Table Setting Error Event code 34100000 hex
Meaning The IP address table settings are incorrect.
Source PLC Function Module Source details None Detection At power ON,
timing Controller reset,
or restart of built-
in Ethernet port
Error attributes Level Minor fault Recovery Error reset Log category System
Effects User program Continues. Operation FINS/UDP communications will not operate.
System-defined Variable Data type Name
variables None --- ---
Cause and Assumed cause Correction Prevention
correction
The IP address conversion method is Correct the IP address table settings. Set the IP address table correctly.
set to the combined method or the IP
address table method, but the IP
address table settings are incorrect.
Attached None
information
Precautions/ None
Remarks
Event name FINS/TCP Connection Table Setting Error Event code 34130000 hex
Meaning The FINS/TCP connection table is incorrect.
Source PLC Function Module Source details None Detection At power ON,
timing Controller reset,
or restart of built-
in Ethernet port
Error attributes Level Minor fault Recovery Error reset Log category System
12-2 Troubleshooting
Effects User program Continues. Operation FINS/UDP communications will not operate.
System-defined Variable Data type Name
variables
None --- ---
Cause and Assumed cause Correction Prevention
correction The power supply to the Controller Download the FINS/TCP connection Do not interrupt the power supply to
was interrupted or communications table again. the Controller or disconnect commu-
with the Sysmac Studio were discon- nications with the Sysmac Studio
nected while downloading the while downloading the FINS/TCP
FINS/TCP connection table. connection table.
12
Attached None
information
Precautions/ None
12-2 Troubleshooting
variables None --- ---
Cause and Assumed cause Correction Prevention
correction
1. An attempt was made to send a Do not send a FINS response with Set the FINS message at the source
FINS response with over 2002 over 2002 bytes. correctly.
bytes.
2. An attempt was made to route a
FINS response with over 2002
bytes.
3. Packet was received with a No Check the FINS message at the 12
Such Unit routing error. source and correct the unit number in
the response frame or a command
frame that does not require a
Security Errors
12-2 Troubleshooting
1 Forgot the Administrator password. You cannot access the Administrator’s password. Always
record the Administrator password so that you do not for-
get it.
2 Cannot release the operation lock with Log in with verification authority that is equal to or higher
the Sysmac Studio. than the verification rights when you connected online.
3 Operation was locked when verifying If the password for verification of operation authority is
operation authority on the Sysmac entered incorrectly five time in row, operation is locked for
Studio. 10 minutes. Wait until the operation lock is released.
4 An online connection was made with Verification of operation authority is required every time 12
the operation authority that is required for the following functions to prevent hazards to equip-
for operation, but operation authority ment and people.
verification was requested for a spe-
A-1 Specifications
This section gives the specifications of the NJ/NX-series Controllers.
A-1 Specifications
A-1-2 Performance Specifications
NX701- NX1P2- NJ501- NJ301- NJ101-
Item
0.37 ns or more 3.3 ns 1.2 ns (1.9 ns 2.0 ns (3.0 ns 3.3 ns (5.0 ns
LD instruction
Process-
Instruction
execution
or less)*1 or less) or less)
A
ing time Math instructions (for long 3.2 ns or more 70 ns or more 42 ns or more 70 ns or more
times 26 ns or more*2
real data)
Size 80 MB 1.5 MB 20 MB 5 MB 3 MB
A-1 Specifications
Range of node addresses that can be set 1 to 512 1 to 192
Inputs: 11,472 Inputs: 1,434 bytes Inputs: 5,736 bytes
bytes Outputs: 1,434 bytes Outputs: 5,736 bytes
Outputs: 11,472 However, the maxi- However, the maximum number of process data
bytes mum number of pro- frames is 4.
Maximum process data size
However, the cess data frames is 1.
Built-in maximum num-
Ether- ber of process
CAT port data frames is 8.
250 µs to 8 ms
(in 250-µs incre-
ments)
Communications cycle
• Priority-5 peri-
odic task
125 µs
250 µs to 100
ms (in 250-µs
increments)
Sync jitter 1 µs max.
--- Half duplex (when ---
connected to the
Communications method
Serial Communica-
tions Option Board)
--- Start-stop synchroni- ---
zation (when con-
Serial
Synchronization method nected to the Serial
commu-
Communications
nications
Option Board)
--- 1.2/2.4/4.8/9.6/19.2/3 ---
8.4/57.6/115.2 kbps
Baud rate (when connected to
the Serial Communi-
cations Option Board)
Note Items that are marked with asterisks in the table are improvements that were made during version upgrades. Refer to A-
14 Version Information for NX-series Controllers and A-15 Version Information for NJ-series Controllers for information
on version upgrades.
NX701-
Item
17 16
Maximum number of controlled axes 256 axes 128 axes
Motion control axes 256 axes 128 axes
Single-axis position ---
control axes
Maximum number of used real axes 256 axes 128 axes
Number of Used motion control 256 axes 128 axes
controlled servo axes
axes*1 Used single-axis posi- ---
tion control servo
A-1 Specifications
axes
Maximum number of axes for linear 4 axes per axes group
interpolation axis control
Number of axes for circular interpola- 2 axes per axes group
tion axis control
Maximum number of axes groups 64 axes groups
Motion control period The same control period as that is used for the process data communications cycle for EtherCAT.
Number of Maximum points per 65,535 points
Cams
cam data
points
cam table A
Maximum points for 1,048,560 points
all cam tables
Maximum number of cam tables 640 tables
*1 Refer to the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507) for descriptions of axes.
NX1P2-
Item
11 10 90
Maximum number of controlled axes 12 axes 10 axes 4 axes
Motion control axes 8 axes 6 axes ---
Single-axis position 4 axes
control axes
Maximum number of used real axes 8 axes 6 axes 4 axes
Number of Used motion control 4 axes 2 axes ---
controlled servo axes
axes*1 Used single-axis posi- 4 axes
tion control servo
axes
Maximum number of axes for linear 4 axes per axes group ---
interpolation axis control
Number of axes for circular interpola- 2 axes per axes group ---
tion axis control
Maximum number of axes groups 8 axes groups ---
Motion control period The same as for the primary periodic task.
Number of Maximum points per 65,535 points ---
cam data cam table
Cams points
Maximum points for 262,140 points
all cam tables
Maximum number of cam tables 80 tables
Position units Pulse, mm, µm, nm, degree, and inch
Override factors 0.00%, or 0.01% to 500.00%
*1 Refer to the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507) for descriptions of axes.
NJ501-
Item
5 4 3
Maximum number of controlled axes 64 axes 32 axes 16 axes
Motion control axes 64 axes 32 axes 16 axes
Single-axis position ---
control axes
Maximum number of used real axes 64 axes 32 axes 16 axes
Number of Used motion control 64 axes 32 axes 16 axes
controlled servo axes
axes*1 Used single-axis posi- ---
tion control servo
axes
Maximum number of axes for linear 4 axes per axes group
interpolation axis control
Number of axes for circular interpola- 2 axes per axes group
tion axis control
Maximum number of axes groups 32 axes groups
Motion control period The same control period as that is used for the process data communications cycle for EtherCAT.
Number of Maximum points per 65,535 points
cam data cam table
Cams points
Maximum points for 1,048,560 points
all cam tables
Maximum number of cam tables 640 tables
Position units Pulse, mm, µm, nm, degree, and inch
Override factors 0.00%, or 0.01% to 500.00%
*1 Refer to the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507) for descriptions of axes.
NJ301-
Item
12 11
Maximum number of controlled axes 15 axes (*)
Motion control axes 15 axes (*)
Single-axis position ---
control axes
Maximum number of used real axes 8 axes 4 axes
Number of Used motion control 8 axes 4 axes
controlled servo axes
axes*1 Used single-axis posi- ---
tion control servo
axes
Maximum number of axes for linear 4 axes per axes group
interpolation axis control
Number of axes for circular interpola- 2 axes per axes group
tion axis control
Maximum number of axes groups 32 axes groups
Motion control period The same control period as that is used for the process data communications cycle for EtherCAT.
Number of Maximum points per 65,535 points
cam data cam table
Cams points
Maximum points for 262,140 points
all cam tables
Maximum number of cam tables 160 tables
Position units Pulse, mm, µm, nm, degree, and inch
Override factors 0.00%, or 0.01% to 500.00%
*1 Refer to the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507) for descriptions of axes.
Note Items that are marked with asterisks in the table are improvements that were made during version upgrades. Refer to A-14 Version Information for NX-
series Controllers and A-15 Version Information for NJ-series Controllers for information on version upgrades.
NJ101-
Item
10 90
Maximum number of controlled axes 6 axes ---
Motion control axes 6 axes ---
Single-axis position ---
control axes
Maximum number of used real axes 2 axes ---
Number of Used motion control 2 axes ---
controlled servo axes
axes*1 Used single-axis posi- ---
tion control servo
axes
A-1 Specifications
Maximum number of axes for linear 4 axes per axes group ---
interpolation axis control
Number of axes for circular interpola- 2 axes per axes group ---
tion axis control
Maximum number of axes groups 32 axes groups ---
Motion control period The same control period as that is used for the ---
process data communications cycle for Ether-
CAT.
Number of Maximum points per 65,535 points ---
cam data cam table A
Cams points
Maximum points for 262,140 points ---
all cam tables
*1 Refer to the NJ/NX-series CPU Unit Motion Control User’s Manual (Cat. No. W507) for descriptions of axes.
A-1 Specifications
A derivative data type that enables access to the same data with different data
Function
types.
Maximum 4
Union number of
Pro- members
gram- Member data BOOL, BYTE, WORD, DWORD, and LWORD
ming types
Enumer- A derivative data type that uses text strings called enumerators to express variable
Function
ation values.
An array is a group of elements with the same data type. You specify the number A
Function
(subscript) of the element from the first element to specify the element.
Maximum 3
A-1 Specifications
group errors
Enabling axes Motion of an axes group is enabled.
groups
Axes groups Disabling axes Motion of an axes group is disabled.
groups
Auxil-
Stopping axes All axes in interpolated motion are decelerated to a stop.
iary groups
func-
Immediately All axes in interpolated motion are stopped immediately.
tions for
multi-
stopping axes A
axes groups
coordi- Setting axes The blended target velocity is changed during interpolated motion.
nated group override
A-1 Specifications
applica-
CoE
Commu- tion pro-
nica- tocol
tions --- Host link (FINS), ---
no-protocol, and
Modbus-RTU
Serial com- master (when
Protocol
munications connected to the
Serial Commu-
nications Option A
Board)
FTP client instructions, CIP com- FTP client instructions (*), CIP communications
A-1 Specifications
Verification of operation Online operations can be restricted by operation rights to prevent damage to equip-
authority ment or injuries that may be caused by operating mistakes.
Number of 5
groups (*)
Verification of user pro- The user program cannot be executed without entering a user program execution
gram execution ID ID from the Sysmac Studio for the specific hardware (CPU Unit).
Storage type SD card or SDHC card
Automatic transfer from When the power supply to the Controller is turned ON, the data that is stored in the
SD Memory Card (*) autoload directory of the SD Memory Card is transferred to the Controller. A
SD Program transfer from SD With the specification of the system-defined variable, you can transfer a program
Mem-
Memory Card (*) that is stored in the SD Memory Card to the Controller.
ory
Note Items that are marked with asterisks in the table were added for version upgrades. Refer to A-14 Version Information for
NX-series Controllers and A-15 Version Information for NJ-series Controllers for information on version upgrades.
You must use the physical Controller to check the real processing times of tasks and task execution
times. For details, refer to 5-11 Task Design Methods and I/O Response Times.
Additional Information
Periodic tasks may be interrupted for the execution of tasks with higher execution priorities. The
real processing time of a task does not include the time for which the task is interrupted. It is the
task execution time that gives the actual time from when the task is started until it is finished,
including the interrupted time. For a detailed description of the differences between the real pro-
cessing times of tasks and the task execution times, refer to Meaning of the Task Execution Time
and the Real Processing Time of the Task on page 5-110.
Priority-17
Guidelines are provided below for calculating the various processing times.
The formula for calculating the EtherCAT slave processing time is different between the primary peri-
odic task and the priority-5 periodic task.
The following describes how to determine the EtherCAT slave processing time for each type of tasks.
Additional Information
The EtherCAT slave processing time is 0 in tasks to which EtherCAT slaves are not assigned.
EtherCAT slave processing time [µs] = 0.0006 × pDout + 0.0001 × pDin + 0.082 × pDinout
+ (1.24 × Snum + 0.01 × Clen) + 25.58
pDout : Total output processing data size [byte] of EtherCAT slaves assigned to the primary
periodic task or the priority-16 periodic task
pDin : Total input processing data size [byte] of EtherCAT slaves assigned to the primary
periodic task or the priority-16 periodic task
pDinout : Total of the larger of the input and output processing data size of each EtherCAT
slave assigned to the primary periodic task or the priority-16 periodic task [byte]
Snum : Total number of EtherCAT slaves connected to the built-in EtherCAT port
Clen : Total length of cables connected to the built-in EtherCAT port [m]
EtherCAT slave processing time [µs] = 0.0006 × pDout + (Larger of the following A and B)
+ sTsend + 0.0001 × sDin + 16
Simple Estimate
For the number of instructions in each group, read the execution time for each instruction group
from the following graphs and calculate the total.
• Execution time for standard instructions
• Execution time for arithmetic instructions for LREAL data
• Execution time for trigonometric instructions for LREAL data
This will allow you to estimate the execution time of the user program.
900
800
Execution time (µs)
700
600
500
400
300
200
NX701-
100
0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000
Total number of instructions
Percent of
Percent of execution
Types of instructions Instructions instructions time in
[%] instruction
group [%]
Ladder diagram instructions LD, AND, OUT, SET, and RESET 81.0% 40.2%
Comparison instructions EQ and LT 4.1% 8.3%
Timer and counter instructions Timer, TON/TOF, and CTU/CTD 1.6% 7.3%
Math instructions +, -, *, /, ADD, SUB, MUL, and DIV 2.4% 6.5%
BCD conversion instructions and INT_TO_DINT and WORD_BC- 0.2% 1.2%
data conversion instructions D_TO_UINT
270
240
Execution time (µs)
210
NX701-
180
150
120
A
90
0 300 600 900 1200 1500 1800 2100 2400 2700 3000
Total number of instructions
Trigonometric instructions for LREAL data Arithmetic instructions for LREAL data
900
800
Execution time (µs)
700
600
500
400
300
NX701-
200
100
270
240
Execution time (µs)
210
NX701-
180
150
120
90
60
NX701-
30
0 300 600 900 1200 1500 1800 2100 2400 2700 3000
Total number of instructions
Trigonometric instructions for LREAL data Arithmetic instructions for LREAL data
NX701-
300
250
Processing time (µs)
200
150
100
50
Item Conditions
GX-ID1611 (Ver. 1.1) Input Slave: 1
GX-OD1611 (Ver. 1.1) Output Slave: 1
R88D-1SN-ECT Servo Drives: 4
EtherCAT Slave Terminal: 1
NX-ECC203 EtherCAT Coupler Unit: 1
Slaves/Units that are used EtherCAT slaves NX-ID5342 DC Input Unit: 1
NX-OD5121 Transistor Output Unit: 1
NX-AD3608 Analog Input Unit: 1
NX-DA2605 Analog Output Unit: 1
NX-CIF101 and NX-CIF105 Communications Inter-
face Units: 1 per Unit
Language Ladder diagrams
Standard instruction Number of instructions: 5,000
configuration
Arithmetic Number of instructions: 200
User program instructions for
LREAL data
Trigonometric Number of instructions: 100
instructions for
LREAL data
Motion control processing Number of axes 4
Note Total length of cables connected to the built-in EtherCAT port is 10 [m].
A-2-2 Example of Calculating the Average Real Processing Time of a Task and Setting the Task Period
NX-CIF105 28 30
Total number of bytes are given below for pDout, pDin and pDinout.
pDout = 2 + 23 × 4 + 62 = 156 [byte]
pDin = 3 + 1 + 26 × 4 + 88 = 196 [byte]
pDinout = 3 + 2 + 26 × 4 + 88 = 197 [byte]
From these values, the I/O refresh time is calculated by the following formula.
I/O refresh processing time
= EtherCAT slave processing time
= 0.0006 × pDout + 0.0001 × pDin + 0.082 × pDinout + (1.24 × Snum + 0.01 × Clen) + 25.58
= 0.0006 × 156 + 0.0001 × 196 + 0.082 × 197 + (1.24 × 7 + 0.01 × 10) + 25.58
= 0.0936 + 0.0196 + 16.154 + (8.68 + 0.1) + 25.58
≈ 51 [µs]
Therefore, the user program execution time is the total of the above values, which is given by the fol-
lowing formula.
User program execution time = 12 + 4 + 9
= 25 [µs]
Therefore, the average real processing time of the task is given by the following formula.
Average real processing time of task = I/O refresh processing time + User program execution time
+ Motion control processing time + Common processing time
= 51 + 25 + 10 + 15
= 101 [µs]
Because the average real processing time of the task that is calculated above is 101 µs, as the value
larger than 1.1 times the average time, the task period is set to 125 µs.
The task execution times in the physical Controller depends on the logic operations that are performed
in the user program, the presence of communications commands and data links, on whether data trac-
ing is performed, and on other factors. The task execution time for a periodic task depends on whether
it is interrupted for the execution of tasks with higher execution priorities.
Use the physical Controller and verify the task execution time with the Task Execution Time Monitor.
Additional Information
Periodic tasks may be interrupted for the execution of tasks with higher execution priorities. The
real processing time of a task does not include the time for which the task is interrupted. It is the
task execution time that gives the actual time from when the task is started until it is finished,
including the interrupted time. For a detailed description of the differences between the real pro-
cessing times of tasks and the task execution times, refer to Meaning of the Task Execution Time
and the Real Processing Time of the Task on page 5-110.
Priority-17
Primary and
Processing Processing contents periodic priority-18
task periodic
tasks
I/O refresh processing I/O is refreshed for NX Units on the CPU Unit, built-in Performed. Not per-
I/O, and EtherCAT slaves. formed.
User program execution Programs assigned to tasks are executed in the order Performed. Performed.
that they are assigned.
Motion control process- • Motion control commands from the user program Performed. Not per-
ing are executed. formed.
• Motion output processing
Common System • Variable refresh processing (if there are accessing Performed. Performed.
process- common tasks) is performed.
ing time processing 1 • Motion input processing
• Data trace processing
System • Variable refresh processing (if there are refreshing Performed. Performed.
common tasks) is performed.
processing 2 • Variable access processing external to the Control-
ler to ensure concurrency with task execution
Guidelines are provided below for calculating the various processing times.
I/O refresh processing time = EtherCAT slave processing time + NX Unit processing time
The following describes how to determine EtherCAT slave processing time, NX Unit processing time
used in the above formula.
EtherCAT slave processing time [µs] = 0.017 × pDout + 0.010 × pDin + 0.082 × pDinout
+ (1.24 × Snum + 0.01 × Clen) + 151.11
pDout : Total output processing data size [byte] of EtherCAT slaves assigned to the primary
periodic task A
pDin : Total input processing data size [byte] of EtherCAT slaves assigned to the primary
periodic task
Additional Information
The EtherCAT slave processing time is 0 if EtherCAT slaves are not connected.
NX Unit processing time [µs] = 0.248 × Dnxout + 0.241 × Dnxin + 0.549 × Dnxnum + 125.36
Additional Information
The NX Unit processing time is 0 if NX Units are not connected to the CPU Unit.
Simple Estimate
For the number of instructions in each group, read the execution time for each instruction group
from the following graphs and calculate the total.
• Execution time for standard instructions
• Execution time for arithmetic instructions for LREAL data
• Execution time for trigonometric instructions for LREAL data
This will allow you to estimate the execution time of the user program.
450
400
Execution time (µs)
350
300
250
200
150
100
NX1P2-
50
0 1500 3000 4500 6000 7500 9000 10500 12000 13500 15000
Total number of instructions
Percent of
Percent of execution
Types of instructions Instructions instructions time in
[%] instruction
group [%]
Ladder diagram instructions LD, AND, OUT, SET, and RESET 81.0% 40.2%
Comparison instructions EQ and LT 4.1% 8.3%
Timer and counter instructions Timer, TON/TOF, and CTU/CTD 1.6% 7.3%
Math instructions +, -, *, /, ADD, SUB, MUL, and DIV 2.4% 6.5%
BCD conversion instructions and INT_TO_DINT and WORD_BC- 0.2% 1.2%
data conversion instructions D_TO_UINT
900
800
NX1P2-
Execution time (µs)
700
600
500
400
A
NX1P2-
300
100
0 300 600 900 1200 1500 1800 2100 2400 2700 3000
Total number of instructions
Trigonometric instructions for LREAL data Arithmetic instructions for LREAL data
900
800
Execution time (µs)
700
600
500
400
300
NX1P2-
200
100
900
800
Execution time (µs)
700
NX1P2-
600
500
400
NX1P2-
300
200
100
0 300 600 900 1200 1500 1800 2100 2400 2700 3000
Total number of instructions
Trigonometric instructions for LREAL data Arithmetic instructions for LREAL data
250
Processing time (µs)
200
150
100
50
0
0 1 2 3 4 5 6 7 8
Number of axes
Item Conditions
GX-ID1611 (Ver. 1.1) Input Slave: 1
EtherCAT slaves GX-OD1611 (Ver. 1.1) Output Slave: 1
R88D-1SN-ECT Servo Drives: 4
NX-PF0630 Additional I/O Power Supply Unit: 1
Slaves/Units that are used
NX-ID5342 Digital Input Units: 3
NX Units
NX-OD3153 Digital Output Units: 2
(on CPU Rack)
NX-AD4608 Analog Input Unit: 1
NX-DA3605 Analog Output Unit: 1
Language Ladder diagrams
Standard instruction Number of instructions: 5,000
configuration
Arithmetic Number of instructions: 200
User program instructions for
LREAL data
Trigonometric Number of instructions: 100
instructions for
LREAL data
Motion control processing Number of axes 4
Note Total length of cables connected to the built-in EtherCAT port is 10 [m].
Total number of bytes are given below for pDout, pDin and pDinout.
pDout = 2 + 23 × 4 = 94 [byte]
pDin = 3 + 1 + 26 × 4 = 108 [byte]
pDinout = 3 + 2 + 26 × 4 = 109 [byte]
NX Units Dnxout: Output data size in bytes Dnxin: Input data size in bytes
NX-PF0630 0 0
NX-ID5342 0 2
NX-OD3153 2 0
NX-AD4608 0 16
Total number of bytes are given below for Dnxout and Dnxin.
Dnxout = 2 × 2 + 8 = 12 [byte]
Dnxin = 2 × 3 + 16 = 22 [byte]
From these values, the I/O refresh time is calculated by the following formula. A
I/O refresh processing time
A-3-2 Example of Calculating the Average Real Processing Time of a Task and Setting the Task Period
= EtherCAT slave processing time + NX Unit processing time
= 0.017 × pDout + 0.010 × pDin + 0.082 × pDinout + (1.24 × Snum + 0.01 × Clen) + 151.11
+ 0.248 × Dnxout + 0.241 × Dnxin + 0.549 × Dnxnum + 125.36
= 0.017 × 94 + 0.010 × 108 + 0.082 × 109 + (1.24 × 6 + 0.01 × 10) + 151.11
+ 0.248 × 12 + 0.241 × 22 + 0.549 × 8 + 125.36
= 1.598 + 1.080 + 8.937 + (7.24 + 0.1) + 151.11
+ 2.976 + 5.302 + 4.392 + 125.36
≈ 308 [µs]
Therefore, the user program execution time is the total of the above values, which is given by the fol-
lowing formula.
User program execution time = 189 + 41 + 51
= 281 [µs]
Therefore, the average real processing time of the task is given by the following formula.
Average real processing time of task = I/O refresh processing time + User program execution time
+ Motion control processing time + Common processing time
= 308 + 281 + 148 + 133
= 870 [µs]
Because the average real processing time of the task that is calculated above is 870 µs, as the value
larger than 1.1 times the average time, the task period is set to 2000 µs.
The task execution times in the physical Controller depends on the logic operations that are performed
in the user program, the presence of communications commands and data links, on whether data trac-
ing is performed, and on other factors. The task execution time for a periodic task depends on whether
it is interrupted for the execution of tasks with higher execution priorities.
Use the physical Controller and verify the task execution time with the Task Execution Time Monitor.
Additional Information
Periodic tasks will be interrupted for the execution of tasks with higher execution priorities. The
real processing time of a task does not include the time for which the task is interrupted. It is the
task execution time that gives the actual time from when the task is started until it is finished,
including the interrupted time. For a detailed description of the differences between the real pro-
cessing times of tasks and the task execution times, refer to Meaning of the Task Execution Time
and the Real Processing Time of the Task on page 5-110.
Priority-17
Primary Priority-16
and prior-
Processing Processing contents periodic periodic
ity-18 peri-
task task
odic tasks
I/O refresh processing I/O is refreshed for CJ-series Units Performed. Performed. Not per-
(Basic I/O Units, Special I/O Units, and formed.
CPU Bus Units) and EtherCAT slaves.
User program execution Programs assigned to tasks are exe- Performed. Performed. Performed.
cuted in the order that they are
assigned.
Motion control processing • Motion control commands from the Performed. Not per- Not per-
user program are executed. formed. formed.
• Motion control outputs are processed.
Common System com- • Variable refresh processing (if there Performed. Performed. Performed.
processing mon pro- are accessing tasks) is performed.
time cessing 1 • Motion input processing
• Data trace processing
System com- • Variable refresh processing (if there Performed. Performed. Performed.
mon pro- are refreshing tasks) is performed.
cessing 2 • Variable access processing external to
the Controller to ensure concurrency
with task execution
System over- Other system common processing Performed. Performed. Performed.
head time
Guidelines are provided below for calculating the various processing times.
The following describes how to determine the I/O refresh overhead time, EtherCAT slave processing
time, and CJ-series Unit processing time used in the above formula.
EtherCAT slave processing time [µs] = Tout × Dout + Tin × Din + Tref × Dinout
+ (1.24 × Snum + 0.01 × Clen - Tec)
A
Tout : Output processing time per byte [µs]
Dout : Total output processing data size [byte] of EtherCAT slaves assigned to the primary peri-
The values of the output processing time, input processing time, refresh processing time, and Ether-
CAT communications adjustment time in the above formula are fixed. They are determined by the
model of the CPU Unit as given in the following table.
Tec: EtherCAT
Tout: Output Tin: Input pro- Tref: Refresh pro-
communications
CPU Unit processing time cessing time per cessing time per byte
adjustment time
per byte [µs] byte [µs] [µs]
[µs]
NJ501- 0.004 0.011 0.082 55*1
NJ301- 0.005 0.013 0.082 90
NJ101- 0.010 0.004 0.082 145
*1 The value is 70 for a CPU Unit with unit version 1.01 or earlier.
If the result that is calculated from the part (1.24 × Snum + 0.01 × Clen - Tec) of the above formula is
a negative number, the result is regarded as 0.
Σ (I/O refresh time for each CJ-series Unit × Number of Units) - Tcj [µs]
In the above formula, Σ represents the total processing time for all CJ-series Units.
If the result that is calculated from the above formula is a negative number, the CJ-series Unit pro-
cessing time is regarded as 0 µs.
The method for calculating the I/O refresh time for each CJ-series Unit is provided later.
The value of Tcj depends on the model and the unit version of the CPU Unit.
If any of the following CJ-series Units is used, add Tcj µs to the result that is calculated from the
above formula, regardless of the number of Units.
• CJ1W-PH41U Analog Input Unit with Universal Inputs
• CJ1W-AD04U Analog Input Unit with Universal Inputs
• CJ1W-PDC15 Analog Input Unit with Universal Inputs
• CJ1W-V680C11 ID Sensor Unit
• CJ1W-V680C12 ID Sensor Unit
• CJ1W-CRM21 CompoNet Master Unit
Simple Estimate
For the number of instructions in each group, read the execution time for each group from the follow-
ing graphs and calculate the total.
• Execution time for standard instructions
• Execution time for arithmetic instructions for LREAL data
• Execution time for trigonometric instructions for LREAL data
This will allow you to estimate the execution time of the user program.
1800
NJ101-
1600
1400
Execution time (ms)
NJ301-
1200
NJ501-
1000
800
600
200
0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000
120
100
80
60
NJ301-
40
NJ501-
20
0 100 200 300 400 500 600 700 800 900 1000
Total number of instructions
Trigonometric instructions for LREAL data Arithmetic instructions for LREAL data
180
160
140
Execution time (µs)
120
NJ501-
100
80
60
NJ501-
40
20
0 100 200 300 400 500 600 700 800 900 1000
Total number of instructions
Trigonometric instructions for LREAL data Arithmetic instructions for LREAL data
1800
NJ101-
Execution time (ms) 1600
1400
NJ301-
1200
1000
NJ501-
800
600
120
100
80
60
NJ301-
40
NJ501-
20
0 100 200 300 400 500 600 700 800 900 1000
Total number of instructions
Trigonometric instructions for LREAL data Arithmetic instructions for LREAL data
180
160
140
Execution time (µs)
NJ501-
120
100
80
60
NJ501-
40
20
0 100 200 300 400 500 600 700 800 900 1000
Total number of instructions
Trigonometric instructions for LREAL data Arithmetic instructions for LREAL data
500 100
Unit version 1.01 Unit version 1.01
or earlier
Processing time (µs)
200 40
*1
100 20
0 0
0 8 16 24 32 40 48 56 64 0 1 2 3 4 5 6 7 8
Number of axes Number of axes
NJ101-10 A
120
80
60
40
20
0
0 1 2
Number of axes
*2 It is the case when the hardware revision for the Unit is A. The other cases are for the Units that hardware revi-
sions are in blank.
Note You cannot use the motion control functions with an NJ101-90 CPU Unit.
*1 The processing time is 265 µs for a CPU Unit with unit version 1.01 or earlier.
*2 The processing time is 360 µs for a CPU Unit with unit version 1.01 or earlier.
Item Conditions
Slaves/Units that are EtherCAT slaves • GX-ID1611 (Ver. 1.1) Input Slave: 1
used • GX-OD1611 (Ver. 1.1) Output Slave: 1
• R88D-1SN-ECT Servo Drives: 4
CJ-series Units (on CPU • CJ1W-ID211 DC Input Unit: 1
Rack) • CJ1W-OD211 Transistor Output Unit: 1
• CJ1W-AD042 Analog Input Unit: 1
• CJ1W-DA021 Analog Output Unit: 1
• CJ1W-SCU42 Serial Communications Unit: 1
(Protocol macros are not used.)
User program Language Ladder diagrams
Standard instruction con- Number of instructions: 5,000
figuration
Arithmetic instructions for Number of instructions: 200
LREAL data
Trigonometric instructions Number of instructions: 100
for LREAL data
Motion control pro- Number of axes 4
cessing
Note Total length of cables connected to the built-in EtherCAT port is 10 [m].
The following table gives the Dout (output processing data size), Din (input processing data size),
Total number of bytes are given below for Dout, Din and Dinout. A
Dout = 2 + 23 × 4 = 94 [byte]
Din = 3 + 1 + 26 × 4 = 108 [byte]
A-4-2 Example of Calculating the Average Real Processing Time of a Task and Setting the Task Period
Dinout = 3 + 2 + 26 × 4 = 109 [byte]
From these values, the I/O refresh time is calculated by the following formula.
I/O refresh processing time
= EtherCAT slave processing time
= Tout × Dout + Tin × Din + Tref × Dinout + (1.24 × Snum + 0.01 × Clen − Tec)
= 0.004 × 94 + 0.011 × 108 + 0.082 × 109 + (1.24 × 6 + 0.01 × 10 − 55)
= 0.376 + 1.188 + 8.938 + (7.44 + 0.1 − 55)
= 10.502 + 0 *1
≈ 11 [µs]
*1. Because the result that is calculated inside the parenthesis is a negative number, it is regarded as 0 µs.
Because the number of Units is all one, the CJ-series Unit processing time is regarded as 0 µs.
CJ-series Unit processing time = Σ (I/O refresh time for each CJ-series Unit × Number of Units) - 110
= 1 × 1 + 1 × 1 + 24 × 1 + 24 × 1 + 2.5 × 1 - 110
= -57.5 [µs]
Because the result that is calculated from the above formula is a negative number, the CJ-series
Unit processing time is regarded as 0 µs.
The following values of the I/O refresh overhead time, EtherCAT slave processing time, and CJ-
series Unit processing time are found by the above calculations.
From these values, the I/O refresh time is calculated by the following formula.
I/O refresh time = I/O refresh overhead time + (Larger of the EtherCAT slave processing
time and the CJ-series Unit processing time)
= 65 + 11
= 76 [µs]
Therefore, the user program execution time is the total of the above values, which is given by the fol-
lowing formula.
User program execution time = 100 + 20 + 27
= 147 [µs]
A-4-2 Example of Calculating the Average Real Processing Time of a Task and Setting the Task Period
it is interrupted for the execution of tasks with higher execution priorities.
Use the physical Controller and verify the task execution time with the Task Execution Time Monitor.
The variables are described in the tables of this appendix as shown below.
Range of
Variable name Meaning Function Data type Reference
values
This is the system- This is the mean- The function of the variable is described. The data The range of The page of
defined variable ing of the vari- type of the values that the the individual
name. The prefix able. variable is variable can system-
gives the category given. take is given. defined vari-
name. able specifi-
cations table
is given.
A version in parentheses in the Variable name column is the unit version of the CPU Unit when the sys-
tem-defined variable was added.
Range of
Variable name Meaning Function Data type Reference
values
_CurrentTime System Time Contains the CPU Unit’s internal clock DATE_ • NX-series page A-113
Range of
A-5-1 System-defined Variables for the Overall NJ/NX-series Controller (No Category)
Variable name Meaning Function Data type Reference
values
_TaskName_ Task Active Flag TRUE during task execution. BOOL TRUE or page A-113
Active FALSE when task execution is not in prog- FALSE
ress.
Note You cannot use this system-defined
variable in the user program. It is
used only to access task status for
data tracing from the Sysmac Stu-
dio.
_TaskName_ Last Task Contains the task execution time the last TIME Depends on page A-113
LastExecTime Execution Time time the task was executed (unit: 0.1 µs). data type.
Note You cannot use this system-defined
variable in the user program. It is
used only to access task status for
data tracing from the Sysmac Stu-
dio.
_TaskName_ Maximum Task Exe- Contains the maximum value of the task TIME Depends on page A-114
MaxExecTime cution Time execution time (unit: 0.1 µs). data type.
Note You cannot use this system-defined
variable in the user program. It is
used only to access task status for
data tracing from the Sysmac Stu-
dio.
_TaskName_ Minimum Task Execu- Contains the minimum value of the task TIME Depends on page A-114
MinExecTime tion Time execution time (unit: 0.1 µs). data type.
Note You cannot use this system-defined
variable in the user program. It is
used only to access task status for
data tracing from the Sysmac Stu-
dio.
_TaskName_ Task Execution Count Contains the number of executions of the UDINT Depends on page A-114
ExecCount task. data type.
If 4294967295 is exceeded, the value
returns to 0 and counting is continued.
Note You cannot use this system-defined
variable in the user program. It is
used only to access task status for
data tracing from the Sysmac Stu-
dio.
Range of
Variable name Meaning Function Data type Reference
values
_TaskName_ Task Period TRUE if the task period was exceeded. BOOL TRUE or page A-114
Exceeded Exceeded Flag FALSE if task execution was completed FALSE
within the task period.
Note You cannot use this system-defined
variable in the user program. It is
used only to access task status for
data tracing from the Sysmac Stu-
dio.
_TaskName_ Task Period Contains the number of times that the UDINT Depends on page A-115
ExceedCount Exceeded Count period was exceeded. data type.
If the present value exceeds the maximum
value of the data type, the present value
returns to 0 and the count is continued.
If 4294967295 is exceeded, the value
returns to 0 and counting is continued.
Note You cannot use this system-defined
variable in the user program. It is
used only to access task status for
data tracing from the Sysmac Stu-
dio.
A-5-1 System-defined Variables for the Overall NJ/NX-series Controller (No Category)
Card is shown by this flag with a delay of up to
100 ms. We therefore do not recommend the
use of this variable in the user program.
_Card1Deteriorated SD Memory Card TRUE when the life of the SD Memory Card is BOOL TRUE or page A-117
Life exceeded. FALSE
Warning Flag TRUE: The life of the Card has been
exceeded.
FALSE: The Card can still be used.
_Card1PowerFail SD Memory Card TRUE when the power supply to the CPU Unit BOOL TRUE or page A-117
Power Interrup- was interrupted during access to the SD FALSE
tion Flag Memory Card.
TRUE: Power was interrupted during SD
Memory Card access.
FALSE: Normal
A-5-1 System-defined Variables for the Overall NJ/NX-series Controller (No Category)
(Ver. 1.03) Verify Status STA
Done Done Flag TRUE when a verification is completed. BOOL TRUE or page A-119
FALSE
Note You cannot use this system-defined
variable in the user program. Use it in
CIP message communications when
sending a command from an HMI or
host computer.
Active Active Flag TRUE when a verification is in progress. BOOL TRUE or page A-119
FALSE
Note You cannot use this system-defined
variable in the user program. Use it in
CIP message communications when
sending a command from an HMI or
host computer.
VefyRslt Verify Result Flag TRUE if the data was the same. FALSE if dif- BOOL TRUE or page A-120
ferences were found. FALSE
Note You cannot use this system-defined
variable in the user program. Use it in
CIP message communications when
sending a command from an HMI or
host computer.
Err Error Flag TRUE when processing a verification ended BOOL TRUE or page A-120
in an error. FALSE
Password Password Use this variable to specify the password that STRING(33) Depends on page A-121
is used for verification when you start transfer- data type.
ring the programs.
The password is initialized every time you
start transferring programs from the SD Mem-
ory Card.
TargetUserPro- User Program Change this variable to TRUE to set a user BOOL TRUE or page A-121
gram and Settings program or setting as the transfer target. FALSE
Transfer Flag Always set this variable to TRUE for transfer-
ring programs from SD Memory Card.
TargetIPAdr IP Address Change this variable to TRUE to include the BOOL TRUE or page A-121
Transfer Flag IP address of the built-in EtherNet/IP port as FALSE
the transfer target.
The IP address means setting type, IP
address, subnet mask, and default gateway.
TargetVariable Present Values of Change this variable to TRUE to set the pres- BOOL TRUE or page A-121
Variables with the ent values of variables with the Retain attri- FALSE
Retain Attribute bute as the transfer target.
Transfer Flag
TargetMemory Present Values of Change this variable to TRUE to set the pres- BOOL TRUE or page A-122
Memory Used for ent values of the memory used for CJ-series FALSE
CJ-series Units Units with the Retain attribute as the transfer
with the Retain target.
Attribute Trans-
fer Flag
_Card1PrgTransfer- SD Memory Card _sPRG- page A-122
Sta (Ver.1.11) Program Trans- TRANS-
fer Status FER_STA
Done Done Flag TRUE when a program transfer is completed. BOOL TRUE or page A-122
FALSE
Active Active Flag TRUE when a program transfer is in progress. BOOL TRUE or page A-122
FALSE
Err Error Flag TRUE when a program transfer ended in an BOOL TRUE or page A-122
error. FALSE
Active Active Flag TRUE when a restore operation is in prog- BOOL TRUE or page A-123
Err Error Flag TRUE when a restore operation ended in an BOOL TRUE or page A-123
error. FALSE
Range of
Variable name Meaning Function Data type Reference
values
_Card1RestoreCmd- User Program Change this variable to TRUE to set a user BOOL TRUE or page A-124
TargetUserProgram and Settings program or setting for the restore by the sys- FALSE
(Ver.1.14) Transfer Flag tem-defined variable as the transfer target.
Always set this variable to TRURE for the
restore by the system-defined variable.
A
_Card1RestoreCmd- IP Address Change this variable to TRUE to include the BOOL TRUE or page A-124
TargetIPAdr Transfer Flag IP address of the built-in EtherNet/IP port for FALSE
A-5-1 System-defined Variables for the Overall NJ/NX-series Controller (No Category)
(Ver.1.14) the restore by the system-defined variable as
the transfer target.
The IP address means setting type, IP
address, subnet mask, and default gateway.
_Card1RestoreCmd- Present Values of Change this variable to TRUE to set the pres- BOOL TRUE or page A-124
TargetVariable Variables with the ent values of variables with the Retain attri- FALSE
(Ver.1.14) Retain Attribute bute for the restore by the system-defined
Transfer Flag variable as the transfer target.
_Card1RestoreCmd- Present Values of Change this variable to TRUE to set the pres- BOOL TRUE or page A-124
TargetMemory Memory Used for ent values of the memory used for CJ-series FALSE
(Ver.1.14) CJ-series Units Units with the Retain attribute for the restore
with the Retain by the system-defined variable as the transfer
Attribute Trans- target.
fer Flag
_Card1RestoreCmd- Unit and Slave Change this variable to TRUE to set the Unit BOOL TRUE or page A-125
TargetUnitConfig Parameters and slave settings for the restore by the sys- FALSE
(Ver.1.14) Transfer Flag tem-defined variable as the transfer target.
_Card1RestoreCmd- Absolute Change this variable to TRUE to set the abso- BOOL TRUE or page A-125
TargetAbsEncoder Encoder Home lute encoder home offset for the restore by the FALSE
(Ver.1.14) Offset Transfer system-defined variable as the transfer target.
Flag
A-5-1 System-defined Variables for the Overall NJ/NX-series Controller (No Category)
Note You cannot use this system-defined
variable inside functions.
P_PRGER Instruction Error This flag changes to and remains TRUE when BOOL TRUE or page A-127
Flag an instruction error occurs in the program or FALSE
in a function/function block called from the
program.
After this flag changes to TRUE, it stays
TRUE until the user program changes it back
to FALSE.
Range of
Variable name Meaning Function Data type Reference
values
_UnitVersion Unit Version Contains the unit version of the CPU Unit. ARRAY[0..1] 0 to 99 page A-128
(Ver.1.08) The integer part of the unit version is OF USINT
stored in element number 0.
The fractional part of the unit version is
stored in element number 1.
Example 1) If the unit version is 1.08, “1”
is stored in element number 0 and “8” is
stored in element number 1.
Example 2) If the unit version is 1.10, “1”
is stored in element number 0 and “10” is
stored in element number 1.
_HardwareRevision Hardware Revision Contains the hardware revision of the STRING[2] - or A to Z page A-128
(Ver.1.11) CPU Unit.
Contains - if the hardware revision is in
blank, and A to Z for other cases.
Range of
Variable name Meaning Function Data type Reference
values
_SelfTest_HighTem- CPU Unit High Tem- TRUE when the internal temperature of BOOL TRUE or page A-129
perature perature Flag the CPU Unit is too high. FALSE
(Ver.1.10)
Note Always FALSE for an NX1P2 CPU
Unit.
_SelfTest_LowBattery Low Battery Flag TRUE when the battery is disconnected or BOOL TRUE or page A-129
(Ver.1.10) the battery voltage is dropped. FALSE
_SelfTest_LowFan- Low FAN Revolution TRUE when the fan is disconnected or the BOOL TRUE or page A-129
Revolution Flag rotation speed of a fan is decreased. FALSE
(Ver.1.10)
Note Always FALSE for an NX1P2 CPU
Unit and NJ-series CPU Unit.
Range of
Variable name Meaning Function Data type Reference
values
_DeviceOutHoldCfg Device Output Hold It is 16#A5A5 if you retain the target BOOL 16#0000 to page A-129
(Ver.1.13) Configuration device output when the operating mode is 16#FFFF
changed or when downloaded.
In the case other than 16#A5A5, the tar-
get device output is initialized when the
operating mode is changed or when
downloaded.
_DeviceOutHoldSta- Device Output Hold It is TRUE if the target device output is BOOL TRUE or page A-129
tus Status retained when the operating mode is FALSE
(Ver.1.13) changed or when downloaded.
When the device output hold configuration
is other than 16#A5A5, or when a major
fault level Controller error occurs, the tar-
get device output is initialized and
changes to FALSE.
_PLC_OptBoardSta Option Board Contains the status of Option Boards. This ARRAY[0..2 page A-131
(Ver.1.13) Status variable is commonly used regardless of the ] OF
models of Option Boards. _sOPT-
The array element 1 corresponds to the BOARD_S
option board slot 1 and array element 2 corre- TA
sponds to the option board slot 2.
Error Transmission Indicates whether a transmission error BOOL TRUE or page A-133
Error occurred. FALSE
TRUE: A parity error, framing error, or an
overrun error occurred.
FALSE: FALSE due to one of the following
causes.
• A parity error, framing error, or an overrun
ParityErr Parity Error Indicates whether a parity error occurred. If BOOL TRUE or page A-133
this error occurs, it means that the serial com- FALSE
munications settings may not apply to the
remote device to connect.
TRUE: A parity error occurred.
FALSE: FALSE due to one of the following
causes.
• A parity error not occurred.
• A port is restarted.
• The Serial communications mode is not set
to Host Link (FINS).
• The Option Board that is mounted is not a
Serial Communications Option Board.
• The Option Board is not mounted.
OverRun Overrun Error Indicates whether an overrun error occurred. BOOL TRUE or page A-134
If this error occurs, it means that the baud rate FALSE
of an Option Board may be too large.
TRUE: An overrun error occurred.
FALSE: FALSE due to one of the following
causes.
• An overrun error not occurred.
Range of
Variable name Meaning Function Data type Reference
values
_CJB_IOUnitInfo Basic I/O Unit Shows the status of the Basic I/O Unit alarm ARRAY TRUE or page A-137
Information output (load short-circuit protection). [0..3, 0..9, FALSE
TRUE: Load short-circuit 0..7] OF
BOOL
FALSE: No load short-circuit
Range of
Variable name Meaning Function Data type Reference
values
_NXB_ErrSta NX Bus Function Gives the NX Bus Function Module error WORD 16#0000 to page A-141
(Ver.1.13) Module Error Status status. 16#40F2
This system-defined variable provides the
collective status of the NX Bus Function
Module Master Error Status and NX Bus
Function Module Unit Error Status for all
Range of
Variable name Meaning Function Data type Reference
values
_NXB_UnitErrFlagTbl NX Unit Error Status Indicates whether errors occurred in the ARRAY TRUE or page A-142
(Ver.1.13) NX Unit on the CPU Unit. [0..8] OF FALSE
This status is given as an array of BOOL BOOL
data. The subscript of the array corre-
sponds to the NX Unit number. A sub-
script of 0 indicates the NX Bus Function
Module and whether an event occurred
that is detected by the NX Bus Function
Module.
TRUE: Error.
FALSE: No error.
The status is FALSE for NX Units that are
set as unmounted Units.
Range of
Variable name Meaning Function Data type Reference
values
_MC_ErrSta Motion Control Func- Shows the status of errors that are WORD 16#0000 to page A-143
tion Module Error Sta- detected in the Motion Control Function 16#40F0
Range of
Variable name Meaning Function Data type Reference
values
_MC1_GRP Axes Group Variables Used to specify axes groups and shows ARRAY[0..63] --- page A-144
multi-axes coordinated control status, and OF
multi-axes coordinated control settings for _sGROUP_R
motion control instructions used for EF
motion control 1.
When you create an axes group on the
System Studio, a user-defined axes group
variable with a different name is created.
Normally, you use an Axes Group Variable
with a different name.
Refer to the NJ/NX-series Motion Control
Instructions Reference Manual (Cat. No.
W508) for details on structure members.
Range of
Variable name Meaning Function Data type Reference
values
_MC1_AX Axis Variables Used to specify axes and shows single- ARRAY[0..25 --- page A-145
axis control status, and single-axis control 5] OF _sAX-
settings for motion control instructions IS_REF
used for motion control 1.
When you create an axis on the System Stu-
dio, a user-defined axis variable with a differ-
ent name is created.
Normally, you use an Axis Variable with a
Range of
Variable name Meaning Function Data type Reference
values
_EC_ErrSta Built-in This system-defined variable provides the WORD 16#0000 to page A-147
EtherCAT Error collective status of errors in the EtherCAT 16#40F0
Master Function Module.
Refer to information on the meanings of
the error status bits at the end of this
appendix for details.
_EC_PortErr Communications Port This system-defined variable provides the WORD 16#0000 to page A-147
Error collective status of errors in the communi- 16#00F0
cations ports for the EtherCAT master.
Refer to information on the meanings of
the error status bits at the end of this
appendix for details.
_EC_MstrErr Master Error This system-defined variable provides the WORD 16#0000 to page A-147
collective status of EtherCAT master 16#00F0
errors and slave errors detected by the
EtherCAT master.
Refer to information on the meanings of
the error status bits at the end of this
appendix for details.
_EC_SlavErr Slave Error This system-defined variable provides the WORD 16#0000 to page A-147
collective status of all the error status for 16#00F0
EtherCAT slaves.
Refer to information on the meanings of
the error status bits at the end of this
appendix for details.
_EC_SlavErrTbl Slave Error Table This system-defined variable gives the Array [1..512] 16#0000 to page A-148
error status for each EtherCAT slave. OF WORD*1 16#00F0
The error status is given for each slave in
the actual system configuration. This vari-
able array indicates slaves in which there
are errors. Status is provided for each Eth-
erCAT slave node address (1 to 512)*1.
Refer to information on the meanings of the
error status bits at the end of this appendix
for details.
_EC_MacAdrErr MAC Address Error TRUE if there is an illegal MAC address. BOOL TRUE or page A-148
FALSE
_EC_LanHwErr Communications TRUE if there is a communications con- BOOL TRUE or page A-148
Controller Error troller hardware error. FALSE
_EC_LinkOffErr Link OFF Error TRUE if the communications controller BOOL TRUE or page A-148
link is not established. FALSE
_EC_NetCfgErr Network TRUE if there is illegal network configura- BOOL TRUE or page A-148
Configuration Infor- tion information. FALSE
mation Error
_EC_NetCfgCmpErr Network TRUE if the network configuration infor- BOOL TRUE or page A-149
Configuration Verifi- mation does not match the actual network FALSE
cation Error configuration.
_EC_NetTopologyErr Network TRUE if there is a network configuration BOOL TRUE or page A-149
Configuration Error error (too many devices connected or ring FALSE
connection).
_EC_PDCommErr Process Data Com- TRUE if there is an unexpected slave dis- BOOL TRUE or page A-149
munications Error connection or connection or if a slave FALSE
WDT error is detected during process
data communications.
_EC_PDTimeoutErr Process Data Recep- TRUE if a timeout occurs while receiving BOOL TRUE or page A-149
tion process data. FALSE
Timeout Error
Range of
Variable name Meaning Function Data type Reference
values
_EC_PDSendErr Process Data Trans- TRUE if there is a process data transmis- BOOL TRUE or page A-149
mission Error sion error (cannot send within the process FALSE
data communications cycle or transmis-
sion jitter is over the limit).
_EC_SlavAdrDupErr Slave Node Address TRUE if the same node address is set for BOOL TRUE or page A-149
Duplicated Error more than one slave. FALSE
_EC_SlavInitErr Slave TRUE if there is an error in an initialization BOOL TRUE or page A-150
Initialization Error command addressed to a slave. FALSE
Additional Information
Note The values of all system-defined variables that are related to errors in EtherCAT communications do not
change until the cause of the error is removed and then the error in the Controller is reset with the trouble-
shooting functions of the Sysmac Studio or the ResetECError instruction.
Range of
Variable name Meaning Function Data type Reference
values
_EC_RegSlavTbl Registered Slave This table indicates the slaves that are Array [1..512] TRUE or page A-151
Table registered in the network configuration OF BOOL*1 FALSE
information. Slaves are given in the table
in the order of slave node addresses. The
element for a slave is TRUE if the corre-
sponding slave is registered.
Range of
Variable name Meaning Function Data type Reference
values
_EC_InData1Invalid Input Data1 Invalid TRUE when process data communica- BOOL TRUE or page A-154
tions performed in the primary periodic FALSE
task are not normal and the input data is
not valid.
Note All system-defined variables that are related to the status of EtherCAT communications give the current status.
Range of
Variable name Meaning Function Data type Reference
values
_EC_StatisticsLogEn- Diagnosis/Statistics Changes to TRUE when the diagno- BOOL TRUE or page A-155
able Log Enable sis/statistics log is started. FALSE
(Ver.1.11) Changes to FALSE when the diagno-
sis/statistics log is ended.
_EC_StatisticsLogCy- Diagnosis/Statistics Specifies the interval to write the diagnos- UINT 0, or 30 to page A-155
cleSec Log Cycle tic and statistical information of the diag- 1800
(Ver.1.11) nosis/statistics log in units of seconds.
When 0 is specified, the diagnostic and
statistical information is written only once
when the diagnosis/statistics log is ended.
Range of
Variable name Meaning Function Data type Reference
values
_EIP_ErrSta Built-in This is the error status variable for the WORD 16#0000 to page A-156
EtherNet/IP Error built-in EtherNet/IP port. 16#00F0
Range of
Variable name Meaning Function Data type Reference
values
_EIP_PortErr Communications Port This is the error status variable for the WORD 16#0000 to page A-156
Error communications port. 16#00F0
NX-series CPU Units: Represents the col-
lective status of the following error flags.
• _EIP1_MacAdrErr (Port1 MAC Address
Error)
• _EIP1_LanHwErr (Port1 Communications
Controller Error)
• _EIP1_EtnCfgErr (Port1 Basic Ethernet Set-
ting Error)
• _EIP1_IPAdrCfgErr (Port1 IP Address Set-
ting Error)
• _EIP1_IPAdrDupErr (Port1 IP Address
Duplication Error)
• _EIP1_BootpErr (Port1 BOOTP Server
Error)
• _EIP_DNSCfgErr (DNS Setting Error)
• _EIP_DNSSrvErr (DNS Server Connection
Error)
• _EIP_IPRTblErr (IP Route Table Error)
NJ-series CPU Units: Represents the col-
lective status of the following error flags.
• _EIP_MacAdrErr (MAC Address Error)
• _EIP_LanHwErr (Communications Control-
ler Error)
• _EIP_EtnCfgErr (Basic Ethernet Setting
Error)
• _EIP_IPAdrCfgErr (IP Address Setting Error)
• _EIP_IPAdrDupErr (IP Address Duplication
Error)
• _EIP_BootpErr (BOOTP Server Error)
• _EIP_IPRTblErr (IP Route Table Error)
Range of
Variable name Meaning Function Data type Reference
values
_EIP1_PortErr Communications This is the error status variable for the WORD 16#0000 to page A-156
Port1 Error communications port. 16#00F0
It represents the collective status of the
following error flags.
• _EIP1_MacAdrErr (Port1 MAC Address
Error)
• _EIP1_LanHwErr (Port1 Communications
Controller Error)
Range of
Variable name Meaning Function Data type Reference
values
_EIP_CipErr CIP Communications This is the error status variable for CIP WORD 16#0000 to page A-158
Error communications. 16#00F0
NX-series CPU Units: Represents the col-
lective status of the following error flags.
• _EIP1_IdentityErr (CIP Communications1
Identity Error)
• _EIP1_TDLinkCfgErr (CIP Communica-
tions1 Tag Data Link Setting Error)
• _EIP1_TDLinkOpnErr (CIP Communica-
tions1 Tag Data Link Connection Failed)
• _EIP1_TDLinkErr (CIP Communications1
Tag Data Link Communications Error)
• _EIP1_TagAdrErr (CIP Communications1
Tag Name Resolution Error)
• _EIP1_MultiSwONErr (CIP Communica-
tions1 Multiple Switches ON Error)
NJ-series CPU Units: Represents the col-
lective status of the following error flags.
• _EIP_IdentityErr (Identity Error)
• _EIP_TDLinkCfgErr (Tag Data Link Set-
ting Error)
• _EIP_TDLinkOpnErr (Tag Data Link
Connection Failed)
• _EIP_TDLinkErr (Tag Data Link Com-
munications Error)
• _EIP_TagAdrErr (Tag Name Resolution
Error)
• _EIP_MultiSwONErr (Multiple Switches
ON Error)
Range of
Variable name Meaning Function Data type Reference
values
_EIP2_CipErr CIP Communica- This is the error status variable for CIP WORD 16#0000 to page A-159
tions2 Error communications 2. 16#00F0
It represents the collective status of the
following error flags.
• _EIP2_IdentityErr (CIP Communications2
Identity Error)
• _EIP2_TDLinkCfgErr (CIP Communica-
tions2 Tag Data Link Setting Error)
Range of
Variable name Meaning Function Data type Reference
values
_EIP2_MacAdrErr Port2 MAC Address Indicates that an error occurred when the BOOL TRUE or page A-160
Error MAC address was read on the communi- FALSE
cations port 2 at startup.
TRUE: Error
FALSE: Normal
Range of
Variable name Meaning Function Data type Reference
values
_EIP2_EtnCfgErr Port2 Basic Ethernet Indicates that the Ethernet communica- BOOL TRUE or page A-161
Setting Error tions speed setting (Speed/Duplex) for the FALSE
communications port 2 is incorrect. Or, a
read operation failed.
TRUE: Setting incorrect or read failed
FALSE: Normal
Range of
Variable name Meaning Function Data type Reference
values
_EIP_IPAdrDupErr IP Address Duplica- NX-series CPU Units: Indicates that the BOOL TRUE or page A-163
tion Error same IP address is assigned to more than FALSE
one node for the communications port 1.
TRUE: Duplication occurred.
FALSE: Other than the above.
NJ-series CPU Units: Indicates that the
same IP address is assigned to more than
one node.
TRUE: Duplication occurred.
FALSE: Other than the above.
_EIP1_IPAdrDupErr Port1 IP Address Indicates that the same IP address is BOOL TRUE or page A-163
Duplication Error assigned to more than one node for the FALSE
communications port 1.
TRUE: Duplication occurred.
FALSE: Other than the above.
Range of
Variable name Meaning Function Data type Reference
values
_EIP2_BootpErr Port2 BOOTP Server Indicates that a BOOTP server connection BOOL TRUE or page A-164
Error failure occurred on the communications FALSE
port 2.
TRUE: There was a failure to connect to
the BOOTP server (timeout).
FALSE: The BOOTP is not enabled, or
BOOTP is enabled and an IP
address was normally obtained
Range of
Variable name Meaning Function Data type Reference
values
_EIP_TDLinkCfgErr Tag Data Link Setting NX-series CPU Units: Indicates that the BOOL TRUE or page A-165
Error tag data link settings for CIP communica- FALSE
tions 1 are incorrect. Or, a read operation
failed.
TRUE: Setting incorrect or read failed
FALSE: Normal
NJ-series CPU Units: Indicates that the
tag data link settings are incorrect. Or, a
read operation failed.
TRUE: Setting incorrect or read failed
FALSE: Normal
_EIP1_TDLinkCfgErr CIP Communica- Indicates that the tag data link settings for BOOL TRUE or page A-166
tions1 Tag Data Link CIP communications 1 are incorrect. Or, a FALSE
Setting Error read operation failed.
TRUE: Setting incorrect or read failed
FALSE: Normal
Range of
Variable name Meaning Function Data type Reference
values
_EIP1_TDLinkOpnErr CIP Communica- Indicates that establishing a tag data link BOOL TRUE or page A-167
tions1 Tag Data Link connection for CIP communications 1 FALSE
Connection Failed failed.
TRUE: Establishing a tag data link con-
nection failed due to one of the
following causes.
• The information registered for
a target node in the tag data
Range of
Variable name Meaning Function Data type Reference
values
_EIP_TagAdrErr Tag Name Resolution NX-series CPU Units: Indicates that tag BOOL TRUE or page A-168
Error resolution for CIP communications 1 failed FALSE
(i.e., the address could not be identified
from the tag name).
TRUE: Tag resolution failed (i.e., the
address could not be identified
from the tag name). The follow-
ing causes are possible.
• The size of the network vari-
able is different from the tag
settings.
• The I/O direction that is set in
the tag data link settings does
not agree with the I/O direc-
tion of the variable in the CPU
Unit.
• There is no network variable
in the CPU Unit that corre-
sponds to the tag setting.
FALSE: Other than the above.
NJ-series CPU Units: Indicates that tag
resolution failed (i.e., the address could
not be identified from the tag name).
TRUE: Tag resolution failed (i.e., the
address could not be identified
from the tag name). The follow-
ing causes are possible.
• The size of the network vari-
able is different from the tag
settings.
• The I/O direction that is set in
the tag data link settings does
not agree with the I/O direc-
tion of the variable in the CPU
Unit.
• There is no network variable
in the CPU Unit that corre-
sponds to the tag setting.
FALSE: Other than the above.
_EIP1_TagAdrErr CIP Communica- Indicates that tag resolution for CIP com- BOOL TRUE or page A-168
tions1 Tag Name munications 1 failed (i.e., the address FALSE
Resolution Error could not be identified from the tag name).
TRUE: Tag resolution failed (i.e., the
address could not be identified
from the tag name). The follow-
ing causes are possible.
• The size of the network vari-
able is different from the tag
settings.
• The I/O direction that is set in
the tag data link settings does
not agree with the I/O direc-
tion of the variable in the CPU
Unit.
• There is no network variable
in the CPU Unit that corre-
sponds to the tag setting.
FALSE: Other than the above.
Range of
Variable name Meaning Function Data type Reference
values
_EIP2_TagAdrErr CIP Communica- Indicates that tag resolution for CIP com- BOOL TRUE or page A-169
tions2 Tag Name munications 2 failed (i.e., the address FALSE
Resolution Error could not be identified from the tag name).
TRUE: Tag resolution failed (i.e., the
address could not be identified
from the tag name). The follow-
ing causes are possible.
• The size of the network vari-
Range of
Variable name Meaning Function Data type Reference
values
_EIP_DNSSrvErr DNS Server Connec- TRUE: The DNS client failed to connect to BOOL TRUE or page A-170
tion Error the server (timeout). FALSE
FALSE: DNS is not enabled. Or, DNS is
enabled and the connection was
successful.
*1 With the NJ-series CPU Unit, this variable can be used with the unit version 1.11 or later.
Note You can access the same values of the system-defined variables whose variable names with _EIP1 and the
system-defined variables whose variable names with _EIP. For example, you can access the same values of
_EIP1_PortErr (Communications Port1 Error) and _EIP_PortErr (Communcations Port Error).
Note You can use the system-defined variables whose variable names with _EIP2 only for the NX701 CPU Units.
Range of
Variable name Meaning Function Data type Reference
values
_EIP_EtnOnlineSta Online NX-series CPU Units: Indicates that the BOOL TRUE or page A-170
built-in EtherNet/IP port’s communications FALSE
can be used via the communications port
1 (that is, the link is ON, IP address is
defined, and there are no errors).
TRUE: The built-in EtherNet/IP port’s
communications can be used.
FALSE: The built-in EtherNet/IP port’s
communications is disabled due
to an error in initial processing,
restart processing, or link OFF
status.
NJ-series CPU Units: Indicates that the
built-in EtherNet/IP port’s communications
can be used via the communications port
(that is, the link is ON, IP address is
defined, and there are no errors).
TRUE: The built-in EtherNet/IP port’s
communications can be used.
FALSE: The built-in EtherNet/IP port’s
communications is disabled due
to an error in initial processing,
restart processing, or link OFF
status.
_EIP1_EtnOnlineSta Port1 Online Indicates that the built-in EtherNet/IP BOOL TRUE or page A-171
port’s communications can be used via FALSE
the communications port 1 (that is, the link
is ON, IP address is defined, and there
are no errors).
TRUE: The built-in EtherNet/IP port’s
communications can be used.
FALSE: The built-in EtherNet/IP port’s
communications is disabled due
to an error in initial processing,
restart processing, or link OFF
status.
Range of
Variable name Meaning Function Data type Reference
values
_EIP_TDLinkRunSta Tag Data Link Com- NX-series CPU Units: Indicates that at BOOL TRUE or page A-171
munications Status least one connection is in normal opera- FALSE
tion in CIP communications 1.
TRUE: Normal operation
FALSE: Other than the above.
NJ-series CPU Units: Indicates that at
least one connection is in normal opera-
tion.
Range of
Variable name Meaning Function Data type Reference
values
_EIP_RegTargetSta Registered Target NX-series CPU Units: Gives a list of ARRAY TRUE or page A-173
[255] Node Information nodes for which built-in EtherNet/IP con- [0..255] OF FALSE
nections are registered for CIP communi- BOOL
cations 1.
This variable is valid only when the built-in
EtherNet/IP port is the originator.
Array[x] is TRUE:
The connection to the node with a tar-
get node ID of x is registered.
Array[x] is FALSE:
The connection to the node with a tar-
get node ID of x is not registered.
NJ-series CPU Units: Gives a list of nodes
for which built-in EtherNet/IP connections
are registered.
This variable is valid only when the built-in
EtherNet/IP port is the originator.
Array[x] is TRUE:
The connection to the node with a tar-
get node ID of x is registered.
Array[x] is FALSE:
The connection to the node with a tar-
get node ID of x is not registered.
_EIP1_RegTargetSta CIP Communica- Gives a list of nodes for which built-in Eth- ARRAY TRUE or page A-173
[255] tions1 Registered Tar- erNet/IP connections are registered for [0..255] OF FALSE
get Node Information CIP communications 1. BOOL
This variable is valid only when the built-in
EtherNet/IP port is the originator.
Array[x] is TRUE:
The connection to the node with a tar-
get node ID of x is registered.
Array[x] is FALSE:
The connection to the node with a tar-
get node ID of x is not registered.
Range of
Variable name Meaning Function Data type Reference
values
_EIP_EstbTargetSta Normal Target Node NX-series CPU Units: Gives a list of ARRAY TRUE or page A-174
[255] Information nodes that have normally established Eth- [0..255] OF FALSE
erNet/IP connections for CIP communica- BOOL
tions 1.
Array[x] is TRUE:
The connection to the node with a target
node ID of x was established normally.
Array[x] is FALSE:
Range of
Variable name Meaning Function Data type Reference
values
_EIP_TargetPLC- Target PLC Operat- NX-series CPU Units: Shows the operat- ARRAY TRUE or page A-175
ModeSta [255] ing Mode ing status of the target node Controllers [0..255] OF FALSE
that are connected for CIP communica- BOOL
tions 1, with the built-in EtherNet/IP port
as the originator.
The array elements are valid only when
the corresponding Normal Target Node
Information is TRUE. If the corresponding
Normal Target Node Information is
FALSE, the Target Node Controller Oper-
ating Information indicates the previous
operating status.
Array[x] is TRUE:
This is the operating state of the target
Controller with a node address of x.
Array[x] is FALSE:
Other than the above.
NJ-series CPU Units: Shows the operat-
ing status of the target node Controllers
that are connected with the built-in Ether-
Net/IP port as the originator.
The array elements are valid only when the
corresponding Normal Target Node Infor-
mation is TRUE. If the corresponding Nor-
mal Target Node Information is FALSE, the
Target Node Controller Operating Informa-
tion indicates the previous operating status.
Array[x] is TRUE:
This is the operating state of the target
Controller with a node address of x.
Array[x] is FALSE:
Other than the above.
_EIP1_TargetPLC- CIP Communica- Shows the operating status of the target ARRAY TRUE or page A-175
ModeSta [255] tions1 Target PLC node Controllers that are connected for [0..255] OF FALSE
Operating Mode CIP communications 1, with the built-in BOOL
EtherNet/IP port as the originator.
The array elements are valid only when
the corresponding Normal Target Node
Information is TRUE. If the corresponding
Normal Target Node Information is
FALSE, the Target Node Controller Oper-
ating Information indicates the previous
operating status.
Array[x] is TRUE:
This is the operating state of the target
Controller with a node address of x.
Array[x] is FALSE:
Other than the above.
Range of
Variable name Meaning Function Data type Reference
values
_EIP2_TargetPLC- CIP Communica- Shows the operating status of the target ARRAY TRUE or page A-175
ModeSta [255] tions2 Target PLC node Controllers that are connected for [0..255] OF FALSE
Operating Mode CIP communications 2, with the built-in BOOL
EtherNet/IP port as the originator.
The array elements are valid only when
the corresponding Normal Target Node
Information is TRUE. If the corresponding
Normal Target Node Information is
Range of
Variable name Meaning Function Data type Reference
values
_EIP1_TargetPLCErr CIP Communica- Shows the error status (logical OR of fatal ARRAY TRUE or page A-176
[255] tions1 Target PLC and non-fatal errors) of the target node [0..255] OF FALSE
Error Information Controllers that are connected for CIP BOOL
communications 1, with the built-in Ether-
Net/IP ports as the originator. The array
elements are valid only when the corre-
sponding Normal Target Node Information
is TRUE. The immediately preceding
value is retained if this variable is FALSE.
Array[x] is TRUE:
A fatal or non-fatal error occurred in the
target Controller with a target node ID
of x.
Array[x] is FALSE:
Other than the above.
Range of
Variable name Meaning Function Data type Reference
values
_EIP_TargetNodeErr Target Node Error NX-series CPU Units: Indicates that the ARRAY TRUE or page A-177
[255] Information connection for the Registered Target [0..255] OF FALSE
Node Information for CIP communications BOOL
1 was not established or that an error
occurred in the target Controller.
The array elements are valid only when
the Registered Target Node Information is
TRUE.
Range of
Variable name Meaning Function Data type Reference
values
_EIP1_Target- CIP Communica- Indicates that the connection for the Reg- ARRAY TRUE or page A-177
NodeErr [255] tions1 Target Node istered Target Node Information for CIP [0..255] OF FALSE
Error Information communications 1 was not established or BOOL
that an error occurred in the target Con-
troller.
The array elements are valid only when
the Registered Target Node Information is
TRUE.
Array[x] is TRUE:
A connection was not normally estab-
lished with the target node for a target
node ID of x (the Registered Target
Node Information is TRUE and the Nor-
mal Target Node Information is FALSE),
or a connection was established with
the target node but an error occurred in
the target Controller.
Array[x] is FALSE:
The target node is not registered for a
target node ID of x (the Registered Tar-
get Node Information is FALSE), or a
connection was normally established
with the target node (the Registered
Target Node Information is TRUE and
the Normal Target Node Information is
TRUE).
An error occurred in the target Control-
ler (the Target PLC Error Information is
TRUE).
Range of
Variable name Meaning Function Data type Reference
values
_EIP_NTPResult NTP Operation Infor- Use the GetNTPStatus instruction to read _sNTP_ page A-178
mation the NTP operation information from the RESULT
user program. Direct access is not possi-
ble.
.ExecTime NTP Last Operation Gives the last time that NTP processing DATE_AND_ Depends on page A-178
Time ended normally. The time that was TIME data type.
obtained from the NTP server is stored
when the time is obtained normally. The
Additional Information
For the NX-series Controller, the communications status of CIP communications 1 and CIP com-
munications 2 is shown by the combination of the values of four system-defined variables in the
same way as shown in the above table.
• CIP Communications 1
• _EIP1_RegTargetSta (CIP Communications1 Registered Target Node Information)
• _EIP1_EstbTargetSta (CIP Communications1 Normal Target Node Information)
• _EIP1_TargetPLCErr (CIP Communications1 Target PLC Error Information)
• _EIP_TargetNodeErr (Target Node Error Information)
• CIP Communications 2
• _EIP2_RegTargetSta (CIP Communications2 Registered Target Node Information)
• _EIP2_EstbTargetSta (CIP Communications2 Normal Target Node Information)
• _EIP2_TargetPLCErr (CIP Communications2 Target PLC Error Information)
• _EIP_TargetNodeErr (Target Node Error Information)
Range of
Variable name Meaning Function Data type Reference
values
_EIP_TDLinkStart- Tag Data Link Com- NX-series CPU Units: Change this vari- BOOL TRUE or page A-179
Cmd munications Start able to TRUE to start tag data links for CIP FALSE
Switch communications 1.
It automatically changes back to FALSE
after tag data link operation starts.
Range of
Variable name Meaning Function Data type Reference
values
_EIP2_TDLinkStop- CIP Communica- Change this variable to TRUE to stop tag BOOL TRUE or page A-180
Cmd tions2 Tag Data Link data links for CIP communications 2. FALSE
Communications Stop It automatically changes back to FALSE
Switch after tag data link operation stops.
Bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WORD
Bit Meaning
15 Master-detected error: This bit indicates whether the master detected a Controller error in the Unit/slave for the
error status of the Controller error.
TRUE: The master detected a Controller error.
FALSE: The master has not detected a Controller error.
Variable name This is the system-defined variable name. The prefix Members (for The member names are given for
gives the category name. structures) structure only.
Meaning This is the meaning of the variable. Global/local Global: Global variable, Local: Local
variable
Function The function of the variable is described.
Data type The data type of the variable is given. Range of values The range of values that the vari-
able can take is given.
R/W access R: Read only, Retained The Retain attri- Network Publish The Network Publish attribute of the
RW: Read/write bute of the vari- variable is given.
able is given.
Usage in user program Whether you Related instruc- The instructions that are related to the variable are given.
can use the vari- tions If you cannot use the variable directly in the user program, the instructions
able directly in that access the variable are given.
the user pro-
gram is speci-
fied.
A
Functional Classification: Tasks
A-6-1 System-defined Variables for the Overall NJ/NX-series Controller (No Category)
Variable name _TaskName_Active
Meaning Task Active Flag Global/local Global
Function TRUE during task execution.
FALSE when task execution is not in progress.
Note You cannot use this system-defined variable in the user program. It is used only to access task status for
data tracing from the Sysmac Studio.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Not published.
Usage in user program Not possible. Related instruc- ActEventTask
tions You can access this variable from the user program only with the following
instruction.
• Task_IsActive
Note You cannot use this system-defined variable in the user program. It is used only to access task status for
data tracing from the Sysmac Studio.
Data type TIME Range of values Depends on data type.
R/W access R Retained Not retained. Network Publish Not published.
Usage in user program Not possible. Related instruc- You can access this variable from the user program only with the following
tions instruction.
• GetMyTaskStatus
Note You cannot use this system-defined variable in the user program. It is used only to access task status for
data tracing from the Sysmac Studio.
Data type TIME Range of values Depends on data type.
R/W access R Retained Not retained. Network Publish Not published.
Usage in user program Not supported. Related instruc- You can access this variable from the user program only with the following
tions instruction.
• GetMyTaskStatus
Note You cannot use this system-defined variable in the user program. It is used only to access task status for
data tracing from the Sysmac Studio.
Data type TIME Range of values Depends on data type.
R/W access R Retained Not retained. Network Publish Not published.
Usage in user program Not possible. Related instruc- You can access this variable from the user program only with the following
tions instruction.
• GetMyTaskStatus
Note You cannot use these system-defined variables in the user program. It is used only to access task status for
data tracing from the Sysmac Studio.
Data type UDINT Range of values Depends on data type.
R/W access R Retained Not retained. Network Publish Not published.
Usage in user program Not possible. Related instruc- You can access this variable from the user program only with the following
tions instruction.
• GetMyTaskStatus
Note You cannot use this system-defined variable in the user program. It is used only to access task status for
data tracing from the Sysmac Studio.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Not published.
Usage in user program Not possible. Related instruc- You can access this variable from the user program only with the following
tions instruction.
• GetMyTaskStatus
Note You cannot use this system-defined variable in the user program. It is used only to access task status for
data tracing from the Sysmac Studio.
Data type UDINT Range of values Depends on data type.
R/W access R Retained Not retained. Network Publish Not published.
Usage in user program Not possible. Related instruc- You can access this variable from the user program only with the following
tions instruction.
• GetMyTaskStatus
Note Do not use this variable in the user program. There may be a delay in updating it and concurrency prob-
A-6-1 System-defined Variables for the Overall NJ/NX-series Controller (No Category)
lems in relation to the status of the function module. Use this variable only to access status through com-
munications from an external device. Refer to A-5-8 Meanings of Error Status Bits for the meanings of the
error status bits.
Data type WORD Range of values 16#0000 to 16#C0F0
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Not possible. Related instruc- • ResetPLCError
tions • ResetCJBError
• ResetECError
• ResetMCError
• MC_Reset
• MC_GroupReset
You can access this variable from the user program only with the following
instructions.
• GetPLCError
• GetCJBError
• GetECError
• GetMCError
• GetEIPError
A-6-1 System-defined Variables for the Overall NJ/NX-series Controller (No Category)
tions
*1 This system-defined variable is not applicable for the data backup function even with a Retain attribute.
Note You cannot use this system-defined variable in the user program. Use it in CIP message communications
when sending a command from an HMI or host computer.
Data type Structure: _sBKUP_CMD, Member: BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user program Not possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.03 of the CPU Unit.
Note You cannot use this system-defined variable in the user program. Use it in CIP message communications
when sending a command from an HMI or host computer.
Data type Structure: _sBKUP_CMD, Member: BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user program Not possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.03 of the CPU Unit.
Note You cannot use this system-defined variable in the user program. Use it in CIP message communications
when sending a command from an HMI or host computer.
Data type Structure: _sBKUP_CMD, Member: BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user program Not possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.03 of the CPU Unit.
Note You cannot use this system-defined variable in the user program. Use it in CIP message communications
when sending a command from an HMI or host computer.
Data type Structure: _sBKUP_CMD, Member: BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user program Not possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.03 of the CPU Unit.
Note You cannot use this system-defined variable in the user program. Use it in CIP message communications
when sending a command from an HMI or host computer.
Data type Structure: _sBKUP_CMD, Member: STRING(64) Range of values Depends on data type.
R/W access RW Retained Not retained. Network Publish Published.
Usage in user program Not possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.03 of the CPU Unit.
Note You cannot use this system-defined variable in the user program. Use it in CIP message communications
to read the status from an HMI or host computer.
Data type Structure: _sBKUP_STA, Member: BOOL Range of values TRUE or FALSE
R/W access Read Retained Not retained. Network Publish Published.
Usage in user program Not possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.03 of the CPU Unit.
Note You cannot use this system-defined variable in the user program. Use it in CIP message communications
to read the status from an HMI or host computer.
Data type Structure: _sBKUP_STA, Member: BOOL Range of values TRUE or FALSE
R/W access Read Retained Not retained. Network Publish Published.
Usage in user program Not possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.03 of the CPU Unit.
Note You cannot use this system-defined variable in the user program. Use it in CIP message communications
to read the status from an HMI or host computer.
Data type Structure: _sBKUP_STA, Member: BOOL Range of values TRUE or FALSE
R/W access Read Retained Not retained. Network Publish Published. A
Usage in user program Not possible. Related instruc- ---
tions
A-6-1 System-defined Variables for the Overall NJ/NX-series Controller (No Category)
*1 This system-defined variable was added for unit version 1.03 of the CPU Unit.
Note You cannot use this system-defined variable in the user program. Use it in CIP message communications
to read the status from an HMI or host computer.
Data type Structure: _sVEFY_STA, Member: BOOL Range of values TRUE or FALSE
R/W access Read Retained Not retained. Network Publish Published.
Usage in user program Not possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.03 of the CPU Unit.
Note You cannot use this system-defined variable in the user program. Use it in CIP message communications
to read the status from an HMI or host computer.
Data type Structure: _sVEFY_STA, Member: BOOL Range of values TRUE or FALSE
R/W access Read Retained Not retained. Network Publish Published.
Usage in user program Not possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.03 of the CPU Unit.
Note You cannot use this system-defined variable in the user program. Use it in CIP message communications
to read the status from an HMI or host computer.
Data type Structure: _sVEFY_STA, Member: BOOL Range of values TRUE or FALSE
R/W access Read Retained Not retained. Network Publish Published.
Usage in user program Not possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.03 of the CPU Unit.
Note You cannot use this system-defined variable in the user program. Use it in CIP message communications
to read the status from an HMI or host computer.
Data type Structure: _sVEFY_STA, Member: BOOL Range of values TRUE or FALSE
R/W access Read Retained Not retained. Network Publish Published.
Usage in user program Not possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.03 of the CPU Unit.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type Structure: _sPRGTRANSFER_CMD, Member: BOOL Range of values TRUE or FALSE
R/W access RW Retained Retained.*2 Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.11 of the CPU Unit.
*2 This system-defined variable is not applicable for the data backup function even with a Retain attribute.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type Structure: _sPRGTRANSFER_CMD, Member: BOOL Range of values TRUE or FALSE
R/W access RW Retained Retained.*2 Network Publish Published.
Usage in user program Possible. Related instruc- --- A
tions
*1 This system-defined variable was added for unit version 1.11 of the CPU Unit.
A-6-1 System-defined Variables for the Overall NJ/NX-series Controller (No Category)
*2 This system-defined variable is not applicable for the data backup function even with a Retain attribute.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type Structure: _sPRGTRANSFER_CMD, Member: BOOL Range of values TRUE or FALSE
R/W access RW Retained Retained.*2 Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.11 of the CPU Unit.
*2 This system-defined variable is not applicable for the data backup function even with a Retain attribute.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type Structure: _sPRGTRANSFER_CMD, Member: BOOL Range of values TRUE or FALSE
R/W access RW Retained Retained. *2 Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.11 of the CPU Unit.
*2 This system-defined variable is not applicable for the data backup function even with a Retain attribute.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type Structure: _sPRGTRANSFER_STA, Member: BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.11 of the CPU Unit.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type Structure: _sPRGTRANSFER_STA, Member: BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.11 of the CPU Unit.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type Structure: _sPRGTRANSFER_STA, Member: BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.11 of the CPU Unit.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type Structure: _sRESTORE_CMD, Member: BOOL Range of values TRUE or FALSE
R/W access RW Retained Retained.*2 Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.14 of the CPU Unit.
*2 This system-defined variable is not applicable for the data backup function even with a Retain attribute.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type Structure: _sRESTORE_CMD, Member: STRING(64) Range of values Depends on data type.
R/W access RW Retained Retained. *2 Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.14 of the CPU Unit.
*2 This system-defined variable is not applicable for the data backup function even with a Retain attribute.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type Structure: _sRESTORE_CMD, Member: STRING(33) Range of values Depends on data type. A
R/W access RW Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- ---
A-6-1 System-defined Variables for the Overall NJ/NX-series Controller (No Category)
tions
*1 This system-defined variable was added for unit version 1.14 of the CPU Unit.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type Structure: _sRESTORE_STA, Member: BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.14 of the CPU Unit.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type Structure: _sRESTORE_STA, Member: BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.14 of the CPU Unit.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type Structure: _sRESTORE_STA, Member: BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.14 of the CPU Unit.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Retained.*2 Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.14 of the CPU Unit.
*2 This system-defined variable is not applicable for the data backup function even with a Retain attribute.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Retained.*2 Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.14 of the CPU Unit.
*2 This system-defined variable is not applicable for the data backup function even with a Retain attribute.
Note You can use this system-defined variable only for NJ/NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Retained.*2 Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.14 of the CPU Unit.
*2 This system-defined variable is not applicable for the data backup function even with a Retain attribute.
Note You can use this system-defined variable only for NJ/NX-series CPU Units. A
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Retained.*2 Network Publish Published.
A-6-1 System-defined Variables for the Overall NJ/NX-series Controller (No Category)
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.14 of the CPU Unit.
*2 This system-defined variable is not applicable for the data backup function even with a Retain attribute.
*1 This system-defined variable was added for unit version 1.03 of the CPU Unit.
*1 This system-defined variable is not applicable for the data backup function even with a Retain attribute.
*1 This system-defined variable is not applicable for the data backup function even with a Retain attribute.
Note When the encoder home offset data is not retained, the status is given in the error status of the axis vari-
able, and not in this flag.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Not published.
Usage in user program Possible. Related instruc- ---
tions
A-6-1 System-defined Variables for the Overall NJ/NX-series Controller (No Category)
Note You cannot use this system-defined variable inside functions.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Not published.
Usage in user program Possible. Related instruc- ---
tions
*1 This system-defined variable was added for unit version 1.08 of the CPU Unit.
Note You can use this system-defined variable only for NJ-series CPU Units.
Data type USINT Range of values 0 to 32
R/W access R Retained Not retained. Network Publish Not published.
Usage in user program Possible. Related instruc- Communications instructions (ExecPMCR, SerialSend, SerialRcv, Send,
tions Rcv, and SendCmd)
Note You can use this system-defined variable only for NJ-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Not published.
Usage in user program Possible. Related instruc- Communications instructions (ExecPMCR, SerialSend, SerialRcv, Send,
tions Rcv, and SendCmd)
Note You can use this system-defined variable only for NJ-series CPU Units.
Data type WORD Range of values 16#0000 to 16#FFFF
R/W access R Retained Not retained. Network Publish Published.*1
Usage in user program Possible. Related instruc- ---
tions
*1 The network for CPU Units with unit version 1.07 or earlier is not published.
*1 This system-defined variable was added for unit version 1.08 of the CPU Unit.
A-6-1 System-defined Variables for the Overall NJ/NX-series Controller (No Category)
Variable name _SelfTest_LowFanRevolution*1
Meaning Low FAN Revolution Flag Global/local Global
Function TRUE when the fan is disconnected or the rotation speed of a fan is decreased.
Note Always FALSE for an NX1P2 CPU Unit and NJ-series CPU Unit.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- ---
gram tions
*1 This system-defined variable was added for unit version 1.10 of the CPU Unit.
Note You cannot use these system-defined variables in the user program. It is used only to monitor the status of
data tracing from the Sysmac Studio.
Data type Structure: _sTRACE_STA, Members: BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Not published.
Usage in user program Not possible. Related instruc- • TraceTrig
tions • TraceSamp
You can access this variable from the user program only with the following
instruction.
• GetTraceStatus
Note You cannot use this system-defined variable in the user program. It is used only to monitor the status of
data tracing from the Sysmac Studio.
Data type Structure: _sTRACE_STA, Members: BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Not published.
Usage in user program Not possible. Related instruc- • TraceTrig
tions • TraceSamp
You can access this variable from the user program only with the following
instruction.
• GetTraceStatus
Note You cannot use these system-defined variables in the user program. It is used only to monitor the status of
data tracing from the Sysmac Studio.
Data type Structure: _sTRACE_STA, Members: BOOL Range of values TRUE or FALSE
R/W access R Retained Retained. Network Publish Not published.
Usage in user program Not possible. Related instruc- • TraceTrig
tions • TraceSamp
You can access this variable from the user program only with the following
instruction.
• GetTraceStatus
Note You cannot use these system-defined variables in the user program. It is used only to monitor the status of
data tracing from the Sysmac Studio.
Data type Structure: _sTRACE_STA, Members: BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Not published.
Usage in user program Not possible. Related instruc- You can access this variable from the user program only with the following
tions instruction.
• GetTraceStatus
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type ARRAY[0..2] OF _sOPTBOARD_STA Range of values
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- ---
gram tions
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- ---
gram tions
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- ---
gram tions
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type ARRAY[0..2] OF _sOPTSERIALERR_STA Range of values
R/W access RW Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- ---
gram tions
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- ---
gram tions
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
A
Variable name _PLC_OptSerialErrSta*1 Member name ParityErr
Note We do not recommend the use of this variable in the user program. There may be a delay in updating it. Use
these variables only to access status through communications from an external device such as an HMI.
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- ---
gram tions
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
Note We do not recommend the use of this variable in the user program. There may be a delay in updating it. Use
these variables only to access status through communications from an external device such as an HMI.
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- ---
gram tions
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
Note We do not recommend the use of this variable in the user program. There may be a delay in updating it. Use
these variables only to access status through communications from an external device such as an HMI.
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- ---
gram tions
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
Note You can use this system-defined variable only for NJ-series CPU Units.
Data type UINT Range of values 0 to 3
“0” means there are no Expansion
Racks.
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
Note You can use this system-defined variable only for NJ-series CPU Units.
Note Do not use this variable in the user program. There may be a delay in updating it and concurrency prob-
lems may occur. Use this variable only to access status through communications from an external device.
Refer to A-5-8 Meanings of Error Status Bits for the meanings of the error status bits.
Note You can use this system-defined variable only for NJ-series CPU Units.
Data type WORD Range of values 16#0000 to 16#00F0
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Not possible. Related instruc- You can access this variable from the user program only with the following
tions instruction.
• GetCJBError
You can use the following instruction to clear this variable.
• ResetCJBError
Note Do not use this variable in the user program. There may be a delay in updating it and concurrency prob-
lems may occur. Use these variables only to access status through communications from an external
device. Refer to A-5-8 Meanings of Error Status Bits for the meanings of the error status bits.
Note You can use this system-defined variable only for NJ-series CPU Units.
Data type WORD Range of values 16#0000 to 16#00F0
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Not possible. Related instruc- You can access this variable from the user program only with the following
tions instruction.
• GetCJBError
You can use the following instruction to clear this variable.
• ResetCJBError
Note Do not use this variable in the user program. There may be a delay in updating it and concurrency prob-
lems may occur. Use this variable only to access status through communications from an external device.
Refer to A-5-8 Meanings of Error Status Bits for the meanings of the error status bits.
Note You can use this system-defined variable only for NJ-series CPU Units.
Data type ARRAY [0..3, 0..9] OF WORD Range of values 16#0000 to 16#80F0
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Not possible. Related instruc- You can access this variable from the user program only with the following
tions instruction.
• GetCJBError
You can clear this variable with the following instruction.
• ResetCJBError
Note You can use this system-defined variable only for NJ-series CPU Units.
Data type ARRAY [0..3, 0..9] OF UINT Range of values 0 to 320
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
Note You can use this system-defined variable only for NJ-series CPU Units.
Data type ARRAY [0..3, 0..9, 0..7] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Not published.
Usage in user program Possible. Related instruc- ---
tions
Auxiliary Words A50 to A69
Area Bits A50.00 to A69.15
addresses
Note You can use this system-defined variable only for NJ-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- • ResetUnit
tions
Auxiliary Words A302
Area Bits A302.00 to A302.15
addresses
Note You can use this system-defined variable only for NJ-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- • ResetUnit
tions
Auxiliary Words A330 to A335
Area
Bits A330.00 to A335.15
addresses
Note You can use this system-defined variable only for NJ-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- • ResetUnit
tions
Auxiliary Words A501
Area Bits A501.00 to A501.15
addresses
Note You can use this system-defined variable only for NJ-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- • ResetUnit
tions
Auxiliary Words A502 to A507
Area
Bits A502.00 to A507.15
addresses
Note You can use this system-defined variable only for NJ-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions A
Auxiliary Words Port on Serial Communications Unit with unit number 0: A620
Area Ports on Serial Communications Unit with unit numbers 1 to 15: A621 to A635
addresses
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type UINT Range of values 0 to 8
0: No NX Unit mounted.
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- ---
gram tions
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type ARRAY[0..8] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- ---
gram tions
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type ARRAY[0..8] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- ---
gram tions
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type ARRAY[0..8] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- ---
gram tions
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type WORD Range of values 16#0000 to 16#40F2
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- You can access this variable from the user program only with the following
gram tions instruction.
• GetNXBError
You can use the following instructions to clear this variable.
• ResetNXBError
• RestartNXUnit
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type WORD Range of values 16#0000 to 16#40F2
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- You can access this variable from the user program only with the following
gram tions instruction.
• GetNXBError
You can use the following instructions to clear this variable.
• ResetNXBError
• RestartNXUnit
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type ARRAY [1..8] OF BOOL Range of values 16#0000 to 16#40F2
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- You can access this variable from the user program only with the following
gram tions instruction.
• GetNXBError
You can use the following instructions to clear this variable.
• ResetNXBError
• RestartNXUnit
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
Note You can use this system-defined variable only for the NX1P2 CPU Units.
Data type ARRAY [0..8] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- You can access this variable from the user program only with the following
gram tions instruction.
• GetNXBError
You can use the following instructions to clear this variable.
• ResetNXBError
• RestartNXUnit
*1 This system-defined variable was added for unit version 1.13 of the CPU Unit.
Note You can use this system-defined variable only for the NX701 CPU Units. You can access the same values
of _MC1_GRP and _MC_GRP if the array element numbers of them are the same.
Data type ARRAY[0..63] OF _sGROUP_REF Range of values ---
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- ---
tions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type ARRAY[0..63] OF _sGROUP_REF Range of values ---
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units. You can access the same values of
_MC1_AX and _MC_AX if the array element numbers of them are the same.
Data type ARRAY[0..255] OF _sAXIS_REF Range of values ---
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type ARRAY[0..255] OF _sAXIS_REF Range of values ---
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
*1 For the NX1P2 CPU Units and NJ-series CPU Units, the node address is 1 to 192 and the data type is Array [1..192] OF WORD.
Note The values of all system-defined variables that are related to errors in EtherCAT communications do not change until the
cause of the error is removed and then the error in the Controller is reset with the troubleshooting functions of the Sys-
mac Studio or the ResetECError instruction.
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE A
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
Note Use this variable to confirm that message communications are possible for the relevant slave before you
execute message communications with an EtherCAT slave.
Data type Array [1..512] OF BOOL*1 Range of values TRUE or FALSE
Note Use this variable to confirm that the data for the relevant slave is valid before controlling an EtherCAT
slave.
Data type Array [1..512] OF BOOL*1 Range of values TRUE or FALSE
Note All system-defined variables that are related to the status of EtherCAT communications give the current status.
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- ---
gram tions
Note All system-defined variables that are related to the status of EtherCAT communications give the current status.
Note You can use this system-defined variable only for NX-series CPU Units.
Note This variable is always TRUE for the NX1P2 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related instruc- ---
gram tions
Note All system-defined variables that are related to the status of EtherCAT communications give the current status.
Note The write interval does not change even if you change the value of this system-defined variable while the A
diagnosis/statistics log operation is in progress.
Data type UINT Range of values 0, or 30 to 1800
Note Refer to A-5-8 Meanings of Error Status Bits for the meanings of the error status bits.
Data type WORD Range of values 16#0000 to 16#00F0
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- You can access this variable from the user program with the following
tions instruction.
• GetEIPError
Note If a Link OFF Detected or Built-in EtherNet/IP Processing Error occurs, it is recorded in the event log and
then corresponding bit turns ON. Refer to A-5-8 Meanings of Error Status Bits for the meanings of the error
status bits.
Data type WORD Range of values 16#0000 to 16#00F0
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- You can access this variable from the user program with the following
tions instruction.
• GetEIPError
Note If a Link OFF Detected or Built-in EtherNet/IP Processing Error occurs, it is recorded in the event log and
then corresponding bit turns ON. Refer to A-5-8 Meanings of Error Status Bits for the meanings of the error
status bits.
Note You can use this system-defined variable only for NX-series CPU Units.
Data type WORD Range of values 16#0000 to 16#00F0
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- You can access this variable from the user program with the following A
tions instruction.
• GetEIPError
Note If a Link OFF Detected or Built-in EtherNet/IP Processing Error occurs, it is recorded in the event log and
then corresponding bit turns ON. Refer to A-5-8 Meanings of Error Status Bits for the meanings of the error
status bits.
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type WORD Range of values 16#0000 to 16#00F0
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- You can access this variable from the user program with the following
tions instruction.
• GetEIPError
Note If a Tag Name Resolution Error occurs, it is recorded in the event log and this variable changes to TRUE.
Refer to A-5-8 Meanings of Error Status Bits for the meanings of the error status bits.
Data type WORD Range of values 16#0000 to 16#00F0
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- You can access this variable from the user program with the following
tions instruction.
• GetEIPError
Note If a Tag Name Resolution Error occurs, it is recorded in the event log and this variable changes to TRUE.
Refer to A-5-8 Meanings of Error Status Bits for the meanings of the error status bits.
Note You can use this system-defined variable only for NX-series CPU Units.
Data type WORD Range of values 16#0000 to 16#00F0
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related instruc- You can access this variable from the user program with the following
tions instruction.
• GetEIPError
Note If a Tag Name Resolution Error occurs, it is recorded in the event log and this variable changes to TRUE.
Refer to A-5-8 Meanings of Error Status Bits for the meanings of the error status bits.
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type WORD Range of values 16#0000 to 16#00F0
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related You can access this variable from the user program with the following instruction.
instructions • GetEIPError
A
Variable name _EIP_TcpAppErr
Meaning TCP Application Communications Error Global/local Global
Note Refer to A-5-8 Meanings of Error Status Bits for the meanings of the error status bits.
Data type WORD Range of values 16#0000 to 16#00F0
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related You can access this variable from the user program with the following instruction.
instructions • GetEIPError
NJ-series CPU Units: Indicates that an error occurred when the MAC address was read at startup.
TRUE: Error
FALSE: Normal
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related ---
instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related ---
instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related ---
instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related ---
instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related ---
instructions
A
NJ-series CPU Units: Indicates that the Ethernet communications speed setting (Speed/Duplex) is incorrect. Or, a
read operation failed.
TRUE: Setting incorrect or read failed
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related ---
instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related ---
instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related ---
instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related ---
instructions
NJ-series CPU Units: Indicates that the same IP address is assigned to more than one node.
TRUE: Duplication occurred.
FALSE: Other than the above.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user program Possible. Related ---
instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Indicates that a BOOTP server connection failure occurred.
TRUE: There was a failure to connect to the BOOTP server (timeout).
FALSE: The BOOTP is not enabled, or BOOTP is enabled and an IP address was normally obtained from the
BOOTP server.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Indicates that the IP router table or hosts settings are incorrect. Or, a read operation failed.
TRUE: Setting incorrect or read failed
FALSE: Normal
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Indicates that the identity information (which you cannot overwrite) is incorrect. Or, a read
operation failed.
TRUE: Setting incorrect or read failed
FALSE: Normal
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Indicates that the tag data link settings are incorrect. Or, a read operation failed.
TRUE: Setting incorrect or read failed
FALSE: Normal
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Indicates that establishing a tag data link connection failed.
TRUE: Establishing a tag data link connection failed due to one of the following causes.
•The information registered for a target node in the tag data link parameters is different from the actual
node information.
•There was no response from the remote node.
FALSE: Other than the above.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Indicates that a timeout occurred in a tag data link connection.
TRUE: A timeout occurred.
FALSE: Other than the above.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Indicates that tag resolution failed (i.e., the address could not be identified from the tag name).
TRUE: Tag resolution failed (i.e., the address could not be identified from the tag name). The following causes are
possible.
•The size of the network variable is different from the tag settings.
•The I/O direction that is set in the tag data link settings does not agree with the I/O direction of the vari-
able in the CPU Unit.
•There is no network variable in the CPU Unit that corresponds to the tag setting.
FALSE: Other than the above.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Indicates that more than one switch turned ON at the same time.
TRUE: More than one data link start/stop switch changed to TRUE at the same time.
FALSE: Other than the above.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Indicates that the built-in EtherNet/IP port’s communications can be used via the communications
port (that is, the link is ON, IP address is defined, and there are no errors).
TRUE: The built-in EtherNet/IP port’s communications can be used.
FALSE: The built-in EtherNet/IP port’s communications is disabled due to an error in initial processing, restart pro-
cessing, or link OFF status.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Indicates that at least one connection is in normal operation.
TRUE: Normal operation
FALSE: Other than the above.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Indicates that all tag data links are communicating.
TRUE: Tag data links are communicating in all connections as the originator.
FALSE: An error occurred in at least one connection.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Gives a list of nodes for which built-in EtherNet/IP connections are registered.
This variable is valid only when the built-in EtherNet/IP port is the originator.
Array[x] is TRUE: The connection to the node with a target node ID of x is registered.
Array[x] is FALSE: The connection to the node with a target node ID of x is not registered.
Data type ARRAY [0..255] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type ARRAY [0..255] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type ARRAY [0..255] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Gives a list of nodes that have normally established EtherNet/IP connections.
Array[x] is TRUE: The connection to the node with a target node ID of x was established normally.
Array[x] is FALSE: The connection to the node with a target node ID of x was not established, or an error occurred.
Data type ARRAY [0..255] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type ARRAY [0..255] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type ARRAY [0..255] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Shows the operating status of the target node Controllers that are connected with the built-in
EtherNet/IP port as the originator.
The array elements are valid only when the corresponding Normal Target Node Information is TRUE. If the corre-
sponding Normal Target Node Information is FALSE, the Target Node Controller Operating Information indicates
the previous operating status.
Array[x] is TRUE: This is the operating state of the target Controller with a node address of x.
Array[x] is FALSE: Other than the above.
Data type ARRAY [0..255] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions A
Note You can use this system-defined variable only for NX-series CPU Units.
Data type ARRAY [0..255] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type ARRAY [0..255] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Shows the error status (logical OR of fatal and non-fatal errors) of the target node Controllers
that are connected with the built-in EtherNet/IP ports as the originator. The array elements are valid only when the
corresponding Normal Target Node Information is TRUE. The immediately preceding value is retained if this vari-
able is FALSE.
Array[x] is TRUE: A fatal or non-fatal error occurred in the target Controller with a target node ID of x.
Array[x] is FALSE: Other than the above.
Data type ARRAY [0..255] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type ARRAY [0..255] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type ARRAY [0..255] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Indicates that the connection for the Registered Target Node Information was not established
or that an error occurred in the target Controller.
The array elements are valid only when the Registered Target Node Information is TRUE.
Array[x] is TRUE: A connection was not normally established with the target node for a target node ID of x (the Regis-
tered Target Node Information is TRUE and the Normal Target Node Information is FALSE), or a connection was
established with the target node but an error occurred in the target Controller.
Array[x] is FALSE: The target node is not registered for a target node ID of x (the Registered Target Node Informa-
tion is FALSE), or a connection was normally established with the target node (the Registered Target Node Infor-
mation is TRUE and the Normal Target Node Information is TRUE). An error occurred in the target Controller (the A
Target PLC Error Information is TRUE).
Data type ARRAY [0..255] OF BOOL Range of values TRUE or FALSE
Note You can use this system-defined variable only for NX-series CPU Units.
Data type ARRAY [0..255] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type ARRAY [0..255] OF BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note Do not use this variable in the user program. There may be a delay in updating it. Use this variable only to
access status through communications from an external device.
Data type Structure: _sNTP_RESULT Range of values Depends on data type.
Members: DATE_AND_TIME
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Not possible. Related You can read the contents of this variable with the GetNTPStatus instruction.
gram instructions
Note Do not use this variable in the user program. There may be a delay in updating it. Use this variable only to
access status through communications from an external device.
Data type BOOL Range of values TRUE or FALSE
R/W access R Retained Not retained. Network Publish Published.
Usage in user pro- Not possible. Related You can read the contents of this variable with the GetNTPStatus instruction.
gram instructions
NJ-series CPU Units: Change this variable to TRUE to start tag data links.
It automatically changes back to FALSE after tag data link operation starts.
Note Do not force this switch to change to FALSE from the user program or from the Sysmac Studio. It changes to
FALSE automatically.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note Do not force this switch to change to FALSE from the user program or from the Sysmac Studio. It changes to
FALSE automatically.
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
NJ-series CPU Units: Change this variable to TRUE to stop tag data links.
It automatically changes back to FALSE after tag data link operation stops.
Note Do not force this switch to change to FALSE from the user program or from the Sysmac Studio. It changes to
FALSE automatically.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note Do not force this switch to change to FALSE from the user program or from the Sysmac Studio. It changes to
FALSE automatically.
Note You can use this system-defined variable only for NX-series CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Note Do not force this switch to change to FALSE from the user program or from the Sysmac Studio. It changes to
FALSE automatically.
Note You can use this system-defined variable only for the NX701 CPU Units.
Data type BOOL Range of values TRUE or FALSE
R/W access RW Retained Not retained. Network Publish Published.
Usage in user pro- Possible. Related ---
gram instructions
Transfer-
ring data
Status changes with the
Data reten- Sysmac
Writing Studio Operating
tion at When Overwrit-
when write modes
CPU Unit data power power is Change When a ing in RUN
protection permitting
interrup- turned ON between Major Fault mode
is enabled writing
tions PRO- Level Con- Synchro-
GRAM troller nized data
mode and Error
RUN mode occurs
Retained Same as Retained. Retained. Not sup- Retained. CPU Unit Not sup-
(with non- before ported. name: ported.
volatile power inter- RUN/PRO-
Opera- Operation Set- memory). ruption. GRAM
tion Set- tings mode,
tings Error settings Other set-
tings: PRO-
GRAM
mode
Retained Same as Retained. Retained. Not sup- Retained. Write Pro- Supported.
(with non- before ported. tection and
Protection
Security volatile power inter- other set-
Settings at
Settings memory). ruption. tings: PRO-
Startup
GRAM
mode
TCP/IP Set- Retained Same as Retained. Retained. Not sup- Retained. PRO- Not sup-
tings, Built-in (with non- before ported. GRAM ported.
EtherNet/IP volatile power inter- mode
Port Link Set- memory). ruption.
tings, Service
Settings.
Built-in SNMP Set-
Ether- tings, SNMP
Net/IP Trap Settings,
Port Set- NTP Settings,
tings FTP Settings,
Control- and IP Router
ler Setup Tables
Tag data link Retained Same as Retained. Retained. Supported Not PRO- Not sup-
settings for (with non- before retained. GRAM/ ported.
built-in Ether- volatile power inter- RUN
Net/IP port memory). ruption.
Node Address Retained Same as Retained. Retained. Not sup- Retained. PRO- Not sup-
Settings, (with non- before ported. GRAM ported.
FINS/UDP Set- volatile power inter- mode
FINS Set- tings, memory). ruption.
tings FINS/TCP Set-
tings, FINS
Routing
Tables
Retained Same as Retained. Retained. Not sup- Retained. PRO- Not sup-
(with non- before ported. GRAM ported.
Built-in I/O Settings
volatile power inter- mode
memory). ruption.
Retained Same as Retained. Retained. Not sup- Retained. PRO- Not sup-
(with non- before ported. GRAM ported.
Option Board Settings
volatile power inter- mode
memory). ruption.
Retained Same as Retained. Retained. Not sup- Retained. PRO- Not sup-
Memory Settings for CJ- (with non- before ported. GRAM ported.
series Units volatile power inter- mode
memory). ruption.
Axis assignments, axis Retained Same as Retained. Retained. Not sup- Retained. PRO- Not sup-
Motion parameter settings, axes (with non- before ported. GRAM ported.
Control group parameter settings, volatile power inter- mode
Setup MC common parameter memory). ruption.
settings
Retained Same as Retained. Retained. Not sup- Retained. PRO- Not sup-
(with non- before ported. GRAM ported.
Cam Data
volatile power inter- mode
memory). ruption.
Transfer-
ring data
Status changes with the
Data reten- Sysmac
Writing Studio Operating
tion at When Overwrit-
when write modes
CPU Unit data power power is Change When a ing in RUN
protection permitting
interrup- turned ON between Major Fault mode
is enabled writing
tions PRO- Level Con- Synchro-
GRAM troller nized data
mode and Error
Transfer-
ring data
Status changes with the
Data reten- Sysmac
Writing Studio Operating
tion at When Overwrit-
when write modes
CPU Unit data power power is Change When a ing in RUN
protection permitting
interrup- turned ON between Major Fault mode
is enabled writing
tions PRO- Level Con- Synchro-
GRAM troller nized data
mode and Error
RUN mode occurs
Not 16#0000 16#0000 16#0000 Supported. Not RUN/PRO- Supported.
Contents CIO/WR retained. retained. GRAM
of mem- mode
ory used
for CJ- Retained Same as Retained. Retained. Supported. Not RUN/PRO- Supported.
series (with Bat- before retained. GRAM
HR/DM/EM
Units tery*1). power inter- mode
ruption.*2
Retained Same as Retained. Retained. Supported. Not Supported.
Event System log (with Bat- before retained.
Logs
logs User event log tery*1). power inter-
ruption.
Retained With Bat- Retained Retained Supported. Not RUN/PRO- Supported.
(with Bat- tery: (continued). (continued). retained. GRAM
tery). Retained mode
Depends on the specifica- (contin-
Internal
tions of each system- ued), With-
clock
defined variable. out Battery:
Not predict-
able (may
stop).
Retained Same as Retained Retained Supported. Not Not sup-
(with Bat- before (continued). (continued). retained. ported.
Absolute encoder home offset
tery*1). power inter-
ruption.
*1For the NX1P2 CPU Units, data is retained in the non-volatile memory.
*2For the NX1P2 CPU Units, the value is 16#0000 if the Battery-related error detection is set to Do not use.
A
I/O Bits
Addresses
Addresses Word addresses Bit addresses
Range CIO 0 to CIO 159 0.00 to 159.15
Additional Information
You can access this area on NJ-series CPU Units through device variables allocated to I/O ports.
We therefore recommend that you do not use AT specifications to access this area. You should
use AT specifications for the CIO Area only when you specify addresses for some of the Special
Units.
Addresses
Addresses Word addresses Bit addresses Words per Unit
Range CIO 1500 to CIO 1899 CIO 1500.00 to CIO 1899.15 25 words
The words that are allocated are listed in the following table.
Word addresses Unit Number
CIO 1500 to CIO 1524 0
CIO 1525 to CIO 1549 1
to to
CIO 1875 to CIO 1899 F
For details on how to use the allocated words, refer to the operation manual for the CJ-series CPU
Bus Unit.
Addresses
Addresses Word addresses Bit addresses Words per Unit
CIO 2000 to CIO 2959 CIO 2000.00 to CIO 2959.15 10 words
Range (10 words × 96 unit
numbers)
The words that are allocated are listed in the following table.
Word addresses Unit Number
CIO 2000 to CIO 2009 0
CIO 2010 to CIO 2019 1
to to
CIO 2950 to CIO 2959 95
For details on how to use the allocated words, refer to the operation manual for the CJ-series Spe-
cial I/O Unit.
Additional Information
You can access the Special I/O Unit Area in NJ-series CPU Units through the device variables
that are allocated to I/O ports. We therefore recommend that you do not use AT specifications to
access this area.
DeviceNet Area
Addresses
Addresses Word addresses Bit addresses
Range CIO 3200 to CIO 3799 CIO 3200.00 to CIO 3799.15
Words in this area are allocated to slaves for fixed allocations according to fixed allocation setting 1,
2, or 3 in the software switches in the CIO Area. Select one of these fixed areas.
Master to slave out-
Addresses Slave to master input area
put area
Fixed allocation area 1 CIO 3200 to CIO 3263 CIO 3300 to CIO 3363
Fixed allocation area 2 CIO 3400 to CIO 3463 CIO 3500 to CIO 3563
Fixed allocation area 3 CIO 3600 to CIO 3663 CIO 3700 to CIO 3763
A
You can allocate memory in the DeviceNet Area even if you use fixed allocations to use the remote
Refer to the CJ-series DeviceNet Units Operation Manual for NJ-series CPU Unit (Cat. No. W497)
for details.
Addresses
Addresses Word addresses Bit addresses
CIO 1300 to CIO 1499 and CIO 1300.00 to CIO 1499.15 and
Range
CIO 3800 to CIO 6143 CIO 3800.00 to CIO 6143.15
Addresses
Addresses Word addresses Bit addresses
Range W000 to W511 W000.00 to W511.15
Addresses
Addresses Word addresses Bit addresses
Range H0 to H511 H0.00 to H511.15
A-8-4 DM Area
Description
This is a general-purpose data area used to read and write 16-bit words. You can also add a bit
number to address specify bits. Data in this area is retained during power interruption or when the
operating mode is changed between PROGRAM and RUN mode.
Addresses
Addresses Word addresses Bit addresses
Range D0 to D32767 D0.00 to D32767.15
Addresses
Type of CJ-series
Addresses Word addresses Words per Unit
Special Unit
CJ-series Special I/O D20000 to D29599 (100 words 100 words
Units × 96 unit numbers)
Range
CJ-series CPU Bus D30000 to D31599 (100 words 100 words
Units × 16 unit numbers)
The words that are allocated are listed in the following table.
CJ-series Special I/O Units
Word addresses Unit Number
D20000 to D20099 0
D20100 to D20199 1
to to
D29500 to D29599 95
For details on how to use the allocated words, refer to the operation manual for the Special Unit.
Additional Information
You can access the DM Area words that are allocated to Special Units in NJ-series CPU Units
through the device variables that are allocated to I/O ports. We therefore recommend that you do
not use AT specifications to access this area.
A-8-5 EM Area
A
Description
This is a general-purpose data area used to read and write 16-bit words. You can also add a bit
A-8-5 EM Area
number to address specify bits. Data in this area is retained during power interruption or when the
operating mode is changed between PROGRAM and RUN mode.
Addresses
Addresses Word addresses Bit addresses
NJ501-: E0_0 to E18_32767 NJ501-: E0_0.00 to E18_3276.15
Range NJ301-: E0_0 to E3_32767 NJ301-: E0_0.00 to E3_32767.15
NJ101-: E0_0 to E3_32767 NJ101-: E0_0.00 to E3_32767.15
This information for determining the location of a variable in memory is called the alignment. The align-
ment is determined for each data type. The amount of memory and the memory locations for the vari-
ables are given below.
Item Specification
Amount of memory that is allocated An integral multiple of the alignment. However, the minimum amount of
memory is the data size.
Locations in memory At an integral multiple of the alignment starting from the start of the vari-
able in memory.
The alignments and the amounts of memory that are allocated for the basic data types and enumera-
tions are given below.
Amount of memory that
Data type Alignment [bytes]
is allocated [bytes]
BOOL 2 2
* BOOL arrays are an exception. Refer to Precautions for Correct Use, below, for the amount of memory that is
allocated for BOOL arrays.
Therefore, the following formula gives the amount of memory that is allocated for a BOOL array.
For 1 to 16 elements, 2 bytes are allocated. For 17 to 32 elements, 4 bytes are allocated.
Number of
elements − 1
Amount of memory = 2 +2
16
Truncate the decimal portion of the result
of the calculation in brackets.
Specific examples of the rules for memory allocation for variables of each data type are given below.
Arrays
A continuous section of memory is allocated for the elements of the array based on the data size of the
data type of the array variable. The alignment of an array is the same as alignment of the data type of
the elements.
Example: Continuous variables in the following order: two BOOL variable, one BOOL array with five
elements, one BOOL array with 19 elements, and one BOOL array with four elements
Structures
For a structure variable, the members are located in memory in the order that they are declared. Each
member is located at an integer multiple of the alignment of the data type of the member. Therefore,
there can be unused memory between members or at the end of members. The alignment of a struc-
ture is the largest alignment of all of the members. The amount of memory that is allocated is the inte-
gral multiple of the alignment that is larger than the total amount of memory that is allocated when the
members are arranged in order at integral multiples of the alignment of the data types of the members.
Example: The alignments and the amounts of memory that are allocated for the four variable declara-
tions given in the following figure are given in the following table.
Example: The alignments and the amounts of memory that are allocated for the four variable declara-
tions given in the following figure are given in the following table.
Unions
For a union variable, the members overlap in the same memory locations. The alignment of a union is
largest alignment of all of the members. The amount of memory that is allocated is the largest amount
of memory that is allocated for any of the members.
Additional Information
This is not necessary when you exchange data between NJ/NX-series CPU Units.
Name Data type NJ/NX-series Structure Variable NJ_X Name Data type CJ-series Structure Variable CJ_X
Structure Y STRUCT Bytes Structure Y STRUCT Bytes
a DINT First byte a a DINT First byte a
b INT b INT
c DINT First byte + 4 b c DINT First byte + 4 b
Variable Table First byte + 6 Not used. Variable Table First byte + 6 c
Name Data type First byte + 8 c Name Data type
Variable NJ_X Structure Y Variable CJ_X Structure Y
Version Information
The following table gives the unit version of the CPU Units and the Sysmac Studio version that
are required to specify member offsets.
* You cannot select the memory offset type. You can set member offsets.
If you change the memory configuration of a structure variable by setting offsets, you must make the
same changes for the same structure variable in other NJ/NX-series CPU Units on the network.
Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No W504-E1-03 or later) for the pro-
cedure to change the memory configuration of a structure variable.
Example: The following example shows how the memory configuration of the structure variable in
To align the memory configurations in the NJ-series and CJ-series CPU Units, offsets are set in the Sysmac Studio.
Here, the following offsets are set for member c of data type Y of the structure variable NJ_X.
A
Make the following changes to align the memory
configurations in the NJ/NX-series and CJ-series CPU Units.
(2) Add the dummy variable b2 that you created in the (1) Add a dummy member variable b2 that matches the
CJ-series CPU Unit to the NJ/NX-series CPU Unit as well. unused memory location on the NJ/NX-series CPU Unit.
1 Use the following format to create a table of variables in a Microsoft Excel spreadsheet.
You must use the same number and arrangement of columns as in the following format. Do not
omit any columns even if they are empty, like the Address type/address and I/O comment col-
umns that are shown below.
2 Start the CX-Designer and open the Symbol Table Dialog Box.
4 Right-click in the Symbol Table Dialog Box in the CX-Designer and select Paste from the
menu.
5 In the Host Selection Dialog Box on the CX-Designer, select the NJ/NX-series Controller
host and then click the OK Button.
The variables are registered in the Symbol Table Dialog Box of the CX-Designer.
Version Information
A CPU Unit with unit version 1.04 or later and Sysmac Studio version 1.05 or higher are required
to use the instructions to enable and disable EtherCAT slaves and axes.
A
Additional Information
• You can also enable and disable EtherCAT slaves in the following Sysmac Studio settings:
Configurations and Setup − EtherCAT − Network Configuration − Enable/Disable Set-
tings. If you use the Sysmac Studio settings, however, you would have to use the Sysmac
Studio to change the settings every time or you would have to change the project file depend-
ing on the machine to handle the application that is described later in Application 1: Central-
ized Management of Machines with Different EtherCAT Slave Configuration and Axis
Composition on page A-208.
• You can disable an EtherCAT slave to enable removing it or installing it on the EtherCAT net-
work.
Version Information
A CPU Unit with unit version 1.04 or later and Sysmac Studio version 1.05 or higher are required
to use the EC_ChangeEnableSetting and MC_ChangeAxisUse instructions.
EC_ChangeEnableSetting Instruction
The EC_ChangeEnableSetting (Enable/Disable EtherCAT Slave) instruction is used to enable and dis-
able EtherCAT slaves. You can use the EC_ChangeEnableSetting instruction to enable or disable the
EtherCAT slave with the specified node address. If you cycle the power supply to the Controller after
this instruction is executed, the settings will return to the settings from before instruction execution.
Refer to the NJ/NX-series Instructions Reference Manual (Cat. No. W502) for the detailed specifica-
tions of the EC_ChangeEnableSetting instruction.
MC_ChangeAxisUse Instruction
The MC_ChangeAxisUse (Change Axis Use) instruction is used to enable and disable axes. The
MC_ChangeAxisUse instruction changes the setting of the Axis Use axis parameter of the specified
axis between Used Axis and Unused Axis. If you cycle the power supply to the Controller after this
instruction is executed, the settings will return to the settings from before instruction execution. Refer to
the NJ/NX-series Motion Control Instructions Reference Manual (Cat. No. W508) for the detailed spec-
ifications of the MC_ChangeAxisUse instruction.
Value Meaning
TRUE The EtherCAT slave with the specified node address is disabled.
FALSE The EtherCAT slave with the specified node address is enabled.
Value Meaning
0: _mcNoneAxis The specified axis is an undefined axis.
1: _mcUnusedAxis The specified axis is an unused axis.
2: _mcUsedAxis The specified axis is a used axis.
Version Information A
A CPU Unit with unit version 1.08 or later and Sysmac Studio version 1.09 or higher are required
to use the PrgStart and PrgStop instructions.
Version Information
A CPU Unit with unit version 1.08 or later and the Sysmac Studio version 1.09 or higher are
required to use the PrgStatus instruction.
1 Right-click EtherCAT under Configurations and Setup and select Edit from the menu.
The EtherCAT Tab Page is displayed.
2 In the Toolbox, right-click the EtherCAT slave you want to connect and select Insert from the menu.
The selected EtherCAT slave is displayed under the EtherCAT master on the EtherCAT Tab
Page. Also, the Parameter Settings Area for the EtherCAT slave is displayed on the right side of
the EtherCAT Tab Page.
3 Set the value of Enable/Disable Settings to Enabled on the Parameter Settings Area for the
EtherCAT slave.
1 Right-click Axis Settings under Configurations and Setup - Motion Control Setup and select
Add - Axis Settings from the menu.
The axis MC_Axis000(0) is added under Axis Settings.
1 Right-click Task Settings under Configurations and Setup and select Edit from the menu.
The Task Settings Tab Page is displayed.
3 Set Initial Status of the program to Run on the Program Assignment Settings Display.
CPU CPU
Unit Unit
EtherCAT EtherCAT
A B C A B C D
In the Sysmac Studio project, an EtherCAT Slave Configuration is created for all four EtherCAT slaves
and axes in A, B, C, and D in the figure. Then, on the Sysmac Studio, you set the EtherCAT slave
enable/disable settings, Axis Use parameter settings, and the associated program run/stop status at
the start of operation according to machine 1, as shown in the following table.
To make changes for machine 2, you use instructions to change the EtherCAT slave enable/disable settings, Axis
Use parameter settings, and the associated program enable/disable settings as shown in the following table.
EtherCAT Installed in Enable/disable Axis Use
Associated programs
slave EtherCAT network setting parameter setting
A, B, and C Installed. Enabled. Used Axis Executed.
D Installed. Enabled. Used Axis Executed.
The user program algorithm is shown in the following figure. A signal is input to the Controller from an
external device to specify whether machine 1 or machine 2 is operated. A
External signal input.
No
Operation started.
CPU CPU
Unit Unit
In the Sysmac Studio project, an EtherCAT slave configuration is created for all seven EtherCAT slaves
and axes in A to G in the figure.
On the Sysmac Studio, set the EtherCAT slave enable/disable settings, Axis Use parameter settings,
and the associated program run/stop status at the start of operation for nodes A to G as shown in the
following table. These are the settings for the configuration before change.
EtherCAT Installed in Enable/disable Axis Use
Associated programs
slave EtherCAT network setting parameter setting
A and B Installed. Enabled. Used Axis Run at the start of opera-
tion.
C, E, and D Installed. Enabled. Used Axis Run at the start of opera-
tion.
F and G Not installed. Disabled. Unused Axis Stop at the start of opera-
tion.
The following procedure is used to change the EtherCAT slaves and axes that are used from C, D, E to
F and G.
2 Use the MC_ChangeAxisUse instruction to set the Axis Use parameters for C, D, and E to
Unused Axis.
3 Use the EC_ChangeEnableSetting instruction to disable the settings for EtherCAT slaves C, D,
and E.
4 Use the PrgStop instruction to disable the programs associated with C, D and E.
7 Use the EC_ChangeEnableSetting instruction to enable the settings for EtherCAT slaves F and
G.
8 Use the MC_ChangeAxisUse instruction to set the Axis Use parameters for F and G to Used
Axis.
9 Use the PrgStart instruction to enable the programs associated with F and G.
10 Start production line 4 again.
As the result of the above steps, the EtherCAT slave enable/disable settings, Axis Use parameter set-
tings, and the associated programs enable/disable settings are changed as shown below.
EtherCAT Installed in Enable/disable Axis Use
Associated programs
slave EtherCAT network setting parameter setting
A and B Installed. Enabled. Used Axis Enabled.
C, E, and D Not installed. Disabled. Unused Axis Disabled.
F and G Installed. Enabled. Used Axis Enabled.
POU Restrictions
There are restrictions both on POU definitions and POU instances.
Refer to Number of POU Instances on page A-215 for information on counting POU instances.
Restrictions to Variables
There are restrictions to both variable usage and variable definitions.
Work Description
Upload the data from the CPU Unit. Upload the following three types of data from the old CPU Unit. Each of
these must be uploaded separately.
• Project
• Present values of variables and memory
• Tag data link tables
Connect the new CPU Unit. Remove the old CPU Unit from the Controller and connect the new CPU Unit.
Download the data to the CPU Unit. Download the three types of data that you stored in the computer to the
new CPU Unit.
Details on the above work is provided in the following sections. A
1 Start the Sysmac Studio on the computer that is connected to the NJ-series Controller.
6 Clear the Do not transfer the EtherNet/IP connection settings (built-in port and Unit)
Check Box and click the Transfer From Controller Button.
The project in the Controller is uploaded to the computer.
1 Select Backup − Backup Variables and Memory from the Tools Menu on the Sysmac Stu-
dio.
2 Select the Present value of Retain attribute variable, DM, EM and Holding Memory used
for CJ -series Units, and Absolute encoder home offset value Check Boxes and click the
Execute Button.
The variable and memory data is uploaded to the computer.
1 Start the Network Configurator on the computer that is connected to the NJ-series Con-
troller.
5 Select only the IP address of the connected CPU Unit as the device and click the OK But-
ton.
1 Start the Sysmac Studio on the computer that is connected to the NJ-series Controller.
6 Clear the Do not transfer the EtherNet/IP connection settings (built-in port and Unit)
Check Box and click the Transfer To Controller Button.
The project in the computer is downloaded to the Controller.
1 Select Backup − Restore Variables and Memory from the Tools Menu on the Sysmac Stu-
dio.
2 Select the data file that you uploaded from the old CPU Unit and click the Execute Button.
The variable and memory data is downloaded to the Controller.
1 Start the Network Configurator on the computer that is connected to the NJ-series Con-
troller.
3 Select File − Open and open the tag data link file that you uploaded from the old CPU
Unit.
4 To download tag data link tables to a CPU Unit with unit version 1.03 or later when the tag
data link tables were uploaded from a CPU Unit with unit version 1.02 or earlier, select
Device − Change Device and select NJ-1 Rev2 as the new device.
A-14-1 Relationship Between Unit Versions of CPU Units and Sysmac Studio Versions
Unit version of CPU Unit Corresponding version of Sysmac Studio
Ver.1.14 Ver.1.18
Ver.1.13*1 Ver.1.17*2
Ver.1.12 Ver.1.16
Ver.1.11 Ver.1.15
Ver.1.10 Ver.1.13
*1 There is no NX1P2- CPU Unit with unit version 1.12 or earlier.
*2 Use an NX1P2- CPU Unit with Sysmac Studio version 1.17 or higher. You cannot use an
NX1P2- CPU Unit with Sysmac Studio version 1.16 or lower.
Additional Information
A-14-2 Functions That Were Added or Changed for Each Unit Version
Addi- Sysmac
Unit ver-
Function tion/cha Studio Reference
sion
nge version
Communi- Communications instructions Change Ver.1.11 Ver.1.15 NJ/NX-series
cations Instructions
Reference
Manual (Cat.
No. W502)
SD Mem- Application Program transfer from SD Addition Ver.1.11 Ver.1.15 9-5 Program
ory Cards Memory Card Transfer from
SD Memory A
Card
Note Refer to the manuals for the function modules for additions and changes to function module functions for
A-14-2 Functions That Were Added or Changed for Each Unit Version
each unit version of the CPU Units.
A
Using a CPU Unit with an Earlier Unit Version
If you use an NJ-series CPU Unit with an earlier version, select the unit version of the connected
A-15-1 Relationship between Unit Versions of CPU Units and Sysmac Studio Versions
CPU Unit or an earlier unit version in the Select Device Area of the Project Properties Dialog Box on
the Sysmac Studio. You can use only the functions that are supported by the unit version of the con-
nected CPU Unit.
Example: Unit version of CPU Unit: 1.03
Sysmac Studio version: 1.05
Unit version 1.04 of the CPU Unit corresponds to Sysmac Studio version 1.05. How-
ever, the connected CPU Unit is unit version 1.03, so select version 1.03 or earlier as
the version in the Select Device Area of the Project Properties Dialog Box. If you select
version 1.03 as the version in the Select Device Area of the Project Properties Dialog
Box, you can use only the functions that are supported by unit version 1.03 of the CPU
Unit. You cannot use functionality that was added for unit version 1.04 or later of the
CPU Unit.
Additional Information
Model number Hardware revision of CPU Unit Corresponding version of Sysmac Studio
NJ501- A Ver.1.14
A-15-3 Functions That Were Added or Changed for Each Unit Version
Sysmac
Addition/ Unit
Function Studio Reference
change version
version
Tasks Function Conditionally executed tasks Addition 1.03 1.04 5-2 Overview of Tasks
Programming Namespaces Addition 1.01 1.02 6-7 Namespaces
Data types Structure data Specifying Addition 1.01 1.02 Specifying Structure
types member off- Member Offsets on
Change 1.03
sets page 6-42
Libraries Addition 1.01 1.02 6-8 Libraries
Motion control Single axes Single-axis Cyclic syn- Addition 1.03 1.04 NJ/NX-series CPU
position con- chronous Unit Motion Control A
trol absolute posi- User’s Manual (Cat.
tioning No. W507)
A-15-3 Functions That Were Added or Changed for Each Unit Version
Auxiliary func- Homing with Addition 1.03 1.04
tion for single- specified
axis control parameters
Enabling digi- Addition 1.06 1.07
tal cam
switches
Command Addition 1.10 1.12
position com-
pensation
Start velocity Addition 1.05 1.06
Axes groups Multi-axes Axes group Addition 1.01 1.02
coordinated cyclic synchro-
control nous absolute
positioning
Auxiliary func- Reading axes Addition 1.01 1.02
tions for multi- group posi-
axes coordi- tions
nated control
Changing the Addition 1.01 1.02
axes in a
group
Common Cams Generating Addition 1.08 1.09
items cam tables
Parameters Changing axis Addition 1.08 1.09
parameters
Auxiliary func- Input signal logic inversion Addition 1.05 1.06
tions
Unit (I/O) NX Units Addition 1.05 1.06 NX-series EtherCAT
management Coupler Unit User’s
Manual (Cat. No.
W519)
Sysmac
Addition/ Unit
Function Studio Reference
change version
version
Communica- EtherNet/ TCP/IP FTP client Addition 1.08 1.09 NJ/NX-series CPU
tions IP port applications Unit Built-in Ether-
Net/IP Port User’s
Manual (Cat. No.
W506)
EtherCAT port Packet monitoring*1 Addition 1.10 1.12 NJ/NX-series CPU
Unit Built-in EtherCAT
(NJ301-)
Port User’s Manual
(Cat. No. W505)
Communications instructions Change 1.08 1.09 NJ/NX-series Instruc-
1.11 1.15 tions Reference Man-
ual (Cat. No. W502)
Debugging Differential monitoring Addition 1.03 1.04 8-6-5 Differential
function Monitoring
Reliability Self diagnosis Controller Changing lev- Addition 1.03 1.04 8-8 Changing Event
functions errors els Levels
Security Asset protec- Protection Data protec- Addition 1.01 1.02 8-5-4 Data Protection
tion and pre- tion
venting
Operation Number of Change 1.01 1.02 8-5-5 Operation
incorrect oper- authority verifi- groups Authority Verification
ation
cation
SD Memory Application Automatic transfer from SD Addition 1.03 1.04 9-4 Automatic Trans-
Cards Memory Card fers from SD Memory
Cards
Program transfer from SD Mem- Addition 1.11 1.15 9-5 Program Transfer
ory Card from SD Memory
Card
Backing up SD Memory Operating CPU Unit Addition 1.03 1.04 9-2 SD Memory Card
data Card backups methods front-panel Backups
DIP switch
Specification Addition 1.03 1.04
with system-
defined vari-
ables
SD Memory Addition 1.03 1.04
Card Window
in Sysmac Stu-
dio
Special Addition 1.08 1.09
instruction
Protection Disabling Addition 1.03 1.04 9-3 Disabling Back-
backups to SD ups to SD Memory
Memory Cards Cards
Sysmac Studio Controller backups Addition 1.03 1.04 9-6 Sysmac Studio
Controller Backups
*1 This addition applies only to an NJ301- CPU Unit. The NJ501- and NJ101- CPU Units support packet
monitoring with all versions.
Note Refer to the manuals for the function modules for additions and changes to function module functions for
each unit version of the CPU Units.
A-15-3 Functions That Were Added or Changed for Each Unit Version
*5 The performance improvement applies only to an NJ301- CPU Unit. The maximum numbers of axes
for single-axis control for the NJ501- are as follows:
NJ501-5: 64 axes, NJ501-4: 32 axes, and NJ501-3: 16 axes
Index
A _Card1RestoreCmd (SD Memory Card Restore Command)
................................................................................A-122
accessing I/O with variables ........................................ 2-14 _Card1RestoreSta (SD Memory Card Restore Status)
Accessing Task ............................................................ 4-10 ..................................................................................A-61
accessing tasks ........................................................... 5-94 _Card1VefySta .................................... A-59, A-119, A-120
_TaskName_Active ................................... 5-8, A-55, A-113 Carry Flag .................................................6-8, A-63, A-126
_AlarmFlag ...................................................... A-56, A-115 changing event levels .................................................. 8-83
algorithms ........................................................... 6-10, 6-17 changing present values .............................................. 8-52
All Tag Data Link Communications Status ..................A-99 CIP Communications Error .............................. A-86, A-158
Always FALSE Flag ......................................... A-63, A-126 CIP Communications1 Error ........................................A-86
Always TRUE Flag .......................................... A-63, A-126 CIP Communications1 Identity Error ...........................A-91
array specification ............................................... 6-33, 6-50 CIP Communications1 Multiple Switches ON Error ....A-95
assumed causes ............................................ 12-20, 12-23 CIP Communications1 Tag Data Link Communications
AT Specification ........................................................... 6-56 Error ..........................................................................A-93
Axes Group Error Status ................................. A-75, A-143 CIP Communications1 Tag Data Link Connection Failed
Axes Group Variables ...............................3-18, A-75, A-76 ..................................................................................A-93
Axis Error Status ............................................. A-75, A-143 CIP Communications1 Tag Data Link Setting Error .....A-92
Axis Variables ........................................... 3-18, A-76, A-77 CIP Communications1 Tag Name Resolution Error ....A-94
CIP Communications2 Error ........................................A-87
B CIP Communications2 Identity Error ...........................A-91
CIP Communications2 Multiple Switches ON Error ....A-95
CIP Communications2 Tag Data Link Communications
backing up data ............................................................. 9-3
Error ..........................................................................A-93
Backup Function Busy Flag ............................. A-62, A-125
CIP Communications2 Tag Data Link Connection Failed
_BackupBusy .................................................. A-62, A-125
..................................................................................A-93
basic data types .......................................................... 6-30
CIP Communications2 Tag Data Link Setting Error .....A-92
Basic Ethernet Setting Error ........................................A-88
CIP Communications2 Tag Name Resolution Error ....A-95
Basic I/O Unit Information ............................... A-71, A-137
_CJB_CBU00InitSta to _CJB_CBU15InitSta
Basic I/O Units ....................................................4-15, 8-22
.............................................................8-24, A-71, A-137
Basic Input Unit Input Response Times . 8-23, A-70, A-136
_CJB_CBU00Restart to _CJB_CBU15Restart
basic settings ................................................................. 4-4
.............................................................8-24, A-71, A-138
basic system configurations ............................1-5, 1-7, 1-9
_CJB_ErrSta ................................................... A-70, A-135
bit strings ..................................................................... 6-31
_CJB_InRespTm ....................................8-23, A-70, A-136
Boolean ....................................................................... 6-31
_CJB_IOUnitInfo .............................................. A-71, A-137
BOOTP Server Error ...................................................A-90
_CJB_MaxRackNo .......................................... A-70, A-135
Built-in EtherCAT Error .................................... A-78, A-147
_CJB_MaxSlotNo ............................................ A-70, A-135
Built-in EtherNet/IP Error ................................. A-83, A-156
_CJB_MstrErrSta ............................................ A-70, A-136
bus bars ....................................................................... 6-87
_CJB_SCU00P1ChgSta to _CJB_SCU00P2ChgSta
..................................................................................A-71
C
_CJB_SCU00P1ChgSta, _CJB_SCU00P2ChgSta to
_CJB_SCU15P1ChgSta, _CJB_SCU15P2ChgSta
_Card1Access ........................................8-30, A-57, A-116
................................................................................A-139
_Card1BkupCmd ................................. A-58, A-117, A-118
_CJB_SCU15P1ChgSta to _CJB_SCU15P2ChgSta
_Card1BkupSta ............................................... A-59, A-119
..................................................................................A-71
_Card1Deteriorated ................................ 8-30, A-57, A-117
_CJB_SIO00InitSta to _CJB_SIO95InitSta
_Card1Err ............................................... 8-30, A-57, A-116
.............................................................8-24, A-71, A-137
_Card1PowerFail .................................... 8-30, A-57, A-117
_CJB_SIO00Restart to _CJB_SIO95Restart
_Card1PrgRestoreCmd (SD Memory Card Restore
.............................................................8-24, A-71, A-138
Command) ................................................................A-60
_CJB_UnitErrSta ............................................. A-70, A-136
_Card1PrgTransferCmd (SD Memory Card Program
CJ-series Unit configuration .......................................... 1-9
Transfer Command) ...................................... A-59, A-120
Clearing All Memory ...................................................... 8-3
_Card1PrgTransferSta (SD Memory Card Program Transfer
clock .............................................................................. 8-3
Status) .............................................. A-60, A-122, A-123
clock data ...................................................................... 8-4
_Card1Protect ........................................8-30, A-57, A-116
Common Error Status ...................................... A-75, A-143
_Card1Ready ......................................... 8-30, A-57, A-116
Common Variable ............................................ A-75, A-144
Process Data Transmission Error ................... A-79, A-149 Serial Communications Unit 0, Port 1/2 Settings Changing
Program Assignment Settings ...................................... 4-9 Flags ............................................................ A-71, A-139
Program Execution Order ............................................. 4-9 Serial Communications Units 1 to 15, Port 1/2 Settings
programming languages ............................................. 6-87 Changing Flags ............................................ A-71, A-139
programs ....................................................................... 6-7 serial IDs ............................................................ 8-45, 8-46
execution conditions ................................................ 6-8 Setting Change during RUN Mode ................................ 4-6
Settings for Exclusive Control of Variables in Tasks
R ............................................................. 4-10, 5-94, 5-101
Settings for Variable Access Time ............................ 5-102
range specification ............................................. 6-33, 6-54 short names .............................................................. 6-140
real numbers ............................................................... 6-31 simulation ...................................................................... 7-3
refreshing tasks ........................................................... 5-94 simulation programs ...................................................... 7-6
Registered Slave Table ................................... A-81, A-151 simulation speed ........................................................... 7-7
restoring data ................................................................ 9-3 Slave Application Error .................................... A-79, A-150
retain condition ............................................................ 6-69 Slave Error ...................................................... A-78, A-147
_RetainFail ...................................................... A-62, A-126 Slave Error Table ............................................. A-78, A-148
Retention Failure Flag ..................................... A-62, A-126 Slave Initialization Error .................................. A-79, A-150
return values ...................................................... 6-20, 6-21 Slave Node Address Duplicated Error ............ A-79, A-149
Run ............................................................................. A-66 software configuration ................................................... 2-4
RUN output ................................................................... 8-6 software operation ........................................................ 2-5
Special I/O Unit Initializing Flags ........... 8-24, A-71, A-137
S Special I/O Unit Restart Bits .................. 8-24, A-71, A-138
Special Units ...................................................... 4-15, 8-23
Saving Packet Data File .................................. A-81, A-153 initial settings ......................................................... 4-20
SD Memory Card specifications I
exclusive control of file access .............................. 8-33 function .................................................................. A-10
self-diagnosis ........................................................ 8-31 general .................................................................... A-3
SD Memory Card Access Flag .............. 8-30, A-57, A-116 performance ............................................................ A-3
SD Memory Card Backup Commands ............ A-58, A-117 specifying structure member offsets ........................... 6-42
SD Memory Card Backup Status .................... A-59, A-118 ST language ................................................................ 6-93
SD Memory Card Error Flag .................. 8-30, A-57, A-116 assignment .......................................................... 6-100
SD Memory Card Life Warning Flag ...... 8-30, A-57, A-117 CASE ................................................................... 6-106
SD Memory Card Power Interruption Flag EXIT .................................................................... 6-116
............................................................ 8-30, A-57, A-117 expressions ........................................................... 6-94
SD Memory Card Program Transfer Command FOR ..................................................................... 6-108
............................................................ 9-35, A-59, A-120 function block calls .............................................. 6-117
SD Memory Card Program Transfer Setting ................. 4-5 function calls ........................................................ 6-120
SD Memory Card program transfer status IF with multiple conditions ................................... 6-103
..........................................................A-60, A-122, A-123 IF with one condition ........................................... 6-101
SD Memory Card Ready Flag ................ 8-30, A-57, A-116 operators ............................................................... 6-97
SD Memory Card Restore Command ....................... A-122 REPEAT .............................................................. 6-114
SD Memory Card Restore status ................................ A-61 RETURN ............................................................. 6-101
SD Memory Card Restorer Command ........................ A-60 statement keywords ............................................... 6-95
SD Memory Card Setting .............................................. 4-5 structure ................................................................ 6-94
SD Memory Card Verify Status ....................... A-59, A-119 syntax errors ........................................................ 6-136
SD Memory Card Write Protected Flag . 8-30, A-57, A-116 WHILE ................................................................. 6-112
SD Memory Cards starting and stopping the Simulator .............................. 7-3
file operations from the Sysmac Studio ................. 8-29 structures .................................................................... 6-40
life expiration detection .......................................... 8-29 Support Software ............................1-5, 1-6, 1-7, 1-8, 1-10
operation instructions ............................................ 8-28 synchronizing sequence control and motion control ... 2-33
operations .............................................................. 8-25 System Service Monitoring Settings ............................. 4-5
specifications ......................................................... 8-26 system services .......................................................... 5-79
Security Setting ............................................................. 4-6 System Time ................................................... A-55, A-113
_SelfTest_HighTemperature ........................................ A-64 system-defined events ................................................ 8-69
_SelfTest_LowBattery ................................................. A-64 system-defined variables ............................................ 6-27
_SelfTest_LowFanRevolution ...................................... A-64 Auxiliary Area bits for CJ-series Units ....... A-71, A-137
semi-user-defined variables ........................................ 6-27 clock .................................................................... A-113
sequence control and motion control .......................... 2-27 communications ........................................ A-63, A-127
sequence control system ............................................ 2-29 debugging .................................................. A-65, A-130
OMRON ASIA PACIFIC PTE. LTD. OMRON (CHINA) CO., LTD. © OMRON Corporation 2011-2017 All Rights Reserved.
No. 438A Alexandra Road # 05-05/08 (Lobby 2), Room 2211, Bank of China Tower, In the interest of product improvement,
Alexandra Technopark, 200 Yin Cheng Zhong Road, specifications are subject to change without notice.
Singapore 119967 PuDong New Area, Shanghai, 200120, China
Tel: (65) 6835-3011/Fax: (65) 6835-2711 Tel: (86) 21-5037-2222/Fax: (86) 21-5037-2200 Cat. No. W501-E1-20 0617