en-us_products:mpino_studio2:box_functions:counter:ctd
Table of Contents
CTD Box Function
Count Down Counter
Category: Counter Box Functions
Behavior
Preloads the current value with the set value, then decrements it once on each rising edge of the left condition. The done state turns ON at zero, where counting stops.
Syntax and Arguments
Syntax: CTD C12 3
- Target — counter memory C<n> (16-bit) or DC<n> (32-bit)
- preset — starting count loaded on reset (an integer, not time)
Behavior Example
| Run condition | Before | Command entered | Expected result |
|---|---|---|---|
| Left condition ON | C12=3 | CTD C12 3 | 3 rising edges → C12=0, C12 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
- CTU View details — Count Up Counter
- CTUD View details — Count Up/Down Counter
en-us_products/mpino_studio2/box_functions/counter/ctd.txt · Last modified: by 127.0.0.1
