What is an encoder? Wiring the encoder to the S7-200 SMART PLC

Publisher:心有所属Latest update time:2024-02-23 Source: elecfansKeywords:Encoder Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The encoder is a digital sensor that integrates optical, mechanical and electrical technologies. It mainly uses the principle of grating diffraction to achieve displacement and digital conversion, and converts the mechanical geometric displacement on the output shaft into pulses or digital quantities through photoelectric conversion.


Encoders are widely used in positioning, speed measurement, and length determination due to their simple structure, high precision, and long life.

Encoders can be divided into incremental encoders and absolute encoders according to their working principles.

1. Incremental encoder

Incremental encoders provide a method for sensing the discretization, incrementation and displacement change (speed) of continuous displacement. The characteristic of incremental encoders is that each incremental displacement corresponds to an output pulse signal. Incremental encoders measure the relative position increment relative to a certain reference point, and cannot directly detect the absolute position information.

The incremental encoder is mainly composed of a light source, a code disk, a detection grating, a photoelectric detection device and a conversion circuit. The code disk is engraved with radial light-transmitting slits with equal pitches, and the interval between two adjacent light-transmitting slits represents an incremental cycle. The detection grating is engraved with two groups of light-transmitting slits A and B corresponding to the code disk, which are used to pass or block the light between the light source and the photoelectric detection device. Their pitch is equal to the pitch on the code disk, and the two groups of light-transmitting slits are staggered by 1/4 pitch, so that the signal output by the photoelectric detection device differs by 90° in phase. When the code disk rotates with the measured shaft, the detection grating does not move, and the light passes through the slits on the code disk and the detection grating to irradiate the photoelectric detection device. The photoelectric detection device outputs two groups of electrical signals that are approximately sinusoidal waves with a phase difference of 90°. After the sine wave is processed by the conversion circuit, a rectangular wave will be obtained, and then the rotation angle or speed information of the measured shaft can be obtained.

a96b17ea-7326-11ee-939d-92fbcf53809c.png

Incremental encoder components and principles

Generally speaking, the incremental photoelectric encoder outputs a pulse signal with a phase difference of 90° between the A and B phases (the so-called two-phase orthogonal output signal). The rotation direction of the encoder can be easily determined based on the position relationship between the A and B phases. In addition, the code disk generally provides a Z-phase mark pulse signal used as a reference zero position. Each time the code disk rotates one circle, a zero position mark signal will be issued.

a97d20ac-7326-11ee-939d-92fbcf53809c.png

Incremental encoder output signal

2. Absolute encoder

The principle and components of the absolute encoder are basically the same as those of the incremental encoder. The difference from the incremental encoder is that the absolute encoder uses different digital codes to represent each different incremental position. It is a sensor that directly outputs digital quantities.

There are several concentric code tracks along the radial direction on the circular code disk of the absolute encoder. Each code track is composed of light-transmitting and light-impermeable sectors alternately. The number of sectors of adjacent code tracks is doubled. The number of code tracks on the code disk is the number of bits of its binary digits. On one side of the code disk is the light source, and on the other side there is a photosensitive element corresponding to each code track. When the code disk is in different positions, each photosensitive element converts the corresponding level signal according to whether it is illuminated or not, forming a binary number. Obviously, the more code tracks, the higher the resolution. For an encoder with n-bit binary resolution, its code disk must have n code tracks.

a9aaf91e-7326-11ee-939d-92fbcf53809c.png

Absolute encoder schematic diagram

According to the different encoding methods, the code disk of the absolute encoder is divided into two forms, namely binary code disk and Gray code disk.

a9c6d5da-7326-11ee-939d-92fbcf53809c.png

Absolute encoder disc

The characteristic of absolute encoder is that it does not need a counter, and a fixed digital code corresponding to the position can be read at any position of the rotating shaft, that is, the absolute value of the angle coordinate can be read directly. In addition, compared with incremental encoder, absolute encoder does not have cumulative error, and the position information will not be lost when the power is cut off.

a9d1d606-7326-11ee-939d-92fbcf53809c.png

3. Encoder output signal type

The encoder's signal output has multiple signal output forms such as open collector output, voltage output, line drive output and push-pull output.

(1) Open collector output type

