Encoder Overview
An encoder is a device that compiles and converts signals or data into a signal form that can be used for communication, transmission and storage. The encoder converts angular displacement or linear displacement into electrical signals. The former is called a code disk and the latter is called a yardstick. According to the readout method, encoders can be divided into contact and non-contact types; according to the working principle, encoders can be divided into incremental and absolute types. The incremental encoder converts the displacement into a periodic electrical signal, and then converts the electrical signal into a counting pulse, and the number of pulses is used to indicate the size of the displacement. Each position of the absolute encoder corresponds to a certain digital code, so its indication is only related to the starting and ending positions of the measurement, but not to the intermediate process of the measurement.
In practical applications, the EtherCAT encoder can convert the original signal of the device into an EtherCAT communication signal, allowing the control system to take advantage of the EtherCAT protocol in providing nanosecond-level precise synchronization and flexible topology, thereby achieving precise and reliable control at a lower cost.
Hongke HK-MK5-5002 EtherCAT Encoder
Hongke HK-MK5-5002 encoder module is an incremental encoder acquisition module for RS422 differential output. It has a 32-bit quadrature decoding counter, a zero pulse, and a latch signal to read the latch position, and pass the count and latch results to the controller through bus communication, thereby realizing distributed encoder acquisition.
This module uses 4 times the frequency to sample and calculate the edges of all input signals, which can further improve the resolution and acquisition accuracy.
The input channels, output channels, EtherCAT communication interface and power interface of Hongke HK-MK5-5002 all have corresponding LED indicator lights for quick observation and diagnosis of signal and command status.
Testing Process
Step.1
.1
Hardware Hookup
This article mainly tests the Hongke HK-MK5-5002-T000 encoder module to read encoder data. KPA Studio software is used as the virtual master station on the EtherCAT side. When the encoder is turned, the data collected by the MK5 5002 encoder module is detected online on KPA.
Before conducting a communication test, you must first make hardware connections to the MK5-5002-T000 encoder module. The figure shows the hardware after the connection is completed:
The encoder A/B/Z differential signals are connected to the terminals corresponding to channel 1 of the HK-MK5-5002 module respectively; the encoder power lines are connected to the terminals corresponding to 5V and 0V of the HK-MK5-5002 module respectively;
The power input of HK-MK5-5002 is used to power the communication system or the field equipment, and has electrical isolation. Its sturdy metal casing can provide excellent electromagnetic shielding and heat dissipation performance, and the IP30 protection level ensures stable use in harsh industrial production environments. It is very safe and reliable.
Step.2
Hongke KPA Studio Configuration
Hongke KPA Studio is a tool software for configuring, debugging and diagnosing EtherCAT networks. The software has the following two main uses:
(1) Connect to the EtherCAT master developed by KPA's master protocol stack to perform EtherCAT network configuration and diagnosis.
(2) Cooperate with KPA's EtherCAT master software (MRT) to debug various EtherCAT slaves, such as servos, IO, etc.
The configuration steps are as follows:
1) After KPA Studio and MRT_WIN32 are installed, double-click Master (Win32) to open MRT. When you open the background task, there is the running icon of MRT.
2) Double-click "studio" to open the KPA Studio software, and click "Run without license" to enter the operation interface.
3) The interface after opening the KPA Studio software is as follows:
•Menu bar: can open help documents, set basic software options, open data recording, frame recording and other tools;
• Toolbar: tools for creating new projects, connecting to master stations, deleting master stations, topology display, etc.;
•EtherCAT network topology window: used to configure the EtherCAT network, such as slave order, number of slaves, etc.;
•Master-slave station configuration/operation window: configure various parameters of the master and slave stations, operate the master and slave stations, such as switching state machines, modifying process data and mailbox data, etc.;
•Slave ESI file window: displays slave ESI file information and can import slave ESI files;
•Diagnostic window: Displays various status information and diagnostic information.
4) Import the slave ESI file
Before scanning a slave station, please import the ESI file of the slave station into the Studio software so that Studio can automatically match the corresponding ESI file after scanning the slave station.
In the ESI file window, right click and select Open slaves library folder.
After opening the path, copy your slave ESI file to this path.
Return to the ESI file window, right-click and select Reload slaves library to complete the import.
At this point, in the slave ESI library, find the slave ESI file of HK-KB as shown in the figure, which means the import is successful.
Step.3
Signal acquisition test
1) First, connect to the local master, i.e. Master (WIN32), click connect in the figure, after successful connection, select the device network card Usb 3.0 to Gigabit Ethernet Adapt, which is used to send EtherCAT messages, as shown below.
2) Use HK-MK5-5002 channel 1 to collect encoder values, insert the network cable, connect the master station, and power on the HK-MK5-5002 module. In the topology window, right-click Master1 - Scan configuration to scan the connected slave stations.
3) If the wiring is normal and the slave is online, the slave can be scanned. As shown in the following figure, the HK-MK5 5002 EtherCAT slave has been scanned.
4) The master station scans out the slave station module HK-MK5-5002, click Master 1 with the mouse, and then click State in the master-slave station operation port to enter the OP state as shown in the figure.
5) In the KPA software, click Process Image with the mouse, and then rotate the encoder. You can observe that the value of PDO (6000:08-Counter value) changes as the encoder rotates (the following figures show the data collection effects when the encoder rotates forward and reverse respectively).
If the encoder rotation direction is opposite to the counting direction, the reverse counting function can be enabled by setting the object dictionary 0x8000.3 (Enable direction inversion) to 1. If you need to set parameters through CoE, you need to switch the slave state machine to Pre-OP first. After setting, you need to assign 0x1234 to the object dictionary F003.01 (Save Current Paremeters) to save the current parameters so that they will not be lost when power is off. Finally, the slave state machine will be in OP state.
Summarize
Hongke HK-MK5-5002 encoder module is an incremental encoder acquisition module for RS422 differential output, with 32-bit orthogonal decoding counter, and zero pulse, latch signal latch can read the latch position, and pass the count and latch results to the controller through bus communication, so as to realize distributed encoder acquisition. The module uses 4 times the frequency to sample and calculate the edges of all input signals, which can further improve the resolution and acquisition accuracy.
Previous article:Hongke Solution | How to choose between Hongke Industrial Raspberry Pi and PLC?
Next article:Hongke Case | Using Hongke Phase Sequence Monitoring Relay to Ensure Safe Operation of Screw Conveyor (Auger) System
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Understanding of MSP430G2553
- A lightweight and precise positioning algorithm based on multiple inertial measurement units (LSM6DSOX)
- PT1000 circuit help
- Brief analysis of the working principle of DSP
- The national competition is tomorrow. What are you doing today?
- Looking for asm330lxh driver!!!
- Share post: Just completed FPGA interpolation filter design
- Introduction to Common PCB Microvia Technology
- Analysis of the design principle of single chip microcomputer music program
- Beetle_ESP32-C3 Arduino routine learning