2-593
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Time and Time of Day Instructions
2
GetDayOfWeek
GetDayOfWeek
The GetDayOfWeek instruction gets the day of the week for the specified year, month, and day of
month.
* If you omit the input parameter, the default value is not applied. A building error will occur.
The GetDayOfWeek instruction gets the day of the week for the year, month, and day of month speci-
fied in In.
The data type of Out is enumerated type _eDAYOFWEEK. The meanings of the enumerators are as fol-
lows:
Instruction Name FB/FUN Graphic expression ST expression
GetDayOfWeek Get Day of Week FUN Out:=GetDayOfWeek(In);
Variables
Name Meaning I/O Description Valid range Unit Default
In Year,
month, day
Input Year, month, day Depends on data type. Year, month,
day
*
Out Day of the
week
Output Day of the week _MON, _TUE, _WED,
_THU, _FRI, _SAT,
_SUN
Day of the
week
---
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 OK
Out Refer to Function for the enumerators for the enumerated type _eDAYOFWEEK.
Function
Enumerator Meaning
_MON Monday
_TUE Tuesday
_WED Wednesday
_THU Thursday
_FRI Friday
_SAT Saturday
_SUN Sunday
(@)GetDayOfWeek
EN ENO
In Out