You are on page 1of 10

FIVE-AXIS MACHINING FUNCTION

26

26-4 Workpiece Setup Error Correction: G54.4P0, G54.4P1 to G54.4P7 (Option)


1.

Function outline
This function is provided to compensate for the error in setting a workpiece easily, without
having to rewrite the program section for describing the machining contour, by modifying the
workpiece coordinate system according to the error in question.
Coordinate system to be referred to

Automatic renovation of coordinate system


to compensate for setup error

Workpiece

Workpiece

Workpiece setup error


D740PB0104

2.

Programming format
G54.4 Pn;
n: Number of the data set for workpiece setup error correction (1 to 7)
Enter zero with P (G54.4 P0) to cancel the correction function.
- Be sure to enter the G54.4 command (for selection as well as for cancellation) independently.
If a block of G54.4 should contain any other commands, an alarm is caused (1815 CANNOT
USE G54.4).
- Omission of argument P will lead to an alarm (807 ILLEGAL FORMAT).
Alarm 809 ILLEGAL NUMBER INPUT occurs if argument P is of any other value than 0 to 7.

3.

Definition of workpiece setup coordinate system


The workpiece setup coordinate system is defined by using the following three types of
externally provided data on the setup error.
1.

Linear errors on the orthogonal axes X, Y, and Z (x, y, z)


Specify the origin of the workpiece setup coordinate system with its absolute values in the
current workpiece coordinate system.

2.

Angular errors in rotation around the orthogonal axes (a, b, c)


Specify those angles (a, b, and c) of rotations around the axes X, Y, and Z of the
current workpiece coordinate system, in that order, by which the same orientation as that of
the workpiece setup coordinate system can be obtained.
Positive values of angle refer to the rotation by which a right-handed screw moves in the
positive direction of the third orthogonal axis.

3.

Coordinate of the axis of table rotation during error measurement


Set the machine coordinate of the axis of table rotation during measurement of errors x,
y, z and a, b, c. No setting is required for machines without the controlled axis of
table rotation, while setting for two axes is necessary for five-axis control machines of table
rotating type.

26-59

26

FIVE-AXIS MACHINING FUNCTION

Workpiece with
setup errors

Y
Workpiece in the correct
mounting position
X

Workpiece coordinate
system (X, Y, Z)

Workpiece setup
coordinate system
(X, Y, Z)

y
X

4.

D740PB0105

Setting workpiece setup errors


Seven data sets (No. 1 to No. 7) of workpiece setup errors can be set or prepared for the
designation by argument P in a G54.4 block.
It is possible, moreover, to prepare a special set of data to be added commonly to each of the
numbered data sets. Values for the linear errors (x, y, z) and the tables angular position
during measurement can be set as common data, but not for the angular errors (a, b, c).
The number of available data items for the tables angular position and their names depend
upon the specifications of the machine in question.
A.

WORK POSITION ERROR COMP. display


Use the WORK POSITION ERROR COMP. display to prepare the data for workpiece setup
error correction. See the relevant section in PART 3 of the Operating Manual.
Common data

B.

No. 1 to No. 7

5.

0.

3.

10.

0.

0.

0.

45.

0.

45.

15.

0.

90.

Set linear errors on the orthogonal axes X, Y, and Z.

Set angular errors in rotation around the orthogonal axes.


No common data can be provided for this type of data items.
Set the coordinate of the axis of table rotation during error
measurement.

System variables
Using variables tabulated below, it is possible to read and write the values used for workpiece
setup error correction.
Common

No. 1

No. 2

No. 3

No. 4

No. 5

No. 6

No. 7

#5801

#5811

#5821

#5831

#5841

#5851

#5861

#5871

#5802

#5812

#5822

#5832

#5842

#5852

#5862

#5872

#5803

#5813

#5823

#5833

#5843

#5853

#5863

#5873

#5814

#5824

#5834

#5844

#5854

#5864

#5874

#5815

#5825

#5835

#5845

#5855

#5865

#5875

#5816

#5826

#5836

#5846

#5856

#5866

#5876

Rotat. axis coord. 1

#5807

#5817

#5827

#5837

#5847

#5857

#5867

#5877

Rotat. axis coord. 2

#5808

#5818

#5828

#5838

#5848

#5858

#5868

#5878

Use #5800 to read the number (1 to 7) of the currently selected data set for workpiece setup
error correction.

26-60

FIVE-AXIS MACHINING FUNCTION

Note:

5.

26

An attempt to overwrite the system variable #5800 will only lead to an alarm (1821
UNWRITABLE SYSTEM VARIABLE).

Operation description
A.

Operation in the mode of workpiece setup error correction


