Mapping Z to U or another axis
-
Greetings!
I've built a custom machine with two Z axes, not the type that is used for bed leveling, my machine is setup as a cartesian XYZ machine, with an extra Z axis, mounted on the X axis.
X normal x axis
Y normal y axis
Z left Z axis with it's own extruder
U right Z axis with it's own extruderM563 has a mapping parameter, from X or Y to UVWABC for multiple XY machines, but it doesn't seem to work for mapping Z to anything else.
I found this post: https://forum.duet3d.com/topic/30186/map-z-axis-to-v-axis
The post clarifies the numbering of axes, it does not give feedback as to whether or not you can map Z to VI just tried with this line:
M563 P1 D1.2 H1 Z3 F1 S"RIGHT XYU"
I'm assuming it is ignoring the Z parameter, it's not throwing an error or warning, but appears to be ignoring it. Because the Z axis moves during a print with Tool 1 selected, not the U axis.
Is there a way to map Z movements to U or another axis, when Tool 1 is selected?
thanks for any tips!
-
@oribotic No, M563 doesn't support remapping Z; there is no Z parameter in M563.
There have been some other projects with two separate Z axes, each with its own extruder or tool; search for 'Zidex' https://forum.duet3d.com/search/?term=zidex&in=titlesposts or there is a paste extruder https://forum.duet3d.com/topic/7590/interested-in-using-two-z-axes. There are probably others. How you want the motion to work will depend how you set it up. @dc42's suggestion in the second link is by:
using M584 commands in the tool change files. You would assign both motors to Z, also assign the individual motors to U and V axes, but hide the U and V axes using the P parameter in the M584 command. When selecting a tool, un-hide U and V, move U or V down a few mm to lower the tool, then hide U and V again. When freeing a tool, do the same except move U or V up the same distance.
Ian
-
This post is deleted! -
@droftarts thanks for clarifiying. It's as I suspected, no handling for Z parameter. But wow! nice simple solution, that sure beats spending the months I'd sink into hacking the firmware.
As far as I understand, it's like this:
Define XYZUV in config.g
Z as dual, and U and V using the same drive numbers as ZM584 X0 Y1 Z2:3 U2 V3 E4:5 ; set drive mapping
During printing: both Z axes move at the same time. U/V are hidden with the P parameter of M584 command:
M584 P3 ; show 3 axes > XYZ, hide UV
At Tool Change: U/V are revealed and can move independently, with command:
M584 P5 ; show 5 axes > XYZUV, reveal UV
While revealed, position U/V up from, or down onto, the printing plane, then hide UV again for printing.
Homing: I'm thinking I'll need to home with U & V visible, then the first tool change will lift the other. I'll try it out and see what works best.
So glad there's some other two z axes trailblazers out there!
Thanks for the advice. I'll give it a go in the morning...
-
@droftarts ok it works amazingly!
just got homing working nicely, I home U, home V and then home Z
U & Z share the same probe and V has an additional probe.One thing though, I don't understand the reason behind hiding the U and V axes.
Because during a tool change for tool 0
; tool 0 pre change script G1 H2 U0 F6000 ; put u in zero position G1 H2 V5 F6000 ; lift V out of the way
and then tool change for tool 1
; tool 1 pre change script G1 H2 V0 F6000 ; put V in zero position G1 H2 U5 F6000 ; lift U out of the way
As long as the U & V are homed correctly, when either of the U or V axes are at 0, they are at on the current z value.
anyway, about to to test some prints
thanks so much for your quick assistance.
Is the ZIDEX printer your project? A great project, lots of work and very handy source of information on independent Z axes!