2-83

2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Timer and Counter Instructions
2
CNTR/CNTRX
CNTR/CNTRX
Applicable Program Areas
Operands

N: Counter Number

The counter number must be between 0000 and 0255(decimal).

S: Set Value

CNTR (BCD):#0000 to #9999

CNTRX (Binary): &0 to &65535 (decimal) or #0000 to #FFFF (hex)

Operand Specifications
Flags
Instruction Mnemonic Variations Function
code Function
REVERSIBLE COUNTER CNTR --- 012 ---
CNTRX --- 548
Symbol
CNTR CNTRX
BCD Binary
Area Step program areas Subroutines Interrupt tasks
Usage OK OK OK
Operand Description Data type Size
CNTR CNTRX
N Counter Number COUNTER COUNTER 1
S Set Value WORD UINT 1
Area Word addresses Indirect DM addresses Constants CF Pulse bits TR bits
CIO WR HR AR T C DM @DM *DM
N --- --- --- --- --- OK --- --- --- --- --- --- ---
S OKOKOKOKOK OK OK OK OK
Name Label Operation
Error Flag P_ER ON if in BCD mode and S does not contain BCD data.
OFF in all other cases.
Increment input
Reset input
Decrement input N: Counter number
S: Set value
CNTR(012)
N
S
Increment input
Reset input
Decrement input N: Counter number
S: Set value
CNTRX(548)
N
S