How to use Cura and GPX with Replicator 1 - Dual - With Heatbed?

4,325 views
Skip to first unread message

Lars Christensen

unread,
Nov 10, 2013, 4:48:08 AM11/10/13
to gpx-co...@googlegroups.com
Hi everybody.

Could you help me here.
Im really stuck in using Cura with GPX on my Replicator 1 - Dual, with heatbed.
I cant seem to turn on the heatbed.
The GPX is saying "Semantic Warning M190 cannot select an non existant heat build platform"
What to do?:-)

Lars

Bill Culverhouse

unread,
Nov 10, 2013, 11:07:09 AM11/10/13
to gpx-co...@googlegroups.com
I don't have a replicator (I use a cupcake and an Ultimaker)
The m190 is added by cura to turn on the heatbed.
My cupcake doesn't use m190 for the heatbed it uses M109
which is what Cura/Marlin wants to use for heat and wait (The extruder).

Seems like this is a gcode standard mismatch between marlin and the
Makerbot firmwares. I disable the Cura heatbed options and just add the
right things to the start.gcode.

This means to change the bed temp you change it in the start.gcode not
the heatbed temp setting box. And either set that to 0 or uncheck "heatbed"
in the machine settings in Cura.

That's how I do it. There may be a more correct answer.

Lars Christensen

unread,
Nov 10, 2013, 1:46:30 PM11/10/13
to gpx-co...@googlegroups.com
I get youre point.
 
i copy/pasted "M109 S60 T0 (set HBP temperature)" into the  start.gcode.
And i did uncheck the heatbed temp box.
But when i start the printer it warms up my extruder to 60 degrees instead of the heatbed.
The extruder should be warmed up to 230degrees!
The heatbed stays Cold!
 
You can see the start.gcode below.
 
;Sliced at: {day} {date} {time}
;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
;Print time: {print_time}
;Filament used: {filament_amount}m {filament_weight}g
;Filament cost: {filament_cost}
;**** Replicator 2 start.gcode ****
M70 P0 ;Cura {layer_height}mm profile @{travel_speed}mm/s
M103 ; extruder off
M73 P0 ; start build progress
M109 S60 T0 (set HBP temperature)
M104 T0 S230 {print_temperature}  ;set extruder temperature
;**** begin homing ****
G162 X Y F3000 ; home XY maximum
G161 Z F1200 ; home Z minimum
G92 Z-5 ; set Z to -5
G1 Z0.0 ; move Z to 0
G161 Z F100 ; home Z slowly
M132 X Y Z A B ; load current position from EPROM
;**** set G10 offset ****
G10 P1 X-140 Y-75 ; set local offset for Cura
G54 ; enable G10 offset
;**** end homing ****
G1 X-5 Y0 Z50 F9000 ; move to wait position off table
G130 X20 Y20 Z20 A20 B20 ; lower stepper Vrefs while heating
M70 P1 ;please wait...
M133 T0 ; wait for extruder to warm up
G130 X127 Y127 Z40 A127 B127 ; default stepper Vrefs
G1 Z0.4 ; position nozzle
M108 R5.0 ; set extruder speed
M101 ; start extruder
G4 P3500 ; purge nozzle
G1 X0 Y5 Z0.15 F1200 ; slow wipe
G1 X5 Y10 Z0.27 F1200 ; lift
M103 ; stop extruder
M73 P1 ;@body (notify GPX body has started)
;**** end of start.gcode ****
 
Do you see where the problem is?
 
Lars

Wingcommander (whpthomas)

unread,
Nov 10, 2013, 8:32:26 PM11/10/13
to gpx-co...@googlegroups.com
Sorry for being a bit slow to respond, I was away from home at a conference over the past weekend.

I have a Replicator 2 with Botleworks HBP. Here is my Cura start.gcode. I have highlighted in RED the positioning values you will need to update to make this work on other Makerbot 3D printers with different bed sizes.