The collector open output type uses the emitter of the transistor in the output circuit as the common terminal, and the collector is left floating. Depending on the type of transistor used, it can be divided into two types: NPN collector open output type and PNP collector open output type.

a9e455ba-7326-11ee-939d-92fbcf53809c.png

NPN open collector output type

aa0071e6-7326-11ee-939d-92fbcf53809c.png

PNP open collector output

(2) Voltage output type

The voltage output type is based on the collector open circuit output circuit, and a pull-up resistor is connected between the power supply and the collector, so that there is a stable voltage state between the collector and the power supply. This type of output circuit is generally used when the encoder power supply voltage is consistent with the voltage of the signal receiving device.

aa104300-7326-11ee-939d-92fbcf53809c.png

Voltage output type

(3) Push-pull

The push-pull output mode consists of two transistors, one of PNP type and the other of NPN type. When one of the transistors is turned on, the other is turned off, and the two output transistors operate alternately.

aa288118-7326-11ee-939d-92fbcf53809c.png

Push-pull output

This output form has high input impedance and low output impedance, so it can also provide a wide range of power under low impedance conditions. Since the input and output signals are in the same phase and have a wide frequency range, it is also suitable for long-distance transmission.

The push-pull output circuit can be directly connected to the circuit with NPN and PNP open collector input, that is, it can be connected to the module with source or sink input.

(4) Line drive output type

The line driver output interface uses a dedicated IC chip. The output signal complies with the RS-422 standard and is output in a differential form. Therefore, the line driver output signal has a stronger anti-interference ability and can be used in high-speed, long-distance data transmission occasions. It also has the characteristics of fast response speed and strong anti-noise performance.

aa35ccba-7326-11ee-939d-92fbcf53809c.png

Line drive output

It should be noted that in addition to the above-listed encoder output interface types, many manufacturers now produce encoders with intelligent communication interfaces, such as PROFIBUS bus interface. This type of encoder can be directly connected to the corresponding bus network and read out the actual count value or measurement value through communication, which will not be explained here.

4. Wiring between encoder and S7-200 SMART PLC

(1) Wiring between PNP output encoder and S7-200 SMART PLC

When connecting a PNP output encoder to an S7-200 SMART PLC, follow the connection method of a sink input.

aa40e56e-7326-11ee-939d-92fbcf53809c.png

Wiring of PNP output encoder and S7-200 SMART PLC

(2) Wiring between NPN output encoder and S7-200 SMART PLC

When connecting an NPN output encoder to an S7-200 SMART PLC, follow the source input connection method.

aa4b43a6-7326-11ee-939d-92fbcf53809c.png

Wiring of NPN output encoder and S7-200 SMART PLC

5. Selection of incremental encoder

When selecting an incremental encoder, the following parameters can be considered comprehensively.

(1) Power supply voltage

The power supply voltage refers to the voltage of the encoder's external power supply, which is generally DC 5~24V.

(2) Resolution

Resolution refers to the number of pulses output by the encoder when it rotates one circle. In engineering, it is generally called the number of output lines. When producing encoders, encoder manufacturers usually divide the same model of products into different resolutions. The resolution is generally between 10 and 10,000 lines. Of course, there are also products with higher resolutions.

(3) Maximum response frequency

The maximum response frequency refers to the maximum frequency of the encoder output pulse. Common maximum response frequencies are 50kHz and 100kHz.

(4) Maximum response speed

The maximum response speed refers to the maximum speed at which the encoder runs, which depends on the resolution and maximum response frequency of the encoder. The calculation formula for the maximum response speed is as follows:

aa5b9d00-7326-11ee-939d-92fbcf53809c.jpg

(5) Output signal type

The output signal has various signal output forms such as open collector output, voltage output, line drive output and push-pull, see "3. Encoder output signal type" for details.

(6) Output signal mode

There are three types of encoder output signals: single pulse output, A/B/Z three-phase pulse output, and differential linear drive pulse output. Among them, A/B phase pulse output is the most commonly used.

1) Single pulse output type. Single pulse output refers to the output of a pulse waveform with a duty cycle of 50%. Single pulse output has a low resolution and is often used in occasions such as speed measurement and pulse counting.

