====== MPINO STUDIO 2 Phase 4-2 · Counter Box Functions ====== These commands count signal transitions and provide a current value and completion state. {{ :en-us_products:mpino_studio2:counter-behavior.svg?1000 |These commands count signal transitions and provide a current value and completion state. }} ===== Common Rules ===== Use ''C'' for a 16-bit counter and ''DC'' for a 32-bit counter. The count changes once on each OFF-to-ON transition. A bit contact for the counter address reads its done state, and a ladder RESET coil initializes the current value. C0 through C10 are mapped to board functions on MPINO-8A4R(T)-S, so the examples on this page use C11 and C12. {{ :en-us_products:mpino_studio2:counter-current-done.svg?1000 |Counter current value and done state }} ===== Box Function List ===== ^ Command ^ Meaning ^ | [[en-us_products:mpino_studio2:box_functions:counter:ctu|CTU]] | Increments the current value once whenever the left condition changes from OFF to ON. | | [[en-us_products:mpino_studio2:box_functions:counter:ctd|CTD]] | Preloads the current value with the set value, then decrements it once on each rising edge of the left condition. | | [[en-us_products:mpino_studio2:box_functions:counter:ctud|CTUD]] | While the left condition is ON, a rising edge on the up input adds one and a rising edge on the down input subtracts one. | ===== Related Documentation ===== * [[en-us_products:mpino_studio2:box_functions|Phase 4 · Box Functions]] * [[en-us_products:mpino_studio2|MPINO STUDIO 2 User Manual]]