Z-axis - 3 steppers - which gcodes?
Martin1454 last edited by
Hi there guys! - So im trying to build an setup where I use 3 independent lead screws, to home z axis (also using DC42's ir probe) -
The wanted outcome when I press "home all" is a sequence looking like:
(1) Home X, then Y
(2) move to the middle of the bed
(3) home z axis in the middle of the bed
(4)Lower the bed a few mm
(5) start 3 point levelling near the 3 lead screws
So my current Gcode looks like:
; homeall.g ; called to home all axes ; ; generated by RepRapFirmware Configuration Tool on Tue Jul 31 2018 15:05:50 GMT+0200 (Centraleuropæisk sommertid) M400; make sure everything has stopped before we make changes M574 X1 Y1 S3 ; M913 X30 Y30 ; XY motors to 30% current M915 X Y H400 S3 R0 F0 ; set X and Y to sensitivity , do nothing when stall, unfiltered ; X axis home G91 ; use relative positioning G1 Z5 F6000 S2 ; lift Z relative to current position G1 S1 X-405 F6000 ; move quickly to X axis endstop and stop there (first pass) G1 X5 F6000 ; go back a few mm G1 S1 X-405 F4000 ; move slowly to X axis endstop once more (second pass) ; Y axis home G1 S1 Y-305 F6000 ; move quickly to Y axis endstop and stop there (first pass) G1 Y5 F6000 ; go back a few mm G1 S1 Y-305 F4000 ; move slowly to Y axis endstop once more (second pass) G90 ; absolute positioning M913 X100 Y100; motor currents back to 100% ; Z-axis M561 ; Clear any bed transform G1 X104.5 Y173 ; Move Probe to middle of bed G32 ; Start 3-point probe sequence - Bed.g M375 P"bareplate.csv" ; Load heightmap G1 Z20.0 F6000 ; Move Z to 20 G1 X5 Y5 ; Move Head to front left
and my bed.g
; bed.g ; called to perform automatic bed compensation via G32 ; ; generated by RepRapFirmware Configuration Tool on Tue Jul 31 2018 15:05:50 GMT+0200 (Centraleuropæisk sommertid) M561 ; clear any bed transform M117 g28; G28 Z; G29 S2; Clear bed height map ; Probe the bed at 3 points G30 P0 X0 Y120 Z-9999 ; Front Right G30 P1 X320 Y47 Z-9999 ; Front Left G30 P2 X320 Y200 Z-9999 S3 ; Center Rear
Currently it is homing X Y more than once, and are feeling that it is not the optimal code - What do I need to change?
Also setup M671 X-50:363:363 Y164:239:315 S3 P2
You should be able to home X and Y simultaneously, see the wiki page on configuring RRF for a Cartesian printer.
What do you have in homez.g?
Martin1454 last edited by Martin1454
; homez.g ; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool on Tue Jul 31 2018 15:05:50 GMT+0200 (Centraleuropæisk sommertid) G91 ; relative positioning G1 Z5 F6000 S2 ; lift Z relative to current position G90 ; absolute positioning G1 X20 Y-27 F6000 ; go to first probe point G30 ; home Z by probing the bed ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 S2 ; lift Z relative to current position ;G90 ; absolute positioning
You are quick! -
Its an D-bot / COREXY with no endstops
EDIT: also DC42 - Now that we are talking - When defining steps per mm for the Z-axis, is there anything special for the 3 stepper z axis? Right now my settings are M92 X200 Y200 Z3200 E415:415 and my 500mm z axis maxes out for "80mm" on the display - I run 0.9 deg stepper with x16 steps and a 8mm acme screw with 2mm pitch?
OK, look at the wiki page on configuring RRF for a CoreXY printer then. You can start by homing X and Y simultaneously, then you can finish by homing them individually. You may need to back off slightly after homing them simultaneously in order to clear the stall status.
Is your leadscrew single start or multi start? 3200 steps/mm would be correct for a single start 2mm pitch leadscrew, assuming no gearing or 1:1 gearing between the motor and the leadscrew. If it isn't travelling as far as it should be, you may have binding in the Z axis or you may be trying to move it too quickly.
Martin1454 last edited by
ah- never though about my lead screw was a 4 "start" screw -
I don't have that much problems getting it to home X and Y, it's more Z im looking for help homing -
I just found out that the reason why it homes multiple times, was due to a setting in the homez.g
But getting the correct setup for the 3 lead screw plan calculation is more my concern - Is the g32 set up correct?
Thanks for the support.
Your bed.g file looks OK. Do you have a M671 command in config.g defining the positions of your leadscrews?