Instructions Reference Manual

1692  Download (0)

全文

(1)

Instructions Reference Manual

NX701-1£££

NX102-1£££

NX102-90££

NX1P2-1£££££

NX1P2-9£££££

NJ501-££££

NJ301-1£££

NJ101-10££

NJ101-90££

W502-E1-30

(2)

otherwise, without the prior written permission of OMRON.

2. No patent liability is assumed with respect to the use of the information contained herein.

Moreover, because OMRON is constantly striving to improve its high-quality products, the infor- mation contained in this manual is subject to change without notice.

3. Every precaution has been taken in the preparation of this manual. Nevertheless, OMRON as- sumes 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, Excel, and Visual Basic are either registered trademarks or trademarks of Mi- crosoft 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.

The SD and SDHC logos are trademarks of SD-3C, LLC.

Other company names and product names in this document are the trademarks or registered trade- marks of their respective companies.

Copyrights

Microsoft product screen shots reprinted with permission from Microsoft Corporation.

This product incorporates certain third party software. The license and copyright information associ- ated with this software is available at http://www.fa.omron.co.jp/nj_info_e/.

(3)

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££

• NX102-12££

• NX102-11££

• NX102-10££

• NX102-90££

• NX1P2-11££££

• NX1P2-11££££1

• NX1P2-10££££

• NX1P2-10££££1

• NX1P2-90££££

• NX1P2-90££££1

• NX1P2-9B££££

• NX1P2-9B££££1

• NJ-series CPU Units

• NJ501-£5££

• NJ501-£4££

• NJ501-£3££

• NJ301-12££

• NJ301-11££

• NJ101-10££

• NJ101-90££

(4)

Part of the specifications and restrictions for the CPU Units are given in other manuals.

Refer to Relevant Manuals on page 3 and Related Manuals on page 30.

(5)

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-ser- ies CPU Unit.

Most operations are performed from the Sysmac Studio Automation Software. Refer to the Sysmac

Studio Version 1 Operation Manual (Cat. No. W504) for information on the Sysmac Studio.

Manual Basic information

Purpose of use

NX-series CPU UnitHardware User’s Manual NX-series NX102 CPU UnitHardware User’s Manual NX-series NX1P2 CPU UnitHardware User’s Manual NJ-series CPU UnitHardware User’s Manual NJ/NX-series CPU UnitSoftware User’s Manual NX-series NX1P2 CPU UnitBuilt-in I/O and Option Board User's Manual NJ/NX-seriesInstructions Reference Manual NJ/NX-series CPU UnitMotion Control User’s Manual NJ/NX-seriesMotion Control Instructions Reference Manual NJ/NX-series CPU UnitBuilt-in EtherCAT Port User´s Manual NJ/NX-series CPU UnitBuilt-in EtherNet/IP Port User’s Manual NJ/NX-series CPU Unit OPC UAUser’s Manual NX-series CPU UnitFINS User’s Manual NJ/NX-series Database Connection CPU UnitsUser's Manual NJ-series SECS/GEM CPU UnitsUser's Manual NJ-series Robot Integrated CPU UnitUser’s Manual NJ-series NJ Robotics CPU UnitUser's Manual NJ/NY-series NC Integrated ControllerUser’s Manual NJ/NX-seriesTroubleshooting Manual

Introduction to NX701 CPU

Units ¡

Introduction to NX102 CPU Units

¡

Introduction to NX1P2 CPU

Units ¡

Introduction to NJ-series Con-

trollers ¡

Setting devices and hardware

¡ ¡ ¡ ¡

Using motion control ¡

Using EtherCAT ¡

Using EtherNet/IP ¡

Using robot control for OM-

RON robots ¡

(6)

Manual Basic information

Purpose of use

NX-series CPU UnitHardware User’s Manual NX-series NX102 CPU UnitHardware User’s Manual NX-series NX1P2 CPU UnitHardware User’s Manual NJ-series CPU UnitHardware User’s Manual NJ/NX-series CPU UnitSoftware User’s Manual NX-series NX1P2 CPU UnitBuilt-in I/O and Option Board User's Manual NJ/NX-seriesInstructions Reference Manual NJ/NX-series CPU UnitMotion Control User’s Manual NJ/NX-seriesMotion Control Instructions Reference Manual NJ/NX-series CPU UnitBuilt-in EtherCAT Port User´s Manual NJ/NX-series CPU UnitBuilt-in EtherNet/IP Port User’s Manual NJ/NX-series CPU Unit OPC UAUser’s Manual NX-series CPU UnitFINS User’s Manual NJ/NX-series Database Connection CPU UnitsUser's Manual NJ-series SECS/GEM CPU UnitsUser's Manual NJ-series Robot Integrated CPU UnitUser’s Manual NJ-series NJ Robotics CPU UnitUser's Manual NJ/NY-series NC Integrated ControllerUser’s Manual NJ/NX-seriesTroubleshooting Manual

Software settings

¡

Using motion control ¡

Using EtherCAT ¡

Using EtherNet/IP ¡

Using OPC UA ¡

Using FINS ¡

Using the database connec-

tion service ¡

Using the GEM Services ¡

Using robot control for OM-

RON robots ¡

Using robot control by NJ Ro-

botics function ¡

Using numerical control ¡

Using the NX1P2 CPU Unit

functions ¡

Writing the user program

¡ ¡

Using motion control ¡ ¡

Using EtherCAT ¡

Using EtherNet/IP ¡

Using OPC UA ¡

Using FINS ¡

Using the database connec-

tion service ¡

Using the GEM Services ¡

Using robot control for OM-

RON robots ¡

Using robot control by NJ Ro-

botics function ¡

Using numerical control ¡

Programming error process-

ing ¡

Using the NX1P2 CPU Unit

functions ¡

(7)

Manual Basic information

Purpose of use

NX-series CPU UnitHardware User’s Manual NX-series NX102 CPU UnitHardware User’s Manual NX-series NX1P2 CPU UnitHardware User’s Manual NJ-series CPU UnitHardware User’s Manual NJ/NX-series CPU UnitSoftware User’s Manual NX-series NX1P2 CPU UnitBuilt-in I/O and Option Board User's Manual NJ/NX-seriesInstructions Reference Manual NJ/NX-series CPU UnitMotion Control User’s Manual NJ/NX-seriesMotion Control Instructions Reference Manual NJ/NX-series CPU UnitBuilt-in EtherCAT Port User´s Manual NJ/NX-series CPU UnitBuilt-in EtherNet/IP Port User’s Manual NJ/NX-series CPU Unit OPC UAUser’s Manual NX-series CPU UnitFINS User’s Manual NJ/NX-series Database Connection CPU UnitsUser's Manual NJ-series SECS/GEM CPU UnitsUser's Manual NJ-series Robot Integrated CPU UnitUser’s Manual NJ-series NJ Robotics CPU UnitUser's Manual NJ/NY-series NC Integrated ControllerUser’s Manual NJ/NX-seriesTroubleshooting Manual

Testing operation and debug- ging

¡

Using motion control ¡

Using EtherCAT ¡

Using EtherNet/IP ¡

Using OPC UA ¡

Using FINS ¡

Using the database connec-

tion service ¡

Using the GEM Services ¡

Using robot control for OM-

RON robots ¡

Using robot control by NJ Ro-

botics function ¡

Using numerical control ¡

Using the NX1P2 CPU Unit

functions ¡

Learning about error manage-

ment and corrections*1 r r r r r r r ¡

Maintenance

¡ ¡ ¡ ¡

Using motion control ¡

Using EtherCAT ¡

Using EtherNet/IP ¡

*1. Refer to the NJ/NX-series Troubleshooting Manual (Cat. No. W503) for the error management concepts and the error items. However, refer to the manuals that are indicated with triangles for details on errors corresponding to the products with the manuals that are indi- cated with triangles.

(8)

Manual Structure

Page Structure

The following page structure is used in this manual.

Level-2 heading

Level-2 heading

Manual name

Level-1 section number Gives the number of the section.

snoitcurtsnImargaiD reddaL

2

2-13 NJ-series Instructions Reference Manual (W502)

Ladder Diagram Instructions

Instruction Name Page

LD and LDN Load/

Load NOT 2-14

AND and ANDN AND/

AND NOT 2-16

OR and ORN OR/

OR NOT 2-18

Out and OutNot Output/

Output NOT 2-20

(9)

2-17 2 Instruction Descriptions

NJ-series Instructions Reference Manual (W502)

snoitcurtsnImargaiD reddaL

2

NRO dna RO

OR and ORN

None

OR

The OR instruction takes the logical OR of the value of a specified BOOL variable and the execution condition and outputs it to the next instruction. Use the OR instruction for a NO bit connected in parallel with the previous instruction. Use the OR instruction to configure a logical OR between an NO bit and one of the following: a LD or LDN instruction connected directly to the bus bar, or the logic block starting with a LD or LDN instruction and ending with the instruction immediately before the OR instruction.

ORN

The ORN instruction takes the logical OR of the inverse of the value of a specified BOOL variable and the execution condition and outputs it to the next instruction. Use the ORN instruction for a NC bit con- nected in parallel with the previous instruction. Use the ORN instruction to configure a logical OR between an NC bit and one of the following: a LD or LDN instruction connected directly to the bus bar, or the logic block starting with a LD or LDN instruction and ending with the instruction immediately before the ORN instruction.

The following figure shows a programming example of the OR instruction. It takes the logical OR of vari- able A and variable B and outputs it to variable C.

OR: Takes the logical OR of the value of a BOOL variable and the execution condition.

ORN: Takes the logical OR of the inverse of the value of a BOOL variable and the execution condi- tion.

Instruction Name FB/FUN Graphic expression ST expression

OR OR --- result:=vBool1 OR vBool2;

ORN OR NOT --- result:=vBool1 OR NOT

vBool2;

Variables

Function

Variable

Downward differentiation Upward

differentiation Variable

Variable Variable Variable

Variable

Downward differentiation Upward

differentiation Variable

Downward differentiation Upward

differentiation Variable

Variable

Variable Variable

Variable

Downward differentiation Upward

differentiation

B

A C

LD instruction

Out instruction

OR instruction

Level-3 heading

Level-1 section number

Gives the number of the section.

Level-1 heading Level-2 heading Level-3 heading

Manual name

Give the current headings.

Note These pages are for illustrative purposes only. They may not literally appear in this manual.

Special Information

Special information in this manual is classified as follows:

Precautions for Safe Use

Precautions on what to do and what not to do to ensure safe usage of the product.

Precautions for Correct Use

Precautions on what to do and what not to do to ensure proper operation and performance.

Additional Information

Additional information to read as required.

This information is provided to increase understanding or make operation easier.

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.

(10)
(11)

Sections in this Manual

1 2 A

I

1

2

A

I Instruction Set

Instruction Descriptions

Appendices

Index

(12)

CONTENTS

Introduction ... 1

Intended Audience...1

Applicable Products ...1

Relevant Manuals... 3

Manual Structure... 6

Page Structure...6

Special Information ...7

Sections in this Manual ... 9

Terms and Conditions Agreement... 18

Warranty, Limitations of Liability ...18

Application Considerations ...19

Disclaimers ...19

Safety Precautions... 21

Precautions for Safe Use ... 22

Precautions for Correct Use ... 23

Regulations and Standards ... 24

Versions ... 25

Checking Versions ...25

Unit Versions of CPU Units and Sysmac Studio Versions ...29

Related Manuals... 30

Revision History... 35

Section 1 Instruction Set

Instruction Set ...1-2

Ladder Diagram Instructions...1-2 ST Statement Instructions ...1-2 Sequence Input Instructions ...1-2 Sequence Output Instructions ...1-3 Sequence Control Instructions...1-3 Comparison Instructions ...1-3 Timer Instructions ...1-5 Counter Instructions...1-5 Math Instructions ...1-5 BCD Conversion Instructions...1-6 Data Type Conversion Instructions...1-7 Bit String Processing Instructions ...1-8 Selection Instructions...1-9 Data Movement Instructions ...1-9 Shift Instructions ...1-10 Conversion Instructions ...1-10 Stack and Table Instructions...1-12 FCS Instructions ...1-13

(13)

Text String Instructions ...1-13 Time and Time of Day Instructions ...1-14 Analog Control Instructions...1-15 System Control Instructions...1-15 Program Control Instructions ...1-17 EtherCAT Communications Instructions ...1-17 IO-Link Communications Instructions ...1-17 EtherNet/IP Communications Instructions ...1-17 Serial Communications Instructions ...1-19 SD Memory Card Instructions...1-20 Time Stamp Instructions ...1-20 Other Instructions ...1-20

Section 2 Instruction Descriptions

Using this Section...2-3

Items ...2-3 Common Variables...2-5 Valid Ranges and Default Values of Variables...2-9 Derivative Data Types (Enumerations, Structures, and Unions) ...2-10 Array Specifications ...2-11 Others ...2-12

Ladder Diagram Instructions ...2-13

LD and LDN ...2-14 AND and ANDN ...2-17 OR and ORN ...2-20 Out and OutNot...2-23

ST Statement Instructions...2-27

IF...2-28 CASE ...2-32 WHILE ...2-36 REPEAT...2-39 EXIT...2-42 RETURN...2-45 FOR ...2-46

Sequence Input Instructions...2-47

R_TRIG (Up) and F_TRIG (Down) ...2-48 TestABit and TestABitN...2-52

Sequence Output Instructions...2-55

RS...2-56 SR...2-59 Set and Reset ...2-62 SetBits and ResetBits ...2-66 SetABit and ResetABit...2-69 OutABit ...2-71

Sequence Control Instructions...2-73

End ...2-74 RETURN...2-75 MC and MCR ...2-76 JMP...2-89 FOR and NEXT...2-91 BREAK...2-98

Comparison Instructions...2-101

EQ (=) ...2-102 NE (<>) ...2-105 LT (<), LE (<=), GT (>), and GE (>=) ...2-108 EQascii ... 2-111 NEascii...2-113 LTascii, LEascii, GTascii, and GEascii ...2-115 Cmp ...2-118

(14)