;Sliced at: {day} {date} {time}
;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
;Print time: {print_time}
;Filament used: {filament_amount}m {filament_weight}g
;Filament cost: {filament_cost}
;**** Replicator 2 start.gcode ****
; WARNING - THIS WILL ONLY WORK WITH GPX
M73 P0 ;Wingcommander's Cura profile {layer_height}mm @{travel_speed}mm/s
M103 ;turn extruder off
;**** begin homing ****
G162 X Y F2500 ;home XY axes maximum
G161 Z F1100 ;home Z axis minimum
M132 X Y Z A B ;load current position from EPROM for XYZAB axis
G1 X140 Y75 Z30 F4000 ;move to holding position
;**** wait for temp ****
M70 P1 ;please wait...
G130 X20 Y20 Z20 A20 B20 ;lower stepper Vrefs while heating
M140 T0 S{print_bed_temperature} ;set bed temperature
M190 T0 ;wait for bed to reach temperature
M104 T0 S{print_temperature} ;set extruder temperature
M116 T0 ;wait for extruder to reach temperature
G130 X127 Y127 Z40 A127 B127 ;set stepper motor Vref to defaults
;**** precision homing ****
G161 Z F1100 ;home Z axis minimum
G92 Z-5 ;set Z to -5
G1 Z0.0 ;move Z to "0"
G161 Z F100 ;home Z axis minimum slowly
M132 Z ;load current position from EPROM for Z axis
;**** pre-prime ****
G1 Z30 F4000 ;drop build plate
G1 X-148 Y-75 ;move to start position
G1 Z0.5 ;position nozzle
G92 E0 ;zero extrusion position
G1 E2 F1200 ;prime (for nylon and pla)
G92 E0 ;zero extrusion position
M108 R5.0 ;set extruder to 5 RPM
M101 ;start extruder
G4 P3000 ;pre-prime extruder
G1 X-135 Y-70 Z0.2 F1100 ;do a slow wipe...
G1 Z0.5 ;...and lift
;@body (marks gcode body for GPX macros)
;**** GCODE_START ****

Here is my end.gcode

;**** GCODE_END ****
G92 E0 ;zero extrusion position
G1 E-2 F1200 ;suck (for nylon and pla)
M73 P100 ;end build progress
G0 Z155 F1000 ;drop Z axis to bottom of machine
M18 ;disable stepper
M104 S0 T0 ;cool down extruder
G162 X Y F2500 ;home XY endstops
M18 ;disable stepper motors
M70 P5 ;We <3 Making Things!
M72 P1 ;play Ta-Da song

Lars Christensen

unread,
Nov 11, 2013, 3:44:11 AM11/11/13
to gpx-co...@googlegroups.com
It seems to work, Thank you.

One more question.
I have changed the pulley diameter of the extruder wheel.
Do you know where to change the diameter or step pr.mm value.
I don't like just increase the flow %

Lars

Wingcommander (whpthomas)

unread,
Nov 11, 2013, 7:38:55 AM11/11/13
to gpx-co...@googlegroups.com
So it seems like you need to create a custom machine definition. There have been previous discussions on this topic you can read here http://groups.google.com/forum/#!topic/gpx-converter/66t_bpfCqW4

However to answer your specific question you can just add the following lines to the gpx.ini file located in the same folder as the executable (make sure the printer definition comes first as GPX alters configuration data sequentially).

[printer]
; Replicator 1 - single extruder
machine_type=
r1d
gcode_flavor=makerbot

[x]
steps_per_mm=96.275201870333662468889989185642

[y]
steps_per_mm=
96.275201870333662468889989185642

Lars Christensen

unread,
Nov 11, 2013, 7:49:41 AM11/11/13
to gpx-co...@googlegroups.com
I dont understand why it is named X and Y?
As i understand it the extruder is named A and B or am i completely wrong?
Teach me here:-)

Should i just be pasted into the gpx.ini in the top - after [printer]:?

Lars

Lars Christensen

unread,
Nov 11, 2013, 8:00:22 AM11/11/13
to gpx-co...@googlegroups.com
Just to be sure that you understand my first question right, it is the wheel that is driving the filament that  i have made smaller.
It is now ø6,5 instead of approx ø10,8.
So i need to change that value someplace.

Im kind of newbie here, so have a little patience:-)

Andrew Plumb

unread,
Nov 11, 2013, 8:05:26 AM11/11/13
to gpx-co...@googlegroups.com
Have a look in the various *.ini files attached to messages in the thread that Wingcommander linked to:


You'll see the full context, including the "[a]" and "[b]" entries for extruders.

Andrew.

--

"The future is already here.  It's just not very evenly distributed" -- William Gibson

Me: http://clothbot.com/wiki/



signature.asc

Lars Christensen