aa626392-7326-11ee-939d-92fbcf53809c.png

Single pulse output type

2) A/B/Z three-phase pulse output type. A/B/Z three-phase pulse output is the most commonly used output signal mode for incremental encoders. The lead and lag relationship of the A/B phase pulse phase can be used to determine whether the incremental encoder is forward or reverse. If viewed from the shaft side of the incremental encoder, the encoder rotates clockwise, that is, forward, and the waveform is that the A phase pulse leads the B phase pulse by 90° in phase, as shown in Figure a below; if viewed from the shaft side of the incremental encoder, the encoder rotates counterclockwise, that is, reverse, and the waveform is that the A phase pulse lags the B phase pulse by 90° in phase, as shown in Figure b below; the Z phase pulse is the zero mark pulse, and the encoder sends one pulse for every revolution.

[1] [2]
Keywords:Encoder Reference address:What is an encoder? Wiring the encoder to the S7-200 SMART PLC

Previous article:A brief discussion on star connection and triangle connection in three-phase motor circuits
Next article:Comparison between DDC and PLC in air-conditioning automatic control system

Recommended ReadingLatest update time:2024-11-16 10:28

How to use PLC controller How to repair PLC controller
How to use PLC controller The use of a PLC (Programmable Logic Controller) controller usually requires the following steps: Understand the structure and working principle of the controller: Understand the hardware structure and software programming method of the controller, as well as the function of its i
[Embedded]
Basic Principles of Industrial Automation PLC
PLC (Programmable Logic Controller) is an electronic device widely used in the field of industrial automation. It can be used to perform various control tasks, such as motion control, data acquisition and monitoring. PLC has high reliability, flexibility and scalability, making it one of the key technologies of mode
[Embedded]
Huawei established the PLC-IoT Ecological Alliance and launched contactless payment in cooperation with UnionPay
Today, Huawei and China UnionPay Co., Ltd. held the 2019 PLC-IoT Industry Development Forum and Huawei PLC-IoT Ecological Alliance Establishment Conference in Dongguan. At the conference, the "Huawei PLC-IoT Ecological Alliance" initiated by Huawei was officially established. A total of 43 industry partners from multi
[Mobile phone portable]
Huawei established the PLC-IoT Ecological Alliance and launched contactless payment in cooperation with UnionPay
Smart210 USB ROOT HUB automatic reset
Phenomenon: When using a USB camera to display images on an LCD, the USB ROOT HUB reset occasionally occurs, causing the camera to stop working. The USB camera then automatically disconnects, then is recognized again, and then disconnects and is recognized again. If you don't use the USB camera, the USB reset will no
[Microcontroller]
Design and implementation of DP master-slave communication between S7-300 integrated DP port and S7-200
S7-300 and S7-200 communicate via PROFIBUS DP via EM277. The S7-300 station needs to be configured in STEP7. There is no need to configure and program the communication in the S7-200 system. You only need to organize and store the data to be communicated in the V storage area, and set the correct address when config
[Embedded]
Design and implementation of DP master-slave communication between S7-300 integrated DP port and S7-200
Four-axis motion control based on PLC
1 Control Task The control system design requirements of the test diagnosis platform are as follows: (1) According to the instructions of the on-site installation personnel, the operator issues the servo electric cylinder action command, and the four servo electric cylinders act independently within the to
[Embedded]
Four-axis motion control based on PLC
Solutions for Mitsubishi FX series PLC communication mode to control inverter
In industrial automation control systems, the most common application is the combination of PLC and inverter, and a variety of PLC control inverter methods have been produced. Among them, the control scheme using RS-485 communication has been widely used: because it has strong anti-interference ability, high transmi
[Embedded]
Solutions for Mitsubishi FX series PLC communication mode to control inverter
Siemens S7-300 PLC wiring diagram
Wiring diagram of digital input module: Digital input module SM 321; DI 32x 24 VDC; Digital input module SM 321; D132 X 20VAC; CPU 313C, CPU 313C-2 DP/PtP, CPU 314C-2 DP/PtP: DI/DO 1) Only applicable to CPU 314C-2 CPU 314C-2 built-in I/O terminal wiring diagram
[Embedded]
Siemens S7-300 PLC wiring diagram
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号