Gcode For Left Extruder

264 views
Skip to first unread message

cageyb...@gmail.com

unread,
Aug 13, 2016, 11:53:09 AM8/13/16
to Makerbot Users
I am setting up the S3D scripts for my Wanhoa 4S (equivalent to the Makerbot Replicator 2X). Everything working fine for the default right extruder.

Could someone please advise the Gcode script I need in order to purge filament for the left extruder? I have 'G1 E25 F300' for the right extruder, and appending 'T1' for tool 1 doesn't seem to do what I thought.

Thanks.

Mark Walker

unread,
Aug 13, 2016, 12:21:03 PM8/13/16
to Makerbot Users
There is a wanhoa Google group.

Your printer is a clone of a Replicator 1 Dual with an upgraded metal frame, not an R2x.

Since S3D uses GPX to convert gcode to x3g, T1 on a line by itself will switch to the right extruder. Put that before your G1 extrusion line.

It'll need to be up to temperature first and if this is for a control button you'll want to be in relative coordinate mode or at least have the absolute coordinate defined via G92.

Daniel Newman

unread,
Aug 13, 2016, 12:22:36 PM8/13/16
to Makerbot Users
On 13/08/2016 8:53 AM, cageyb...@gmail.com wrote:
> I am setting up the S3D scripts for my Wanhoa 4S (equivalent to the Makerbot Replicator 2X).

Actually, it is equivalent to the MakerBot Replicator 1. That is, it is a clone of the Replicator 1.
It is not a clone of the Replicator 2 series: entirely different electronics requiring an entirely
different firmware build. There's other differences as well but they do not manifest at the gcode
level (fortunately).

> Could someone please advise the Gcode script I need in order to purge filament for the left extruder?
> I have 'G1 E25 F300' for the right extruder, and appending 'T1' for tool 1 doesn't seem to do what I thought.

You have to select tool 1 first. Particularly before motion commands. Depending upon how you are generating
the X3G for the printer, how you do this will vary. I don't recall offhand the correct M code to use
for MakerWare/Desktop. For RepG it's

M108 T1

For anything using GPX to generate the X3G you can use either M108 T1 or just T1. And, of course, you
want to heat up T1 first. Moreover, you generally need to let the slicer know the correct machine
profile (Replicator 1 dual) so that it generates the correct X3G to use either T0 or T1 and not just
T0.

Dan

Caghey Bear

unread,
Aug 14, 2016, 1:10:55 AM8/14/16
to makerbo...@googlegroups.com
>There is a wanhoa Google group.

Thanks for that. I wasn't aware but will go find.

>Your printer is a clone of a Replicator 1 Dual with an upgraded metal
frame, not an R2x.

My bad. As a previous owner of an R2X the Wanhoa 4S looked like a clone
of the 2X so putting 2 and 2 together I ended up with the proverbial 3.

> Since S3D uses GPX to convert gcode to x3g, T1 on a line by itself will switch to the right extruder. Put that before your G1 extrusion line.
>
> It'll need to be up to temperature first and if this is for a control button you'll want to be in relative coordinate mode or at least have the absolute coordinate defined via G92.
Again, thanks.

Caghey Bear

unread,
Aug 14, 2016, 1:12:27 AM8/14/16
to makerbo...@googlegroups.com
Thanks Dan.

Cagey Bear

unread,
Aug 21, 2016, 4:39:01 AM8/21/16
to makerbo...@googlegroups.com
> You have to select tool 1 first. Particularly before motion commands.

I'm obviously doing something wrong. Herewith the starting script -
there is some stuff before this (including heating the left extruder and
HBP) but here's where I am trying to command the left nozzle (T1) to
extrude filament:

G92 A0 B0 ; zero extruders
T1
G1 Z0.4 ; position nozzle
G1 E25 F300 ; purge nozzle
G1 X-115 Y-60 Z0.15 F1200 ; slow wipe
G1 X115 Y-60 Z0 F1200
G1 X115 Y-60 Z0 F1200 ; lift
G92 A0 B0 ; zero extruders
M73 P1 ;@body (notify GPX body has started)
; **** end of start.gcode ****

The short delay where the extruder is supposed to be purging filament
happens. Then it drags across the HBP, and then starts printing with the
left nozzle.

No filament is purged. I think it MIGHT be purging the right nozzle
(which is currently inoperative due to a technical issue), which is why
I am trying to purge the left.

I'm forced to print a skirt around the object - the filament starts
coming out about halfway round the skirt.

Mark Walker

unread,
Aug 21, 2016, 10:16:33 AM8/21/16
to Makerbot Users
You might be hitting a bug in the GPX that comes with simplify3d. If you Upload a complete gcode file somewhere and paste a link here, I could take a look.

What comes before your snippet is important. Particularly because of two things: G92 gets expanded to all axes because x3g demands it, GPX also send absolute X Y Z coordinates whenever possible for G1 and G0.

Jetguy

unread,
Aug 21, 2016, 6:07:33 PM8/21/16
to Makerbot Users
Thanks for that explanation, I saw just such a G92 warning from the Octoprint plugin and it wasn't a "verbose" explanation. G92 zeroing of extrusion lengths is common in startup gcode. In fact, that's default in most replicator and replicator clone profiles in S3D.
Again, that situation was a user was slicing with S3D, not using the S3D produced X3G, but rather, sending the gcode to Octoprint and letting the GPX plugin stream it.

Just saying, I saw this fault in a similar way, all due to how GPX handles G92.

Jetguy

unread,
Aug 21, 2016, 6:10:02 PM8/21/16
to Makerbot Users
More or less standard gcode that S3D provides in default profiles for Replicator clones
; **** Duplicator 4 single start.gcode ****

M73 P0 ; enable build progress

G162 X Y F3000 ; home XY maximum

G161 Z F1200 ; home Z minimum

G92 Z-5 ; set Z to -5

G1 Z0 ; move Z to 0

G161 Z F100 ; home Z slowly

M132 X Y Z A B ; recall home offsets

G1 X-120 Y-70 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

G92 A0 ; zero extruder

G1 Z0.4 ; position nozzle

G1 E25 F300 ; purge nozzle

G1 X-115 Y-65 Z0.15 F1200 ; slow wipe

G1 X-110 Y-60 Z0.5 F1200 ; lift

G92 A0 ; zero extruder

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

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



Mark Walker

unread,
Aug 21, 2016, 8:49:49 PM8/21/16
to Makerbot Users
That _should_ work ok though it does leave the other extruder ambiguously set.  For those G92's X Y and Z are known due to the earlier G1 X-120 Y-70 Z30 F9000, but B is still ambiguous.

If it were me, I'd probably adjust this start gcode slightly:

* Change the G92 Z-5 to G92 X0 Y0 Z-5 A0 B0.  That's just to be explicit about what GPX will have to do under the covers.
* Then change the M132 X Y Z A B to M132 X Y Z because stored offsets for A and B aren't really useful and here just serve to confuse the host (since it doesn't know what those offsets are)

Also, I'd change the G130 X127 Y127 Z40 A127 B127 to G130 X118 Y118 Z40 A118 B118 because I believe those are the actual default vrefs for a mightyboard.
Reply all
Reply to author
Forward
0 new messages