![IDEC OpenNet series User Manual Download Page 215](http://html.mh-extra.com/html/idec/opennet-series/opennet-series_user-manual_617384215.webp)
15: W
EEK
P
ROGRAMMER
I
NSTRUCTIONS
15-4
O
PEN
N
ET
C
ONTROLLER
U
SER
’
S
M
ANUAL
Interval Comparison in WKCMP ON/OFF Instructions
The WKCMP ON/OFF instructions compare the current day and time with the preset values designated by operands S1
and S2. When the current day and time reach the presets, the WKCMP turns on or off the output or internal relay desig-
nated by destination operand D1. When the WKCMP ON/OFF instructions are programmed as described below, interval
comparison among the current day/time and presets is performed to reflect the comparison result on the comparison out-
put. With the WKCMP ON/OFF instructions programmed for interval comparison, the comparison output status is ensured
when the CPU restarts operation after interruption; the output is turned on or off as appropriate.
Conditions for Interval Comparison with ON/OFF Times on the Same Day
When the three conditions shown below are satisfied, the interval comparison is enabled. Otherwise, the instructions work
as ordinary clock data comparison instructions.
1. WKCMP ON is followed by WKCMP OFF immediately, which has the same input contact.
2. The matching WKCMP ON and WKCMP OFF instructions have the same values for the day of week comparison data
(S1: constant), week table output control (S3), and comparison output operand (D1).
3. Hour/minute comparison data (S2: constant) has a relationship: ON time < OFF time.
Example: Interval comparison with ON/OFF times on the same day
When the current day and time reach the presets, the output designated by operand D1 is turned on and off.
Caution
• The program shown below does not make an interval comparison because the WKCMP ON and
WKCMP OFF instruction have separate input contacts.
D1
Q0
S1
62
M8125
WKCMP
ON
S2
830
S3
0
D1
Q0
S1
62
WKCMP
OFF
S2
1715
S3
0
M8125
We strongly recommend the use of
the interval comparison to ensure
outputs as programmed when the
CPU is restarted.
D1
Q0
S1
62
M8125
WKCMP
ON
S2
830
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.
WKCMP ON turns on output Q0 at 8:30 on Monday through
Friday.
WKCMP OFF turns off output Q0 at 17:15 on the same day.
Sun
Mon
Tue
Wed
Thu
Fri
Sat
8:30
17:15
ON
ON
8:30
17:15
8:30
17:15
ON
8:30
17:15
ON
8:30
17:15
ON
8:30
17:15
ON
8:30
17:15
ON
Output Q0
S1: Same constant value
S2: Constant values; ON time < OFF time
S3: Same constant value
D1: Same operand
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]