15: WEEK PROGRAMMER INSTRUCTIONS
« FC4A MICROSMART USER’S MANUAL » 15-3
S1 through SN — Special month/day data
Specify the months and days to add or skip days to turn on or off the comparison outputs programmed in WKTIM
instructions.
Example: To set July 4 as a special day, designate 704 as S1.
Make sure that the values set for S1 through SN are within the valid ranges. If any data is over the valid value, a user pro-
gram execution error will result, turning on special internal relay M8004 and the ERR LED on the CPU module.
Examples: WKTIM and WKTBL
• Without Special Days (MODE = 0)
This example is the basic program for week programmer application without using the WKTBL (week table) instruction.
While the CPU is running, the WKTIM compares the S1, S2, and S3 preset data with the current day and time.
When the current day and time reach the presets, an output designated by operand D1 is turned on and off.
• With Additional Days in the Week Table (MODE = 1)
When the current time reaches the hour/minute preset time on the special days programmed in the WKTBL, the designated
output is turned on or turned off. In addition, the designated output is turned on and off every week as designated by oper-
and S1 of WKTIM.
In normal execution, when the current day and time coincide with the preset day (S1) and time (S2 or S3) of the WKTIM,
the designated output is turned on or off. Execution on the special days has precedence over execution on normal days.
This example demonstrates operation on special days in addition to regular weekends. The output is turned on from 10:30
a.m. to 11:10 p.m. on every Saturday and Sunday. Without regard to the day of week, the output is also turned on Decem-
ber 31 through January 3.
• With Skip Days in the Week Table (MODE = 2)
On the special days programmed in the WKTBL, the designated output is not turned on or off, while the designated output
is turned on and off every week as designated by operand S1 of WKTIM.
In normal execution, when the current day and time coincide with the preset day (S1) and time (S2 or S3), the designated
output is turned on or off. Execution on the special days has precedence over execution on normal days.
This example demonstrates operation aborted on special days. The output is turned on from 10:00 a.m. to 8:00 p.m. on
every Monday through Friday, but is not turned on from May 2 through May 5.
Month Day
01 through 12 01 through 31
WKTBL designates Dec. 31 to Jan. 3 as special days.
MODE (1) adds special days.
WKTBL designates May 2 to May 5 as special days.
MODE (2) skips special days.