Timer And Counter Instructions - Omron SYSMAC CVM1 Series Operation Manual

Duplex system
Hide thumbs Also See for SYSMAC CVM1 Series:
Table of Contents

Advertisement

Timer and Counter Instructions

5-13 Timer and Counter Instructions

Timers
Counters
Set Values
T/C Numbers as Operands
The timer instructions in this section are used to create timers. Most timers re-
quire a timer number and a set value (SV). Timer numbers run from T0000
through T1023, and are used to access timer PVs and Completion Flags in
memory areas set aside specifically for this purpose.
TIML(121) and MTIM(122) do not require timer numbers. The PVs and Comple-
tion Flags for these timers are contained in addresses specified by the user
when inputting the instructions.
Any one timer number cannot be defined twice, i.e., once it has been used in any
of the timer instructions it cannot be used again unless the two timers are never
active simultaneously. If two timers share a single timer number, but are not used
simultaneously, a duplication error will be generated when the program is
checked, but the timers will operate normally. Once defined, a timer number can
be used as many times as required as an operand in other instructions to access
the present value and Completion Flag of the timer.
The counter instructions in this section are used to create counter. Most count-
ers require a counter number and a SV, and are connected to multiple instruction
lines which serve as input signals, resets, etc.
Any one counter number cannot be defined twice, i.e., once it has been used in
any of the counter instructions it cannot be used again unless the two counters
are never active simultaneously. If two counters share a single counter number,
but are not used simultaneously, a duplication error will be generated when the
program is checked, but the counters will operate normally. Once defined, a
counter number can be used as many times as required as an operand in other
instructions to access the present value and Completion Flag of the counter.
A timer or counter SV can be input as a constant or as a word address in a data
area. If an I/O Area word assigned to an Input Unit is designated as the word
address, the Input Unit can be wired so that the SV can be set externally through
thumbwheel switches or similar devices. Timers wired in this way can only be set
externally during RUN or MONITOR mode. All SVs, including those set external-
ly, must be in BCD.
Although set values may be set to 0 for timers and counters, it will disable them,
i.e., turn ON the Completion Flag immediately.
No prefix is required when using a timer or counter number as a definer in a timer
or counter instruction. Once a timer or counter number has been used to create
a timer/counter, it can be prefixed with T or C for use as an operand in various
instructions.
Timer and counter numbers can be designated as operands that require either
bit or word data. When designated as an operand that requires bit data, the timer
or counter number accesses a bit that functions as a Completion Flag that indi-
cates when the timer or counter has completed counting, i.e., the Completion
Flag, which is normally OFF, will turn ON when the timer has timed out or counter
counted out.
When designated as an operand that requires word data, the timer or counter
number accesses a memory location that holds the present value (PV) of the
timer or counter. The PV of a timer or counter can thus be used as an operand in
CMP(020), or any other instruction for which the Timer or Counter Area is al-
lowed.
Note that "T0000" is used to designate both the Completion Flag for the timer
and to designate the PV of the timer. The meaning of the term in context should
be clear, i.e., the first is always a bit operand and the second is always a word
operand. The same is true of all other timer or counter numbers.
Section 5-13
127

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cv seriesSysmac cvm1d series

Table of Contents