A block of G54.4 Pn (n = 1 to 7) selects the mode of workpiece setup error correction, and
causes a workpiece setup coordinate system to be established according to the data set of No.
n as well as to the current positions on the rotational axes concerned, with the positional
indication (POSITION values) on the display with respect to the currently valid coordinate
system being changed accordingly.
Axis motion commands in the G54.4 Pn mode are processed in general with respect to the
workpiece setup coordinate system.
A block of G54.4 P0 cancels the mode of workpiece setup error correction. The workpiece setup
coordinate system will be replaced by the original workpiece coordinate system with reference
to which the G54.4 Pn command was given, and the POSITION values on the display will be
changed accordingly.
Y

X
c

y
X

Tool path in the workpiece setup


coordinate system (X Y Z)

Tool path in the workpiece


coordinate system (X, Y, Z)

D740PB0106

In the mode of workpiece setup error correction (G54.4), the NC unit controls the tool path by
including the program-externally provided data of workpiece setup errors.
Note 1: Resetting the NC-unit includes cancellation of the mode of workpiece setup error correction (G54.4).
Note 2: Selection and cancellation of the mode of workpiece setup error correction (with
G54.4) causes the POSITION values on the display to be changed as mentioned
above, indeed, but no actual movements occur on the machine.

26-61

26

FIVE-AXIS MACHINING FUNCTION

B.

Precautions for the selection and cancellation with G54.4


A block of G54.4 does not cause any actual movements on the machine. Use the method of
absolute data input, therefore, for the first block of axis movement after the selection of the
mode of workpiece setup error correction (with G54.4). Use of incremental data could not move
the tool to the expected position. This also applies to the cancellation, and the first motion
command after G54.4P0 must be given with absolute data.
Movements for a correctly mounted workpiece

Movement command with incremental data after G54.4


Y

Y
Y
20

N2
N2
5
N1

N1
X
X
X

For incremental data input

G54.4 P1
N1 G91 G0 X5.Y5.
N2 G91 G1 Y15.F500

N1 G91 G0 X5.Y5.
N2 G91 G1 Y15.F500
For absolute data input

Movement command with absolute data after G54.4

N1 G90 G0 X5.Y5.
N2 G90 G1 Y20.F500

Y
Y

N2

N1
X
X

G54.4 P1
N1 G90 G0 X5.Y5.
N2 G90 G1 Y20.F500
D740PB0107

26-62

FIVE-AXIS MACHINING FUNCTION

C.

26

Correction of the tool-axis direction


In addition to the translating correction in the XYZ space, an angular correction can be achieved
on five-axis control machines, according to the inclination on the rotational axis, in order to set
the tool-axis direction (tool attitude) normal to the surface to be machined.

Workpiece setup
error correction ON

D740PB0108

26-63

26

FIVE-AXIS MACHINING FUNCTION

6.

Relationship to other functions


A.

Commands available in the mode of workpiece setup error correction


Function

Code

Positioning

G00

Linear interpolation

G01

Dwell

G04

High-speed machining mode

G05

Exact-stop

G09

Programmed data setting ON/OFF

G10/G11

Plane selection

G17/G18/G19

Return to zero point

G28/G30

Nose radius/Tool radius compensation OFF

G40

Tool radius compensation for five-axis machining (to the right/left)

G41.2/G42.2

Remarks

G41.4/G42.4
G41.5/G42.5
Tool length offset (+/)

G43/G44

Tool tip point control type 1/2

G43.4/G43.5

Tool position offset ext./red./double ext./double red.

G45/G46/G47/G48

Tool length offset OFF

G49

Scaling ON/OFF

G50/G51

Mirror image ON/OFF

G50.1/G51.1

Machine coordinate system selection

G53

Tool-axis direction control

G53.1

High-accuracy control mode (Geometry compensation)

G61.1

Cutting mode

G64

Macro call

G65/G66/G66.1/G67

Inclined-plane machining

G68.2

Fixed cycle

G71.1-G89/G280-G289

Programmed coordinate rotation OFF

G69

Absolute data input

G90

Incremental data input

G91

Feed per minute

G94

Feed per revolution

G95

Constant surface speed control OFF

G97

Return to Initial point level in hole-machining fixed cycles

G98

Return to R-point level in hole-machining fixed cycles

G99

Subprogram call/End of subprogram

M98/M99

Feed function

M, S, T, B function

MSTB

Local variables, Common variables, Operation commands (arithmetic operations, trigonometric functions, square root, etc), Control
commands (IF GOTO , WHILE DO )

Macro instructions

Note:

Giving any other command than those enumerated above in the mode of workpiece
setup error correction will lead to an alarm (1814 ILLEGAL CMD IN G54.4 MODE).

26-64

FIVE-AXIS MACHINING FUNCTION

B.

26

Modes in which workpiece setup error correction is selectable


Function

Code

Positioning
Linear interpolation

G01

Polar coordinate interpolation OFF

G13.1

Polar coordinate input OFF

G15

Plane selection

G17/G18/G19

Inch/Metric data input

G20/G21

Pre-move stroke check OFF

G23

Return to zero point

G28/G30

Nose radius/Tool radius compensation OFF

G40

Shaping function OFF

G40.1

Tool length offset (+/)

G43/G44

