How to use encoder to measure speed and angle During work, we will encounter some mechanical equipment's rotating shafts that need to measure its operating speed and angle, such as punches and shears in the hardware industry, or require two rotating shafts to run at a certain speed ratio, such as metal processing lathe threading.

To achieve this function, we need to install an encoder on the axis to be measured, which is generally incremental. To measure the forward and reverse rotation of the axis, use the AB phase output, as long as the A single-phase output is used to measure one direction. If you need to measure the angular position, it is better to use an encoder with ABZ phase output.

After the encoder is installed, a measurement controller must be connected to the output of the encoder. Generally, the following types of controllers are used: 1. Single-chip microcomputer or DSP. With this type of controller, open collector output can be selected according to the interface circuit Or an encoder with differential output. 2. PLC controller, if it is connected to the basic unit of PLC, generally select open collector output, if it is an expansion unit, there are collectors and differential inputs. 3. For digital control processing cards and servo drives, differential output encoders are used in most cases with this controller.

After the measuring controller is connected, the next step is to write the software program. The figure below is an explanation of measuring the speed with Mitsubishi PLC.

Encoder|Transmitter|Soft starter|Power supply|VFD|Light curtain|Servo products|Human-machine interface|Solenoid valve|Cylinder|Actuator|Flow meter|Transformer|Thyristor|Sensor|Deceleration drive gearbox reducer|Linear guide|Circuit breaker|Refrigeration compressorAll industrial products of okplazas are purchased from the original factory or formal channels of agents to ensure the original authenticity, which perfectly solves the problem of industrial product sample procurement and small-batch procurement for the majority of engineers and purchasing personnel.

The software programming idea is as follows: The first step is to count the number of input pulses to D0 within the specified time, and the second step is four arithmetic operations to calculate the speed N=60*D0*1000/(n*t), where n means the encoder rotates one Number of output pulses, t represents the specified measurement time (ms)

Using this method, the measurement accuracy and encoder resolution are inversely proportional to the measurement time width. When the rotating body rotates at a high speed (above 200r/min), the error can reach below 5R/MIN.

If you want to measure the angular position, you only need to accumulate the number of Z-phase pulses + the number of A or B-phase count pulses, and you can calculate the number of turns and angles the current position is.

With this method, it should be noted that the pulse speed acceptable to the controller at the highest speed exceeds the limit value, and the measurement is not accurate.