This block allows you to count up or down with pulses received on the input.
The counter output is AQ, which with each pulse on the input C, will either increment or decrement depending on the value of the Dir input. You can define the start value of AQ with the parameter SV.
In addition this program block allows you to turn the Q output on and off using the parameters Von and Voff. As soon as AQ is equal or greater to Von then Q will be on, and as soon as the value of AQ is less than or equal to Voff then Q will go off.
A pulse on the input R will reset to the start value, SV parameter, again.
|C||Counter input||Connect an inpulse here to count the pulses on the input.|
|Dir||Counter direction||When Dir = 0, AQ incremements, when Dir = 1, AQ decrements.|
|R||Reset||Resets AQ to the start value, defined by parameter SV.|
|SV||Start value||Value from which the counter AQ starts.|
|Von||On value||Value at which the Q output will turn on if more than or equal to Von.|
|Voff||Off value||Value at which the Q output will be off if less than or equal to Voff.|
|Q||Digital output||On when AQ is more than or equal to Von, off when AQ is less than or equal to Voff.|
|AQ||Counter reading||Here the current count is output.|