You are not logged in.

#1 2016-04-18 17:07:36

backXslash
Member
Registered: 2016-03-25
Posts: 151

Assistance With Pre and Post Layer GCode

I built a VERY simple top down DLP.

NanoDLP is actually running it like a champ, but my GCode for the actual printing is utter shite. Here are the specs:

Mitsubishi XD221U projector with color wheel relocated, UV filter removed, and 3mm spacer added to optics to shorten throw
GRBL 0.9j w/ SolidRay and a few of my own patches to help with NanoDLP stuff running on an Arduino Nano
EasyStepper 4.4 driver board
BluRay drive carriage from a Sony PlayStation 3 for the Z axis
Glass cup filled with resin for the vat


The printer itself is an even more barebones iteration of the Chimera from Instructables. I couldn't figure out how to get everything working correctly in absolute mode, so I just did this instead:

Start Of Print:
$X ; Unlock GRBL just in case
G91 ; Put positioning in relative mode
$H ; Home GRBL
G4 P0.1; SolidRay movement sync
[[WaitForDoneMessage]] ; Wait until movement completed

After Each Layer:
G91 ; Put positioning in relative mode just in case
G1 Z-5 F100; Sink to dip position
G4 P0.1; SolidRay movement sync
[[WaitForDoneMessage]] ; Wait for the movement finished
G4 P2 ; Wait for 2 seconds to ensure the resin has coated the print
[[WaitForDoneMessage]] ; Wait for the movement finished
G1 Z4.95 ; Raise the platform 0.05mm lower than the last exposure
G4 P0.1; SolidRay movement sync
[[WaitForDoneMessage]] ; Wait for the movement finished
G4 P7 ; Wait for resin to settle
[[WaitForDoneMessage]] ; Wait for the movement finished

End Of Print:
$X ; Unlock GRBL just in case we hit the bottom endstop
G01 Z+1 F100 ; Move away from the end stop so GRBL doesn't freak out
$H ; Home the Z axis to bring the print up out of the resin
G4 P0.1; SolidRay movement sync
[[WaitForDoneMessage]] ; Wait until movement completed

Basically, before starting a print, I home GRBL to set a repeatable start level and "level" the resin in the cup with the build plate by adding or removing resin. Then I open the terminal and sink the platform 15mm into the resin, this ensures there's definitely resin on the platform. Once the print starts, NanoDLP will unlock and home GRBL to return it to the resin surface. The layer is then exposed according to the configuration settings. Once the exposure is done, the platform is sunk 5mm below the resin level, and held there for 2 seconds. After that, the platform is raised to 0.05mm lower than it previously was, and held there for 7 seconds to let the resin settle. Then the next layer is exposed, wash, rinse, repeat.

I KNOW this is shitty GCode, but it DOES work. I'd much rather have it setup correctly, with absolute positioning and fallbacks in case of failure, but I honestly just couldn't wrap my head around it.

Can anyone help?

Offline

#2 2016-04-18 18:14:57

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: Assistance With Pre and Post Layer GCode

General idea is to use [[SetPosition ]] keyword to store correct position on nanodlp side just after each movement. And let nanodlp return correct position.

Checkout machine.json and profiles.json files from distro/muve3d/opt folder.

Offline

Board footer

Powered by FluxBB