ZoneCmp ...2-120 TableCmp...2-122 AryCmpEQ and AryCmpNE...2-125 AryCmpLT, AryCmpLE, AryCmpGT, and AryCmpGE ...2-127 AryCmpEQV and AryCmpNEV...2-130 AryCmpLTV, AryCmpLEV, AryCmpGTV, and AryCmpGEV...2-132

Timer Instructions...2-135

TON ...2-136 TOF...2-142 TP ...2-145 AccumulationTimer ...2-148 Timer...2-152

Counter Instructions...2-155

CTD ...2-156 CTD_**...2-158 CTU ...2-161 CTU_**...2-164 CTUD...2-167 CTUD_** ...2-172

Math Instructions ...2-177

ADD (+)...2-179 AddOU (+OU) ...2-183 SUB (-)...2-187 SubOU (-OU) ...2-190 MUL (*) ...2-194 MulOU (*OU) ...2-198 DIV (/) ...2-202 MOD ...2-205 ABS...2-207 RadToDeg and DegToRad...2-209 SIN, COS, and TAN ...2-211 ASIN, ACOS, and ATAN ...2-214 SQRT ...2-217 LN and LOG...2-220 EXP...2-224 EXPT (**) ...2-226 Inc and Dec...2-232 Rand ...2-234 AryAdd ...2-236 AryAddV...2-238 ArySub ...2-240 ArySubV...2-242 AryMean ...2-244 ArySD ...2-246 ModReal ...2-248 Fraction...2-250 CheckReal ...2-252

BCD Conversion Instructions ...2-255

**_BCD_TO_*** ...2-256

**_TO_BCD_*** ...2-259 BCD_TO_**...2-262 BCDsToBin ...2-265 BinToBCDs_**...2-268 AryToBCD ...2-271 AryToBin ...2-273

Data Type Conversion Instructions...2-275

**_TO_*** (Integer-to-Integer Conversion Group)...2-277

**_TO_*** (Integer-to-Bit String Conversion Group) ...2-280

**_TO_*** (Integer-to-Real Number Conversion Group)...2-283

**_TO_*** (Bit String-to-Integer Conversion Group) ...2-285

**_TO_*** (Bit String-to-Bit String Conversion Group)...2-288

**_TO_*** (Bit String-to-Real Number Conversion Group) ...2-290

(15)

**_TO_*** (Real Number-to-Integer Conversion Group)...2-292

**_TO_*** (Real Number-to-Bit String Conversion Group) ...2-295

**_TO_*** (Real Number-to-Real Number Conversion Group)...2-297

**_TO_STRING (Integer-to-Text String Conversion Group) ...2-299

**_TO_STRING (Bit String-to-Text String Conversion Group) ...2-301

**_TO_STRING (Real Number-to-Text String Conversion Group) ...2-303 RealToFormatString...2-305 LrealToFormatString ...2-311 STRING_TO_** (Text String-to-Integer Conversion Group) ...2-317 STRING_TO_** (Text String-to-Bit String Conversion Group) ...2-319 STRING_TO_** (Text String-to-Real Number Conversion Group) ...2-321 TO_** (Integer Conversion Group) ...2-325 TO_** (Bit String Conversion Group) ...2-327 TO_** (Real Number Conversion Group) ...2-329 EnumToNum ...2-331 NumToEnum ...2-333 TRUNC, Round, and RoundUp ...2-336

Bit String Processing Instructions ...2-339

AND (&), OR, and XOR ...2-340 XORN ...2-343 NOT ...2-345 AryAnd, AryOr, AryXor, and AryXorN ...2-347

Selection Instructions...2-351

SEL ...2-352 MUX...2-354 LIMIT...2-357 Band ...2-359 Zone...2-361 MAX and MIN ...2-363 AryMax and AryMin ...2-365 ArySearch ...2-368

Data Movement Instructions ...2-371

MOVE ...2-372 MoveBit...2-375 MoveDigit...2-377 TransBits...2-379 MemCopy ...2-381 SetBlock...2-383 Exchange...2-385 AryExchange ...2-387 AryMove...2-389 Clear ...2-391 Copy**ToNum (Bit String to Signed Integer)...2-393 Copy**To*** (Bit String to Real Number) ...2-395 CopyNumTo** (Signed Integer to Bit String)...2-397 CopyNumTo** (Signed Integer to Real Number) ...2-399 Copy**To*** (Real Number to Bit String) ...2-401 Copy**ToNum (Real Number to Signed Integer) ...2-403

Shift Instructions...2-405

AryShiftReg...2-406 AryShiftRegLR ...2-408 ArySHL and ArySHR ...2-411 SHL and SHR ...2-414 NSHLC and NSHRC...2-417 ROL and ROR ...2-420

Conversion Instructions...2-423

Swap...2-425 Neg ...2-427 Decoder ...2-429 Encoder ...2-432 BitCnt ...2-434 ColmToLine_** ...2-435

(16)

LineToColm...2-437 Gray ...2-439 UTF8ToSJIS ...2-444 SJISToUTF8 ...2-446 PWLApprox and PWLApproxNoLineChk...2-448 PWLLineChk...2-454 MovingAverage ...2-457 DispartReal ...2-464 UniteReal ...2-467 NumToDecString and NumToHexString ...2-469 HexStringToNum_**...2-472 FixNumToString ...2-474 StringToFixNum ...2-476 DtToString ...2-479 DateToString ...2-481 TodToString...2-483 GrayToBin_** and BinToGray_**...2-485 StringToAry ...2-488 AryToString ...2-490 DispartDigit ...2-492 UniteDigit_** ...2-494 Dispart8Bit ...2-496 Unite8Bit_** ...2-498 ToAryByte ...2-500 AryByteTo ...2-506 SizeOfAry...2-512 PackWord ...2-514 PackDword ...2-516 LOWER_BOUND and UPPER_BOUND ...2-518

Stack and Table Instructions ...2-523

StackPush...2-524 StackFIFO and StackLIFO...2-533 StackIns ...2-536 StackDel ...2-539 RecSearch ...2-541 RecRangeSearch ...2-546 RecSort...2-551 RecNum...2-557 RecMax and RecMin ...2-560

FCS Instructions ...2-565

StringSum ...2-566 StringLRC ...2-568 StringCRCCCITT ...2-570 StringCRC16...2-572 AryLRC_** ...2-574 AryCRCCCITT ...2-576 AryCRC16...2-578

Text String Instructions ...2-581

CONCAT ...2-582 LEFT and RIGHT...2-584 MID ...2-587 FIND ...2-589 LEN...2-591 REPLACE ...2-593 DELETE...2-595 INSERT...2-597 GetByteLen...2-599 ClearString...2-600 ToUCase and ToLCase...2-602 TrimL and TrimR ...2-604 AddDelimiter ...2-606 SubDelimiter ...2-618

Time and Time of Day Instructions ...2-631

(17)

