Omron NY Series Reference guide

  • Hello! I am an AI chatbot trained to assist you with the Omron NY Series Reference guide. I’ve already reviewed the document and can help you find the information you need or explain it in simple terms. Just ask your questions, and providing more details will help me assist you more effectively!
Industrial PC Platform
NY-series
Instructions
Reference Manual
W560-E1-07
NY532-1500
NY532-1400
NY532-1300
NY532-5400
NY512-1500
NY512-1400
NY512-1300
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.
• 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 Microsoft Corpora-
tion 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 trademarks of their
respective companies.
Trademarks
Copyrights
NOTE
• Microsoft product screen shots reprinted with permission from Microsoft Corporation.
• This product incorporates certain third party software. The license and copyright information associated with this
software is available at http://www.fa.omron.co.jp/nj_info_e/.
1
Introduction
NY-series Instructions Reference Manual (W560)
Introduction
Thank you for purchasing an NY-series IPC Machine Controller Industrial Panel PC / Industrial Box PC.
This manual provides a collective term of Industrial Panel PC and Industrial Box PC which are applica-
ble products as the NY-series Industrial PC. This manual also provides the range of devices that are
directly controlled by the Controller functions embedded the Real-Time OS in the NY-series Industrial
PC as the Controller.
This manual contains information that is necessary to use the NY-series Controller. Please read this
manual and make sure you understand the functionality and performance of the NY-series Controller
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.
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.
This manual covers the following products.
NY-series IPC Machine Controller Industrial Panel PC
NY532-15
NY532-14
NY532-13
NY532-5400
NY-series IPC Machine Controller Industrial Box PC
NY512-15
NY512-14
NY512-13
Part of the specifications and restrictions for the Industrial PC are given in other manuals. Refer to Rel-
evant Manuals on page 2 and Related Manuals on page 24.
Intended Audience
Applicable Products
Relevant Manuals
2NY-series Instructions Reference Manual (W560)
Relevant Manuals
The following table provides the relevant manuals for the NY-series Controller.
Read all of the manuals that are relevant to your system configuration and application before you use
the NY-series Controller.
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.
*1 Refer to the NY-series Industrial Panel PC / Industrial Box PC Setup User's Manual (Cat. No. W568) for how to set up and
how to use the utilities on Windows.
Purpose of use
Manual
Basic information
NY-series IPC Machine Controller
Industrial Panel PC
Hardware User’s Manual
NY-series IPC Machine Controller
Industrial Box PC
Hardware User’s Manual
NY-series IPC Machine Controller
Industrial Panel PC / Industrial Box PC
Setup User's Manual
NY-series IPC Machine Controller
Industrial Panel PC / Industrial Box PC
Software User’s Manual
NY-series
Instructions Reference Manual
NY-series IPC Machine Controller
Industrial Panel PC / Industrial Box PC
Motion Control User's Manual
NY-series Motion Control
Instructions Reference Manual
NY-series IPC Machine Controller
Industrial Panel PC / Industrial Box PC
Built-in EtherCAT Port User’s Manual
NY-series IPC Machine Controller
Industrial Panel PC / Industrial Box PC
Built-in EtherNet/IP Port User's Manual
NJ/NY-series
NC Integrated Controller User’s Manual
NY-series
Troubleshooting Manual
Introduction to NY-series Panel PCs
Introduction to NY-series Box PCs
Setting devices and hardware

Using motion control
Using EtherCAT
Using EtherNet/IP
Making setup*1
Making initial settings
Preparing to use Controllers
Software settings
Using motion control
Using EtherCAT
Using EtherNet/IP
Using numerical control
Writing the user program

Using motion control 
Using EtherCAT
Using EtherNet/IP
Using numerical control
Programming error processing
Testing operation and debugging
Using motion control
Using EtherCAT
Using EtherNet/IP
Using numerical control
Learning about error management and
corrections*2
Maintenance

