529
7
7 Motion Control 7.9 Format and Use of G-code Subprograms
Towards the positioning or trajectory control, it supports the setting of acceleration/deceleration type/time,
maximum speed, base speed, and they must be set in the special elements. The parameters must be set
correctly; otherwise, an error may occur during running. For example, if the mechanical unit is incorrect, the
pulse output frequency exceeds the maximum speed.
Parameters for an axis not used during multi-axes action need not be entered. In such a way, the axis
resources are not occupied, and the axis can be used for positioning or electronic cam running.
Helix interpolation can also be performed by using the arc interpolation instruction. For example, when arc
interpolation is performed on the XY plane, helix interpolation is performed by setting the displacement of
the z-axis. Note that, the helix can rotate only one circle each time, and the number of pulses output on the
axis in linear motion within one instruction shall not be greater than the master axis length; that is, the helix
distance shall be no more than 0.9 times the perimeter.
The following is a G-code editing page.
A red mark appears in the line of G-code with a syntactic error. The following rules shall be followed when
G-code is input.
●
One line can have only one executable instruction (G00, G01, G02, G03, or G04).
Incorrect format:
●
The executable instruction can only be followed by parameters.
●
Multiple environment instructions (G17, G18, G19, G90, or G91) can be placed in one line, but
cannot be placed after an executable instruction, and the last parameter shall prevail. For example,
G17G90G18G91G01X10 indicates that the plane and coordinate type of the current instruction are
G18 and G91 respectively.
●
H3U-PM supports one G-code subprogram which can be divided into O subprograms (starting with
the key word 0, ranging from O0000 to O9999. They can be called by using M98.) The .nc le can be
imported into G-code subprograms.