Selecting a tool
-
I am having some odd behaviours during tool changing and would like to clarify a couple of things:
I can select to mount a tool in two different ways ... I can give a Gcode command (T0) or I can click on "Tool 0". I was under the impression both ways resulted in the same outcome but something is not going quite right and is possibly related to my lack of understanding of coordinate systems.
Suppose I have just unloaded tool #3 by pressing the Tool 0 button on DWC. The carriage moves to the location specified in T0pre.g and then performs the load and so on .... all fine.
If I do the same thing in a macro and use "T" commands and I am currently have tool T3 loaded and am calling for T0, the printer will unload T3 ok but instead of the carriage going to the T0pre.g designated coordinates, will travel in a diagonal line to a position much closer to the stored tools. The end result is a crash into the stored tools by the carriage.
My question is a two part-er:
Is there any difference between giving the command Tx compared to selecting Toolx in DWC?
Am I getting into trouble with the coordinate tool system somewhere in this tool change?This is my macro that crashes things:
T0
G0 x0 y0
G0 x300 y0
G0 x300 y300
T1
G0 x0 y0
G0 x300 y0
g0 x300 y300
T2
G0 x0 y0
G0 x300 y0
G0 x300 y300
;T3
;G0 x0 y0
;G0 x300 y0
;g0 x300 y300
;T3g0 x150 y150
-
I have done some more testing.
I have made a copy of t0free,t0post and t0pre and put them in the macro directory. I have written a simple macro:T0
G0 x300 y300
T-1This will crash the tool into parked tools as it does a diagonal move to a position much closer in y to the parked tools.
T0
G0 x300 y300
M98 P"/macros/T0pre.g"
M98 P"/macros/T0free.g"This does a move from x300 y300 to x-2 y295. It also confuses RRF as to tool status but it does store tool 0 without crashing into anything.
If I run the T0post macro it does weird things, possibly because RRF is confused.
Anyway, the key issue is that the first macro crashes the tool while the second one works as expected.
Can anyone explain to me why the first macro differs from the second macro in the actions from x300 y300 to storing the tool? -
T0free.g:
G91 ; Relative Mode. G1 Z2 ; Pop Z up slightly so we don't crash while traveling over the usable bed region. G90 ; Absolute Mode. G53 G0 X-2 Y285 F12000 ; Rapid to the back of the post. Stay away from the tool rack so we don't collide with tools. ; This position must be chosen such that the most protruding y face of the current tool ; (while on the carriage) does not collide with the most protruding y face of any parked tool. G53 G1 X-2 Y340 F6000 ; Controlled move to the park position with tool-0. (park_x, park_y) M98 P"/macros/tool_unlock.g" ; Unlock the tool G53 G1 Y300 F6000 ; Retract the pin.
T0pre.g:
G90 ; Ensure the machine is in absolute mode before issuing movements. G0 X-2 Y285 F20000 ; Rapid to the approach position without any current tool. G60 S0 ; Save this position as the reference point from which to later apply new tool offsets.
-
I only have single tool printers so I have not worked with the tool change features.
But, perhaps, when issuing a T command from within a .G file you need to have a M400 command after the T command to allow the T invoked file to finish?
Just guessing there.
Frederick
-
Never thought about a delay .... it's something to test.
Thanks -
As it turned out, the problem was in my Tfree/post/pre files. I did not understand one position parameter correctly when I set those files up for my printer.
I still don't understand why some operations bypassed this wrong information but hey, it now works as expected.