ADD_TIME...2-633 ADD_TOD_TIME ...2-635 ADD_DT_TIME...2-637 SUB_TIME...2-639 SUB_TOD_TIME ...2-641 SUB_TOD_TOD ...2-643 SUB_DATE_DATE...2-645 SUB_DT_DT...2-646 SUB_DT_TIME ...2-648 MULTIME ...2-650 DIVTIME ...2-652 CONCAT_DATE_TOD ...2-654 DT_TO_TOD...2-656 DT_TO_DATE...2-658 SetTime...2-660 GetTime ...2-662 DtToSec ...2-664 DateToSec ...2-666 TodToSec ...2-668 SecToDt ...2-670 SecToDate ...2-672 SecToTod ...2-674 TimeToNanoSec ...2-676 TimeToSec ...2-677 NanoSecToTime ...2-679 SecToTime ...2-680 ChkLeapYear ...2-682 GetDaysOfMonth ...2-683 DaysToMonth...2-686 GetDayOfWeek...2-688 GetWeekOfYear...2-690 DtToDateStruct ...2-692 DateStructToDt ...2-695 TruncTime ...2-698 TruncDt ...2-702 TruncTod ...2-706

Analog Control Instructions... 2-711

PIDAT...2-712 PIDAT_HeatCool...2-742 TimeProportionalOut...2-779 LimitAlarm_** ...2-799 LimitAlarmDv_**...2-804 LimitAlarmDvStbySeq_** ...2-809 ScaleTrans...2-827 AC_StepProgram...2-830

System Control Instructions ...2-857

TraceSamp ...2-859 TraceTrig...2-862 GetTraceStatus...2-865 SetAlarm ...2-868 ResetAlarm ...2-873 GetAlarm...2-875 ResetPLCError ...2-877 GetPLCError ...2-880 ResetCJBError...2-882 GetCJBError ...2-884 GetEIPError ...2-886 ResetMCError...2-888 GetMCError ...2-894 ResetECError ...2-896 GetECError ...2-898 ResetNXBError ...2-901 GetNXBError...2-903 GetNXUnitError...2-905

(18)

SetInfo ...2-912 ResetUnit ...2-914 GetNTPStatus...2-919 RestartNXUnit...2-921 NX_ChangeWriteMode ...2-927 NX_SaveParam ...2-933 PLC_ReadTotalPowerOnTime...2-939 NX_ReadTotalPowerOnTime...2-942

Program Control Instructions ...2-951

PrgStart...2-952 PrgStop...2-961 PrgStatus ...2-980

EtherCAT Communications Instructions ...2-985

EC_CoESDOWrite...2-986 EC_CoESDORead ...2-989 EC_StartMon ...2-995 EC_StopMon ...2-1001 EC_SaveMon...2-1003 EC_CopyMon ...2-1005 EC_DisconnectSlave ...2-1007 EC_ConnectSlave ...2-1015 EC_ChangeEnableSetting...2-1017 NX_WriteObj ...2-1037 NX_ReadObj...2-1053

IO-Link Communications Instruction ...2-1061

IOL_ReadObj...2-1062 IOL_WriteObj ...2-1071

EtherNet/IP Communications Instructions ...2-1081

CIPOpen ...2-1083 CIPOpenWithDataSize ...2-1093 CIPRead ...2-1097 CIPWrite...2-1103 CIPSend ...2-1109 CIPClose... 2-1114 CIPUCMMRead ... 2-1117 CIPUCMMWrite ...2-1123 CIPUCMMSend ...2-1130 SktUDPCreate ...2-1141 SktUDPRcv...2-1149 SktUDPSend...2-1152 SktTCPAccept...2-1155 SktTCPConnect ...2-1158 SktTCPRcv ...2-1167 SktTCPSend ...2-1170 SktGetTCPStatus ...2-1173 SktClose ...2-1176 SktClearBuf...2-1179 SktSetOption...2-1182 ModbusTCPCmd ...2-1187 ModbusTCPRead ...2-1195 ModbusTCPWrite...2-1203 ChangeIPAdr...2-1211 ChangeFTPAccount...2-1220 ChangeNTPServerAdr...2-1224 FTPGetFileList...2-1229 FTPGetFile ...2-1243 FTPPutFile...2-1252 FTPRemoveFile...2-1263 FTPRemoveDir ...2-1273

Serial Communications Instructions...2-1277

ExecPMCR ...2-1278 SerialSend ...2-1292

(19)

SerialRcv and SerialRcvNoClear...2-1303 SendCmd...2-1318 NX_SerialSend ...2-1330 NX_SerialRcv ...2-1343 NX_ModbusRtuCmd...2-1358 NX_ModbusRtuRead...2-1369 NX_ModbusRtuWrite ...2-1380 NX_SerialSigCtl ...2-1391 NX_SerialSigRead...2-1399 NX_SerialStatusRead...2-1404 NX_SerialBufClear...2-1409 NX_SerialStartMon ...2-1419 NX_SerialStopMon ...2-1424

SD Memory Card Instructions...2-1429

FileWriteVar ...2-1430 FileReadVar ...2-1436 FileOpen ...2-1441 FileClose...2-1445 FileSeek...2-1448 FileRead ...2-1451 FileWrite...2-1459 FileGets ...2-1467 FilePuts...2-1475 FileCopy...2-1484 FileRemove...2-1492 FileRename ...2-1497 DirCreate ...2-1503 DirRemove...2-1506 BackupToMemoryCard ...2-1509

Time Stamp Instructions ...2-1523

NX_DOutTimeStamp ...2-1524 NX_AryDOutTimeStamp...2-1530

Other Instructions ...2-1539

ReadNbit_** ...2-1540 WriteNbit_** ...2-1542 ChkRange...2-1544 GetMyTaskStatus...2-1547 GetMyTaskInterval ...2-1550 Task_IsActive...2-1552 Lock and Unlock ...2-1554 ActEventTask ...2-1560 Get**Clk ...2-1567 Get**Cnt...2-1569

Appendices

A-1 Error Codes That You Can Check with ErrorID... A-2 A-2 Error Codes ... A-31 A-3 Instructions You Cannot Use in Event Tasks... A-32 A-4 Instructions Related to NX Message Communications Errors... A-35 A-5 SDO Abort Codes... A-36 A-6 Version Information ... A-37

A-6-1 Instructions with Specifications Changes and New Instructions for Version Upgrades ... A-37 A-6-2 What to Do If An Error Message Says the Instruction May Cause Unintended Operations .... A-41

Index

(20)

Terms and Conditions Agreement

Warranty, Limitations of Liability

Warranties

l Exclusive Warranty

Omron’s exclusive warranty is that the Products will be free from defects in materials and work- manship for a period of twelve months from the date of sale by Omron (or such other period ex- pressed in writing by Omron). Omron disclaims all other warranties, express or implied.

l 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.

l 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 re- sponsible 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 Compa- nies shall not be liable for the suitability or unsuitability or the results from the use of Products in combination with any electrical or electronic components, circuits, system assemblies or any other materials or substances or environments. Any advice, recommendations or information given orally or in writing, are not to be construed as an amendment or addition to the above warranty.

See http://www.omron.com/global/ or contact your Omron representative for published information.

Limitation on Liability; Etc

OMRON COMPANIES SHALL NOT BE LIABLE FOR SPECIAL, INDIRECT, INCIDENTAL, OR CON-

SEQUENTIAL DAMAGES, LOSS OF PROFITS OR PRODUCTION OR COMMERCIAL LOSS IN ANY

(21)

