EasyManua.ls Logo

Omron NJ501-1500

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
Loading...
2-591
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Time and Time of Day Instructions
2
DaysToMonth
DaysToMonth
The DaysToMonth instruction calculates the month based on the number of days from January 1.
The DaysToMonth instruction calculates the month based on the number of days in Days from January
1 in year Ye a r.
The following example is for when Ye a r is UINT#2012 and Days is UINT#32.
[
Instruction Name FB/FUN Graphic expression ST expression
DaysToMonth Convert Days to
Month
FUN Out:=DaysToMonth(Year,
Days);
Variables
Name Meaning I/O Description Valid range Unit Default
Ye a r Ye a r
Input
Year 1970 to 2554 Year 1970
Days Days Number of days from Janu-
ary 1
1 to 365
1 to 366 for a leap year
Days 1
Out Month Output Month 1 to 12 Month
---
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
Ye a r O K
Days OK
Out OK
Function
(@)DaysToMonth
EN ENO
Year Out
Days
abc:=DaysToMonth(UINT#2012, UINT#32);
UINT#2012
UINT#32
LD ST
abc
DaysToMonth
EN ENO
Year
Days
Out=abc
Ye a r
Days
Month
Days
Month
Year
UINT#2012
USINT#2
UINT#32

Table of Contents

Related product manuals