Macro-programming of educational and rotating quadrangular pyramids
August 20 21:00:13, 2025
With the continuous development of China's national economy and the ongoing reform of its education system, there has been an increasing demand for skilled technical professionals. This has become a critical need for enterprises and a vital part of the country's development strategy. As a result, higher vocational education has become a key source of high-quality technical talent, providing strong support for building a reasonable educational structure, promoting economic transformation, and addressing employment challenges.
To meet the needs of employers, the teaching process must align with factory management practices and focus on the knowledge required by industry. However, traditional exam-oriented education struggles to engage students in vocational schools, who are naturally curious and motivated by hands-on learning. To address this, our school emphasizes stimulating student interest through the analysis and application of real-world processing techniques. This approach encourages students to think critically and apply various concepts, leading to excellent results in CNC machining, tool usage, programming, and machine tool operation.
The image above shows a project where students are learning macro programming, and their work is both engaging and impressive.
**Key Learning Points**:
1. Variable programming
2. Use of rotation commands
3. Removal of residual material
**Processing Techniques**:
1. Finishing surfaces using a ball-end mill
2. Using a flat-end mill to rough and finish residual material
**Processing Procedure**:
%
O1111 (XZSLZ)
#100=5 (tool radius)
#101=40 (bottom side length)
#102=50 (surface height)
#103=50 (tilt angle)
#104=0.2 (Z step)
#5=5 (current tool compensation)
#6=-30 (current Z value)
#105=35 (upward rotation angle)
G80 G40 G54 G90 G49 G17
G0 Z50
G0 Y-60
M3 S5000
G1 Z10 F3000
G05.1 Q1 (pre-read 20 blocks from this block)
WHILE [#6 LE [#102 + #100]] DO1
G68 X0 Y0 R#105 (rotate angle)
G10 L12 P1 R#5
G1 Z#6
G1 G41 X[2*#100] Y-[#101/2+2*#100] D1
G3 X0 Y- [#101/2] R[2*#100]
G1 X- [#101/2]
Y [#101/2]
X [#101/2]
Y- [#101/2]
X0 Y- [#101/2]
G3 X- [2*#100] Y- [#101/2+2*#100] R[2*#100]
G1 G40 X0 G69
#6 = #6 + #104
#5 = #5 - [#104 / TAN[#103]]
#105 = #105 + [#104 * [90 / #102]]
END1
G0 Z100.
M5
G91 G28 Z0.
G28 X0. Y0.
M30
%
This program demonstrates how we integrate practical skills with theoretical knowledge, ensuring that students not only understand the concepts but also apply them effectively in real-world scenarios. Through such projects, students gain confidence, develop problem-solving abilities, and prepare themselves for future careers in the manufacturing industry.