Counter
R2026bDiscrete- or continuous-time counter
Libraries:
Simscape /
Electrical /
Control /
General Control
Description
The Counter block implements an incremental counter in either discrete or continuous time. The counter increments in response to one of these criteria:
Up — The input goes up.

Down — The input goes down.

Up-Down — The input goes up or down.

Ports
Output
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"ee_sl_lib/General Control/Counter"
Example: add_block("ee_sl_lib/General Control/Counter","myModel/myBlock",MakeNameUnique="on")
Extended Capabilities
Version History
Introduced in R2018b
