Ðề: câu hỏi về G code !
Anh chàng chímèn khẳng định chắc nịch - ghê ghớm quá, không biết chìmèn có rờ cái nút Start của máy CNC thường xuyên không ? :21: Đầy đủ về G10 nè: [h=2]11. G10 L1 Set Tool Table[/h]
G10 L1 P- axes <R- I- J- Q->
- P - tool number
- R - radius of tool
- I - front angle (lathe)
- J - back angle (lathe)
- Q - orientation (lathe)
G10 L1 sets the tool table for the
P tool number to the values of the words.
A valid G10 L1 rewrites and reloads the tool table.
G10 L1 Example Line
G10 L1 P1 Z1.5 (set tool 1 Z offset from the machine origin to 1.5)G10 L1 P2 R0.015 Q3 (lathe example setting tool 2 radius to 0.015 and orientation to 3)
It is an error if:
- Cutter Compensation is on
- The P number is unspecified
- The P number is not a valid tool number from the tool table
- The P number is 0
For more information on cutter orientation used by the
Q word, see the
Lathe Tool Orientation diagram.
[h=2]12. G10 L2 Set Coordinate System[/h]
G10 L2 P- <axes R->
- P - coordinate system (0-9)
- R - rotation about the Z axis
G10 L2 offsets the origin of the axes in the coordinate system specified to the value of the axis word. The offset is from the machine origin established during homing. The offset value will replace any current offsets in effect for the coordinate system specified. Axis words not used will not be changed.
Program P0 to P9 to specify which coordinate system to change.
Table 1. Coordinate System
[TH="align: center"]P Value [/TH]
[TH="align: center"]Coordinate System [/TH]
[TH="align: center"]G code[/TH]
|
[TD="align: center"][/TD]
[TD="align: center"]Active
[/TD]
[TD="align: center"]n/a
[/TD]
|
[TD="align: center"]1
[/TD]
[TD="align: center"]1
[/TD]
[TD="align: center"]G54
[/TD]
|
[TD="align: center"]2
[/TD]
[TD="align: center"]2
[/TD]
[TD="align: center"]G55
[/TD]
|
[TD="align: center"]3
[/TD]
[TD="align: center"]3
[/TD]
[TD="align: center"]G56
[/TD]
|
[TD="align: center"]4
[/TD]
[TD="align: center"]4
[/TD]
[TD="align: center"]G57
[/TD]
|
[TD="align: center"]5
[/TD]
[TD="align: center"]5
[/TD]
[TD="align: center"]G58
[/TD]
|
[TD="align: center"]6
[/TD]
[TD="align: center"]6
[/TD]
[TD="align: center"]G59
[/TD]
|
[TD="align: center"]7
[/TD]
[TD="align: center"]7
[/TD]
[TD="align: center"]G59.1
[/TD]
|
[TD="align: center"]8
[/TD]
[TD="align: center"]8
[/TD]
[TD="align: center"]G59.2
[/TD]
|
[TD="align: center"]9
[/TD]
[TD="align: center"]9
[/TD]
[TD="align: center"]G59.3
[/TD]
|
Optionally program R to indicate the rotation of the XY axis around the Z axis. The direction of rotation is CCW as viewed from the positive end of the Z axis.
All axis words are optional.
Being in incremental distance mode (
G91) has no effect on
G10 L2.
Important Concepts:
- G10 L2 Pn does not change from the current coordinate system to the one specified by P, you have to use G54-59.3 to select a coordinate system.
- When a rotation is in effect jogging an axis will only move that axis in a positive or negative direction and not along the rotated axis.
- If a G92 origin offset was in effect before G10 L2, it will continue to be in effect afterwards.
- The coordinate system whose origin is set by a G10 command may be active or inactive at the time the G10 is executed. If it is currently active, the new coordinates take effect immediately.
It is an error if:
- The P number does not evaluate to an integer in the range 0 to 9.
- An axis is programmed that is not defined in the configuration.
G10 L2 Example Line
G10 L2 P1 X3.5 Y17.2
In the above example the origin of the first coordinate system (the one selected by
G54) is set to be X=3.5 and Y=17.2. Because only X and Y are specified, the origin point is only moved in X and Y; the other coordinates are not changed.
G10 L2 Example Line
G10 L2 P1 X0 Y0 Z0 (clear offsets for X,Y & Z axes in coordinate system 1)
The above example sets the XYZ coordinates of the coordinate system 1 to the machine origin.
The coordinate system is described in the
Coordinate System Section.
[h=2]13. G10 L10 Set Tool Table[/h]
G10 L10 P- axes <R- I- J- Q->
- P - tool number
- R - radius of tool
- I - front angle (lathe)
- J - back angle (lathe)
- Q - orientation (lathe)
G10 L10 changes the tool table entry for tool P so that if the tool offset is reloaded, with the machine in its current position and with the current G5x and G92 offsets active, the current coordinates for the given axes will become the given values. The axes that are not specified in the G10 L10 command will not be changed. This could be useful with a probe move as described in the
G38 section.
G10 L10 Example
T1 M6 G43 (load tool 1 and tool length offsets)G10 L10 P1 Z1.5 (set the current position for Z to be 1.5)G43 (reload the tool length offsets from the changed tool table)M2 (end program)
- See T & M6, and G43/G43.1 sections for more information.
It is an error if:
- Cutter Compensation is on
- The P number is unspecified
- The P number is not a valid tool number from the tool table
- The P number is 0
[h=2]14. G10 L11 Set Tool Table[/h]
G10 L11 P- axes <R- I- J- Q->
- P - tool number
- R - radius of tool
- I - front angle (lathe)
- J - back angle (lathe)
- Q - orientation (lathe)
G10 L11 is just like G10 L10 except that instead of setting the entry according to the current offsets, it is set so that the current coordinates would become the given value if the new tool offset is reloaded and the machine is placed in the G59.3 coordinate system without any G92 offset active.
This allows the user to set the G59.3 coordinate system according to a fixed point on the machine, and then use that fixture to measure tools without regard to other currently-active offsets.
It is an error if:
- Cutter Compensation is on
- The P number is unspecified
- The P number is not a valid tool number from the tool table
- The P number is 0
[h=2]15. G10 L20 Set Coordinate System[/h]
G10 L20 P- axes
- P - coordinate system (0-9)
G10 L20 is similar to G10 L2 except that instead of setting the offset/entry to the given value, it is set to a calculated value that makes the current coordinates become the given value.
G10 L20 Example Line
G10 L20 P1 X1.5 (set the X axis current location in coordinate system 1 to 1.5)
It is an error if: