User`s guide
Counter
5-107
To run the model, first select Simulation Parameters from the Simulation 
menu, and set the 
Stop time to 30. Then adjust the block parameters as 
described below. (Use the default settings for the Pulse Generator and To 
Workspace blocks.)
•Set the N-Sample Enable block parameters as follows:
-
Trigger count = 6
- Active level = High (1)
•Set the Counter block parameters as follows: 
-
Count direction = Down
- Count event = Rising edge
- Counter size = User defined
- Maximum count = 20
- Initial count = 5
- Output = Count and Hit
- Hit value = 4
- Reset input
•Set the Number of inputs parameter of the Mux block to 4.
The figure below shows the first 22 samples of the model’s four-column output, 
yout. The first column is the Counter block’s Clk input, the second column is 
the block’s 
Rst input, the third column is the block’s Cnt output, and the fourth 
column is the block’s 
Hit output. 










