The place to discuss your hardware and software/firmware modifications...


Postby Swami » Sun Jan 21, 2018 1:32 am


- Holds g-code that gets executed on startup.
- Files go in root of SD card.
- Having limited success:
- Not sure what “normal” behavior should be, but...
- ...What I’m observing on startup:
-- Display shows ‘auto0.g’ (and executes the code), but
-- ‘...Ready’ does NOT appear, though system seems ready.
- And, having issues with homing (G28) via auto0.g:
-- Printer auto homes, but motors then deenergize, and values not stored.
-- Tried explicit call to energize motors (M17), but too late, apparently, so to no avail :(
-- Tried explicit call to store values (M500), but to no avail :(
- Am having success turning on fans, though :) (electronics/coldend).

So, auto homing on startup is not required, but adds a level of safety when subsequently executing absolute moves of the nozzle, as system must initially get x, y, z values from endstops to know reference for origin. Of course, auto homing on startup does present its own potential problem: if bed is not clear, things could collide :(

This is important to me, as I’m implementing the latest Marlin (1.1.8)/Arduino (1.8.5) on Makergear M2 to add some features via an LCD controller (Viki 1). Among these is an assisted bed leveling via CUSTOM_USER_MENUS. These simply move the nozzle to strategic locations (center, over adjustment screws, & each corner) - but this needs the proper origin reference!
(FYI, by default, Marlin only supports 5 custom menu items, but I hacked the firmware, and now you get 10! :) And, more are possible, if desired.)

OK, I realize this is a rather esoteric aspect of the firmware, but I’m hoping some clever, experienced programmers are here and can shed some light...

User avatar
Posts: 19
Joined: Sun Dec 03, 2017 11:17 pm
Location: Orlando, FL


Postby insta » Mon Jan 22, 2018 5:03 pm

There's a command in Configuration_adv.h that's something like SDCARDFINISH that explicitly runs an M84 command to disable all motors.

You really only need one custom command to do the bed leveling and nozzle height adjustment:
Code: Select all
M84\nG28 X0 Y0\nG1 X103 Y125 F3000\nM84\nG28 Z0\nG1 Z0 F1200

Retract your filament entirely before running it, heat the machine to PLA temps, and scrub the nozzle with a brass brush. Run that command. Loosen the screw holding the hotend in place to get a perfect Z=0. Then, in clockwise order, loosen the bed-level screw a few turns and just push the X and Y axies around to where you need them to check the level. For a Rev-E, that's the 4 corners, for a Rev-D, that's front & back first, then right and left.

I have 1.1.8 set up with the Rev E for Viki1 i a local Git branch. I can push it to a remote on GitHub if you'd like to follow along.
Custom 3D printing for you or your business -- quote [at]
User avatar
Posts: 1965
Joined: Tue Sep 16, 2014 3:59 am

Return to Modifications

Who is online

Users browsing this forum: No registered users and 1 guest