Omron C200HX Operation Manual page 185

Hide thumbs Also See for C200HX:
Table of Contents

Advertisement

Timer and Counter Instructions
Precautions
Flags
Example 1:
Basic Application
00000
00001
00002
CNT 004
Changes in execution conditions, the Completion Flag, and the PV are illus-
trated below. PV line height is meant only to indicate changes in the PV.
Execution condition
ON
on count pulse (CP)
OFF
Execution condition
ON
on reset (R)
OFF
ON
Completion Flag
OFF
PV
Program execution will continue even if a non-BCD SV is used, but the SV will
not be correct.
Jumps
Never program CNT between JMP(04) 00 and JME(05) 00 with an SV of #0000.
The Completion Flag will turn ON even when the execution condition for
JMP(04) 00 is ON (i.e., even when the program section with CNT is jumped).
CNT can be programmed successfully between JMP(04) and JME(05) as long
as a jump number between 01 and 99 is used.
Step Instructions
Never program CNT between STEP(08) and SNXT(09) with an SV of #0000.
The Completion Flag will turn ON even when the step containing CNT is reset.
ER:
SV is not in BCD.
Indirectly addressed DM word is non-existent. (Content of DM word is
not BCD, or the DM area boundary has been exceeded.)
In the following example, the PV will be decremented whenever both 00000 and
00001 are ON provided that 00002 is OFF and either 00000 or 00001 was OFF
the last time CNT 004 was executed. When 150 pulses have been counted down
(i.e., when PV reaches zero), 00205 will be turned ON.
CP
CNT 004
R
Here, 00000 can be used to control when CNT is operative and 00001 can be
used as the bit whose OFF to ON changes are being counted.
SV
SV – 1
SV – 2
Address Instruction
00000
LD
#0150
00001
AND
00002
LD
00003
CNT
00205
00004
LD
00005
OUT
Section 5-14
SV
0002
0001
0000
Operands
00000
00001
00002
0004
#
0150
CNT
004
00205
167

Advertisement

Table of Contents
loading

This manual is also suitable for:

C200hgC200he

Table of Contents