Daystomonth - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

2 Instruction Descriptions

DaysToMonth

The DaysToMonth instruction calculates the month based on the number of days from January 1.
Instruction
DaysToMonth
Convert Days to
Month
Variables
Name
Meaning
Year
Year
Days
Days
Out
Month
Bit strings
Year
Days
Out
Function
The DaysToMonth instruction calculates the month based on the number of days in Days from January
1 in year Year.
The following example is for when Year is UINT#2012 and Days is UINT#32.
LD
UINT#2012
UINT#32
Year
UINT#2012
Days
UINT#32
2-640
Name
FB/FUN
FUN
I/O
Description
Year
Input
Number of days from Janu-
ary 1
Output
Month
OK
OK
OK
DaysToMonth
EN
ENO
abc
Year
Days
Year
Month
Out=abc
Days
Graphic expression
(@)DaysToMonth
EN
ENO
Year
Days
Valid range
1970 to 2554
1 to 365
1 to 366 for a leap year
1 to 12
Integers
ST
abc:=DaysToMonth(UINT#2012, UINT#32);
USINT#2
Month
[
NY-series Instructions Reference Manual (W560)
ST expression
Out:=DaysToMonth(Year,
Days);
Out
Unit
Default
Year
1970
Days
1
Month
---
Times, durations, dates,
and text strings

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents