Title: DDCSV Tool change instruction M6 expansion description [Print This Page] Author: ytliu Time: 2018-2-26 11:43 Title: DDCSV Tool change instruction M6 expansion description 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. Author: Lukasz Time: 2018-2-28 03:35
Hello ytliu,
It looks like command "G04P-1" does not work correctly (even with latest firmware).
I noticed that parameter P-1 is not recognised correctly and the program does not stop (I supose "-1" means that it should wait for infinity).
For other vaules of P (like P100) it works correctly.
But I think command "M0" can be used instead.
Regards
LukaszAuthor: ytliu Time: 2018-2-28 07:00
Sorry, there was a problem with the previous statement.
If the G04P-1 or M0 command appears in the program header, it will be ignored, so the question you said will appear.
T.nc can be written like this
M5
G04P-1
or
M5
M0
In this way, when executing M6, the spindle will be shut down first, and then the program will be suspended. When the start key is pressed again, the program will continue to execute.Author: Lukasz Time: 2018-2-28 14:52
Hello ytliu,
Great ! Now everything works correctly
And how about adding some popup window or comment on the screen with information which tool should be used. It would be helpfull for manual tool change.
As I saw it was also requested in one of the posts by user JPoepsel.
Is it possible to add such a feature in future version of the firmware?
Currently my postprocessor is adding a comment which tool should be used, but because of gcode line length shown on the screen the comment is not fully visible.