1. Introduction
Currently, the secondary development of various motion control cards is relatively complicated. However, with the application of high-speed and high-precision motion controllers with five-axis linear interpolation, and the development of various dedicated CNC systems, engineers only need to focus on large-scale and complex software development, and do not need to understand the hardware at all.
2. Hardware system of G code five-axis linkage motion controller
2.1 AFDX05 motion control chip
The AFDX05 motion control chip developed by Yunshan CNC supports any 2~5-axis linear interpolation, any 2-axis circular interpolation, and up to 6 levels of motion command buffers, which are particularly suitable for high-speed multi-line segment or circular continuous interpolation motion control. In addition, it also has reverse gap compensation, speed control, acceleration and deceleration control, position control, general input and output ports, 8/16-bit data bus, interruption, hardware limit, software limit, emergency stop, pause, encoder signal input and other functions, with a drive pulse frequency of up to 8MPPS and an interpolation accuracy of ±5LSB. It is used to control servo motors and stepper motors input in pulse sequence mode.
The "Chinese chip" AFDX05 is more in line with the usage habits of Chinese people.
CPU is S3C44B0X. 32M Flash. Pulse direction differential output driver. 60 optocoupler isolated inputs and 42 open collector optocoupler isolated outputs or 36 optocoupler isolated inputs and 20 open collector optocoupler isolated outputs. 5 stepper/servo motor pulse optocoupler isolated outputs, maximum frequency 4MHz. 32-bit logical position and actual position counter. RS232 communication. The hardware part has been modularized and can be developed without any hardware knowledge.
3. Software system of G code five-axis linkage motion controller
3.1 Supported G-codes
G code Group Function
*G00 1 Positioning (rapid movement)
*G01 1 Linear interpolation (feed speed)
G02 1 Clockwise circular interpolation
G03 1 Counterclockwise circular interpolation
G04 0 Pause, precise stop
*G17 2 Select X plane
G18 2 Select Z plane
G19 2 Select Y plane
G27 0 Return and check reference point
G28 0 Return to reference point
G29 0 Return from reference point
G30 0 Return to the second reference point
*G40 7 Cancel tool radius compensation
G41 7 Left tool radius compensation
G42 7 Right tool radius compensation
G43 8 Tool length compensation +
G44 8 Tool length compensation -
*G49 8 Cancel tool length compensation
G52 0 Set local coordinate system
G53 0 Select machine coordinate system
*G54 14 Select workpiece coordinate system No. 1
G55 14 Select workpiece coordinate system No. 2
G56 14 Select workpiece coordinate system No. 3
G57 14 Select workpiece coordinate system No. 4
G58 14 Select workpiece coordinate system No. 5
G59 14 Select workpiece coordinate system No. 6
*G60 0 Single direction positioning
G64 15 cutting mode
G65 0 Macro program call
G66 12 Modal macro program call
*G67 12 Modal macro program call cancel
*G90 3 Absolute value command mode
*G91 3 Incremental value command mode
G92 0 Workpiece zero point setting
*G98 10 Fixed cycle returns to the initial point
G99 10 Fixed cycle returns to point R
3.2 Supported M codes
M code function
M00 Program stop
M01 Conditional program stop
M02 Program End
M03 Spindle forward
M04 Spindle reverse
M05 Spindle stop
M06 Tool Exchange
M08 Cooling on
M09 Cooling off
M18 Spindle orientation release
M19 Spindle Orientation
M30 ends the program and returns to the program header
M50 spare output 1 open
M51 Standby output 1 off
M52 spare output 2 open
M53 spare output 2 open
M54 spare output 3 open
M55 spare output 3 open
M56 spare output 4 open
M57 spare output 4 open
… …
M98 calls a subroutine
M99 Return after subroutine ends/repeat execution
3.3 Macro Programming
Variable number Variable type Function
#0 "NULL" This variable is always empty and cannot be assigned a value.
#1~#33 Local variables Local variables can only be used in macros to keep the results of operations. When the power is turned off, local variables are initialized to "empty". When the macro is called, the independent variable is assigned to the local variable.
#100~#149
#500~#531 Public variables Public variables can be shared between different macro programs. Variables when the power is turned off.
#100~#149 are initialized to "empty", while variables #500~#531 hold data. Public variables #150~#199 and #532~#999 are optional, but when these variables are used, the length of the paper tape is reduced by 8.5 meters.
#1000~ System variables System variables are used to read and write various NC data items, such as current position and tool compensation value.
#2000~#2059 IO input 60 channels of optocoupler isolation input signals.
4. Three-axis milling machine CNC system development example
4.1 Parameter Initialization
The following parameters are for each of the five axes.
Parameter Name Parameter Setting Parameter Unit
Pulse equivalent P01=XXX.XXXXXX mm
G00 command speed P02=XXXX mm/min
G01 command speed P03=XXXX mm/min
G02 command speed P04=XXXX mm/min
G03 command speed P05=XXXX mm/min
Starting speed P06=XXXX mm/min
Acceleration time P07=XXXX milliseconds
Positive soft limit P08=XXXX mm
Negative soft limit P09=XXXX mm
Backlash compensation P10=XXXX mm
Zero return speed P11=XXXX mm/min
Manual speed P12=XXXX mm/min
Maximum feed speed P13=XXXX mm/min
Total number of tools in the system P14=XX
M code waiting time P15=XXXX milliseconds
Return to reference point coordinates P16=XXX.XXXXXX mm
Spindle encoder line number P17=XXXX (/R)
Zero return direction P18=X
Tool change reference position P19=XXX.XXXXXX mm
Tool change safety height P20=XXX.XXXXXX mm
Tool change interval P21=XXX.XXXXXX mm
Tool change speed P22=XXX.XXXXXX mm/min
Maximum stroke P23=XXX.XXXXXX mm
Set workpiece coordinate system P25 = XXX.XXXXXX mm
4.2 Send G code to control the machine tool operation. For example:
G54
M03 X8
G0 G90 G17
G28
G00X-2.046Y59.111Z10.000
Z4.000
G01Z-1.000F300
G17
G02X1.245Y54.864I-54.422J-45.566K0.000F800
X2.203Y53.318I-15.407J-10.613K0.000
G00Z10.000
G91 G28 M09
V. Summary
Based on the open five-axis five-link CNC system platform, application development engineers can focus on developing specific industry-specific CNC systems without having to understand the hardware, thus reducing the development cost of CNC systems and promoting the popularization and application of CNC machine tools.
Previous article:Design of Ship Cargo Control System Based on PLC
Next article:Research on SVPWM Control Algorithm of Three-Level Inverter
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- One picture to understand the chip series: Huawei Kirin super popular science - RF
- Research and development of supercapacitor urban public transportation electric vehicles
- [Raspberry Pi Pico Review] Serial communication function and its test
- How to choose the appropriate main circuit topology for power supply?
- The diameter of the four holes on the EK140 base plate
- This circuit is called a "lawn mower"
- In a single-chip computer, writing 1 clears it to 0, and writing 0 clears it to 0. What is the difference?
- How to monitor battery voltage with Arduino
- Image Algorithm Transplantation to DSP and Its Optimization Steps
- To advance in technology to a certain level, you just need to read more datasheets!