Description of the function
The function DAY_OF_WEEK provides the result of the day of the week, in the form of a whole number:
-
1 for Monday,
-
2 for Tuesday,
-
3 for Wednesday,
-
4 for Thursday,
-
5 for Friday,
-
6 for Saturday,
-
7 for Sunday.
The additional parameters and can be configured.
Representation:
Representation:
Representation:
DAY_OF_WEEK
ST Out_Day_Of_Week
Representation:
Out_Day_Of_Week := DAY_OF_WEEK();
Description of parameters
The following table describes the output parameters:
Parameter
|
Type
|
Comment
|
Out_Day_Of_Week
|
|
Whole number from 1 to 7 indicating the day of the week:
-
1 for Monday,
-
2 for Tuesday,
-
3 for Wednesday,
-
4 for Thursday,
-
5 for Friday,
-
6 for Saturday,
-
7 for Sunday.
|
If the function cannot update the result following a real-time clock access error, the result sent back is 0 and the system bit
%S18 is set to 1.