WAY CONNECTED WITH THE PRODUCTS, WHETHER SUCH CLAIM IS BASED IN CONTRACT, WARRANTY, NEGLIGENCE OR STRICT LIABILITY.

Further, in no event shall liability of Omron Companies exceed the individual price of the Product on which liability is asserted.

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 Buy- er’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 complete determination of the suitability of the Product in combination with the end product, machine, system, or other application or use. Buyer shall be solely responsible for determining appropriateness of the par- ticular Product with respect to Buyer’s application, product or system. Buyer shall take application re- sponsibility in all cases.

NEVER USE THE PRODUCT FOR AN APPLICATION INVOLVING SERIOUS RISK TO LIFE OR PROPERTY OR IN LARGE QUANTITIES WITHOUT ENSURING THAT THE SYSTEM AS A WHOLE HAS BEEN DESIGNED TO ADDRESS THE RISKS, AND THAT THE OMRON PRODUCT(S) IS PROPERLY RATED AND INSTALLED FOR THE INTENDED USE WITHIN THE OVERALL EQUIP- MENT 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 per- formance 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 oth-

er 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

(22)

be changed without any notice. When in doubt, special part numbers may be assigned to fix or estab- lish key specifications for your application. Please consult with your Omron’s representative at any time to confirm actual specifications of purchased Product.

Errors and Omissions

Information presented by Omron Companies has been checked and is believed to be accurate; how-

ever, no responsibility is assumed for clerical, typographical or proofreading errors or omissions.

(23)

Safety Precautions

Refer to the following manuals for safety precautions.

• NX-series CPU Unit Hardware User's Manual (Cat. No. W535)

• NX-series NX102 CPU Unit Hardware User's Manual (Cat. No. W593)

• NX-series NX1P2 CPU Unit Hardware User's Manual (Cat. No. W578)

• NJ-series CPU Unit Hardware User’s Manual (Cat No. W500)

(24)

Precautions for Safe Use

Refer to the following manuals for precautions for safe use.

• NX-series CPU Unit Hardware User's Manual (Cat. No. W535)

• NX-series NX102 CPU Unit Hardware User's Manual (Cat. No. W593)

• NX-series NX1P2 CPU Unit Hardware User's Manual (Cat. No. W578)

• NJ-series CPU Unit Hardware User’s Manual (Cat No. W500)

(25)

Precautions for Correct Use

Refer to the following manuals for precautions for correct use.

• NX-series CPU Unit Hardware User's Manual (Cat. No. W535)

• NX-series NX102 CPU Unit Hardware User's Manual (Cat. No. W593)

• NX-series NX1P2 CPU Unit Hardware User's Manual (Cat. No. W578)

• NJ-series CPU Unit Hardware User’s Manual (Cat No. W500)

(26)

Regulations and Standards

Refer to the following manuals for regulations and standards.

• NX-series CPU Unit Hardware User's Manual (Cat. No. W535)

• NX-series NX102 CPU Unit Hardware User's Manual (Cat. No. W593)

• NX-series NX1P2 CPU Unit Hardware User's Manual (Cat. No. W578)

• NJ-series CPU Unit Hardware User’s Manual (Cat No. W500)

(27)

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.

Checking Unit Versions on ID Information Indications

The unit version is given on the ID information indication on the side of the product.

l For NX701

The ID information on an NX-series NX701-££££ CPU Unit is shown below.

ID information indication

Lot number Serial number Unit version

MAC address Hardware revision

LOT No. DDMYY£ xxxx Ver.1.££

PORT1 : ££££££££££££ HW Rev. £ PORT2 : ££££££££££££

Note The hardware revision is not displayed for the Unit whose hardware revision is blank.

l For NX102

The ID information on an NX-series NX102-££££ CPU Unit is shown below.

(28)

ID Information Indication

Unit version Hardware revision Lot number Serial number

MAC address

LOT No. DDMYY£ xxxx PORT1 ££££££££££££

PORT2 ££££££££££££

Ver.£.££ HW Rev.£

Note The hardware revision is not displayed for the Unit whose hardware revision is blank.

l For NX1P2

The ID information on an NX-series NX1P2-£££££££ CPU Unit is shown below.

PORT1 : ££££££££££££

PORT2 : ££££££££££££

Ver.1.££ HW Rev. £ LOT No. DDMYY£ xxxx

ID information indication

Lot number Serial number Unit version

MAC address

Hardware revision

Note The hardware revision is not displayed for the Unit that the hardware revision is in blank.

l For NJ-series

The ID information on an NJ-series NJ501-££££ CPU Unit is shown below.

(29)

ID information indication

Unit model

Lot number Serial number MAC address Unit version Hardware revision

NJ501 - ££££ Ver.1.££

PORT1 MAC ADDRESS: ££££££££££££

PORT2 MAC ADDRESS: ££££££££££££

Lot No. DDMYY£ xxxx

HW Rev. £

Note The hardware revision is not displayed for the Unit that the hardware revision is in blank.

Checking Unit Versions with the Sysmac Studio

You can use the Sysmac Studio to check unit versions. The procedure is different for Units and for EtherCAT slaves.

l Checking the Unit Version of an NX-series CPU Unit

You can use the Production Information while the Sysmac Studio is online to check the unit version of a Unit. You can do this for the following Units.

Model Unit for which unit version can be checked

NX701-££££ CPU Unit

NX102-££££ CPU Unit and NX Unit on CPU Rack

NX1P2-££££ CPU Unit, NX Unit on CPU Rack, and Option Boards

1 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.

l Checking the Unit Version of an NJ-series CPU Unit

You can use the Production Information while the Sysmac Studio is online to check the unit version of a Unit. You can do this for the CPU Unit, CJ-series Special I/O Units, and CJ-series CPU Bus Units. You cannot check the unit versions of CJ-series Basic I/O Units with the Sysmac Studio.

1 Double-click CPU Rack under Configurations and Setup - CPU/Expansion Racks in the Multiview Explorer. Or, right-click CPU Rack under Configurations and Setup - CPU/

Expansion Racks in the Multiview Explorer and select Edit from the menu.

The Unit Editor is displayed.

2 Right-click any open space in the Unit Editor and select Production Information.

The Production Information Dialog Box is displayed.

(30)

l Changing Information Displayed in Production Information Dialog Box

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.

Outline View Detail View

The information that is displayed is different for the Outline View and Detail View. The Detail View displays the unit version, hardware revision, and various 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.

l Checking the Unit Version of an EtherCAT Slave

You can use the Production Information while the Sysmac Studio is online to check the unit version of an EtherCAT slave.

Use the following procedure to check the unit version.

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.”

l Changing Information Displayed in Production Information Dialog Box

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.

(31)

Outline View Detail View

Unit Versions of CPU Units and Sysmac Studio Versions

The functions that are supported depend on the unit version of the NJ/NX-series CPU Unit. The ver- sion of Sysmac Studio that supports the functions that were added for an upgrade is also required to use those functions.

Refer to the NJ/NX-series CPU Unit Software User’s Manual (Cat. No. W501) for the relationship be-

tween the unit versions of the CPU Units and the Sysmac Studio versions and for the functions that

are supported by each unit version.

(32)

Related Manuals

