15: WEEK PROGRAMMER INSTRUCTIONS
OPENNET CONTROLLER USER’S MANUAL 15-3
Examples: WKCMP ON/OFF
• Without Special Days (S3 = 0)
This example is the basic program for week programmer application without using the WKTBL (week table) instruction.
While the CPU is running, the WKCMP ON and WKCMP OFF compare the S1 and S2 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 (S3 = 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 (WKCMP ON) or turned off (WKCMP OFF). In addition, the designated output is turned on and off
every week as designated by operand S1 of WKCMP.
In normal execution, when the current day and time coincide with the preset day (S1) and time (S2), 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:18
a.m. to 11:03 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, and May 3 through May 5.
• With Skip Days in the Week Table (S3 = 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 WKCMP.
In normal execution, when the current day and time coincide with the preset day (S1) and time (S2), the designated output
is turned on or off. Execution on the special days has precedence over execution on normal days.
This example is demonstrates operation aborted on special days. The output is turned on from 8:45 a.m. to 10:32 p.m. on
every Monday through Friday, but is not turned on December 31 through January 3, and May 3 through May 5.
D1
Q0
S1
62
M8125
WKCMP
ON
S2
815
S3
0
D1
Q0
S1
62
WKCMP
OFF
S2
1715
S3
0
M8125 is the in-operation output special internal relay.
S1 (62) specifies Monday through Friday.
The WKCMP ON turns on output Q0 at 8:15 on Monday
through Friday.
The WKCMP OFF turns off output Q0 at 17:15 on Monday
through Friday.
D1
Q0
S1
65
WKCMP
ON
S2
1018
S3
1
D1
Q0
S1
65
WKCMP
OFF
S2
2303
S3
1
WKTBL designates Dec. 31 to Jan. 3
and May 3 to May 5 as special days.
S1 (65) specifies Saturday and Sunday.
S3 (1) adds special days.
WKCMP ON turns on output Q0 at
10:18 on every Saturday, Sunday, and
special days.
The WKCMP OFF turns off output Q0
at 23:03 on the same days.
S7
505
S1
1231
M8125
WKTBL
S2
101
S3
102
S4
103
S5
503
S6
504
D1
Q0
S1
62
WKCMP
ON
S2
845
S3
2
D1
Q0
S1
62
WKCMP
OFF
S2
2232
S3
2
WKTBL designates Dec. 31 to Jan. 3
and May 3 to May 5 as special days.
S1 (62) specifies Monday to Friday.
S3 (2) skips special days.
WKCMP ON turns on output Q0 at
8:45 on every Monday through Friday
except on special days.
The WKCMP OFF turns off output Q0
at 22:32 on the same days.
S7
505
S1
1231
M8125
WKTBL S2
101
S3
102
S4
103
S5
503
S6
504
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com