Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual page 288

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

Timer and Counter Instructions
Example
248
note.) The jumped TIM/TIMX(550) instruction will not be executed, but the PV
will be refreshed each cycle after all tasks have been executed.
Note With the CS1D CPU Units, the PV will not be refreshed in the above case.
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 operation of the = Flag and N Flag depends on the model of the CPU
Unit. Refer to Flags, above, for details.
The timer's Completion Flag is refreshed only when TIM/TIMX(550) is exe-
cuted, 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 Com-
pletion Flag. The timer will not operate properly unless the Completion Flag is
reset.
A TIM/TIMX(550) instruction's PV and Completion Flag can be refreshed in
the following ways depending on the timer number that is used.
Timers Created with Timer Numbers 0000 to 2047
Execution of TIM/
TIMX(550)
After executing all tasks
80-ms interval refreshing
Timers Created with Timer Numbers 2048 to 4095
Execution of TIM
Timers are reset (PV = SV, Completion Flag OFF) by power interruptions
unless the IOM Hold Bit (A50012) is ON and the bit is protected in the PLC
Setup. It is also possible use a clock pulse bit and a counter instruction to pro-
gram a timer that will retain its PV in the event of a power interruption, as
shown in the following diagram.
Execution
condition
When timer input CIO 000000 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 0000.
When CIO 000000 goes OFF, the timer PV will be reset to the SV and the
Completion Flag will be turned OFF.
The PV is updated every time that TIM/TIMX(550) is exe-
cuted.
The Completion Flag is turned ON if the PV is 0000.
The Completion Flag is turned OFF if the PV is not 0000.
The PV is also updated every cycle at the end of pro-
gram execution.
If the cycle time exceeds 80 ms, the timer's PV is
updated every 80 ms.
The PV is updated every time that TIM is executed.
The Completion Flag is turned ON if the PV is 0000.
The Completion Flag is turned OFF if the PV is not 0000.
1-s clock
pulse bit
Count input
Reset input
Section 3-6

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents