Printing with Cura appears offset; runs past... [Solved!]

Troubleshooting talk for software

Printing with Cura appears offset; runs past... [Solved!]

Postby lairdb » 2015-May-Sat-12-May

Printrbot Simple Metal, Ref F, Cura 15.02.1

I'm finding that the Cura workspace appears to be offset a little in the +x and +y directions when I print. This shows itself if I try to print a maximum size object, or anything at the max X or max Y dimensions.

Some background:
  • Limit switches are working perfectly; all axes home just fine.
  • In Cura, I have 150x150 set for platform dimensions.
  • Calibration appears near perfect (a 130mm square .020 high square prints at ~130.4 actual in both directions).
  • If I manually (using Octoprint Control UI) move, I can move 152 in each of X and Y, and then the firmware stops.)
All that works -- and then if I try to print an object that is positioned to approach max X/max Y: wham, grind, grind.

Here's my start gcode:
Code: Select all
M104 S{print_temperature}
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;start with the fan off
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
M109 S{print_temperature} ;wait on temperature line
G29 ; Auto bed levelling
G92 E0 ;zero the extruded length
G1 F{travel_speed}


I'm not even sure where to start troubleshooting this -- manually driving the bed around seems to work fine, but printing is weirdly offset, despite homing perfectly.
  • 0

Last edited by lairdb on 2015-May-Sun-12-May, edited 1 time in total.
Simple Metal Kit, heated bed
Mods: blower fan with self-remixed blower duct
Usually PLA on kapton with AquaNet.
Usually Cura.
lairdb
Waiting for extruder temp...
 
Posts: 81
Joined: 2015-May-Tue-13-May
Reputation: 3

Printing with Cura appears offset; runs past... [Solved!]

Sponsor

Sponsor
 

Re: Printing with Cura appears offset; runs past maximum tra

Postby cacb » 2015-May-Sat-15-May

Hi, I think I have observed something very similar (Simple Metal, Rev F5 board). I am using OctoPrint.

I have not investigated this in every detail (I have printed a lot lately), but I think I have seen the effect in X-direction, less sure about Y direction. If you try a M501 you should get the echo with e.g. the M212 parameters, in my case it is

Code: Select all
echo:Bed probe offset (mm):
echo:  M212 X25.00 Y0.00 Z-1.40

I have calibrated the Z value for my printer, but the X and Y offsets were predefined when I got the printer, and I have not touched them. I think the offsets are supposed to mean "offset of hotend relative to z-probe". This makes sense for the Z-value (hotend tip lower than z probe), and also the Y value seems ok as the Z-probe is on the same Y-position as the hotend tip.

However, for the X-value, something seems odd. If my definition above was correct, one would expect X-25.00 to indicate the hotend is 25mm in the negative X-direction, which it is. Instead it says X25.00. It is this value I was meaning to figure out, I think it causes the problem you describe (for x-direction), at least it seems that way from my perspective. When I use KISSlicer and print later, the real print is offset about 25mm in X-direction.

A guess is that the X-value should be set to 0.0, but then it means the definition of M212 must be something different than what i suggested above.

This has been on my list of things to figure out...
  • 0

Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 405
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 18

Re: Printing with Cura appears offset; runs past maximum tra

Postby lairdb » 2015-May-Sat-15-May

Well, I had a random idea, and tried it -- I seem to have solved my problem... maybe.

I noticed that the G29 seems to be not quite at the extents, by about the same amount as I seem to overtravel. So, at semi-random, I thought maybe I should return to 0,0 after G29 and before starting the print commands. So, I added a
Code: Select all
G28 X0 Y0 ;move X/Y to min endstops
right after the G29, and now it's working exactly as expected.

What I'm not perfectly sure of is that it's retaining the G29 results. I think it is, but I have a very close to level platform to begin with, so it's tough to be certain.
  • 0

Simple Metal Kit, heated bed
Mods: blower fan with self-remixed blower duct
Usually PLA on kapton with AquaNet.
Usually Cura.
lairdb
Waiting for extruder temp...
 
Posts: 81
Joined: 2015-May-Tue-13-May
Reputation: 3

Re: Printing with Cura appears offset; runs past maximum tra

Postby cacb » 2015-May-Sat-15-May

As you say, G29 does not move to the extreme positions, it uses 3 points well within the print area.

Perhaps your issue is different than what I discussed. Below is my G-code prefix, notice I do the G28 before G29, so that G29 is always referencing the endstops (this is in KISSlicer, the <BED> and <TEMP> tokens are replaced with actual settings for bed and hotend temperature when slicing)

Code: Select all
M140 S<BED> ; set bed temp and return immediately
G21            ;metric values
G90            ;absolute positioning
M82            ;set extruder to absolute mode
M107          ;start with the fan off
G28 X0 Y0  ;move X/Y to min endstops
G28 Z0       ;move Z to min endstops
G29            ;Run the auto bed leveling
G1 Z+10.0  ; Lift hotend 10 mm
M104 S<TEMP>; set hot end temperature and return
M190 S<BED> ; wait for bed temp


Moving G28 X0 Y0 after G29 should do no harm, but I think it makes sense to do it before. After G29 I just lift the hotend in place 10mm and wait for the bed to warm up.

After the print completes, my postfix G-code is
Code: Select all
M104 S0    ; turn off head temp
M140 S0    ; turn off bed temp
G91           ;relative positioning
G1 E-1 F300    ;retract the filament a bit
G1 Z+0.5   
G28 X0 Y0 ; home X,Y axis
M84           ; disable motors
M107         ; turn fan off


I.e. I ask the printer to home in X and Y after lifting the hotend 0.5mm relative to the top layer to avoid colliding with the print.
  • 0

Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 405
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 18

Re: Printing with Cura appears offset; runs past maximum tra

Postby lairdb » 2015-May-Sat-16-May

Ah -- I wasn't clear. I still do a G28 X Y before the G29 -- it's actually a gcode requirement to be at x0 y0 before doing a G29. I inserted a second one, after, for a total start code of:

Code: Select all
M104 S{print_temperature}
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;start with the fan off
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
M109 S{print_temperature} ;wait on temperature line
G29 ; Auto bed levelling
G28 X0 Y0 ;move X/Y to min endstops
G92 E0 ;zero the extruded length
G1 F{travel_speed}
  • 0

Simple Metal Kit, heated bed
Mods: blower fan with self-remixed blower duct
Usually PLA on kapton with AquaNet.
Usually Cura.
lairdb
Waiting for extruder temp...
 
Posts: 81
Joined: 2015-May-Tue-13-May
Reputation: 3

Re: Printing with Cura appears offset; runs past maximum tra

Postby thawkins » 2015-May-Sun-10-May

lairdb wrote:Ah -- I wasn't clear. I still do a G28 X Y before the G29 -- it's actually a gcode requirement to be at x0 y0 before doing a G29. I inserted a second one, after, for a total start code of:

Code: Select all
M104 S{print_temperature}
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;start with the fan off
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
M109 S{print_temperature} ;wait on temperature line
G29 ; Auto bed levelling
G28 X0 Y0 ;move X/Y to min endstops
G92 E0 ;zero the extruded length
G1 F{travel_speed}


If you execute a G28 X0 Y0 after a G29 it will clear the bed compensation map and it will be like G29 never happened. If you want to return to the x,y 0,0 point then use a G1 X0 Y0 instead.
  • 0

Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Printing with Cura appears offset; runs past maximum tra

Postby dsegel » 2015-May-Sun-10-May

There's a bug in the firmware that messes up the "known" position after the G29 process is run. This is most likely the cause of your problem. It can be fixed by resetting the actual position after the G29 command:

G92 X132 Y20; Reset actual position

You can test that this is the problem by just not running a G29 before you start to print. There's more discussion in this forum if you search for it and here: http://help.printrbot.com/Answers/View/11360
  • 0

dsegel
Waiting for printbed temp...
 
Posts: 109
Joined: 2014-Sep-Mon-12-Sep
Reputation: 3

Re: Printing with Cura appears offset; runs past maximum tra

Postby lairdb » 2015-May-Sun-12-May

All credit to dsegel -- that's the solution. (And I agree with dsegel that it appears to be rooted in a firmware bug.) I just successfully printed my 150x150x0.20 test square with what appears to be uniform thickness.

I hadn't yet posted the update of trying a second G28 X0 Y0 after the G29, because I still wasn't certain that I was retaining the calibration.

dsegel is correct; after the G29, the position is off by X25 and Y10. I used his solution of adding a
Code: Select all
G92 X132.4 Y20; Reset actual position
after the G29, and all's well.

Current start code:
Code: Select all
M104 S{print_temperature}
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;start with the fan off
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
M109 S{print_temperature} ;wait on temperature line
G29 ; Auto bed levelling
;G28 X0 Y0 ;move X/Y to min endstops
G92 X132.4 Y20; Reset actual position after G29 bug
G92 E0 ;zero the extruded length
G1 F{travel_speed}


