dennisjm
Posts: 343
Joined: Wed May 07, 2014 9:51 pm

multi process tip - gcode

This has probably been eluded to here and there, but I just wanted to point it out explicitly because it just bit me again...

If you use multiple processes, the gcode from the 1st process is the one that controls the print.

However, there is other gcode inserted by other processes based on tool change and temperature settings etc.

So.. if you have a 2nd process based on the first process, and you don't want it to change your temperature settings HINT HINT S3D (I really hope they fix those temperature bugs in the next release....), you might want to remove the temperature controllers from your 2nd and subsequent processes.

Glad I printed a small test print or I might have ruined a 13 hour print I'm about to start after 12.6 hours since I used a different process for the last few mm.

Sheesh...
dennisjm
Posts: 343
Joined: Wed May 07, 2014 9:51 pm

Re: multi process tip - gcode

Actually, I spoke too soon.

Even if I remove the temperature controllers on the 2nd process I still get this in the gcode:

; layer 3, Z = 0.45
; tool H0.15 W0.4
M140 S90 T0

Which causes the tool to switch to T0 even though I'm printing with T1

Which causes broken print :(

Haven't figured out a fix yet.

Already have this as a bug :/
dennisjm
Posts: 343
Joined: Wed May 07, 2014 9:51 pm

Re: multi process tip - gcode

So is there a way to manually run the gcode to x3g converter?

I'm tired of wasting time trying to fix this with the broken processes. It seems easier at this point to open the gcode file, remove the stupid temperature set line and regenerate.
dennisjm
Posts: 343
Joined: Wed May 07, 2014 9:51 pm

Re: multi process tip - gcode

Perhaps
> gpx -m r1d <gcode>
is good enough.
I don't know if S3D is using percentages for ABS and stuff like that though. There were a number of other command line options available but they aren't customizable in the UI so I don't know what they're doing.
dennisjm
Posts: 343
Joined: Wed May 07, 2014 9:51 pm

Re: multi process tip - gcode

Ok, this is by trial and error. Here is the gpx command line that produces the same x3g file as when I save from the UI.

> gpx -g -p -m r1d <in> <out>

So now I should be able to edit the gcode, resave and print from the new file.

<shakes head, still can't believe this bug exists.. such an easy fix />
dennisjm
Posts: 343
Joined: Wed May 07, 2014 9:51 pm

Re: multi process tip - gcode

My next workaround is to put my primary filament back on T0 and only use T1 when using support filament and dual extrusion.
JoeJ
Posts: 1435
Joined: Sun Feb 16, 2014 10:52 am

Re: multi process tip - gcode

Can you explain the problem you're having a bit more? Or maybe post a factory file that shows it? I'm a little confused as to what problem you're seeing. If you have temperature settings in a second process, isn't it normal for them to be part of the final gcode file?
dennisjm
Posts: 343
Joined: Wed May 07, 2014 9:51 pm

Re: multi process tip - gcode

There is already a bug on this somewhere filed.

The problem is this:

printing on T1 (left extruder)
...
...
; some new layer w/ new temperature
M134 S90 T0 ; I guessed on the M code I forgot the one that sets temperature
; that switched the toolhead to T0 even though it was only needed to set the temperature
;
..
; now the print is printing with T0, which was unheated and not the same filament anyway
; print ruined.
All that is needed to fix it is to put the toolhead change back in again
M135 T1; such an easy fix.....

If you are printing with both extruders, you don't have this problem because each layer already has the M135 code to tell which extruder to print with.
Also if you are printing on just the right extruder, you don't have to worry about it because T0 is already the correct tool.

Workaround is to set the T1 temperature every time you also make a hotbed temperature adjustment.
That doesn't work when you're using multiple processes though. I couldn't figure out how to get it to export the gcode in a non-failing way so I just removed the extra unneeded temperature sets from the gcode and re-exported the file.

(Too much work though in the end I just moved the plastic to the other extruder.
JoeJ
Posts: 1435
Joined: Sun Feb 16, 2014 10:52 am

Re: multi process tip - gcode

I'm guessing you were thinking of an M104 command (set extruder temperature). The M135 command creates the actual toolchange.

So is the Simplify3D gcode correctly inserting the M104 commands? Is it also inserting these extra M135 toolchanges or is that only happening when it is converted with GPX? Should be pretty easy to see where the problem lies since you can look at both the gcode and x3g files
dennisjm
Posts: 343
Joined: Wed May 07, 2014 9:51 pm

Re: multi process tip - gcode

No, it's not the x3g conversion process.
It's not putting M104 commands in either. It's putting M140 commands in for the hotbed temperature change.
This is a common use case. example: first layer temperature 100C then 2nd layer temperature 95 (or 90 or whatever).

The M140 S90 T0 command changes the tool so you need an additional M135 to change it back.

I just thought of something I haven't tried. I think on M140 the Tool is actually ignored. I wonder if I changed it to M140 S90 T1 if that would solve the issue as well.

Return to “General Discussion and Tips”