The followings are the manuals related to this manual. Use these manuals for reference. Use these manuals for reference.

Manual name Cat. No. Model numbers Application Description

NX-series CPU Unit Hardware User's Manual

W535 NX701-££££ Learning the basic specifications of the NX701 CPU Units, including introductory information, design- ing, installation, and maintenance.

Mainly hardware in- formation is provided.

An introduction to the entire NX701 system is provided along with the following informa- tion on the CPU Unit.

Features and system configuration

Introduction

Part names and functions

General specifications

Installation and wiring

Maintenance and inspection NX-series

NX102 CPU Unit Hardware User’s Manual

W593 NX102-££££ Learning the basic specifications of the NX102 CPU Units, including introductory information, design- ing, installation, and maintenance.

Mainly hardware in- formation is provided.

An introduction to the entire NX102 system is provided along with the following informa- tion on the CPU Unit.

Features and system configuration

Introduction

Part names and functions

General specifications

Installation and wiring

Maintenance and inspection NX-series

NX1P2 CPU Unit Hardware User’s Manual

W578 NX1P2-££££ Learning the basic specifications of the NX1P2 CPU Units, including introductory information, design- ing, installation, and maintenance.

Mainly hardware in- formation is provided.

An introduction to the entire NX1P2 system is provided along with the following informa- tion on the CPU Unit.

Features and system configuration

Introduction

Part names and functions

General specifications

Installation and wiring

Maintenance and inspection NJ-series CPU Unit

Hardware User's Manual

W500 NJ501-££££

NJ301-££££

NJ101-££££

Learning the basic specifications of the NJ-series CPU Units, including introductory information, design- ing, installation, and maintenance.

Mainly hardware in- formation is provided.

An introduction to the entire NJ-series sys- tem is provided along with the following in- formation on the CPU Unit.

Features and system configuration

Introduction

Part names and functions

General specifications

Installation and wiring

Maintenance and inspection NJ/NX-series CPU Unit

Software User’s Manual

W501 NX701-££££

NX102-££££

NX1P2-££££

NJ501-££££

NJ301-££££

NJ101-££££

Learning how to pro- gram and set up an NJ/NX-series CPU Unit.

Mainly software infor- mation is provided.

The following information is provided on a Controller built with an NJ/NX-series CPU Unit.

CPU Unit operation

CPU Unit features

Initial settings

Programming based on IEC 61131-3 lan- guage specifications

(33)

Manual name Cat. No. Model numbers Application Description NX-series NX1P2 CPU Unit

Built-in I/O and Option Board User’s Manual

W579 NX1P2-££££ Learning about the details of functions only for an NX-series NX1P2 CPU Unit and an introduction of functions for an NJ/NX-series CPU Unit.

Of the functions for an NX1P2 CPU Unit, the following information is provided.

Built-in I/O

Serial Communications Option Boards

Analog I/O Option Boards

An introduction of following functions for an NJ/NX-series CPU Unit is also provided.

Motion control functions

EtherNet/IP communications functions

EtherCAT communications functions NJ/NX-series Instructions

Reference Manual

W502 NX701-££££

NX102-££££

NX1P2-££££

NJ501-££££

NJ301-££££

NJ101-££££

Learning detailed specifications on the basic instructions of an NJ/NX-series CPU Unit.

The instructions in the instruction set (IEC 61131-3 specifications) are described.

NJ/NX-series CPU Unit Motion Control User’s Manual

W507 NX701-££££

NX102-££££

NX1P2-££££

NJ501-££££

NJ301-££££

NJ101-££££

Learning about mo- tion control settings and programming concepts.

The settings and operation of the CPU Unit and programming concepts for motion con- trol are described.

NJ/NX-series

Motion Control Instructions Reference Manual

W508 NX701-££££

NX102-££££

NX1P2-££££

NJ501-££££

NJ301-££££

NJ101-££££

Learning about the specifications of the motion control in- structions.

The motion control instructions are descri- bed.

NJ/NX-series CPU Unit

Built-in EtherCAT® Port User’s Manual

W505 NX701-££££

NX102-££££

NX1P2-££££

NJ501-££££

NJ301-££££

NJ101-££££

Using the built-in EtherCAT port on an NJ/NX-series CPU Unit.

Information on the built-in EtherCAT port is provided.

This manual provides an introduction and provides information on the configuration, features, and setup.

NJ/NX-series CPU Unit

Built-in EtherNet/IP Port User’s Manual

W506 NX701-££££

NX102-££££

NX1P2-££££

NJ501-££££

NJ301-££££

NJ101-££££

Using the built-in EtherNet/IP port on an NJ/NX-series CPU Unit.

Information on the built-in EtherNet/IP port is provided.

Information is provided on the basic setup, tag data links, and other features.

NJ/NX-series CPU Unit OPC UA User’s Manual

W588 NX102-££££

NJ501-1£00

Using the OPC UA. Describes the OPC UA.

NX-series CPU Unit FINS Function User’s Manual

W596 NX701-££20

NX102-££££

Using the FINS func- tion of an NX-series CPU Unit.

Describes the FINS function of an NX-ser- ies CPU Unit.

NJ/NX-series

Database Connection CPU Units

User’s Manual

W527 NX701-££20

NX102-££20 NJ501-££20 NJ101-££20

Using the database connection service with NJ/NX-series Controllers.

Describes the database connection service.

NJ-series

SECS/GEM CPU Units User’s Manual

W528 NJ501-1340 Using the GEM Serv- ices with NJ-series Controllers.

Provides information on the GEM Services.

NJ-series

Robot Integrated CPU Unit User’s Manual

O037 NJ501-R£££ Using the NJ-series Robot Integrated CPU Unit.

Describes the settings and operation of the CPU Unit and programming concepts for OMRON robot control.

(34)

Manual name Cat. No. Model numbers Application Description Sysmac Studio

Robot Integrated System Building Function with Robot Integrated CPU Unit Opera- tion Manual

W595 SYSMAC-SE2££

£ SYSMAC- SE200D-64

Learning about the operating procedures and functions of the Sysmac Studio to configure Robot Inte- grated System using Robot Integrated CPU Unit.

Describes the operating procedures of the Sysmac Studio for Robot Integrated CPU Unit.

Sysmac Studio

Robot Integrated System Building Function with IPC Application Controller Opera- tion Manual

W621 SYSMAC-SE2££

£ SYSMAC- SE200D-64

Learning about the operating procedures and functions of the Sysmac Studio to configure Robot Inte- grated System using IPC Application Con- troller.

Describes the operating procedures of the Sysmac Studio for IPC Application Control- ler.

Sysmac Studio

3D Simulation Function Oper- ation Manual

W618 SYSMAC-SE2££

£

SYSMAC-SA4££

£-64

Learning about an outline of the 3D sim- ulation function of the Sysmac Studio and how to use the func- tion.

Describes an outline, execution procedures, and operating procedures for the 3D simu- lation function of the Sysmac Studio.

NJ-series

NJ Robotics CPU Unit User’s Manual

W539 NJ501-4£££

NJ501-R£££

Controlling robots with NJ-series CPU Units.

Describes the functionality to control robots.

NJ/NY-series

NC Integrated Controller User’s Manual

