1. Introduction
At present, the secondary development of various motion control cards is relatively complicated. At present, many engineers in China are familiar with the G code of CNC systems. Based on
the ARM
32-bit microcontroller and the domestic motion control chip AFD-X05, a five-axis linkage motion controller that can execute G code has been developed, making secondary development simpler. Applying this high-speed and high-precision motion controller that supports five-axis linear interpolation, and then developing 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
arc interpolation
, and up to 6 levels of motion command buffer, which is particularly suitable for high-speed multi-line segment or arc continuous interpolation motion control. In addition, there are 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, drive pulse frequency up to 8MPPS, interpolation accuracy ±5LSB. It is used to control servo motors and stepper motors input in pulse sequence mode.
The "Chinese core" AFDX05 is more in line with the usage habits of Chinese people. It can control up to 5-axis point motion, continuous trajectory motion, synchronous motion and other applications.
2.2 ARM 32-bit microcontroller
CPU is S3C44B0X. 32M Flash. Pulse direction differential output drive. 60-channel
Optocoupler isolation
Input 42-channel open collector optocoupler isolation output or 36-channel optocoupler isolation input 20-channel open collector optocoupler isolation output. 5-channel stepper/servo motor pulse optocoupler isolation output, 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. G code five-axis linkage motion controller software system
3.1 Supported G code
G code grouping 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 return to initial point
G99 10 Fixed cycle return to R point
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 change
M08 Cooling on
M09 Cooling off
M18 Spindle orientation cancel
M19 Spindle orientation
M30 Program ends and returns to program header
M50 Spare output 1 on
M51 Spare output 1 off
M52 Spare output 2 on
M53 Spare output 2 on
M54 Spare output 3 on
M55 Spare output 3 on
M56 Spare output 4 on
M57 Spare output 4 on
... ...
M98 Subroutine call
M99 Subroutine ends and returns/repeated execution
3.3 Macro Programming
Variable Number Variable Type Function
#0 "Empty" 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. When the power is turned off, variables
#100~#149 are initialized to "empty", while variables #500~#531 keep data
. Public variables #150~#199 and #532~#999 can be selected, 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, tool compensation value
#2000~#2059 IO input 60-way optocoupler isolation input signal
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 Reverse
clearance compensation P10=XXXX mm
Return to zero speed P11=XXXX mm/min
Manual speed P12=XXXX mm/min
Maximum feed speed P13=XXXX mm/min
System total number of tools 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 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. 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
5. Summary.
Based on the open five-axis five-linkage CNC system platform for development, you only need to transfer the G code to this platform to quickly develop a set of special CNC systems based on international standard G code processing. Application development engineers do not need to understand the hardware at all, and can concentrate on making a specific industry-specific CNC system. Reduce the development cost of CNC systems and promote the popularization and application of CNC machine tools.
Previous article:Application of electronic anti-theft system in store anti-theft
Next article:Permanent Magnet Synchronous Motor Control Based on Chaos Synchronization
- 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
- TI DSP C6657 Learning - Compiling static library .lib
- [ESK32-360 Review] 1. Unboxing and lighting up the LED
- How to boot a program larger than 48K for C5000?
- Five-star article: Overview of RF Power Amplifier (RF PA)
- Embedded homework: OK6410 development environment configuration
- When using ALTium Designer to edit the PCB library, the pads placed are invisible. I don't know why.
- [Serial server rs485 communication experience tutorial] Storage gateway working mode
- 【GD32F310G-START】Solve Error: Device not found and turn on the LED light
- [National Technology N32G457 Review] Install RT-Thread Studio
- FPGA chip power backflow problem