(And thawkins is correct, my original attempt of a G28 should have been a G1 X0 Y0 to keep the compensation -- but I don't think that would have worked, since the head is slightly lost already after the G29.)
  • 0

Simple Metal Kit, heated bed
Mods: blower fan with self-remixed blower duct
Usually PLA on kapton with AquaNet.
Usually Cura.
lairdb
Waiting for extruder temp...
 
Posts: 81
Joined: 2015-May-Tue-13-May
Reputation: 3

Re: Printing with Cura appears offset; runs past... [Solved!

Postby cacb » 2015-May-Sun-13-May

Interesting, I will check that G92 command. Good stuff.
  • 0

Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 405
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 18

Re: Printing with Cura appears offset; runs past maximum tra

Postby cacb » 2015-May-Sun-15-May

thawkins wrote:If you execute a G28 X0 Y0 after a G29 it will clear the bed compensation map and it will be like G29 never happened. If you want to return to the x,y 0,0 point then use a G1 X0 Y0 instead.


I just did the following on my simple metal

Code: Select all
G29
G1 X0 Y0


It moved the hotend very slowly to the front left corner (origin of axis system). This is not the same as the home position (back left).
  • 0

Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 405
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 18

Re: Printing with Cura appears offset; runs past maximum tra

Postby cacb » 2015-May-Sun-15-May

lairdb wrote:dsegel is correct; after the G29, the position is off by X25 and Y10. I used his solution of adding a
Code: Select all
G92 X132.4 Y20; Reset actual position
after the G29, and all's well.


I am trying to understand the above. when I run G29, it reports x=142.40 y=10 as final point.

Code: Select all
Send: G29
Recv: Bed x: 10 y: 142.40 z: 1.06
Recv: Bed x: 10 y: 10 z: 1.21
Recv: Bed x: 142.40 y: 10 z: 1.31
Recv: ok
Recv: echo:endstops hit:  X:0.00 Z:1.32


Is it correct to say that these coordinates are wrong, and should really be x=132.40 y=20 ?? I don't see how that agrees with "the position is off by X25 and Y10" ?
  • 0

Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 405
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 18

Re: Printing with Cura appears offset; runs past... [Solved!

Postby lairdb » 2015-Jun-Wed-14-Jun

Mmmm -- I wrote "the position is off by X25 and Y10" withotu actually thinking it through -- it probably should have read "X10 and Y10". That said, I admit I just jumped straight to empirical testing, and once it worked, I didn't go back to refine the theory statement. What I can say with confidence is this: adding the "G92 X132.4 Y20" after the G29 makes it work. Based on this, I would say Yes, these coordinates are wrong, and should really be x=132.40 y=20.
  • 0

Simple Metal Kit, heated bed
Mods: blower fan with self-remixed blower duct
Usually PLA on kapton with AquaNet.
Usually Cura.
lairdb
Waiting for extruder temp...
 
Posts: 81
Joined: 2015-May-Tue-13-May
Reputation: 3

Re: Printing with Cura appears offset; runs past... [Solved!

Postby cacb » 2015-Jun-Wed-15-Jun

Thanks. I will try this next time I print.
  • 0

Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 405
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 18

Re: Printing with Cura appears offset; runs past... [Solved!

Postby cacb » 2015-Jun-Sat-16-Jun

cacb wrote:Thanks. I will try this next time I print.


I have now tried the G92 fix after G29:
Code: Select all
G92 X132.4 Y20; Reset actual position


But I think there is a problem. I made a simple "calibrator" on OpenSCAD to print a centered square on the print surface. It simply outlines the square corners:

Code: Select all
// simple bed calibrator
bed_size = 130;
difference() 3{
   cube(size=[bed_size,bed_size,0.5],center=true);
   
   union() {
      cube(size=[bed_size-1,bed_size-1,1.0],center=true);
      cube(size=[bed_size/2,bed_size*2,100],center=true);
      cube(size=[bed_size*2,bed_size/2,100],center=true);
   }
}


In order to be careful, I started with a bed_size = 100 and increased the value successively. I noticed an oddity at the end of the first print, where an extra line was printed "inwards", without there being anything similar in the model. Still, I increased the size and didn't observe that issue again.

When i got to 130mm something strange happened, after finishing the print correctly, or so it seemed, the hotend took off to the right and crashed into my "printrwings" with a bad belt skip. I don't understand why this happens, as I have never seen anything like it before. I wonder if it is related to the G92 fix, but I really don't know. Obviously, I didn't increase the bed size any more.
13mm_crash.png


Here is the G-code as generated by KISSlicer 1.4.5.10, if anyone wants to have a look
bed_calibrator_130.gcode


After seeing this, it seems to be a variant of the first problem I saw, the hotend "took off" at the end of the final segment, but inwards instead of outwards and causing crash.

I had a look at the G-code in http://openscam.com/ , but could not see anything wrong there.

Can anyone explain what is going so wrong?
  • 0

You do not have the required permissions to view the files attached to this post.
Printrbot Simple Metal Kit + heated bed upgrade. KISSlicer (Kubuntu/Win7), OctoPrint (wireless Raspberry Pi model B) - http://arnholm.org/
cacb
Support material...
 
Posts: 405
Joined: 2015-Mar-Sun-06-Mar
Location: Norway
Reputation: 18


Return to Troubleshooting talk

Who is online

Users browsing this forum: No registered users and 1 guest

cron