O030 NJ501-5300

NY532-5400

Performing numerical control with NJ/NY- series Controllers.

Describes the functionality to perform the numerical control.

NJ/NY-series G code

Instructions Reference Man- ual

O031 NJ501-5300

NY532-5400

Learning about the specifications of the G code/M code in- structions.

The G code/M code instructions are descri- bed.

NJ/NX-series

Troubleshooting Manual

W503 NX701-££££

NX102-££££

NX1P2-££££

NJ501-££££

NJ301-££££

NJ101-££££

Learning about the errors that may be detected in an NJ/NX-series Con- troller.

Concepts on managing errors that may be detected in an NJ/NX-series Controller and information on individual errors are descri- bed.

Sysmac Studio Version 1 Operation Manual

W504 SYSMAC

-SE2£££

Learning about the operating procedures and functions of the Sysmac Studio.

Describes the operating procedures of the Sysmac Studio.

CNC Operator Operation Manual

O032 SYSMAC-RTNC0£

££D

Learning an introduc- tion of the CNC Op- erator and how to use it.

An introduction of the CNC Operator, instal- lation procedures, basic operations, con- nection operations, and operating proce- dures for main functions are described.

NX-series

EtherCAT® Coupler Unit User’s Manual

W519 NX-ECC£££ Learning how to use the NX-series Ether- CAT Coupler Unit and EtherCAT Slave Terminals.

The following items are described: the over- all system and configuration methods of an EtherCAT Slave Terminal (which consists of an NX-series EtherCAT Coupler Unit and NX Units), and information on hardware, setup, and functions to set up, control, and monitor NX Units through EtherCAT.

NX-series

Data Reference Manual

W525 NX-££££££ Referencing lists of the data that is re- quired to configure systems with NX-ser- ies Units.

Lists of the power consumptions, weights, and other NX Unit data that is required to configure systems with NX-series Units are provided.

(35)

Manual name Cat. No. Model numbers Application Description NX-series

NX Units User’s Manual

W521 NX-ID££££

NX-IA££££

NX-OC££££

NX-OD££££

NX-MD££££

Learning how to use NX Units.

Describes the hardware, setup methods, and functions of the NX Units.

Manuals are available for the following Units.

Digital I/O Units, Analog I/O Units, System Units, Position Interface Units, Communica- tions Interface Units, Load Cell Input Unit, and IO-Link Master Units.

W522 NX-AD££££

NX-DA££££

W592 NX-HAD£££

W566 NX-TS££££

NX-HB££££

W523 NX-PD1£££

NX-PF0£££

NX-PC0£££

NX-TBX01

W524 NX-EC0£££

NX-ECS£££

NX-PG0£££

W540 NX-CIF£££

W565 NX-RS££££

W567 NX-ILM£££

CJ-series

Special Unit Manuals For NJ-series CPU Unit

W490 CJ1W-AD£££

CJ1W-DA£££

CJ1W-MAD42

Learning how to use CJ-series Units with an NJ-series CPU Unit.

The methods and precautions for using CJ- series Units with an NJ-series CPU Unit are described, including access methods and programming interfaces.

Manuals are available for the following Units.

Analog I/O Units, Insulated-type Analog I/O Units, Temperature Control Units, ID Sensor Units, High-speed Counter Units, Serial Communications Units, DeviceNet Units, EtherNet/IP Units and CompoNet Master Units.

W491 CJ1W-TC£££

W492 CJ1W-CT021

W498 CJ1W-PDC15

CJ1W-PH41U CJ1W-AD04U

W493 CJ1W-CRM21

W494 CJ1W-SCU££

W495 CJ1W-EIP21

W497 CJ1W-DRM21

Z317 CJ1W-V680£££

CX-Protocol Operation Manual

W344 --- Creating data trans-

fer protocols for gen- eral-purpose devices connected to CJ-ser- ies Serial Communi- cations Units.

Describes operating procedures for the CX- Protocol.

GX-series EtherCAT Slave Units

User’s Manual

W488 GX-ID££££

GX-OD££££

GX-OC££££

GX-MD££££

GX-AD££££

GX-DA££££

GX-EC££££

XWT-ID££

XWT-OD££

Learning how to use the EtherCAT remote I/O terminals.

Describes the hardware, setup methods and functions of the EtherCAT remote I/O terminals.

AC Servomotors/Servo Drives 1S-series with

Built-in EtherCAT® Communi- cations User's Manual

I586 R88M-1£

R88D-1SN£-ECT

Learning how to use the Servomotors/

Servo Drives with built-in EtherCAT Communications.

Describes the hardware, setup methods and functions of the Servomotors/Servo Drives with built-in EtherCAT Communica- tions.

I621 R88M-1AL£/ -1AM

£

R88D-1SAN£-ECT

(36)

Manual name Cat. No. Model numbers Application Description AC Servomotors/Servo Drives

G5 Series with

Built-in EtherCAT® Communi- cations User's Manual

I576 R88M-K£

R88D-KN£-ECT

Learning how to use the AC Servomotors/

Servo Drives with built-in EtherCAT Communications.

Describes the hardware, setup methods and functions of the AC Servomotors/Servo Drives with built-in EtherCAT Communica- tions.

The Linear Motor Type models and dedicat- ed models for position control are available in G5-series.

I577 R88L-EC-£

R88D-KN£-ECT-L

(37)

Revision History

A manual revision code appears as a suffix to the catalog number on the front and back covers of the manual.

W502-E1-30

Revision code

Cat. No.

Revision

code Date Revised content

01 July 2011 Original production

02 September 2011 Corrected mistakes.

03 March 2012

Made changes accompanying release of unit version 1.01 of the CPU Unit and version 1.02 of the Sysmac Studio.

Corrected mistakes.

04 May 2012

Made changes accompanying release of unit version 1.02 of the CPU Unit and version 1.03 of the Sysmac Studio.

Corrected mistakes.

05 August 2012

Made changes accompanying release of unit version 1.03 of the CPU Unit and version 1.04 of the Sysmac Studio.

Corrected mistakes.

06 February 2013

Made changes accompanying release of unit version 1.04 of the CPU Unit and version 1.05 of the Sysmac Studio.

Corrected mistakes.

07 April 2013

Made changes accompanying release of unit version 1.05 of the CPU Unit and version 1.06 of the Sysmac Studio.

Corrected mistakes.

08 June 2013

Made changes accompanying release of unit version 1.06 of the CPU Unit and version 1.07 of the Sysmac Studio.

Corrected mistakes.

09 September 2013

Made changes accompanying release of unit version 1.07 of the CPU Unit and version 1.08 of the Sysmac Studio.

Corrected mistakes.

10 December 2013

Made changes accompanying release of unit version 1.08 of the CPU Unit and version 1.09 of the Sysmac Studio.

Corrected mistakes.

11 July 2014

Made changes accompanying release of unit version 1.09 of the CPU Unit and version 1.10 of the Sysmac Studio.

Corrected mistakes.

12 January 2015

Made changes accompanying release of unit version 1.10 of the CPU Unit and version 1.12 of the Sysmac Studio.

Corrected mistakes.

13 April 2015

