|
Last edited by ytliu In 2018-2-26 11:46 Editor
The user can write T.nc according to the actual demand and copy it to the system directory (/mnt/nand1-1/) to complete the extension definition of tool change instruction M6.
Example 1: Manual tool change while encountering M6 command in machining, T.nc is implemented as follows:
G04P-1; external pause
Example 2: Automatic Tool Changer, T.nc achieved as follows:
#1=105; In-line magazine first knife X position, set according to the actual situation
#2=50; The distance between each knife in the row magazine is set according to the actual situation
M05; Close the spindle
(The following is the retraction process)
IF [#592 <1] GOTO1; 592 variables for the current folder tool number, if less than 1, the description is empty knife, skip the retraction process, enter the folder knife process
G53 G00 G90 X[#1+[#592-1]*#2] Y2500 Z-126; Rapid traverse to the machine coordinate tool gate
G04 P5000; Pause until the spindle is completely stopped
G53 G00 G90 X[#1+[#592-1]*#2] Y2550 Z-126; Enter tool magazine
G04 P500; Pause to the holder on the holder
M08; Open the spindle tool change pneumatic valve
G04 P500; pause 0.5 seconds
G53 G00 G90 Z-20; raise the spindle
M09; Close the spindle tool change pneumatic valve
GOTO2
N1 G04 P5000; Pause until the spindle stops completely
(The following is the folder knife process)
N2 G53 G00 G90 X[#1+[#593-1]*#2] Y2500 Z-126; Rapid traverse to the machine coordinate tool gate
G53 G00 G90 X[#1+[#593-1]*#2] Y2550 Z-126; Enter tool magazine
G04 P500; Pause to the holder on the holder
M08; Open the spindle tool change pneumatic valve
G04 P500; pause 0.5 seconds
G53 G00 G90 Z-20; raise the spindle
M09; Close the spindle tool change pneumatic valve
G04P0; Synchronization
#592=#593; After the tool change is completed, the current tool number will be updated
Related instructions:
The #593 parameter is used to receive the tool number to be replaced. If the T3M6 instruction is executed, the system assigns 3 to #593.
#592 The parameter is the number of the currently used tool. When it is 0, it indicates that the tool is not currently installed.
|
|