Welcome! Log In Create A New Profile

Advanced

Runaway Y-axis with properly working endstop

Posted by sergeys 
Runaway Y-axis with properly working endstop
January 11, 2016 12:21PM
Hi,

I recently finished building my Prusa i3 (using Folger Tech kit), and most everything went great! (after hours and hours of painstaking learning process, that is... who would've thought it would require so much effort)

I was able to google and trial/error most of the issues, but this one is a tough cookie. My Y-axis does not seem to want to be confined to the area it is in. When I turn on the printer I perform homing calibration on all axes. (I use Repetier Host and Slic3r) Y axis moves towards the endstop, and stops right after it clicks. All seems well.

But then when print is finished, looks like firmware (Marlin) tries to move the bed home, and often runs into an endstop (that gets triggered, as confirmed by LED on it), and keeps trying to move past that (unsuccessfully, as gears start slipping on the belt; I have it a bit loose). From my understanding, it should stop axis movement as soon as endstop is triggered. That works well on X and Z axis, but not on Y for some reason. Any idea what might be the cause, and how I can correct this?

Thanks!
Re: Runaway Y-axis with properly working endstop
January 11, 2016 01:03PM
What does the end of the code look like?
You can enable and disable the endstops in the firmware. Make sure they are all on to prevent runaways.
Re: Runaway Y-axis with properly working endstop
January 11, 2016 02:56PM
Here's the ending of G code file (I'm not sure if this one caused bumping into the endstop, but I guess all endings will be the same, given settings did not change)

G92 E0
G1 X55.943 Y38.700 F9000.000
G1 E1.00000 F1800.00000
G1 X58.193 Y38.700 E1.24313 F2100.000
G1 E0.24313 F1800.00000
G92 E0
M107
M104 S0 ; turn off temperature
G28 X0  ; home X axis
M84     ; disable motors
Re: Runaway Y-axis with properly working endstop
January 11, 2016 04:34PM
You are not even showing a y home move (G28 Y0)
Looking at that it should turn off the heaters, home X and then turn off the motors...
Not sure why its trying to home Y then.
Re: Runaway Y-axis with properly working endstop
January 11, 2016 05:14PM
Yup, I noticed that... But that's not exactly what's happening, so I'm not sure how it gets controlled. I didn't pay attention to heater being on/off, but after the print, these steps happen:
- Home X-axis
- Move X in the middle of the bed
- Move Y axis to 0 (and I say move to 0, because it's not always hitting an endstop, sometimes it stops a few mm short of it, other times it tries to run it over).

Maybe my method of obtaining G-code is wrong? After slicing, I selected "Save g-code." There was also "Save for SD print" option. Should I have gone for that one instead? When I print, I have it connected to my computer via USB, and print directly from Repetier host.
Re: Runaway Y-axis with properly working endstop
January 11, 2016 10:51PM
Ok, I saved "for SD card print" and it has end code for homing Y axis, and moving X in the middle. Here's the end:
G1 E2.19786 F1800
G92 E0
M107
M104 S0
G28 X0
M84
M104 T0 S0
M140 S0
G90
G1 X100 Y0 F4800
M84

Any idea why Y0 will be causing it to run over the endstop?
Re: Runaway Y-axis with properly working endstop
January 12, 2016 02:04AM
Quote
sergeys
Ok, I saved "for SD card print" and it has end code for homing Y axis, and moving X in the middle. Here's the end:
G1 E2.19786 F1800
G92 E0
M107
M104 S0
G28 X0
M84
M104 T0 S0
M140 S0
G90
G1 X100 Y0 F4800
M84

Any idea why Y0 will be causing it to run over the endstop?

The Y Axis stepper motor has forgotten where is was.

G28 X0 ; Homes the X Axis
M84 ; Turns off the motors which causes the stepper to become free to turn so losses it's position.

G28 Y0 ; Add this line before you turn off the motors
This will place both steppers at home, which triggers the end stop condition so that the firmware (software) knows where the hardware (stepper motor) is.
Both items are at zero

Not sure why you need/want to home X & Y then move to a X Y position at the end of a print?
Here is my end g-code shown in slic3r
G1 X190 Y190 F9000
G4 S0
G10 P0 S-273 R-273                       ; Set tool 0 operating and standby temperatures
M140 S120
M140 S40
M104 S0  ; turn off Hot End
M140 S0  ; Turn off Heated Bed Plate

Turning off the motors with M84, normally means that all 3 axis (X, Y, Z) will need homing again before starting another print or moving to another position

Edited 1 time(s). Last edit at 01/12/2016 02:05AM by orictosh.


Supporting 3D Printers with Parts and Build services.
Printer: Ormerod 2 (528.4) Duel extruder set-up with Aluminium X-Rib, RRPro Firmware v1.11-ch (2016-04-08)
Re: Runaway Y-axis with properly working endstop
January 12, 2016 08:29AM
@orictosh - where can I configure this "end of pring" code in slic3r? I tried poking around, and can't find any configuration like that, unless I modify g code after slicing.
Re: Runaway Y-axis with properly working endstop
January 12, 2016 11:42AM
I found a setting in Slic3r about end of print code... But it does not contain the last section. So not sure where is it coming from, and how to remove/edit that:
M104 T0 S0
M140 S0
G90
G1 X100 Y0 F4800
M84
Re: Runaway Y-axis with properly working endstop
January 12, 2016 02:27PM
Quote
sergeys
@orictosh - where can I configure this "end of pring" code in slic3r? I tried poking around, and can't find any configuration like that, unless I modify g code after slicing.

It's in slic3r Printer settings tab > Custom G-code. You should see some large text boxes on the right hand side, one labelled Start g-code and the another end -G -code
Edit the code here and printer will perform these steps at the end of print.

To show slic3r from Repetier Host click upon the slicer tab, (the one after object placement), then click the configuration button, this will bring up slic3r, then select the Printer settings tab...
Screen shot showing Repetier Host and slic3r in which you should see the code segment I posted earlier


Supporting 3D Printers with Parts and Build services.
Printer: Ormerod 2 (528.4) Duel extruder set-up with Aluminium X-Rib, RRPro Firmware v1.11-ch (2016-04-08)
Re: Runaway Y-axis with properly working endstop
January 12, 2016 03:29PM
Quote
orictosh
It's in slic3r Printer settings tab > Custom G-code.

Yup, found that section. But I have code after everything I have in there. Namely, this is the code in my file beyond what "End G-code" has:
M104 T0 S0
M140 S0
G90
G1 X100 Y0 F4800
M84
Re: Runaway Y-axis with properly working endstop
January 12, 2016 04:15PM
Quote
sergeys
Quote
orictosh
It's in slic3r Printer settings tab > Custom G-code.

Yup, found that section. But I have code after everything I have in there. Namely, this is the code in my file beyond what "End G-code" has:
M104 T0 S0
M140 S0
G90
G1 X100 Y0 F4800
M84
[/quote

A little confused;
In your end-g-code section in slic3r Do you have the five lines of code (shown above) or is there more code after M84 that you don't need?

Edited 1 time(s). Last edit at 01/12/2016 04:38PM by orictosh.


Supporting 3D Printers with Parts and Build services.
Printer: Ormerod 2 (528.4) Duel extruder set-up with Aluminium X-Rib, RRPro Firmware v1.11-ch (2016-04-08)
Re: Runaway Y-axis with properly working endstop
January 12, 2016 06:14PM
Quote
orictosh
A little confused;
In your end-g-code section in slic3r Do you have the five lines of code (shown above) or is there more code after M84 that you don't need?

Sorry, it's confusing smiling smiley
The 5 lines above are NOT in the "End G-code" section in Slic3r config. But those 5 lines ARE in the saved file if I choose "Save for SD card print" after slicing. And seem like they correspond to what actually happens (evidenced by "G1 X100 Y0 F4800")
Re: Runaway Y-axis with properly working endstop
January 12, 2016 06:47PM
Repetier-Host has start and end g-code that it will prepend and append if configured to do so. When I use the load to SD card option, it has checkboxes for whether I want to include the start and end G-code. I uncheck them. It sounds like your workflow is resulting in RH adding that extra g-code. There should be a setting somewhere to prevent that but I'm not familiar with it.
Re: Runaway Y-axis with properly working endstop
January 13, 2016 03:48AM
Quote
sergeys
Quote
orictosh
A little confused;
In your end-g-code section in slic3r Do you have the five lines of code (shown above) or is there more code after M84 that you don't need?

Sorry, it's confusing smiling smiley
The 5 lines above are NOT in the "End G-code" section in Slic3r config. But those 5 lines ARE in the saved file if I choose "Save for SD card print" after slicing. And seem like they correspond to what actually happens (evidenced by "G1 X100 Y0 F4800")

It's just my work-flow from design to print is different and I can't see where Repetier Host is holding "G1 X100 Y0 F4800" or "G90" so you able to edit/remove it.
As in the context of g-code this a valid move command AS long it doesn't come after M84 (disable motors) which in your case it does, that's the reason for the runway Y Axis. I have RH installed and use it on machines that I support but it's not my main method of controlling my printer (an ormerod 2)
I use Slic3r outside of RH and the load the g-code into RH or upload the file to my printer via the web interface.

I can see the check boxes that IMBoring25 mentioned in the "Save for SD Print" dialogue box but all that does adds 3 lines shown below
M104 T0 S0
M140 S0
M84
Which is valid end G-code, which can useful when coded correctly to move the print head out of the way or present the print in a easy place for removal. In mine it moves the print bed towards the front of the machine so can get to the print for removal.
Now trying to get RH to forget the G90 and G1 code after the M84.

You could place some code in slic3r end-code box which might overwrite what RH is storing or in the Slicer tab on RH click the manager button, at the bottom is a reset button, click that, then close and re open RH and slice a file and check the g-code produced. Hopefully the 2 lines have gone.
Here is a link to some info about each g-code and it's meaning [reprap.org] It's useful to know some functions of g-code
There is also the folder for Repetier upon these forums [forums.reprap.org] as this could be a bug which needs fixing or fixed in the latest version.
As you haven't mentioned version numbers of what being used. I can't say any more than what I have said already.

Let us know how you get on.


Supporting 3D Printers with Parts and Build services.
Printer: Ormerod 2 (528.4) Duel extruder set-up with Aluminium X-Rib, RRPro Firmware v1.11-ch (2016-04-08)
Re: Runaway Y-axis with properly working endstop
January 13, 2016 10:21AM
I'll poke around in repetier config to see if I can find where that end code might be (did not have a chance today). Another option: remove M84 from Slic3r "end g-code" section, then Y axis should not be losing its position (although from my understanding of M84, it should not lose it's position, it would just be prone to things like shifting the bed manually, while Marlin things it stays at the same spot; but we'll see).
Re: Runaway Y-axis with properly working endstop
January 19, 2016 07:34AM
Ok, after having issues with the nozzle, breaking it, going away for a long weekend, I'm back to fixing my printer smiling smiley

I found a section in config for custom g-code in repetier host, but that does not have anything in there. I gave up on finding that, and added homing for Y axis in slic3r end code, removed "disable motors" part, so I should have no problems with the next line of "move to 0"

Thanks for the help!
Sorry, only registered users may post in this forum.

Click here to login