Counter
![]() |
![]() |
| Vector | C | ST | |
| in the palette | on the schematic |
The block implements vector processing (pulse counting) of real input signals according to the algorithm of one of the following options:
Option 1 ("In-Range" option): If during the simulation the value of some real signal in the vector of the input signals belongs to the specified range from xmin to xmax, then the number 1 is added to the currently available counter reading for this signal. This means that the corresponding element in the vector output of the block increases by 1:

where y(t) is the output vector signal of the block, x(t) is the input vector signal.

where y(t) is the output vector signal of the block, x(t) is the input vector signal.
Option 2 (Option "Out of Range"): If during the simulation the value of some real signal in the vector of the input signals is out of the specified range from xmin to xmax, then the number 1 is added to the currently available counter reading for this signal. This means that the corresponding element in the vector output of the block increases by 1:


Inputs
- input - the port for the input signal.
Outputs
- output - the port for the decimal number of input pulses.
Properties
- Lower deadband limit – xmin.
- Upper deadband limit – xmax.
- Counter if the input... – an indicator of the block operation options. The counter counts if the input signal gets into the "In-Range" or "Out of Range" area.
Parameters
none

