beautypg.com

Sample program, 2 instructions – Omron SYSMAC CP CP1E-N@@D@-@ User Manual

Page 104

background image

2 Instructions

2-68

CP1E CPU Unit Instructions Reference Manual(W483)

*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 TIM/TIMX(550) is executed.

When TIM/TIMX(550) is in a program section between IL(002) and ILC(003) and the program section

is interlocked, the PV will be reset to the SV and the Completion Flag will be turned OFF.

When an operating TIM/TIMX(550) timer is in a jumped program section (JMP(004), CJP(510),

JME(005)), the timer’s PV will not be refreshed.

When a TIM/TIMX(550) timer is forced set, its Completion Flag will be turned ON and its PV will be

set to 0000. When a TIM/TIMX(550) 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 TIM/TIMX(550) 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. 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

100

T0000

T0000

or

0.00

TIM

0000

#0100

TIMX

0000

&0100

0.00

ON

OFF

ON

OFF

ON

OFF

Timer input

Timer PV

Timer
Completion
Flag

This manual is related to the following products: