End G-Code final head position

Troubleshooting talk for software

End G-Code final head position

Postby MileHigh3DII » 2017-Mar-Sun-18-Mar

I have a PB+ dual head with 'home' in the rear left corner. At the end of my print, the head finishes up, heads to the back left corner but once it get there, it heads back tot the front of the print bed- about where it goes after I run the G29 code to level the bed.

I don't see why it goes back to the front, plus it 'grinds' for a split second when it gets there, probably because it is a software stop, not a hardware limited one.

Here is my ending G-Code:
G1 X107.343 Y99.520 E915.40526
M107
G1 F2400 E914.90526
G0 F9000 X107.343 Y99.520 Z68.000
;End GCode
M104 S0 ;extruder heater off
M140 S0 ;heated bed heater off (if you have it)
G91 ;relative positioning
G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more
G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way
M84 ;steppers off
G90 ;absolute positioning


Here is my start G-code:
G21
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
G1 Z15.0 F9000 ;move the platform down 15mm
G92 E0 ;zero the extruded length
G1 F200 E3 ;extrude 3mm of feed stock
G92 E0 ;zero the extruded length again
G1 F9000

;Layer count: 629
;LAYER:0
M106 S226
G0 F9000 X92.918 Y93.884 Z0.200
;TYPE:SKIRT
G1 F1200 X94.877 Y92.285 E0.09252
  • 0

User avatar
MileHigh3DII
Waiting for printbed temp...
 
Posts: 121
Joined: 2013-Apr-Thu-17-Apr
Reputation: 1

End G-Code final head position

Sponsor

Sponsor
 

Re: End G-Code final head position

Postby RetireeJay » 2017-Mar-Sun-19-Mar

I think this line has something to do with the behavior you are seeing:
MileHigh3DII wrote:G1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more

You're doing this while in relative coordinates mode. Besides moving Z and E (as the comment says) it's also moving -20mm in both X and Y. Depending on where the head was sitting before you reached this line, it might be asking the head to move beyond the physical limits of the axes, which would cause grinding.

BTW, although the switches and sensors are sometimes called "endstops" they really are not. The ONLY time the firmware checks the status of the switches or the sensor is during "homing" maneuvers; the switches are IGNORED at all other times.

The simplest thing for you to try is to delete the X-20 Y-20 part of your ending G-code. You've been around on this forum for a while, so I think you know how to do that. But just as a reminder, the ending G-code is in an editable field in the Cura slicer, in Slic3r, and presumably in any other slicing program that you may be using.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
"My next printer is..." Prusa i3 MK3, upgraded to MK3S
User avatar
RetireeJay
My next printer is...
 
Posts: 4992
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 498

Re: End G-Code final head position

Postby MileHigh3DII » 2017-Mar-Mon-01-Mar

Nope that wasn't it???

Actually, that didn't seem to do anything. It still goes to the back left corner and then comes in a straight line to 2/3 to the right side all the way forward.

Is it something outside of this g- code? Something set in the firmware of something?
  • 0

User avatar
MileHigh3DII
Waiting for printbed temp...
 
Posts: 121
Joined: 2013-Apr-Thu-17-Apr
Reputation: 1

Re: End G-Code final head position

Postby Mooselake » 2017-Mar-Mon-09-Mar

The G28 home command in your end gcode is why it moves to the home position. Not sure why it moves after that, but try moving the G90 before the home command so it's not homing in relative mode.

Has it always done this with this gcode, or is it something new?

Kirk
  • 0

Modified KickStarter Classic Plus 7/2012
KS Thingybot Delta Pro 10/31/16
User avatar
Mooselake
My next printer is...
 
Posts: 3598
Joined: 2011-Dec-Tue-23-Dec
Location: Moose Swamp, Upper Michigan, USA
Reputation: 175

Re: End G-Code final head position

Postby RetireeJay » 2017-Mar-Mon-09-Mar

Hmm...
You had these commands; I'm commenting them here, and I don't see any problem. (I wish the forum would allow the nice neat formatting I applied with spaces to be reproduced on the final product!)

Code: Select all
G1 X107.343 Y99.520 E915.40526             ; The X and Y here are near the center of a Plus bed
M107                                            ; turns off the (print-cooling) fan
G1 F2400 E914.90526                         ; backs up the extruder 0.5mm from its last location
G0 F9000 X107.343 Y99.520 Z68.000        ; Leave X and Y where they were, and move Z to 68mm (where was it before???)
;End GCode
M104 S0                                        ; extruder heater off
M140 S0                                        ; heated bed heater off (if you have it)
G91                                           ; use relative positioning
G1 E-1 F300                                    ; retract the filament 1mm (before lifting the nozzle?  but maybe 68mm was already a lift?), to release some of the pressure
G1 Z+0.5 E-5 X-20 Y-20 F9000                 ; move Z up 0.5mm, retract filament 5mm more, decrease X by 20mm (to 87.343) and Y by 20mm (to 79.520)
G28 X0 Y0                                       ; move X/Y to endstops.  The actual values are ignored by Marlin, so if your Y endstop is at YMax, then it should move to X=0, Y=Max
M84                                             ; steppers off
G90                                             ; absolute positioning

Perhaps there's a command just before the first line that you copied into your post that sends the printhead to the corner?
Does this problem happen with all your models, or just this specific print?

Repetier is ideal for debugging this kind of problem. Once you have the sliced file, i.e. the G-code, in Repetier's memory, you can edit the G-code before sending it to the printer (I don't think this is possible with Cura). And Repetier adds a few commands to G-code that are meaningful to Repetier but are not sent to the printer; the specific command that would be useful to us here is the @pause command.

You can insert new lines with the @pause command to make Repetier stop sending commands to the printer until you tell Repetier to proceed by clicking the "run" arrow. By the way, the format is extremely specific. You must type it exactly as I've shown it, with no space between the "@" sign and the "pause" and with the "pause" written in all lower case.

By placing several @pause command lines in the ending of your G-code, you can essentially execute the code line-by-line and find out exactly where things go funny. Naturally, this would be most useful to you if you do it on an extremely small model that only takes a few seconds to run before it encounters the ending code.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
"My next printer is..." Prusa i3 MK3, upgraded to MK3S
User avatar
RetireeJay
My next printer is...
 
Posts: 4992
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 498

Re: End G-Code final head position

Postby Mooselake » 2017-Mar-Mon-11-Mar

The firmware implements soft limits, i.e. it won't let you move outside the configured limits of each axis as long as you haven't lost position by missed steps. It should never grind unless it's not where it thinks it is or when homing with a malfunctioning switch.

We've seen a lot of probes with open wires, which the firmware interprets as a triggered home switch. I wonder if your errant axis has a shorted switch, which would never trigger and might give the behavior you're seeing as it goes a way past where the switch should be and then gives up. The home switches use closed (current passing) contacts for untriggered so a broken wire will look like a triggered switch, a holdover from their CNC roots. Inversely a shorted switch will always appear untriggered. There are no limit switches on reprap devices, they're both lightweight and have low powered motors. When you're slinging tones of cast iron around limit switches can be machine and actual life savers, but having a 3D printer carriage doing the full tilt boogie slam into the stops won't hurt much, even if you stick a finger in there.

Use the M119 command to display the current endstop status. Check it with the problematic axis off the home switch, then use the manual controls to get it as close as you can and then give it a little shove so it clicks, and check it again. Or you could just use something to reach in there and push it, but the check it with the machine will also help detect an obstruction that prevents it from closing. Perhaps there's a piece of Dorito (or something else) under the switch? An loose piece of plastic that keeps the machine from getting close enough to actuate the switch.

Kirk
  • 0

Modified KickStarter Classic Plus 7/2012
KS Thingybot Delta Pro 10/31/16
User avatar
Mooselake
My next printer is...
 
Posts: 3598
Joined: 2011-Dec-Tue-23-Dec
Location: Moose Swamp, Upper Michigan, USA
Reputation: 175


Return to Troubleshooting talk

Who is online

Users browsing this forum: No registered users and 3 guests