Made changes accompanying the addition of NX-series NX701-££££ CPU Units and the release of version 1.13 of the Sysmac Studio.

Added information on the NJ101-££££ NJ-series CPU Units.

Corrected mistakes.

14 October 2015

Made changes accompanying the addition of hardware revision.

Corrected mistakes.

(38)

Revision

code Date Revised content

15 April 2016

Made changes accompanying release of unit version 1.11 of the CPU Unit and version 1.15 of the Sysmac Studio.

Corrected mistakes.

16 July 2016

Made changes accompanying release of unit version 1.12 of the CPU Unit and version 1.16 of the Sysmac Studio.

Corrected mistakes.

17 October 2016

Made changes accompanying release of unit version 1.13 of the CPU Unit and version 1.17 of the Sysmac Studio.

Corrected mistakes.

18 November 2016 Corrected mistakes.

19 January 2017 Corrected mistakes.

20 April 2017 Corrected mistakes.

21 October 2017

Made changes accompanying release of unit version 1.16 of the CPU Unit.

Corrected mistakes.

22 April 2018

Made changes accompanying release of unit version 1.18 of the CPU Unit and version 1.22 of the Sysmac Studio.

Corrected mistakes.

23 April 2018

Made changes accompanying the addition of NX-series NX102 CPU Units.

Made changes accompanying the transfer of event codes to the NJ/NX- series Troubleshooting Manual (Cat. No. W503).

Corrected mistakes.

24 July 2018 Corrected mistakes.

25 January 2019 Corrected mistakes.

26 April 2019

Added information on the functions supported by unit version 1.32 or later of NX102 CPU Units.

Added information on the functions supported by unit version 1.21 or later of NX1P2 CPU Units.

Added information on the functions supported by unit version 1.21 or later of NJ501-1£00, NJ301-££££, and NJ101-££00 CPU Units.

27 July 2019

Made changes accompanying the upgrade of NX102-££00, NX1P2-££££

££, NJ501-1£00, NJ301-££££, and NJ101-££00 CPU Units to unit ver- sion 1.40.

Made changes accompanying the upgrade of NX701-££££, NJ501-4£00, NJ501-4£10, NJ501-1340 and NJ501-5300 CPU Units to unit version of 1.21.

28 July 2019 Corrected mistakes.

29 October 2019 Corrected mistakes.

30 August 2020

Made changes accompanying the addition of NJ501-R£££ CPU Units.

Corrected mistakes.

(39)

1

Instruction Set

This section provides a table of the instructions that you can use with NJ/NX-series CPU Unit.

Instruction Set ... 1-2

1

(40)

Instruction Set

• Refer to the NJ/NX-series Motion Control Instructions Reference Manual (Cat. No. W508) for the specifications of the motion control instructions.

• Refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504) for the specifications of the simulation instructions.

Ladder Diagram Instructions

Instruction Name Function Page

LD Load Reads the value of a BOOL variable. page 2-14

LDN Load NOT Reads the inverted value of a BOOL variable. page 2-14

AND AND Takes the logical AND of the value of a BOOL variable and

the input value.

page 2-17

ANDN AND NOT Takes the logical AND of the inverted value of a BOOL vari-

able and the input value.

page 2-17

OR OR Takes the logical OR of the value of a BOOL variable and

the execution condition.

page 2-20

ORN OR NOT Takes the logical OR of the inverted value of a BOOL varia-

ble and the execution condition.

page 2-20

Out Output Takes the logical result from the previous instruction and

outputs it to a BOOL variable.

page 2-23

OutNot Output NOT Takes the inverted value of the logical result from the previ- ous instruction and outputs it to a BOOL variable.

page 2-23

ST Statement Instructions

Instruction Name Function Page

IF If Selects one of two statements to execute, based on the

evaluation result of a specified condition expression.

page 2-28

CASE Case Selects a statement to execute, based on the value of a

specified integer expression.

page 2-32

WHILE While Repeatedly executes a statement as long as the evaluation

result of a specified condition expression is TRUE.

page 2-36

REPEAT Repeat Executes a statement once and then executes it repeatedly

until a specified condition expression becomes TRUE.

page 2-39

EXIT Break Loop Ends repeat processing for the FOR, WHILE, or REPEAT

instruction of the innermost loop.

page 2-42

RETURN Return Ends a function or function block and returns processing to

the calling instruction.

page 2-45

FOR Repeat Start Specifies the condition for repeat processing, and repeated- ly executes statements between FOR and END_FOR.

page 2-46

Sequence Input Instructions

Instruction Name Function Page

R_TRIG (Up) Up Trigger Outputs TRUE for one task period only when the input sig- nal changes to TRUE.

page 2-48

(41)

Instruction Name Function Page F_TRIG (Down) Down Trigger Outputs TRUE for one task period only when the input sig-

nal changes to FALSE.

page 2-48

TestABit Test A Bit Outputs the value of the specified bit in a bit string. page 2-52 TestABitN Test A Bit NOT Outputs the inverted value of the specified bit in a bit string. page 2-52

Sequence Output Instructions

Instruction Name Function Page

RS Reset-Priority Keep Retains the value of a BOOL variable.

It gives priority to the Reset input if both the Set input and Reset input are TRUE.

page 2-56

SR Set-Priority Keep Retains the value of a BOOL variable.

It gives priority to the Set input if both the Set input and Re- set input are TRUE.

page 2-59

Set Set Changes a BOOL variable to TRUE. page 2-62

Reset Reset Changes a BOOL variable to FALSE. page 2-62

SetBits Set Bits Changes consecutive bits in bit string data to TRUE. page 2-66

ResetBits Reset Bits Changes consecutive bits in bit string data to FALSE. page 2-66

SetABit Set A Bit Changes the specified bit in bit string data to TRUE. page 2-69

ResetABit Reset A Bit Changes the specified bit in bit string data to FALSE. page 2-69 OutABit Output A Bit Changes the specified bit in bit string data to TRUE or

FALSE.

page 2-71

Sequence Control Instructions

Instruction Name Function Page

End End Ends execution of a program in the current task period. page 2-74

RETURN Return Ends a function or function block and returns processing to

the calling instruction.

page 2-75

MC Master Control Start Marks the starting point of a master control region and re- sets the master control region.

page 2-76

MCR Master Control End Marks the end point of a master control region. page 2-76

JMP Jump Moves processing to the specified jump destination. page 2-89

FOR Repeat Start Marks the starting position for repeat processing and speci- fies the repeat condition.

page 2-91

NEXT Repeat End Marks the ending position for repeat processing. page 2-91

BREAK Break Loop Cancels repeat processing from the innermost FOR instruc-

tion to the NEXT instruction.

page 2-98

Comparison Instructions

Instruction Name Function Page

EQ (=) Equal Determines if the values of two or more variables are all

equivalent.

page 2-102

NE (<>) Not Equal Determines if the values of two variables are not equivalent. page 2-105

LT (<) Less Than Performs a less than comparison between values. page 2-108

LE (<=) Less Than Or Equal Performs a less than or equal comparison between values. page 2-108

GT (>) Greater Than Performs a greater than comparison between values. page 2-108

Instruction Set

1

Sequence Output Instructions

數據

Updating...

參考文獻

相關主題 :