Sample program, 2 instructions – Omron SYSMAC CP CP1E-N@@D@-@ User Manual
Page 107
2-71
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Tim
er and
Cou
nter
I
n
stru
ctio
ns
2
TIMH/
T
IMHX
*1
If the IOM Hold Bit (A500.12) has been turned ON, the status of timer Completion Flags and PVs will be maintained when
the operating mode is changed.
*2
The PV will be set to the SV when TIMH(015)/TIMHX(551) is executed.
• When an operating TIMH(015)/TIMHX(551) timer is in a jumped program section (JMP(004),
CJP(510), JME(005)), the timer’s PV will not be refreshed in the above case.
• When TIMH(015)/TIMHX(551) is in a program section between IL(002) and ILC(003) and the pro-
gram section is interlocked, the PV will be reset to the SV and the Completion Flag will be turned
OFF.
• When a TIMH(015)/TIMHX(551) timer is forced set, its Completion Flag will be turned ON and its PV
will be set to 0000. When a TIMH(015)/TIMHX(551) timer is forced reset, its Completion Flag will be
turned OFF and its PV will be reset to the SV.
• The timer’s Completion Flag is refreshed only when TIMH(015)/TIMHX(551) is executed, so a delay
of up to one cycle may be required for the Completion Flag to be turned ON after the timer times out.
• If online editing is used to overwrite a timer instruction, always reset the Completion Flag. The timer
will not operate properly unless the Completion Flag is reset.
Sample program
When timer input CIO 0.00 goes from OFF to ON in the following example, the timer PV will begin
counting down from the SV (#0064 = 100 = 1.00 s). The Timer Completion Flag, T0000, will be turned
ON when the PV reaches 0.
When CIO 0.00 goes OFF, the timer PV will be reset to the SV and the Completion Flag will be turned
OFF.
i
Condition
PV
Completion Flag
Operating mode changed from RUN or MONITOR mode
to PROGRAM mode or vice versa.
*1
0
OFF
Power off and reset
0
OFF
Execution of CNR(545)/CNRX(547), the RESET
TIMER/COUNTER instructions
*2
BCD: 9999
Binary: FFFF
OFF
Operation in interlocked program
section (IL(002)-ILC(003))
Reset to SV.
OFF
Operation in jumped program section
(JMP(004)-JME(005))
Retains previous
status.
Retains previous
status.
0.00
0.00
0.00
T0000
T0000
100
(1.00 s)
or
ON
OFF
ON
0
&100
TIMHX
0
100
OFF
0
#0100
TIMH
Timer input
Timer PV
Timer Completion
Flag