Tool length offset OFF

G49

Scaling OFF

G50

Mirror image OFF

G50.1

Local coordinate system setting

G52

Selection of workpiece coordinate system

G54-G59/G54.1

Dynamic offsetting OFF

G54.2P0

High-accuracy control mode (Geometry compensation)

G61.1

Cutting mode

G64

Modal macro call OFF

G67

Programmed coordinate rotation OFF

G69

Fixed cycle OFF

G80

Absolute data input

G90

Incremental data input

G91

Inverse time feed

G93

Feed per minute

G94

Feed per revolution

G95

Constant surface speed control OFF

G97

Return to Initial point level in hole-machining fixed cycles

G98

Return to R-point level in hole-machining fixed cycles

G99

Note:

Remarks

G00

Selecting the mode of workpiece setup error correction in a mode other than those
enumerated above will lead to an alarm (1815 CANNOT USE G54.4).

26-65

26

FIVE-AXIS MACHINING FUNCTION

C.

Restrictions
1.

Be sure to enter the G54.4 command (for selection as well as for cancellation) independently. If a block of G54.4 should contain any other commands, an alarm is caused (1815
CANNOT USE G54.4).

2.

In the mode of workpiece setup error correction, system variables #5001 to #5116 for
reading positional information refer to the workpiece setup coordinate system, while system
variables #5021 to #5036 always denote the current position with respect to the machine
coordinate system.

3.

Resetting the NC-unit includes cancellation of the mode of workpiece setup error
correction.

4.

Tool radius compensation, tool length offset, tool tip point control, mirroring by G-code,
scaling, inclined-plane machining, and fixed cycle must be selected and cancelled within
the mode of workpiece setup error correction (between G54.4P_ and G54.4P0), as shown
in the example below for the use of tool radius compensation.
G54.4P2 (Workpiece setup error correction ON)
:
:

G41D3 (Tool radius compensation ON)

Mode of setup error correction

:
:

Mode of radius compensation

G40 (Tool radius compensation OFF)


:
:

G54.4P0 (Workpiece setup error correction OFF)

5.

Do not give any tool change command in the mode of workpiece setup error correction;
otherwise an alarm will be caused (1814 ILLEGAL CMD IN G54.4 MODE).

6.

Manual interruption is always performed on the basis of the machine coordinate system
(without any coordinate conversion). After manual interruption of workpiece setup error
correction (by or without using the TPS function) do not resume automatic operation
without returning the machine components concerned to the original positions on the
controlled axes; otherwise an alarm will be caused (184 ILLEGAL OPER IN G54.4
MODE).

7.

During interruption of workpiece setup error correction, an attempt to perform manual


movements on a rotational axis, or to use the manual pulse handle will only lead to an
alarm (184 ILLEGAL OPER IN G54.4 MODE).

8.

Tool path check can only be performed on the basis of the original workpiece coordinate
system (without coordinate conversion taken into consideration).

9.

Tracing in the mode of workpiece setup error correction is displayed with reference to the
machine coordinate system.

10. Do not use corner chamfering or rounding commands in the mode of workpiece setup error
correction; otherwise an alarm will be caused (1814 ILLEGAL CMD IN G54.4 MODE).
11. Restarting operation from a block in the mode of workpiece setup error correction begins
with a movement to the accordingly corrected position and to the position without
correction, respectively, in the case of using the [RESTART] and the [RESTART 2
NONMODAL] menu function.

26-66

FIVE-AXIS MACHINING FUNCTION

26

12. Do not specify a MAZATROL program as a subprogram to be called up in the mode of


workpiece setup error correction; otherwise an alarm will be caused (1814 ILLEGAL CMD
IN G54.4 MODE).
13. Do not enter a block of motion command which requires an angular movement through
more than 180; otherwise an alarm will be caused (1820 ILLEGAL COMMD IN G54.4).
7.

Related alarms
No.

Message

Description

Remedy

184

ILLEGAL OPER IN
G54.4 MODE

The operation attempted is not allowed in


the mode of workpiece setup error correction.

Do not attempt such an operation.

1813

G54.4 OPTION NOT


FOUND

The system of machining is not equipped


with the optional function for workpiece setup error correction.

G54.4 is not usable for a machine


without the optional function.

1814

ILLEGAL CMD IN
G54.4 MODE

The command given (G-code, T-code, etc.)


is not compatible with the mode of workpiece setup error correction.

Delete the incompatible command,


or cancel the error correction mode
beforehand to give the command.

1815

CANNOT USE G54.4

The mode of workpiece setup error correction is not selectable under the current
modal conditions.

Modify the program so as to


establish correct modal conditions for
workpiece setup error correction.

1820

ILLEGAL COMMD IN
G54.4

A block of motion command requires an


angular movement through more than 180.

Divide the command so that the


amount of angular movement of any
block does not exceed 180.

26-67

26

FIVE-AXIS MACHINING FUNCTION

- NOTE -

26-68 E

You might also like