EasyManuals Logo

Omron NJ501-1500 User Manual

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #636 background imageLoading...
Page #636 background image
2 Instruction Descriptions
2-588
NJ-series Instructions Reference Manual (W502)
ChkLeapYear
The ChkLeapYear instruction is used to check for a leap year.
The ChkLeapYear instruction is used to check to see if year In is a leap year. If it is a leap year, the
value of result Out is TRUE. If it is not a leap year, Out is FALSE.
The following example is for when In is UINT#2012.
[
If the value of In exceeds the valid range, an error will not occur and the value of Out will be an illegal
value.
Instruction Name FB/FUN Graphic expression ST expression
ChkLeapYear Check for Leap
Ye a r
FUN Out:=ChkLeapYear(In);
Variables
Name Meaning I/O Description Valid range Unit Default
In Year Input Year 1970 to 2554 Year 1970
Out Result Output TRUE: Leap year
FALSE: Not leap year
Depends on data type.
--- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In OK
Out OK
Function
Precautions for Correct Use
(@)ChkLeapYear
EN ENO
In Out
abc:=ChkLeapYear(UINT#2012);
UINT#2012
LD ST
abc
ChkLeapYear
EN ENO
In Out
Ye a r
Out=abc
In
Check for Leap Year
UINT#2012
TRUE

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ501-1500 and is the answer not in the manual?

Omron NJ501-1500 Specifications

General IconGeneral
BrandOmron
ModelNJ501-1500
CategoryController
LanguageEnglish

Related product manuals