Tool change script for auto lifting nozzles
-
@adhanabal here is how i would approach this
a) write homing macros for U to A axis. This also has the advantage that all tools will go into inactive position when you home your machine. Make sure to understand that no tool has been selected and you will need to select at least one tool before printing.
b) in tfree0.g to tfree3.g, simply call the approriate homing sequence,
i.e. for tool 1 do "G28 V"c) in tpre0.g to tpre3.g, move the appropriate axis so that the nozzle is at the zero position. Instead of setting Z offset with G10 per tool, you could adjust the motion length here.
There are likely intricacies about this setup that I dont understand, but you should be getting some way with this approach.
Let us know how it works out!
-
@oliof sure thank you
-
@oliof Hi i added the following in S3d slicer tool change script and got the following result.
Tool change command
{IF NEWTOOL=0}G1 U15 F160 ; Take U to print position
{IF NEWTOOL=0}G1 V2 F160 ;Take V to not print position
{IF NEWTOOL=1}G1 U2 F160 ; Take U to not print position
{IF NEWTOOL=1}G1 V15 F160 ; Take V to print positionThe command works well, but the main problem is,
After executing this commands only the nozzle moves to the printing position,
But i want something like the following,- while changing tools , first it should move the second head to the print position and then lower the Lifting axis, any idea to do this?
-
@adhanabal your slicer should just emit T0 to T3, RRF handles what you want in the tpre/tpost/tfree macros.
-
@oliof okay thank you , let me try some codes in RRF in macros, and update you the results
-
@adhanabal said in Tool change script for auto lifting nozzles:
G1 U15 F160
@dc42 can you help on this?
-
@adhanabal OK, so,
for two tools, you need four (possibly 6, but four is enough for now):- tpre0.go to do things before the first toolhead is activated with T0
- tfree0.g to do things when the first toolhead is deactivated (either by calling another tool while T0 is active, or by deactivating all running T-1)
- tpre1.g to do things before the second toolhead is activated with T1
- tfree1.g to do things when the second toolhead is deactivated (either by calling another tool while T0 is active, or by deactivating all running T-1)
The other two are
- tpost0.g to do things after the first toolhead is activated
- tpost1.g to do things after the second toolhad is activated
just for moving the toolheads up and down I would do the following
tpre0.g:
; [other things people do in tpre scripts] G1 U15 F160
tfree0.g:
G28 U ; [other things people do in tfree scripts]
tpre1.g:
; [other things people do in tpre scripts] G1 V15 F160
tfree1.g
G28 V ; [other things do in tfree scripts]
The axis moves basically replace the Z lift and Z return commands in usual tool changer scripts. And that's about it.
to answer your question, about moving the toolhead to the right position:
For this at first you need to determine and set the tool offsets between the tools with G10. For your operation, it looks like the X offset would be (roughly) 0, and the Y offset is critical. Z offset could be set, or you adjust the axis move in your tpre scripts.
Second, you need to store the current position when disabling a tool,
and then restore the position when enabling another tool. you do this by addingG1 R2 X0 Y0 Z0
to your tpre files before lowering the print head (see R parameter description in the G1 documentation.It may be useful to re-read https://docs.duet3d.com/en/User_manual/Tuning/Tool_changing if you haven't already.
-
@adhanabal said in Tool change script for auto lifting nozzles:
@adhanabal said in Tool change script for auto lifting nozzles:
G1 U15 F160
@dc42 can you help on this?
With what, exactly?
@oliof has already explained the basics of what you should do in the tool change files.
-
@oliof said in Tool change script for auto lifting nozzles:
your tpre files before lo
thank you ill follow these
-
@oliof hi we can close this issue, I have done the settings in S3d itself, this is my tool change script in S3d and works fine.
{IF NEWTOOL=0}G1 V2 F160 ;Take V to not print position
{IF NEWTOOL=1}G1 U2 F160 ; Take U to not print position
T[new_tool] ; select new tool
G1 X[next_position_x] Y[next_position_y] F[xy_travel_speed]
{IF NEWTOOL=0}G1 U15 F160 ; Take U to print position
{IF NEWTOOL=1}G1 V15 F160 ; Take V to print position -
@adhanabal we'll close it if you like, but if that's working then you could have put similar commands in the tfree and tpost (or tpre) files instead, as @oliof suggested. Did you try that?
-
@dc42 Yes still fine tuning has to be done, i ll update here once done.
regards