Count up or down through specified range of numbers
Main Content Count up or down through specified range of numbersexpand all in pageLibraries: DSP System Toolbox / Signal Management / Switches and Counters DescriptionThe Counter block counts up or down through a specified range ofnumbers. The block enables the Inc (increment) port when you setthe Count direction parameter to Up.When you set the Count direction parameter toDown, the block enables the Dec(decrement) port. If you set the Count event parameter toFree running, the block disables theInc or Dec port and counts at a constanttime interval. For all other settings of the Count event parameter,the block increments or decrements the counter each time a trigger event occurs at theInc or Dec input port. When a triggerevent occurs at the optional Rst port, the block resets the counterto its initial state.The Counter block accepts single-channel inputs. For more informationabout scalar input operation, vector input operation, and free-running operation, seeAlgorithms.Examplesexpand al...