Welcome! Log In Create A New Profile

Advanced

MARLIN C0DE Help - Automated Filament Changer and Bed Leveling

Posted by yoUmake-3d 
MARLIN C0DE Help - Automated Filament Changer and Bed Leveling
September 01, 2015 01:34PM
Hey Everyone!

I am trying to find 2 functions in marlin. Do these exist?

1) A change filament setup so when it is selected on the LCD the hot end heats up, then the filament retracts all the way, then a prompt is given to add new material?

2) Bed leveling (non-automated): Looking for where a bed leveling sequence will engage and allow manual adjustment of the heat bed. Such as: selecting a bed leveling option on the lcd, the bed raises to max with the hot end in the back corner. After adjustment selecting next, hot end goes to left back corner. Selecting next, hot end front right corner ... you get the idea.

Do you know of this being in the marlin firmware? If so could you direct me where it is located?
Re: MARLIN C0DE Help - Automated Filament Changer and Bed Leveling
September 02, 2015 04:44AM
In regards to changing filament,

I have been playing around with Marlin 1.1 DEV, the only thing that I seen is the filament run out feature. Basically when printing from a SD card you have a switch wired in to an I/O which when the filament runs out it activates a Gcode of M600.
This then causes the Z , X and Y axis to be moved to a preset postion which you can set, also filament can be pulled back by a set distance and certain stepper motors can be de-powered. LCD then flashes and shows "Filament Change". This then allows you to manually replace the filament. The hotend and print bed heaters are kept on. When finished you then press the LCD knob to continue printing.


Therefore there is nothing that selectable on the LCD.
While there are ways to setup LCD menus to run gcodes. I built a CoreXY machine to which I have added a few extra menus to home my XY axis and another just to home my Z axis and another to lower my Z axis.

As M600 doesn't heat up the hotend it won't be of much use to what you want.
Filament runout uses gcode M600 , it is currently setup to only function when printing from a SD card. I did disable the SD code to see how it worked when printing from a PC when the filament ran out, I did read that an issue occurs when the PC times out and everything stops when you take too long to change the filament. Got to have a bit more of a play to see how long and whether pausing Ponterface does anything to stop the time out.

Note: I did find that when I first tried using the filament runout option I couldn't stop the flashing LCD to turn off and continue printing by pressing the LCD knob. Ended up commenting out the flashing bit of the code which then worked. later added if command when the code is waiting for the LCD knob to be pressed to cause the beeper to sound if no filament is present.

Not using bed levelling so unable to comment, but if there is a gcode it should be able to be added to the LCD menu.


-------------------------------------------------------------------------------------------------------------------------------------------
For your information......

Adding home x to the LCD is easy. All you need to do is find the following in ultralcd.cpp

MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));


Then after this you can add additional menu’s,
E.G. - LCD Menu Description “XXXXXXX XXX” and required Gcode

Example below of code to add.

MENU_ITEM(gcode, "Auto Home X", PSTR("G28 X0"));

-------------------------------------------------------------------------------------------------------------------------------------------

Cheers Bruce Builder of a Openbeam CoreXY printer and Mendle M5 Battle Tank printer.
Re: MARLIN C0DE Help - Automated Filament Changer and Bed Leveling
September 02, 2015 04:14PM
Great Thanks,

In the next few weeks I want to get into the code a bit. I feel like it would be a simple code to run through.

For the Change Filament:
1) Add object to the menu screen
2) connect that object so when activated runs through a sequence on g-code.
a. heat up hot end
b. move extruder backwards x mm.
c. prompt user
d. move extruder forwards
e. prompt user
f. end

For bed leveling:
1) Add object to menu
2) connect object so when activated runs through the following g-code
a. move hot end to (0,0,0) on heatbed
b. prompt user
c. move hot end to (xmax,0,0) on heatbed
d. prompt user
e. move hot end to (0,ymax,0) on heatbed
f. prompt user
g. move hot end to (xmax,ymax,0) on heatbed
h. prompt user
i. end

Correct?
Re: MARLIN C0DE Help - Automated Filament Changer and Bed Leveling
September 02, 2015 06:07PM
Hopefully it shouldn't be too much of a mission
As I see it....

Filament change -
M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
Press LCD knob to allow LCD menu (feed and retract filament and Exit menu's only) to be used to feed new filament in. (Menu needs to be created)
After changing filament
Select menu to exit filament changing . (Menu needs to be created)
M104 - Set extruder target temp - Turn extruder temp off.

Note: When using M600 after pressing the LCD knob all the axis are returned to original position - you will need to delay this if you want to be able to use a menu for feeding and retraction.
M600 only allows for manual loading.


Bed levelling -
G28 - Home one or more axes
G29 - Detailed Z-Probe, probes the bed at 3 or more points. Will fail if you haven't homed yet.


Have fun.. cheers
Sorry, only registered users may post in this forum.

Click here to login