DZRN return to origin command
DZRN K20000 K3000 X12 Y0
This is a return to origin instruction. K20000 indicates the pulse frequency at the beginning of the return to origin. When the rising edge of X12 is detected, the pulse output frequency drops to 3000. When the falling edge of X12 is detected again, the pulse output stops. The pulse output terminal is Y0.
DDRVI relative positioning instruction
x2-------DDRVI K10000 K1000 Y0 Y2
It means: when X2 is turned on, 10,000 pulses are sent to Y0 at a frequency of 1KHz, starting from the current position. The direction of the motor is positive, and it is reflected on Y2.
Generally, the most commonly used mode for servo motors is position control. Don’t be scared by the wiring in the manual. CN1 is the control port, and CN2 is the encoder feedback port. Don’t worry about it, there are dedicated lines for them.
In fact, only four wires, 32, 33, 34, and 35, are needed to control cn1. These four wires are divided into two groups, 32 and 33 are used as pulse inputs, and 34 and 35 are used as direction inputs.
For example: we connect 32 (plus+) to +24v, 33 (plus-) to 0V, 34 (dir+) to +24v, and 35 (dir-) to 0V, and we have the simplest servo system. Did you notice that three external wires are actually enough? We connect 32 and 34 together and share the positive pole of the power supply.
However, the servo is controlled by pulses. Our circuit only sends one pulse to the servo, and this set of servos has 10,000 pulses/turn, so it only turns 360/10,000, almost like it doesn't move. To make it move continuously, it needs to be given continuous pulses. The faster the pulse, the faster it turns. The more pulses, the more it turns. Then PLC is used.
I am using Mitsubishi PLC here: FX1s and Fx1n both provide 24V DC power supply, the lead-out terminals are 24+ and COM, at the output end, Y0 corresponds to COM0, Y1 corresponds to COM1, Y2Y3 to Y5 correspond to COM2 (I take Fx1s14mr 8 inputs and 6 outputs as an example). When Y0 has output, COM0 is connected to Y0 (internal, said to be a field effect transistor), and similarly when Y2 has output, COM2 is connected to Y2, so we can control the on and off of Y0 and Y2 to generate a pulse signal (0101010101) and a direction signal (0000001111111). Generating pulses is not easy, just use a timer to perform alt (alt is a command of Mitsubishi PLC, alt y0, each time it is executed, Y0 flips).
Simpler and more powerful DRVA and DRVI.
DDRVA: absolute position driver ddrva s1 s2 d1 d2
s1: position (simply understood as the number of pulses relative to the origin, between positive and negative 999999)
s2: frequency (the speed of sending pulses, the higher the speed, the faster it is, do not exceed the maximum speed, generally 10k, of course, it cannot be lower than a certain value, it is related to acceleration and deceleration, and the maximum speed, refer to the programming manual for details)
d1: output pulse out port, we use y0
d2: output direction out port, we use y2
DDRVI: Relative position drive, the usage is the same, the only difference is S1: simply understood as the number of pulses relative to the current position.
Some people may say that it seems troublesome, why not use alt? alt is simple, but I don't see many people use alt to drive servo.
The advantage of DDRVA is that there is no need to deal with the pulse direction, that is, we don’t need to care whether Y2 is positive or negative. We only need to tell s1 whether it is positive or negative. If it is positive, y2 will automatically output. If it is negative, y2 will not output, and the servo will reverse automatically.
In addition, when we use DDRVA and DDRVI, PLC can help us record the pulses emitted by using its special registers, like this: ddrva k1000 k500 y0 y2 (drive the servo motor to move a distance of 1000 pulses at a speed of 500 pulses per second. The expression is not accurate, please understand it yourself). Then D8140 is 1000, and D8141 is still 0, because it is the high 16 bits. When the low 16 bits of D8140 are full (16 bits, if it is to be full, it is estimated to be 665535), D8141 will be used.
Note: Fx1s only has high-speed outputs y0 and y1, so in order to effectively utilize resources (sometimes to control two servos), non-high-speed direction signals are given to y2 and y3. Generally, y0 and y2 are paired, and y1 and y3 are paired.
Previous article:What is motor calibration? How does motor calibration work?
Next article:Basic structure/working principle/advantages/application areas of linear motors
Recommended ReadingLatest update time:2024-11-16 11:53
- 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.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 80-bit extended precision floating point in OCaml
- Tutorial: How to use Vivado HLS to accelerate algorithm development on FPGA
- [Contactless facial recognition access control system] + 1-MAIX_BIT development environment construction
- 【Project source code】Data on FPGA-based DDR3
- A collection of selected C language resources - from basic theory to embedded development practice
- Why was DP1332E suddenly chosen as the PN532 replacement compatible chip?
- How is the brightness of LCD segment code screen defined?
- WeChat applet and RSL10 Bluetooth two-way communication
- Thank you for being there - I am grateful for the forum which has given me a lot of technical help and helped me grow very fast.
- fpga download program