Chapter 10 CPU Function
(c) Example of modifying clock data through the program
A user can set up the clock data through the program using RTC-SET function blocks as below.
REQ It executes the function block in rising edge.
DATA Time data to input (Refer to the below table.)
If the process is performed normally, 1 is output.
STAT In case of error, it outputs error codes.
Variable Details Example Variable Details Example
DATA[0] Year 16#16 DATA[4] Minute 16#30
DATA[1] Month 16#11 DATA[5] Second 16#11
DATA[2] Day 16#30 DATA[6] Day of Week -
DATA[3] Hour 16#12 DATA[7] Age 16#20
In case of 12:30:11, 30th, November, 2016, you do not need to input the separate day data since the
day of week corresponding to the date is automatically set up.
(d) Example of modifying clock data through the system flags
You can set up the clock data by filling up the clock data in the below area and turning on %FX20480
(_RTC_WR) without using function blocks.
%FB2568~
%FB2575
Time to set (a hundred of years)
(e) How to express day of the week