Measuring Linear Displacement
Linear displacement is movement and direction along a single axis. A position or linear displacement sensor is a device whose output signal represents the distance an object has traveled from a reference point. The linear variable differential transformer (LVDT) is a sensor that measures linear displacement.
On M Series devices, C Series devices, and NI-TIO-based devices, you can use the counters to perform displacement measurements with two-pulse encoders. Linear position can be measured with two-pulse encoders. You can choose to do either a single point or a buffered sample clock displacement measurement.
You also can measure velocity with two-pulse encoders, but you need to use a sample clock with a fixed frequency. To measure velocity, use the following formula:
V = D/T
where V is the average velocity, D is the distance, and T is time.
The counter measures the position of the encoder using the A and B signals, which are offset by 90°. The counter also supports the Z index, which provides a precise reference point and is available on some encoders.
Creating a Program