unread,
Nov 11, 2013, 8:43:27 AM11/11/13
to gpx-co...@googlegroups.com
Thanks for your reply Andrew.

My problem is that i come from ReplicatorG and i am trying to figure out how this Cura works and which files are doing what?
Im not quite sure where to put the (a) and (b) entries.

In ReplicatorG it was a replicator.xml file that i just edited to change the (a) (b) entries!

When i installed the GPX plugin i also installed a "GPX-Cura-Profile.ini" in the cura\ folder.
As i understand this is the machine definition file or what?
Shouldn't the (a) and (b) entries be dropped into this file?
If it is so why doesn't it already contain the (a) and (b) entries?

There is also a GPX.ini 
What do i use it for and what does it do?

Hope you will take take time to answer all my question.

Lars 

Wingcommander (whpthomas)

unread,
Nov 11, 2013, 9:08:13 AM11/11/13
to gpx-co...@googlegroups.com
My problem is that i come from ReplicatorG and i am trying to figure out how this Cura works and which files are doing what?
Im not quite sure where to put the (a) and (b) entries.

The extruders are referred to as A (right) and B (left). So these headings are used to define their properties.
 
In ReplicatorG it was a replicator.xml file that i just edited to change the (a) (b) entries!

GPX looks for a gpx.ini file to be installed in the same folder as the program. If you add a machine definition in the gpx.ini you should leave the machine definition on the command line blank.

Wingcommander (whpthomas)

unread,
Nov 11, 2013, 9:19:00 AM11/11/13
to gpx-co...@googlegroups.com
There is an example machine definition here https://github.com/whpthomas/GPX

There are steps_per_mm values for x,y,z,a,b axes, so you just need to update the ones that you have changed from the stock configuration.

Lars Christensen

unread,
Nov 11, 2013, 9:21:03 AM11/11/13
to gpx-co...@googlegroups.com
I have attached the GPX.ini file where i have pasted the definiton for my extruder A and B.
The steps pr.mm is 169
 
As my extruder/filament Wheel is made ø6,5mm instead of 10,8 i need more steps.
 
Is this correctly done.
 
Please look into the file.
Thanks.
 
Lars 
gpx.ini

Lars Christensen

unread,
Nov 11, 2013, 10:29:46 AM11/11/13
to gpx-co...@googlegroups.com
Just to get it right.

"GPX-Cura-Profile.ini" is this file the machine definiton?
Can i use the "r2h-machine.ini" that you uploaded instead of "GPX-Cura-Profile.ini"
If not, what is the difference then?

How do i load the machine definition into cura?

Am sorry to bother you with all these questions, but i dont know much about how this works!
Hope its ok.

Thanks again.

Lars.

Wingcommander (whpthomas)

unread,
Nov 11, 2013, 10:00:19 PM11/11/13
to gpx-co...@googlegroups.com
Am sorry to bother you with all these questions, but i dont know much about how this works!

OK, first thing to make clear here is that Cura takes your STL file and slices it and outputs a GCODE file. GPX then converts the GCODE file to and X3G file that Makerbot printers need in oder to print. Cura needs to be set up to output GCODE that is compatible with Makerbot printers. Cura also needs to be set up to run GPX as a post processor.

In the Cura file menu there is an option to Load and Save a Cura slicer profile. It just so happens that Cura uses the ini file format to store these profiles. GPX uses the same file format, however that does not mean that the files are compatible. They are just text files containing a lists of parameters, organised into sections, formatted according to the ini file specification.

So if you have a Cura profile, you load that into Cura using the file menu. If you have a GPX configuration file, you need to set up GPX to load it then it is run. GPX is a command line utility, so if you open a terminal window and type /program_path/gpx (mac) or C:\program_path\gpx.exe (windows), where program_path is the path where you installed GPX like /Applications/GPX, then GPX will print out the following:

Usage: gpx [-dgprsvw] [-f F] [-x X] [-y Y] [-z Z] [-m M] [-c C] IN [OUT]

Options:

-d simulated ditto printing
-g Makerbot/ReplicatorG GCODE flavor
-p override build percentage
-r Reprap GCODE flavor
-s enable stdin and stdout support for command pipes
-v verose mode
-w rewrite 5d extrusion values

F is the actual filament diameter

X,Y & Z are the coordinate system offsets for the conversion

X = the x axis offset
Y = the y axis offset
Z = the z axis offset

M is the predefined machine type

c3  = Cupcake Gen3 XYZ, Mk5/6 + Gen4 Extruder
c4  = Cupcake Gen4 XYZ, Mk5/6 + Gen4 Extruder
cp4 = Cupcake Pololu XYZ, Mk5/6 + Gen4 Extruder
cpp = Cupcake Pololu XYZ, Mk5/6 + Pololu Extruder
t6  = TOM Mk6 - single extruder
t7  = TOM Mk7 - single extruder
t7d = TOM Mk7 - dual extruder
r1  = Replicator 1 - single extruder
r1d = Replicator 1 - dual extruder
r2  = Replicator 2 (default config)
r2h = Replicator 2 with HBP
r2x = Replicator 2X

C is the filename of a custom machine definition (ini)

IN is the name of the sliced gcode input filename

OUT is the name of the x3g output filename

Examples:
gpx -p -m r2 my-sliced-model.gcode
gpx -c custom-tom.ini example.gcode /volumes/things/example.x3g
gpx -x 3 -y -3 offset-model.gcode

This provides some basic command line usage information. So for example, to convert example.gcode into an x3g file for a stock single extruder Replicator 1 we would type:

/program_path/gpx -p -m r1 example.gcode

After running the command, we would find example.x3g in the current directory.

In order to convert GCODE into the X3G format, GPX needs a machine definition. This is because in the X3G file, all movements in mm have are converted to steps - specific to the machine. If you have a non-standard machine, then you need to provide a custom machine definition for GPX to make the correct conversion. Fortunately, GPX has machine definitions for all the stock Makerbot printers, and its fairly easy for me to add new ones for any new printers.

The best strategy for a non-stock printer, is to load the stock machine definition and then override the variables that have changed. In your case, load the stock Replicator 1 machine definition and then update the steps_per_mm variables for parts you have changed. However there is more than one way to do this, and you need to understand how GPX prioritises configuration information. First it loads the gpx.ini file located in the program directory. Next it interprets any command line flags. Finally it loads any custom machine definition that has been specified with the -c flag on the command line.

The problem is that if you define a machine in the gpx.ini file, and then again on the command line - the command line definition will clobber the one in the gpx.ini file. For this reason, it best to define everything in the the gpx.ini file, and leave the command line blank - except for the file name.

One other point is that ini parameters appear in sections, so the semantic organisation is important see http://en.wikipedia.org/wiki/INI_file. In your case, your gpx.ini file only needs to contain the following.

[printer]
machine_type=r1d
gcode_flavor=makerbot
build_progress=1

[a]
steps_per_mm=
169

[b]
steps_per_mm=169

Finally - and this is important - in the GPX plug-in window leave the machine type blank. This way the machine definition in your gpx.ini file will take priority.

cura-gpx.png

Lars Christensen

unread,
Nov 12, 2013, 2:07:12 AM11/12/13
to gpx-co...@googlegroups.com
Hey Wingcommander

Thanks a lot for taking your time an explaining how it all works.
I really appreciate it!
Here in Denmark there isn't so many who knows about this 3D printer stuff.
Anyway - here is what i did:

I copy/pasted this:

[printer]

machine_type=r1d
gcode_flavor=makerbot

build_progress=1

[a]
steps_per_mm=169

[b]
steps_per_mm=169

Into the GPX.ini.
It now only contains this information, everything else inside the file is deleted!

I also copy/pasted the start.gcode and end.gcode into cura that you send yesterday.
I did change the values regarding the X and Y axis.

I loaded the profile "GPX-Cura-Profile.ini" that you provided in the first place into cura.
(I did also try to use the "r2h-machine.ini" that you also provided in another context.)

The GPX path looks so:
C:\Users\lch\Desktop\Cura\gpx
I copied the GPX converter folder into a folder inside Cura just to keep it together.
So this points to the folder that contains the GPX.exe and the GPX.ini.

I leave the text field "machine type" blank.

I now load a .stl into cura and the gpx pluging runs a little while, shows a terminal window with a lot of text.
Cant see what it says as it disappears pretty quickly.
So now i would expect to see a .x3g file in the same directory that contains the loaded .stl file.

But nothing happends.

Am i all wrong?

Lars Christensen

unread,
Nov 12, 2013, 1:51:05 PM11/12/13
to gpx-co...@googlegroups.com
And the last one before bedtime.

