G-Code, homing a replicator Dual on latest SailFish

42 views
Skip to first unread message

Martin Bogomolni

unread,
Mar 30, 2015, 9:24:37 AM3/30/15
to jetty-firmware

Because I have modified my printhead, added a borosilicate glass plate, and replaced the printing bed heater with the machined aluminum one ... the standard replicator homing and pre-execution script doesn't quite work because when it does a Z-homing, the printhead collides with the handles on the glass plate.

What I would like to do is first home X/Y, move the head to the center of the plate, then home Z.  Then follow this by moving to the "parking" position, heat the bed and head, and finally do the long "smear" extrusion before beginning the main printing task.

When I modified the script, the machine doesn't move as I expect it to.   The X/Y homing occurs, then the G4 is ignored and the machine never dwells or waits at all .. and then it goes to the middle of the plate, homes Z .. and then proceeds to try to move off the plate completely and go beyond the limits of the axes when moving to the "parking/heating" position.

I've pasted the script as I've modified it.   Help with debugging?

-----------

; **** Replicator 1 start.gcode ****

M103 ; disable RPM

M73 P0 ; enable build progress

G21 ; set units to mm

G162 X Y F2500 ; home XY maximum

G4 P1000 ; wait a second

G1 X0 Y0 F100 ; Move to the center of the platform, slowly

G161 Z F1200 ; home Z minimum

G92 Z-5 ; set Z to -5

G1 Z0 F1000; move Z away from the endstop

G161 Z F100 ; home Z slowly

M132 X Y Z A B ; recall home offsets

M135 T0 ; load right extruder offsets

G1 X-50 Y-50 Z30 F9000 ; move to wait position off table

G130 X20 Y20 Z20 A20 B20 ; lower stepper Vrefs while heating

M126 S[fan_speed_pwm]

M140 S[bed0_temperature] T0

M134 T0 ; stabilize bed temperature

M104 S[extruder0_temperature] T0

M133 T0 ; stabilize extruder temperature

G130 X127 Y127 Z40 A127 B127 ; default stepper Vrefs

G1 F3600; Set speed for tool change

M135 T0; Change to different tool

G1 X100.000 Y-65.000 Z0.270 F6000.000 (Extruder Prime Dry Move)

G1 X-100 Y-65 Z0.270 F1800.000 E25.000 (Extruder Prime Start)

G92 A0 B0 (Reset after prime)

G1 Z0.000000 F1000

G1 X-100.0 Y-65.0 Z0.0 F1000 E0.0

G92 E0

G1 X-100.000 Y-65.000 Z0.000 F1200 A-1.00000; Retract

G1 X-100.000 Y-65.000 Z0.200 F1380; Travel move

M73 P1 ;@body (notify GPX body has started)

; **** end of start.gcode ****

Dan Newman

unread,
Mar 30, 2015, 10:35:36 AM3/30/15
to jetty-f...@googlegroups.com
You need to recall the X & Y home offsets after you home X & Y and before
you command any motion along the X and Y axes.

> -----------
>
> ; **** Replicator 1 start.gcode ****
>
> M103 ; disable RPM
>
> M73 P0 ; enable build progress
>
> G21 ; set units to mm
>
> G162 X Y F2500 ; home XY maximum
>
> G4 P1000 ; wait a second
>
> G1 X0 Y0 F100 ; Move to the center of the platform, slowly

The position 0,0 is undefined. All you've done is homed. But
that doesn't mean that the printer's idea of what it's current
X & Y coordinates are agree with the center of the platform being
(0,0). You need to recall the X and Y home offsets for that to
be the case.


> G161 Z F1200 ; home Z minimum
>
> G92 Z-5 ; set Z to -5
>
> G1 Z0 F1000; move Z away from the endstop
>
> G161 Z F100 ; home Z slowly

> M132 X Y Z A B ; recall home offsets

This defines the current position in (x,y,z,a,b) space to be that
stored in EEPROM. That's fine for Z since it is presently homed.
It's fine for A and B since this always just sets them to 0 and 0.
However, as you've moved X and Y to unknown locations they will
continue to have effectively unknown positions.

Dan

Martin Bogomolni

unread,
Mar 30, 2015, 11:20:02 AM3/30/15
to jetty-firmware

I see.  So I've misunderstood what M132 is for, I think.    The following edit should correct the situation then?   

I've added an M132 X Y right after homing the X Y axis, but before the pause.
I've added a M132 Z A B after homing Z.

-Martin

---

; **** Replicator 1 dual start.gcode ****

M103 ; disable RPM

M73 P0 ; enable build progress

G21 ; set units to mm

G162 X Y F2500 ; home XY maximum

M132 X Y ; recall X/Y offsets before moving

G4 P1000; wait one second

G1 X0 Y0 F100 ; Move to the center of the platform, slowly

G161 Z F1200 ; home Z minimum

G92 Z-5 ; set Z to -5

G1 Z0 F1000; move Z away from the endstop

G161 Z F100 ; home Z slowly

M132 Z A B; recall home offsets

M135 T0 ; load right extruder offsets

G1 X-50 Y-50 Z30 F9000 ; move to wait position off table

G130 X20 Y20 Z20 A20 B20 ; lower stepper Vrefs while heating

M126 S[fan_speed_pwm]

M140 S[bed0_temperature] T0

M134 T0 ; stabilize bed temperature

M104 S[extruder0_temperature] T0

M133 T0 ; stabilize extruder temperature

G130 X127 Y127 Z40 A127 B127 ; default stepper Vrefs

G1 F3600; Set speed for tool change

M135 T0; Change to different tool

G1 X100.000 Y-65.000 Z0.270 F6000.000 (Extruder Prime Dry Move)

G1 X-100 Y-65 Z0.270 F1800.000 E25.000 (Extruder Prime Start)

G92 A0 B0 (Reset after prime)

G1 Z0.000000 F1000

G1 X-100.0 Y-65.0 Z0.0 F1000 E0.0

G92 E0

G1 X-100.000 Y-65.000 Z0.000 F1200 A-1.00000; Retract

G1 X-100.000 Y-65.000 Z0.200 F1380; Travel move

M73 P1 ;@body (notify GPX body has started)

; **** end of start.gcode ****




Dan

--
You received this message because you are subscribed to the Google Groups "Jetty Firmware" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jetty-firmware+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dan Newman

unread,
Mar 30, 2015, 11:37:01 AM3/30/15
to jetty-f...@googlegroups.com
On 30/03/2015 8:19 AM, Martin Bogomolni wrote:
> I see. So I've misunderstood what M132 is for, I think. The following
> edit should correct the situation then?

I've not looked through the gcode in its entirety (let alone tried it).
However, that was at least one issue with the gcode which needed to be
corrected.

Dan


Reply all
Reply to author
Forward
0 new messages