Share this

Application of macro programs in achieving synchronous operation of the simulated spindle and interpolation axis

2026-04-06 04:46:37 · · #1

Abstract : This paper introduces a macro-programming method for achieving synchronous operation of the simulated spindle and interpolation axis on a special-purpose machine based on the Mitsubishi E60 CNC system. By using variable calculation and settings, the machine acquires flexible machining capabilities, thus meeting the operational requirements of the special-purpose machine on the E60 CNC system.

Keywords : Macro program simulation, spindle synchronous operation, variable calculation

1. Working requirements of special working machinery

A customer's PVC ribbon dot printing machine uses a Mitsubishi E60 CNC system in its control system. The ribbon unwinding section uses a frequency converter and a three-phase motor, while the length control and dot printing are controlled by two servo axes. The machine's operational requirements are:

(1) Using the "unwinding speed" as the reference speed, the "fixed length control axis" and the "dot printing axis" perform interpolation operation. The "fixed length control axis running speed" is required to be the same as the "unwinding speed".

(2) The following operating parameters can be set arbitrarily on the display screen:

(a.) Unwinding speed; the unwinding speed can also be adjusted at any time on the control panel;

(b) Fixed length; (The fixed length can be modified according to the product model)

(c) Number of dot print heads; (The number of dot print heads mounted on the dot print shaft can be modified according to the product model)

2. Control System Solutions

Based on the customer's machine requirements and after comprehensive analysis of the E60 CNC system's functions, the following solution was adopted:

(1) Use the "unwinding frequency converter" as the simulated spindle of the CNC system. The E60 CNC system has a built-in "analog output" interface, which can control the frequency converter spindle. In this way, the spindle running S command can be directly issued in the machining program to set the speed of the frequency converter spindle. The E60 system can also issue the S command in manual mode.

(2) After issuing the S command in the program, the spindle speed can also be adjusted by the knob on the operation panel. The adjustment accuracy can be preset by the PLC program.

(3) The spindle S command is set using variables. The interpolation axis speed is also calculated using variables. Variable calculations ensure that the spindle speed is equal to the speed of the fixed-length control axis. This satisfies the main requirements of the machine tool.

(4) The fixed length and the number of printing heads are also set as variables. This satisfies the customer's requirement that these values ​​can be modified at any time.

(5) Compile all these variable calculations into a macro program. Call the macro program when the main program runs to meet the runtime requirements.

3. Calculation of simulated spindle speed:

(1) Spindle S command

In the mechanical structure, the drive chain for the unwinding pressure roller is "frequency converter --- ordinary three-phase motor --- gearbox --- unwinding pressure roller". The frequency converter can act as a "simulated spindle", and its speed can be issued by the S command in the machining program as follows:

N10S1000M3

In the above program segment, S1000 is the spindle speed command. After this command is issued in the machining program, the system performs calculations (especially considering factors such as spindle speed adjustment) and sends an analog voltage signal to the frequency converter. The frequency converter adjusts the frequency to drive the motor based on the analog signal.

(2) Parameters related to spindle operation

The parameters related to spindle operation are as follows:

#1039-----Does it have a spindle?

#1024----Simulated Spindle Connection

#1001-----Maximum spindle speed

Parameter #1001 is closely related to the analog signal. Its meaning is "rotational speed when the analog signal = 10V". Therefore, this parameter must be set to the rated speed of the spindle motor at 50Hz. If the rated speed of the spindle motor at 50Hz = 1480 R/M, then set #1001 = 1480.

Thus, when writing the S instruction, writing S1000 will give you the value of the variable frequency drive spindle motor = 1000 R/M.

(3) The effect of spindle ratio.

The NC system also provides spindle speed adjustment. That is, after setting the S command, the spindle speed can be adjusted via an external knob. This needs to be handled in the PLC program. Spindle speed register = R148. By setting the spindle speed register to #1033 via the macro program interface R74, the final actual spindle speed (#2000) will be achieved.

#2000 = S command speed * spindle speed

#2000=#100*#1033—————(1)

(See Table 1 in 5.1 for variable definitions and settings)

Figure 1. Variable handling of spindle magnification

Figure 1 shows the PLC program that converts the spindle magnification data into macro program variable #1033 via the macro program interface. This is a necessary variable when performing macro program calculations.