Using motion control
Using EtherCAT
Using EtherNet/IP
3
Relevant Manuals
NY-series Instructions Reference Manual (W560)
*2 Refer to the NY-series Troubleshooting Manual (Cat. No. W564) for the error management concepts and the error items.
Manual Structure
4NY-series Instructions Reference Manual (W560)
Manual Structure
Some of the instructions described in this manual are common to the NJ/NX-series.
Therefore, note the following conditions.
You cannot connect a CJ-series Unit with NY-series Controllers. In the instructions, skip items and
samples related to CJ-series Units.
In explanation of the instructions, replace the term “CPU Unit” with “NY-series Controller.”
NY-series Controllers have no SD Memory Card slots. Instead, they provide the Virtual SD Memory
Card function that uses the Windows shared folder. Therefore, replace the term “SD Memory Card”
with “Virtual SD Memory Card.” Refer to the NY-series Industrial Panel PC / Industrial Box PC Soft-
ware User’s Manual (Cat. No. W558) and NY-series Industrial Panel PC / Industrial Box PC Setup
User’s Manual (Cat. No. W568) for details on the function of a Virtual SD Memory Card.
The unit version of the NY-series Controller is 1.12 or later.
The following page structure is used in this manual.
Page Structure
Level-2 heading
Level-2
heading
Manual name
Level-1
section number
Gives the number
of the section.
This page is for illustration only. It may not literally appear in this manual.
snoitcurtsnI margaiD 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
5
Manual Structure
NY-series Instructions Reference Manual (W560)
Version Information
Information on differences in specifications and functionality for CPU Units with different unit ver-
sions and for different versions of the Sysmac Studio are given.
2-17
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
s
no
itcu
rt
s
n
I
m
a
r
ga
iD
re
dd
aL
2
N
RO dn
a
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
Var i able
Downward
differentiation
Upward
differentiation
Var i able
Var i able Va r iabl e
Var i able
Var i able
Downward
differentiation
Upward
differentiation
Var i able
Downward
differentiation
Upward
differentiation
Var i able
Var i able
Var i able
Var i able
Var i able
Downward
differentiation
Upward
differentiation
B
AC
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
This page is for illustration only. It may not literally appear in this manual.
Give the current
headings.
Manual Structure
6NY-series Instructions Reference Manual (W560)
7
Sections in this Manual
NY-series Instructions Reference Manual (W560)
Sections in this Manual
1
2
A
1
2
A
I
Instruction Set
Instruction Descriptions
Appendices
IIndex
8NY-series Instructions Reference Manual (W560)
CONTENTS
CONTENTS
Introduction ...............................................................................................................1
Relevant Manuals......................................................................................................2
Manual Structure.......................................................................................................4
Sections in this Manual ............................................................................................7
Terms and Conditions Agreement.........................................................................16
Safety Precautions..................................................................................................18
Precautions for Safe Use........................................................................................19
Precautions for Correct Use...................................................................................20
Regulations and Standards....................................................................................21
Versions ...................................................................................................................22
Related Manuals......................................................................................................24
Revision History......................................................................................................27
Section 1 Instruction Set
Instruction Set ........................................................................................................... 1-2
Section 2 Instruction Descriptions
Using this Section ...................................................................................................... 2-3
Ladder Diagram Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-15
LD and LDN ............................................................................................................. 2-16
AND and ANDN ....................................................................................................... 2-18
OR and ORN ........................................................................................................... 2-20
Out and OutNot ....................................................................................................... 2-22
ST Statement Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-25
IF .............................................................................................................................2-26
CASE ....................................................................................................................... 2-30
WHILE ..................................................................................................................... 2-34
REPEAT .................................................................................................................. 2-36
EXIT ........................................................................................................................ 2-38
RETURN ................................................................................................................. 2-41
FOR ......................................................................................................................... 2-42
Sequence Input Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-43
R_TRIG (Up) and F_TRIG (Down) .......................................................................... 2-44
TestABit and TestABitN ........................................................................................... 2-47
Sequence Output Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-49
RS ........................................................................................................................... 2-50
SR ........................................................................................................................... 2-53
Set and Reset .......................................................................................................... 2-56
SetBits and ResetBits .............................................................................................. 2-59
SetABit and ResetABit ............................................................................................ 2-61
9
NY-series Instructions Reference Manual (W560)
CONTENTS
OutABit .................................................................................................................... 2-63
Sequence Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-65
End .......................................................................................................................... 2-66
RETURN ................................................................................................................. 2-67
MC and MCR ........................................................................................................... 2-68
JMP ......................................................................................................................... 2-80
FOR and NEXT ....................................................................................................... 2-82
BREAK .................................................................................................................... 2-89
Comparison Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-91
EQ (=) ...................................................................................................................... 2-92
NE (<>) .................................................................................................................... 2-94
LT (<), LE (<=), GT (>), and GE (>=) ...................................................................... 2-97
EQascii .................................................................................................................. 2-100
NEascii .................................................................................................................. 2-102
LTascii, LEascii, GTascii, and GEascii .................................................................. 2-104
Cmp ....................................................................................................................... 2-107
ZoneCmp ............................................................................................................... 2-109
TableCmp .............................................................................................................. 2-111
AryCmpEQ and AryCmpNE .................................................................................. 2-114
AryCmpLT, AryCmpLE, AryCmpGT, and AryCmpGE ........................................... 2-116
AryCmpEQV and AryCmpNEV ............................................................................. 2-119
AryCmpLTV, AryCmpLEV, AryCmpGTV, and AryCmpGEV ................................. 2-121
Timer Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-125
TON ....................................................................................................................... 2-126
TOF ....................................................................................................................... 2-132
TP .......................................................................................................................... 2-135
AccumulationTimer ................................................................................................ 2-138
Timer ..................................................................................................................... 2-141
Counter Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-145
CTD ....................................................................................................................... 2-146
CTD_** .................................................................................................................. 2-148
CTU ....................................................................................................................... 2-150
CTU_** .................................................................................................................. 2-152
CTUD .................................................................................................................... 2-155
CTUD_** ................................................................................................................ 2-159
Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-165
ADD (+) ................................................................................................................. 2-166
AddOU (+OU) ........................................................................................................ 2-170
SUB (-) .................................................................................................................. 2-174
SubOU (-OU) ......................................................................................................... 2-177
MUL (*) .................................................................................................................. 2-181
MulOU (*OU) ......................................................................................................... 2-185
DIV (/) .................................................................................................................... 2-189
MOD ...................................................................................................................... 2-192
ABS ....................................................................................................................... 2-194
RadToDeg and DegToRad .................................................................................... 2-196
SIN, COS, and TAN .............................................................................................. 2-198
ASIN, ACOS, and ATAN ....................................................................................... 2-201
SQRT .................................................................................................................... 2-204
LN and LOG .......................................................................................................... 2-206
EXP ....................................................................................................................... 2-209
EXPT (**) ............................................................................................................... 2-211
Inc and Dec ........................................................................................................... 2-217
Rand ...................................................................................................................... 2-219
AryAdd ................................................................................................................... 2-221
AryAddV ................................................................................................................ 2-223
ArySub ................................................................................................................... 2-225
ArySubV ................................................................................................................ 2-227
10 NY-series Instructions Reference Manual (W560)
CONTENTS
AryMean ................................................................................................................ 2-229
ArySD .................................................................................................................... 2-231
ModReal ................................................................................................................ 2-233
Fraction ................................................................................................................. 2-235
CheckReal ............................................................................................................. 2-237
BCD Conversion Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-241
**_BCD_TO_*** ..................................................................................................... 2-242
**_TO_BCD_*** ..................................................................................................... 2-245
BCD_TO_** ........................................................................................................... 2-247
BCDsToBin ............................................................................................................ 2-250
BinToBCDs_** ....................................................................................................... 2-253
AryToBCD ............................................................................................................. 2-256
AryToBin ................................................................................................................ 2-258
Data Type Conversion Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-261
**_TO_*** (Integer-to-Integer Conversion Group) ................................................. 2-262
**_TO_*** (Integer-to-Bit String Conversion Group) .............................................. 2-265
**_TO_*** (Integer-to-Real Number Conversion Group) ....................................... 2-268
**_TO_*** (Bit String-to-Integer Conversion Group) .............................................. 2-270
**_TO_*** (Bit String-to-Bit String Conversion Group) .......................................... 2-272
**_TO_*** (Bit String-to-Real Number Conversion Group) .................................... 2-274
**_TO_*** (Real Number-to-Integer Conversion Group) ....................................... 2-276
**_TO_*** (Real Number-to-Bit String Conversion Group) .................................... 2-279
**_TO_*** (Real Number-to-Real Number Conversion Group) ............................. 2-281
**_TO_STRING (Integer-to-Text String Conversion Group) ................................. 2-283
**_TO_STRING (Bit String-to-Text String Conversion Group) .............................. 2-285
**_TO_STRING (Real Number-to-Text String Conversion Group) ....................... 2-287
RealToFormatString .............................................................................................. 2-289
LrealToFormatString ............................................................................................. 2-294
STRING_TO_** (Text String-to-Integer Conversion Group) ................................. 2-299
STRING_TO_** (Text String-to-Bit String Conversion Group) .............................. 2-301
STRING_TO_** (Text String-to-Real Number Conversion Group) ....................... 2-303
TO_** (Integer Conversion Group) ........................................................................ 2-306
TO_** (Bit String Conversion Group) .................................................................... 2-308
TO_** (Real Number Conversion Group) .............................................................. 2-310
EnumToNum ......................................................................................................... 2-312
NumToEnum ......................................................................................................... 2-314
TRUNC, Round, and RoundUp ............................................................................. 2-316
Bit String Processing Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-319
AND (&), OR, and XOR ......................................................................................... 2-320
XORN .................................................................................................................... 2-323
NOT ....................................................................................................................... 2-325
AryAnd, AryOr, AryXor, and AryXorN .................................................................... 2-327
Selection Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-331
SEL ........................................................................................................................ 2-332
MUX ...................................................................................................................... 2-334
LIMIT ..................................................................................................................... 2-337
Band ...................................................................................................................... 2-339
Zone ...................................................................................................................... 2-342
MAX and MIN ........................................................................................................ 2-345
AryMax and AryMin ............................................................................................... 2-347
ArySearch .............................................................................................................. 2-350
Data Movement Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-353
MOVE .................................................................................................................... 2-354
MoveBit ................................................................................................................. 2-357
MoveDigit .............................................................................................................. 2-359
TransBits ............................................................................................................... 2-361
MemCopy .............................................................................................................. 2-363
SetBlock ................................................................................................................ 2-365
11
NY-series Instructions Reference Manual (W560)
CONTENTS
Exchange .............................................................................................................. 2-367
AryExchange ......................................................................................................... 2-369
AryMove ................................................................................................................ 2-371
Clear ...................................................................................................................... 2-373
Copy**ToNum (Bit String to Signed Integer) ......................................................... 2-375
Copy**To*** (Bit String to Real Number) ............................................................... 2-377
CopyNumTo** (Signed Integer to Bit String) ......................................................... 2-379
CopyNumTo** (Signed Integer to Real Number) .................................................. 2-381
Copy**To*** (Real Number to Bit String) ............................................................... 2-383
Copy**ToNum (Real Number to Signed Integer) .................................................. 2-385
Shift Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-387
AryShiftReg ........................................................................................................... 2-388
AryShiftRegLR ....................................................................................................... 2-390
ArySHL and ArySHR ............................................................................................. 2-393
SHL and SHR ........................................................................................................ 2-396
NSHLC and NSHRC ............................................................................................. 2-398
ROL and ROR ....................................................................................................... 2-400
Conversion Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-403
Swap ..................................................................................................................... 2-404
Neg ........................................................................................................................ 2-405
Decoder ................................................................................................................. 2-407
Encoder ................................................................................................................. 2-410
BitCnt ..................................................................................................................... 2-412
ColmToLine_** ...................................................................................................... 2-413
LineToColm ........................................................................................................... 2-415
Gray ....................................................................................................................... 2-417
UTF8ToSJIS .......................................................................................................... 2-422
SJISToUTF8 .......................................................................................................... 2-424
PWLApprox and PWLApproxNoLineChk .............................................................. 2-426
PWLLineChk ......................................................................................................... 2-432
MovingAverage ..................................................................................................... 2-435
DispartReal ............................................................................................................ 2-441
UniteReal ............................................................................................................... 2-444
NumToDecString and NumToHexString ............................................................... 2-446
HexStringToNum_** .............................................................................................. 2-449
FixNumToString .................................................................................................... 2-451
StringToFixNum .................................................................................................... 2-453
DtToString ............................................................................................................. 2-456
DateToString ......................................................................................................... 2-458
TodToString ........................................................................................................... 2-459
GrayToBin_** and BinToGray_** .......................................................................... 2-461
StringToAry ........................................................................................................... 2-463
AryToString ........................................................................................................... 2-465
DispartDigit ............................................................................................................ 2-467
UniteDigit_** .......................................................................................................... 2-469
Dispart8Bit ............................................................................................................. 2-471
Unite8Bit_** ........................................................................................................... 2-473
ToAryByte .............................................................................................................. 2-475
AryByteTo .............................................................................................................. 2-480
SizeOfAry .............................................................................................................. 2-485
PackWord .............................................................................................................. 2-487
PackDword ............................................................................................................ 2-489
LOWER_BOUND/UPPER_BOUND ...................................................................... 2-491
Stack and Table Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-497
StackPush ............................................................................................................. 2-498
StackFIFO and StackLIFO .................................................................................... 2-507
StackIns ................................................................................................................. 2-510
StackDel ................................................................................................................ 2-512
RecSearch ............................................................................................................. 2-514
12 NY-series Instructions Reference Manual (W560)
CONTENTS
RecRangeSearch .................................................................................................. 2-519
RecSort ................................................................................................................. 2-524
RecNum ................................................................................................................ 2-530
RecMax and RecMin ............................................................................................. 2-532
FCS Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-537
StringSum .............................................................................................................. 2-538
StringLRC .............................................................................................................. 2-540
StringCRCCCITT ................................................................................................... 2-542
StringCRC16 ......................................................................................................... 2-544
AryLRC_** ............................................................................................................. 2-546
AryCRCCCITT ....................................................................................................... 2-548
AryCRC16 ............................................................................................................. 2-550
Text String Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-553
CONCAT ............................................................................................................... 2-554
LEFT and RIGHT .................................................................................................. 2-556
MID ........................................................................................................................ 2-558
FIND ...................................................................................................................... 2-560
LEN ....................................................................................................................... 2-562
REPLACE .............................................................................................................. 2-563
DELETE ................................................................................................................ 2-565
INSERT ................................................................................................................. 2-567
GetByteLen ........................................................................................................... 2-569
ClearString ............................................................................................................ 2-571
ToUCase and ToLCase ......................................................................................... 2-573
TrimL and TrimR ................................................................................................... 2-575
AddDelimiter .......................................................................................................... 2-577
SubDelimiter .......................................................................................................... 2-588
Time and Time of Day Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-599
ADD_TIME ............................................................................................................ 2-600
ADD_TOD_TIME ................................................................................................... 2-602
ADD_DT_TIME ..................................................................................................... 2-604
SUB_TIME ............................................................................................................ 2-606
SUB_TOD_TIME ................................................................................................... 2-608
SUB_TOD_TOD .................................................................................................... 2-610
SUB_DATE_DATE ................................................................................................ 2-611
SUB_DT_DT ......................................................................................................... 2-612
SUB_DT_TIME ...................................................................................................... 2-614
MULTIME .............................................................................................................. 2-616
DIVTIME ................................................................................................................ 2-618
CONCAT_DATE_TOD .......................................................................................... 2-620
DT_TO_TOD ......................................................................................................... 2-622
DT_TO_DATE ....................................................................................................... 2-624
GetTime ................................................................................................................. 2-626
DtToSec ................................................................................................................ 2-628
DateToSec ............................................................................................................ 2-630
TodToSec .............................................................................................................. 2-631
SecToDt ................................................................................................................ 2-632
SecToDate ............................................................................................................ 2-634
SecToTod .............................................................................................................. 2-636
TimeToNanoSec ................................................................................................... 2-638
TimeToSec ............................................................................................................ 2-639
NanoSecToTime ................................................................................................... 2-640
SecToTime ............................................................................................................ 2-641
ChkLeapYear ........................................................................................................ 2-643
GetDaysOfMonth ................................................................................................... 2-644
DaysToMonth ........................................................................................................ 2-646
GetDayOfWeek ..................................................................................................... 2-648
GetWeekOfYear .................................................................................................... 2-650
DtToDateStruct ...................................................................................................... 2-652
13
NY-series Instructions Reference Manual (W560)
CONTENTS
DateStructToDt ...................................................................................................... 2-655
TruncTime ............................................................................................................. 2-657
TruncDt .................................................................................................................. 2-661
TruncTod ............................................................................................................... 2-665
Analog Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-669
PIDAT .................................................................................................................... 2-670
PIDAT_HeatCool ................................................................................................... 2-695
TimeProportionalOut ............................................................................................. 2-733
LimitAlarm_** ......................................................................................................... 2-750
LimitAlarmDv_** .................................................................................................... 2-754
LimitAlarmDvStbySeq_** ....................................................................................... 2-759
ScaleTrans ............................................................................................................ 2-774
AC_StepProgram .................................................................................................. 2-777
System Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-803
TraceSamp ............................................................................................................ 2-804
TraceTrig ............................................................................................................... 2-807
GetTraceStatus ..................................................................................................... 2-810
SetAlarm ................................................................................................................ 2-814
ResetAlarm ............................................................................................................ 2-819
GetAlarm ............................................................................................................... 2-821
ResetPLCError ...................................................................................................... 2-823
GetPLCError .......................................................................................................... 2-826
GetEIPError ........................................................................................................... 2-828
ResetMCError ....................................................................................................... 2-830
GetMCError ........................................................................................................... 2-835
ResetECError ........................................................................................................ 2-837
GetECError ............................................................................................................ 2-839
SetInfo ................................................................................................................... 2-842
RestartNXUnit ....................................................................................................... 2-844
NX_ChangeWriteMode ......................................................................................... 2-851
NX_SaveParam ..................................................................................................... 2-856
NX_ReadTotalPowerOnTime ................................................................................ 2-862
Program Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-871
PrgStart ................................................................................................................. 2-872
PrgStop ................................................................................................................. 2-881
PrgStatus ............................................................................................................... 2-901
EtherCAT Communications Instructions . . . . . . . . . . . . . . . . . . . . . . . . . 2-907
EC_CoESDOWrite ................................................................................................ 2-908
EC_CoESDORead ................................................................................................ 2-911
EC_StartMon ......................................................................................................... 2-916
EC_StopMon ......................................................................................................... 2-922
EC_SaveMon ........................................................................................................ 2-924
EC_CopyMon ........................................................................................................ 2-926
EC_DisconnectSlave ............................................................................................. 2-928
EC_ConnectSlave ................................................................................................. 2-935
EC_ChangeEnableSetting .................................................................................... 2-937
NX_WriteObj ......................................................................................................... 2-954
NX_ReadObj ......................................................................................................... 2-969
IO-Link Communications Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-977
IOL_ReadObj ........................................................................................................ 2-978
IOL_WriteObj ......................................................................................................... 2-987
EtherNet/IP Communications Instructions . . . . . . . . . . . . . . . . . . . . . . . 2-997
CIPOpen ................................................................................................................ 2-998
CIPOpenWithDataSize ........................................................................................ 2-1007
CIPRead .............................................................................................................. 2-1011
CIPWrite .............................................................................................................. 2-1017
CIPSend .............................................................................................................. 2-1023
CIPClose ............................................................................................................. 2-1028
14 NY-series Instructions Reference Manual (W560)
CONTENTS
CIPUCMMRead ................................................................................................... 2-1031
CIPUCMMWrite ................................................................................................... 2-1036
CIPUCMMSend ................................................................................................... 2-1043
SktUDPCreate ..................................................................................................... 2-1053
SktUDPRcv ......................................................................................................... 2-1061
SktUDPSend ....................................................................................................... 2-1064
SktTCPAccept ..................................................................................................... 2-1067
SktTCPConnect ................................................................................................... 2-1070
SktTCPRcv .......................................................................................................... 2-1079
SktTCPSend ........................................................................................................ 2-1082
SktGetTCPStatus ................................................................................................ 2-1085
SktClose .............................................................................................................. 2-1088
SktClearBuf ......................................................................................................... 2-1091
SktSetOption ....................................................................................................... 2-1094
ChangeIPAdr ....................................................................................................... 2-1099
ChangeFTPAccount ............................................................................................ 2-1107
FTPGetFileList .................................................................................................... 2-1111
FTPGetFile .......................................................................................................... 2-1128
FTPPutFile .......................................................................................................... 2-1137
FTPRemoveFile .................................................................................................. 2-1148
FTPRemoveDir .................................................................................................... 2-1158
Serial Communications Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1163
NX_SerialSend .................................................................................................... 2-1164
NX_SerialRcv ...................................................................................................... 2-1177
NX_ModbusRtuCmd ........................................................................................... 2-1191
NX_ModbusRtuRead .......................................................................................... 2-1202
NX_ModbusRtuWrite ........................................................................................... 2-1214
NX_SerialSigCtl ................................................................................................... 2-1226
NX_SerialBufClear .............................................................................................. 2-1235
NX_SerialStartMon .............................................................................................. 2-1245
NX_SerialStopMon .............................................................................................. 2-1250
SD Memory Card Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1255
FileWriteVar ......................................................................................................... 2-1256
FileReadVar ........................................................................................................ 2-1261
FileOpen .............................................................................................................. 2-1266
FileClose ............................................................................................................. 2-1270
FileSeek .............................................................................................................. 2-1273
FileRead .............................................................................................................. 2-1277
FileWrite .............................................................................................................. 2-1285
FileGets ............................................................................................................... 2-1293
FilePuts ............................................................................................................... 2-1301
FileCopy .............................................................................................................. 2-1310
FileRemove ......................................................................................................... 2-1319
FileRename ......................................................................................................... 2-1324
DirCreate ............................................................................................................. 2-1329
DirRemove .......................................................................................................... 2-1332
BackupToMemoryCard ....................................................................................... 2-1335
Time Stamp Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1351
NX_DOutTimeStamp ........................................................................................... 2-1352
NX_AryDOutTimeStamp ..................................................................................... 2-1358
OS Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1367
IPC_GetOSStatus ............................................................................................... 2-1368
IPC_RebootOS .................................................................................................... 2-1371
IPC_Shutdown .................................................................................................... 2-1374
Other Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1377
ReadNbit_** ......................................................................................................... 2-1378
WriteNbit_** ......................................................................................................... 2-1380
ChkRange ........................................................................................................... 2-1382
15
NY-series Instructions Reference Manual (W560)
CONTENTS
GetMyTaskStatus ................................................................................................ 2-1384
GetMyTaskInterval .............................................................................................. 2-1387
Task_IsActive ...................................................................................................... 2-1390
Lock and Unlock .................................................................................................. 2-1392
ActEventTask ...................................................................................................... 2-1399
Get**Clk ............................................................................................................... 2-1405
Get**Cnt .............................................................................................................. 2-1406
Appendices
A-1 Error Codes That You Can Check with ErrorID ....................................................................A-2
A-2 Instructions You Cannot Use in Event Tasks .....................................................................A-19
A-3 Instructions Related to NX Message Communications Errors .........................................A-21
A-4 SDO Abort Codes ..................................................................................................................A-22
A-5 Version Information...............................................................................................................A-23
Index
Terms and Conditions Agreement
16 NY-series Instructions Reference Manual (W560)
Terms and Conditions Agreement
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.
See http://www.omron.com/global/ or contact your Omron representative for published information.
OMRON COMPANIES SHALL NOT BE LIABLE FOR SPECIAL, INDIRECT, INCIDENTAL, OR CON-
SEQUENTIAL DAMAGES, LOSS OF PROFITS OR PRODUCTION OR COMMERCIAL LOSS IN ANY
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.
Warranty, Limitations of Liability
Warranties
Limitation on Liability; Etc
17
Terms and Conditions Agreement
NY-series Instructions Reference Manual (W560)
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 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.
Omron Companies shall not be responsible for the user’s programming of a programmable Product, or
any consequence thereof.
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.
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.
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.
Application Considerations
Suitability of Use
Programmable Products
Disclaimers
Performance Data
Change in Specifications
Errors and Omissions
Safety Precautions
18 NY-series Instructions Reference Manual (W560)
Safety Precautions
Refer to the following manuals for safety precautions.
NY-series Industrial Box PC Hardware User’s Manual (Cat. No. W556)
NY-series Industrial Panel PC Hardware User’s Manual (Cat. No. W557)
NY-series Industrial Panel PC / Industrial Box PC Software User’s Manual (Cat. No. W558)
/