en-us_products:mpino_studio2:box_functions:counter:ctu
Table of Contents
CTU Box Function
Count Up Counter
Category: Counter Box Functions
Behavior
Increments the current value once whenever the left condition changes from OFF to ON. The done state turns ON at or above the set value, and counting stops at the maximum value.
Syntax and Arguments
Syntax: CTU C11 3
- Target — counter memory C<n> (16-bit) or DC<n> (32-bit) that stores the count value
- preset — count at which the done bit turns ON (an integer, not time)
Behavior Example
| Run condition | Before | Command entered | Expected result |
|---|---|---|---|
| Left condition ON | C11=0 | CTU C11 3 | 3 rising edges → C11=3, C11 done contact=ON |
Cautions
- A counter changes once per rising edge of the left condition. On MPINO-8A4R(T)-S, C0 through C10 are mapped to board functions, so use C11 or later for a counter.
Box Functions in the Same Category
- CTD View details — Count Down Counter
- CTUD View details — Count Up/Down Counter
en-us_products/mpino_studio2/box_functions/counter/ctu.txt · Last modified: by 127.0.0.1
