MOTION-IN is used for high speed counting of digital input signals. It’s a background task. Once a MOTION-IN Block is executed, it’ll continue counting in the background until another MOTION-IN block set to Stop is executed.

To enable MOTION-IN, Press the “Setup Hardware” button. It’s on the upper left of vBuilder.

The last page of the “Setup Hardware” lets you set MOTION-IN (High-Speed Counter) options.
There are 2 MOTION-IN types: Pulsed input and quadrature input. Shown below is the setup pages for MOTION-IN type.

Pulsed input : Typically is associated with frequency, counting or totalization applications

Pulsed input requires 1 Digital Input. After configuring in “Setup Hardware”, placing a MOTION-IN Block brings up the following Dialog.

The Tag you select for “Count Value” will store the MOTION-IN’s count value. Count Value must be of the I32 Data Type. The MOTION-IN block can be set to count up or down. A count is triggered by either a rising (0 to 1) value, or a falling (1 to 0) value. The “Counter Input Bit” that causes the count is the digital input that you selected in “Setup Hardware”.

Quadrature Input (A and B signals) : Provides the interface to incremental encoders for obtaining mechanical position data

Quadrature Inputs are used with incremental rotary encoders.

Check out Wikipedia’s article on them to learn more.  They require 2 digital inputs.  Be sure not to use the same digital input for both quadrature inputs.

Start  counter :

Start counter requires an I32 tag to store the count in.

Stop counter :