You are not logged in.

#1 2016-06-02 06:39:02

sgraber
Member
From: Indiana
Registered: 2016-03-11
Posts: 54
Website

Layer delay math?

Hi! I wanted to know if it is possible to somehow use NanoDLP variables for programically determining the length of time between images being displayed?

For example: I have a LittleRP with a flexvat.  I have NanoDLP set to slowly pull away from my flexvat at 25mm/min to a height of 5mm, then a rapid return at 200mm/min.  Programically, the blank time would be:

(5mm / 25mm/min * 60 sec/min) + (5mm / 200mm/min * 60 sec/min) = 12 sec + 1.5 sec = 13.5 sec

I then normally add about 1.5-2 sec additional time to this calculation so the resin has a bit of time to flow and level under the build platform prior to displaying the next image.

With that added,my blank time would be around 15sec.

Is it somehow possible to do this programically in NanoDLP?  That way I can change either my pull speed and/or my lift height and not have to manually change the

Here is my settings and printer setup:

Profile:  http://i.imgur.com/d0StqMI.png
Hardware Setup:  http://i.imgur.com/UBShnMB.png

Given the variables that we can use for calculations, I have to believe this is somehow possible...I'm just not seeing it.  smile

Offline

#2 2016-06-02 17:23:56

sgraber
Member
From: Indiana
Registered: 2016-03-11
Posts: 54
Website

Re: Layer delay math?

Here's an idea I came up with while chatting with folks on IRC:  use [[Delay x.x]] .

Would the following work in the "GCODE After Each Layer" box?

[[Delay (( [[ZLiftDistance]] / [[ZSpeed]] * 60 ) + ( [[ZLiftDistance]] / 200 * 60 ) + 2.0 ) ]]

It yields [[Delay (12 + 1.5 + 2.0)]] or [[Delay 15.5]]

Thoughts?

Or to make it a bit more readable:

G1 Z[[ZLiftDistance]] F[[ZSpeed]]
[[Delay ( [[ZLiftDistance]] / [[ZSpeed]] * 60 ) ]] ; wait this time for z-lift movement

G1 Z{[[LayerThickness]]-[[ZLiftDistance]]} F200
[[Delay ( ( [[ZLiftDistance]] - [[LayerThickness]] ) / 200 * 60 ) ]] ; wait this time for z-return movement

[[Delay 2.0]] ; wait additional 2.0 sec to allow resin to level under build plate

Last edited by sgraber (2016-06-02 18:05:38)

Offline

#3 2016-06-04 05:21:54

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

Re: Layer delay math?

Considering priority of gcode parser logic, I believe solution which you came up with is correct. Let me know if it does not work.

Offline

#4 2016-06-05 14:13:06

sgraber
Member
From: Indiana
Registered: 2016-03-11
Posts: 54
Website

Re: Layer delay math?

Shahin wrote:

Considering priority of gcode parser logic, I believe solution which you came up with is correct. Let me know if it does not work.

Interestingly enough, using multiple brackets, parentheses, etc. doesn't work.  You are only allowed one level deep.  For example, this works:

G1 Z{[[LayerThickness]]-[[ZLiftDistance]]} F200

and outputs:

G1 Z-4.9 F200

However note if you add a second layer of parenthesis:

G1 Z({[[LayerThickness]]-[[ZLiftDistance]]}) F200

outputs this in Terminal:

G1 Z(0.100-5.000) F200

Based on the docs, this should output the same as the first but it doesn't.

Offline

#5 2016-06-06 13:36:09

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

Re: Layer delay math?

Math parser works on strings insides pairs of {}.
So instead of this

G1 Z({[[LayerThickness]]-[[ZLiftDistance]]}) F200

Use this one

G1 Z{([[LayerThickness]]-[[ZLiftDistance]])} F200

Offline

#6 2016-06-06 15:47:22

sgraber
Member
From: Indiana
Registered: 2016-03-11
Posts: 54
Website

Re: Layer delay math?

Ah-ha!  Ok, that explains it!  Thank you!  smile

Offline

Board footer

Powered by FluxBB