(4) Actual linear speed of the unwinding motor pressure roller

#105=k*#2000--------------(2)

#105---Actual linear velocity of the unwinding pressure roller

#2000 = Actual spindle speed command

K=(3.14*102)/101

#101 = Spindle reduction ratio

#102 = Diameter of unwinding pressure roller

K = (3.14 * diameter of unwinding pressure roller) / reduction ratio

(Once the mechanical system is determined, K is a constant value)

Before calculating the linear velocity of the main shaft pressure roller: it is necessary to set...

#101 = Spindle reduction ratio

#102 = Diameter of unwinding pressure roller

4. Resultant velocity and component velocities of the interpolation axis

4.1 Calculation of the linear velocity of the traction motor

The main axis speed is the reference speed for the entire production line, and the speed of the traction motor shaft must be equal to the main axis speed. This is the principle for setting the interpolation axis speed:

Figure 2 shows the calculation of the speed of each axis during interpolation.

In the following procedure

N10S#100M3G91G01XA.YBF#115

F specifies the composition rate of the interpolation operation. The composition rate is decomposed into its values ​​on the X and Y axes, as shown in the following formula:

A----X-axis movement distance

B---Y-axis movement distance

F --- Linkage Speed

Fx----X-axis velocity

The synthesis rate of the interpolation operation is as follows:

Fx must be equal to the linear velocity of the main shaft pressure roller.

Fx=K*#2000, then

(4)-----The formula for calculating the composite velocity expressed in terms of variables

5. Variable Setting and Macro Programming

5.1 Setting Variables

The following variables must be set before a macro program can run:

Serial Number

Variable number

Variable Function

Setting up an example

Remark

1

*#100

Spindle S command speed

#100=1200

2

#2000

Actual spindle speed command

calculate

Spindle magnification adjustment

3

*#101

spindle reduction ratio

#101=25

4

*#102

Main shaft pressure roller diameter

#102=100

5

#105

Main spindle pressure roller linear velocity

#105=k * #2000

K=(3.14*#102)/#101

*#107

Tooth pitch

#107= 8

X-axis movement distance

*#109

Number of print heads

#109=6

#110

Y-axis movement distance of dot print axis

calculate

*#111

Dot printing roller diameter

#111=120

#1000

2-axis linkage speed

Initial variables marked with an asterisk (*) must be set and cannot be zero. Otherwise, calculation errors will occur.

5.2 After calculating and setting the linear velocity of the main spindle pressure roller and related variables of the interpolation shaft, a macro program for variable calculation can be compiled as follows:

Variable calculation macro program: P9100

(#100----Spindle speed S command (setting))

#101-----Spindle reduction ratio (setting)

#102------Main spindle pressure roller diameter (setting)

#2000----Actual spindle speed (R/M) (PLC to NC)

#105------ Main spindle unwinding wheel linear velocity (calculation)

#107-----Pitch: X-axis single-pitch distance (setting)

#109----Number of Printheads (Setting)

#111-----Diameter of the dot printing roller (setting)

#110-----Y-axis movement distance of the dot print axis

#1000-----Interpolation axis linkage speed)

N5 #2000=#100* #1033/100-------Actual spindle speed (R/M)

N10 #105 = (3.14 * #102) / #101 * #2000 ------ Main shaft unwinding pressure roller linear speed

N20 #110=(3.14*#111) / #109------------Calculate the distance the dot print roller moves.

N30

—Calculate linkage speed

N100 S#100 M3

N200 G91 G01 X#107. Y#110 F#115

Running result:

By using variables and macro programming, the machine tool's flexible machining capabilities have been greatly enhanced. Even if the types of products being processed frequently change, operators can easily meet the requirements by simply setting the variables. After more than a year of trial use, the results have been excellent and have been praised by the users.

Author: Xu Tianqi

Mailing Address: Xu Tianqi, Department of Control Science and Engineering (J05), School of Physics and Information Engineering, Jianghan University, Hanyang District, Wuhan, Hubei Province

Postal code: 430056

Email address: [email protected]

Phone number 18971184652

Home phone: 027 84650285

Read next

CATDOLL 136CM Sasha (Customer Photos)

Height: 136cm Weight: 23.3kg Shoulder Width: 31cm Bust/Waist/Hip: 60/54/68cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22