Omron Sysmac NY512-1500, NY532-5400, Sysmac NY512-1300, Sysmac NY512-1400, Sysmac NY532-1300, Sysmac NY532-1400, Sysmac NY532-1500 Reference guide

  • Hello! I am an AI chatbot trained to assist you with the Omron Sysmac NY512-1500 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-04
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.
• Intel and Intel Core are trademarks of Intel Corporation in the U.S. and / or other countries.
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.
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
2
NY-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
4
NY-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 iable
Downward
differentiation
Upward
differentiation
Var iable
Var iabl e
Var iable
Var iabl e
Var iabl e
Downward
differentiation
Upward
differentiation
Var iable
Downward
differentiation
Upward
differentiation
Var iable
Var iabl e
Var iable
Var iabl e
Var iabl e
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
This page is for illustration only. It may not literally appear in this manual.
Give the current
headings.
Manual Structure
6
NY-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
I
Index
8
NY-series Instructions Reference Manual (W560)
CONTENTS
CONTENTS
Introduction ...............................................................................................................1
Relevant Manuals ......................................................................................................2
Manual Structure.......................................................................................................4
Sections in this Manual ............................................................................................6
Terms and Conditions Agreement.........................................................................15
Safety Precautions..................................................................................................17
Precautions for Safe Use........................................................................................18
Precautions for Correct Use...................................................................................19
Regulations and Standards....................................................................................20
Versions ...................................................................................................................21
Related Manuals......................................................................................................23
Revision History......................................................................................................26
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
Stack and Table Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-491
StackPush ............................................................................................................. 2-492
StackFIFO and StackLIFO .................................................................................... 2-501
StackIns ................................................................................................................. 2-504
StackDel ................................................................................................................ 2-506
RecSearch ............................................................................................................. 2-508
RecRangeSearch .................................................................................................. 2-513
12
NY-series Instructions Reference Manual (W560)
CONTENTS
RecSort ................................................................................................................. 2-518
RecNum ................................................................................................................ 2-524
RecMax and RecMin ............................................................................................. 2-526
FCS Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-531
StringSum .............................................................................................................. 2-532
StringLRC .............................................................................................................. 2-534
StringCRCCCITT ................................................................................................... 2-536
StringCRC16 ......................................................................................................... 2-538
AryLRC_** ............................................................................................................. 2-540
AryCRCCCITT ....................................................................................................... 2-542
AryCRC16 ............................................................................................................. 2-544
Text String Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-547
CONCAT ............................................................................................................... 2-548
LEFT and RIGHT .................................................................................................. 2-550
MID ........................................................................................................................ 2-552
FIND ...................................................................................................................... 2-554
LEN ....................................................................................................................... 2-556
REPLACE .............................................................................................................. 2-557
DELETE ................................................................................................................ 2-559
INSERT ................................................................................................................. 2-561
GetByteLen ........................................................................................................... 2-563
ClearString ............................................................................................................ 2-565
ToUCase and ToLCase ......................................................................................... 2-567
TrimL and TrimR ................................................................................................... 2-569
AddDelimiter .......................................................................................................... 2-571
SubDelimiter .......................................................................................................... 2-582
Time and Time of Day Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-593
ADD_TIME ............................................................................................................ 2-594
ADD_TOD_TIME ................................................................................................... 2-596
ADD_DT_TIME ..................................................................................................... 2-598
SUB_TIME ............................................................................................................ 2-600
SUB_TOD_TIME ................................................................................................... 2-602
SUB_TOD_TOD .................................................................................................... 2-604
SUB_DATE_DATE ................................................................................................ 2-605
SUB_DT_DT ......................................................................................................... 2-606
SUB_DT_TIME ...................................................................................................... 2-608
MULTIME .............................................................................................................. 2-610
DIVTIME ................................................................................................................ 2-612
CONCAT_DATE_TOD .......................................................................................... 2-614
DT_TO_TOD ......................................................................................................... 2-616
DT_TO_DATE ....................................................................................................... 2-618
GetTime ................................................................................................................. 2-620
DtToSec ................................................................................................................ 2-622
DateToSec ............................................................................................................ 2-624
TodToSec .............................................................................................................. 2-625
SecToDt ................................................................................................................ 2-626
SecToDate ............................................................................................................ 2-628
SecToTod .............................................................................................................. 2-630
TimeToNanoSec ................................................................................................... 2-632
TimeToSec ............................................................................................................ 2-633
NanoSecToTime ................................................................................................... 2-634
SecToTime ............................................................................................................ 2-635
ChkLeapYear ........................................................................................................ 2-637
GetDaysOfMonth ................................................................................................... 2-638
DaysToMonth ........................................................................................................ 2-640
GetDayOfWeek ..................................................................................................... 2-642
GetWeekOfYear .................................................................................................... 2-644
DtToDateStruct ...................................................................................................... 2-646
DateStructToDt ...................................................................................................... 2-649
13
NY-series Instructions Reference Manual (W560)
CONTENTS
TruncTime ............................................................................................................. 2-651
TruncDt .................................................................................................................. 2-655
TruncTod ............................................................................................................... 2-659
Analog Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-663
PIDAT .................................................................................................................... 2-664
PIDAT_HeatCool ................................................................................................... 2-689
TimeProportionalOut ............................................................................................. 2-727
LimitAlarm_** ......................................................................................................... 2-743
LimitAlarmDv_** .................................................................................................... 2-747
LimitAlarmDvStbySeq_** ....................................................................................... 2-752
ScaleTrans ............................................................................................................ 2-767
AC_StepProgram .................................................................................................. 2-770
System Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-795
TraceSamp ............................................................................................................ 2-796
TraceTrig ............................................................................................................... 2-799
GetTraceStatus ..................................................................................................... 2-802
SetAlarm ................................................................................................................ 2-806
ResetAlarm ............................................................................................................ 2-811
GetAlarm ............................................................................................................... 2-813
ResetPLCError ...................................................................................................... 2-815
GetPLCError .......................................................................................................... 2-818
GetEIPError ........................................................................................................... 2-820
ResetMCError ....................................................................................................... 2-822
GetMCError ........................................................................................................... 2-827
ResetECError ........................................................................................................ 2-829
GetECError ............................................................................................................ 2-831
SetInfo ................................................................................................................... 2-834
RestartNXUnit ....................................................................................................... 2-836
NX_ChangeWriteMode ......................................................................................... 2-843
NX_SaveParam ..................................................................................................... 2-848
NX_ReadTotalPowerOnTime ................................................................................ 2-854
Program Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-863
PrgStart ................................................................................................................. 2-864
PrgStop ................................................................................................................. 2-873
PrgStatus ............................................................................................................... 2-893
EtherCAT Communications Instructions . . . . . . . . . . . . . . . . . . . . . . . . . 2-899
EC_CoESDOWrite ................................................................................................ 2-900
EC_CoESDORead ................................................................................................ 2-903
EC_StartMon ......................................................................................................... 2-908
EC_StopMon ......................................................................................................... 2-914
EC_SaveMon ........................................................................................................ 2-916
EC_CopyMon ........................................................................................................ 2-918
EC_DisconnectSlave ............................................................................................. 2-920
EC_ConnectSlave ................................................................................................. 2-927
EC_ChangeEnableSetting .................................................................................... 2-929
NX_WriteObj ......................................................................................................... 2-946
NX_ReadObj ......................................................................................................... 2-961
IO-Link Communications Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-969
IOL_ReadObj ........................................................................................................ 2-970
IOL_WriteObj ......................................................................................................... 2-979
EtherNet/IP Communications Instructions . . . . . . . . . . . . . . . . . . . . . . . 2-989
CIPOpen ................................................................................................................ 2-990
CIPOpenWithDataSize .......................................................................................... 2-999
CIPRead .............................................................................................................. 2-1003
CIPWrite .............................................................................................................. 2-1009
CIPSend .............................................................................................................. 2-1015
CIPClose ............................................................................................................. 2-1020
CIPUCMMRead ................................................................................................... 2-1023
14
NY-series Instructions Reference Manual (W560)
CONTENTS
CIPUCMMWrite ................................................................................................... 2-1028
CIPUCMMSend ................................................................................................... 2-1035
SktUDPCreate ..................................................................................................... 2-1045
SktUDPRcv ......................................................................................................... 2-1053
SktUDPSend ....................................................................................................... 2-1056
SktTCPAccept ..................................................................................................... 2-1059
SktTCPConnect ................................................................................................... 2-1062
SktTCPRcv .......................................................................................................... 2-1071
SktTCPSend ........................................................................................................ 2-1074
SktGetTCPStatus ................................................................................................ 2-1077
SktClose .............................................................................................................. 2-1080
SktClearBuf ......................................................................................................... 2-1083
SktSetOption ....................................................................................................... 2-1086
ChangeIPAdr ....................................................................................................... 2-1091
ChangeFTPAccount ............................................................................................ 2-1099
FTPGetFileList .................................................................................................... 2-1103
FTPGetFile .......................................................................................................... 2-1120
FTPPutFile .......................................................................................................... 2-1129
FTPRemoveFile .................................................................................................. 2-1140
FTPRemoveDir .................................................................................................... 2-1150
Serial Communications Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1155
NX_SerialSend .................................................................................................... 2-1156
NX_SerialRcv ...................................................................................................... 2-1169
NX_ModbusRtuCmd ........................................................................................... 2-1183
NX_ModbusRtuRead .......................................................................................... 2-1193
NX_ModbusRtuWrite ........................................................................................... 2-1204
NX_SerialSigCtl ................................................................................................... 2-1215
NX_SerialBufClear .............................................................................................. 2-1224
NX_SerialStartMon .............................................................................................. 2-1234
NX_SerialStopMon .............................................................................................. 2-1239
SD Memory Card Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1243
FileWriteVar ......................................................................................................... 2-1244
FileReadVar ........................................................................................................ 2-1249
FileOpen .............................................................................................................. 2-1254
FileClose ............................................................................................................. 2-1258
FileSeek .............................................................................................................. 2-1261
FileRead .............................................................................................................. 2-1265
FileWrite .............................................................................................................. 2-1273
FileGets ............................................................................................................... 2-1281
FilePuts ............................................................................................................... 2-1289
FileCopy .............................................................................................................. 2-1298
FileRemove ......................................................................................................... 2-1307
FileRename ......................................................................................................... 2-1312
DirCreate ............................................................................................................. 2-1317
DirRemove .......................................................................................................... 2-1320
BackupToMemoryCard ....................................................................................... 2-1323
Time Stamp Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1339
NX_DOutTimeStamp ........................................................................................... 2-1340
NX_AryDOutTimeStamp ..................................................................................... 2-1346
OS Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1355
IPC_GetOSStatus ............................................................................................... 2-1356
IPC_RebootOS .................................................................................................... 2-1359
IPC_Shutdown .................................................................................................... 2-1362
Other Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1365
ReadNbit_** ......................................................................................................... 2-1366
WriteNbit_** ......................................................................................................... 2-1368
ChkRange ........................................................................................................... 2-1370
GetMyTaskStatus ................................................................................................ 2-1372
15
NY-series Instructions Reference Manual (W560)
CONTENTS
GetMyTaskInterval .............................................................................................. 2-1375
Task_IsActive ...................................................................................................... 2-1378
Lock and Unlock .................................................................................................. 2-1380
ActEventTask ...................................................................................................... 2-1387
Get**Clk ............................................................................................................... 2-1393
Get**Cnt .............................................................................................................. 2-1394
Appendices
A-1 Error Codes That You Can Check with ErrorID.....................................................................A-2
A-2 Instructions You Cannot Use in Event Tasks......................................................................A-18
A-3 Instructions Related to NX Message Communications Errors..........................................A-20
A-4 SDO Abort Codes ..................................................................................................................A-21
A-5 Version Information ...............................................................................................................A-22
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 WITHOUT ENSURING THAT THE SYSTEM AS A WHOLE HAS BEEN DESIGNED TO
ADDRESS THE RISKS, AND THAT THE OMRON PRODUCT(S) IS PROPERLY RATED AND
INSTALLED FOR THE INTENDED USE WITHIN THE OVERALL EQUIPMENT OR SYSTEM.
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)
/