L9_UCTR: Up Counter
(Original Document)
Naming
Name in LL984 Editor
Function Block Name
name of legacy 984 instruction
name in other tools and editors like:
  • Type Library Browser
  • Data Editor
  • Animation Tables
  • Search Results
Function Description
The L9_UCTR function block counts control input transitions - from OFF to ON - up from 0 to a counter PRESET value.
The upward counting operation begins when the input to the ENABLE pin is turned ON. The ACCUM value increments while the RUN input remains ON. When the RUN input turns OFF, the ACCUM value is reset to 0.
L9_UCTR can activate 1 of 2 outputs. The AT_PRE output turns ON if the ACCUM value has incremented to the counter PRESET value. The LESS_PRE output turns ON when the block is solved and the value of ACCUM is less than the PRESET value.
NOTE: The ACCUM value is also incremented in case of a PLC Start or in case of Power ON.
Representation
Parameters
Input Pin
Name
Data Type
Address Range
Meaning
Top
ENABLE
OFF to ON initiates the count.
Bottom
RUN
BOOL
OFF resets the counter to the PRESET value; ON lets the counter execute when ENABLE turns ON.
Node
Node Type
Name
Data Type
Address Range
Meaning
Top
IN
PRESET
%IW, %MW
The counter preset value to which the counter counts up. Can be displayed as an integer constant, or can be stored in a variable located in a %IW input word or a %MW memory word or an unlocated UINT word. Valid range: 1 to 65,535.
Bottom
IN/OUT
ACCUM
UINT
%MW
The accumulated count. Increments up from 0 by a value of 1 each time the top input transitions from OFF to ON, until this value reaches the counter preset value. A variable tied to this pin must be located in a %MW memory word or an unlocated UINT word.
Output Pin
Name
Data Type
Address Range
Meaning
Top
AT_PRE
BOOL
ON indicates the accumulated count equals the counter preset value.
Bottom
LESS_PRE
BOOL
ON indicates the accumulated count is less than the counter preset value.