How to get the best prime/deprime in Cura.
I do have sailfish 7.5 firmware on my rep1, so i guess i could use the one embedded in the firmware, but ive tried that once and got the best result by using the Dimension plugin in RepG.
I been using" Retraction distance 0.5" and "Restart extra distance 0.1".
These setting were spot on to my needs.

Since i decided to move on to Cura, that's not a possibility.
Do you know if anything like this is possible in Cura 13.11 or in the code somewhere?

Lars

Dan Newman

unread,
Nov 12, 2013, 5:00:38 PM11/12/13
to Lars Christensen, gpx-co...@googlegroups.com
As Daid, author of Cura wrote when you asked over in UM land, he removed
that functionality from Cura since it didn't make sense to him. For a Bowden
extruder, I can see asymmetric retraction as not being useful so with his
focus on Ultimakers that's understandable.

Dan

Wingcommander (whpthomas)

unread,
Nov 13, 2013, 7:50:51 PM11/13/13
to gpx-co...@googlegroups.com
But nothing happends.

Try running GPX on the command line - that will tell you if there is a problem with your configuration. At some point you are going to have to trouble shoot some of this stuff on your own - I don't have a windows machine, so I really can't help you figure out how to run Cura with GPX on windows.

Enginwiz

unread,
Nov 14, 2013, 3:29:07 PM11/14/13
to gpx-co...@googlegroups.com
Would it be possible to get a parameter in GPX.ini to disable the priority of all commandline parameters?

This would help to resolve conflicts with wrong or invalid postprocessing parameters coming from the slicer.

Wingcommander (whpthomas)

unread,
Nov 14, 2013, 7:56:21 PM11/14/13
to gpx-co...@googlegroups.com
Great idea,

I actually have started down that path, by having GPX check if the same machine definition on the command line has already been loaded, and if the same one has, it will not to overwrite the one already loaded.

I think this one setting is probably the most contentious, because it re/loads all the machine definition variables, and clobbers everything that came before it. However it is a problem with understanding user intent, if I set up my gpx.ini then run GPX on the command line with different flags, and they have no effect I am going to be just as confused.
So my original thinking was to have layers of specificity. i.e. gpx.ini is the default behaviour, then the command line overrides that, then a custom machine definition (specified on the command line) overrides any previous settings.

However I can see the problem with programs like Simplify3D Creator, that allow you to choose the machine definition, but this results in clobbering the ones specified in gpx.ini.

For this reason I think checking whether the machine definition is already loaded and ignoring the command line flag if its the same is probably the least confusing option. This way, if I have customised my Replicator 2 settings, then select a TOM in S3DCreator, it will go with the TOM machine def, but when I return to selecting Replicator 2 machine, my gpx.ini customised settings take priority again.

How does that solution sound? 

Enginwiz

unread,
Nov 15, 2013, 10:54:44 AM11/15/13
to gpx-co...@googlegroups.com
Simplify3D Creator currently doesn't have an option to select the machine definition for a Rep2 with HBP.
Clayton promised to fix this in the next release. In the meantime there is no way to overrride the -m r2
setting that gets executed (without being visible or traceable) as a command line parameter. 

My logic would suggest that if there is no GPX.ini then all parameters have to come through the command line.

If a GPX.ini is present then all parameters except the file name have to come from the GPX.ini

Everything else is very hard to troubleshoot. How would I find out which setting is being used?

A compromise would be a parameter in the GPX.ini to disable all commandline parameters
and hand over command to the GPX.ini if the postprocessing commands from the slicer are invalid or incomplete.




Wingcommander (whpthomas)

unread,
Nov 15, 2013, 12:40:31 PM11/15/13
to gpx-co...@googlegroups.com
OK I have implemented the conditional override in the latest version 1.4



The windows binary will be up in a few days.

To fix the problem with S3DCreator you can do one of two things.

Set the machine definition to r2 then include the following section to gpx.ini

[a]
has_heated_build_platform=1

Alternatively, under the scripts tab you can uncheck the built-in version of GPX and specify it explicitly in the text box below it.

/path/to/gpx "[output_filepath]"

Enginwiz

unread,
Nov 16, 2013, 4:28:36 PM11/16/13
to gpx-co...@googlegroups.com
Thank you!
Reply all
Reply to author
Forward
0 new messages