You are not logged in.

#1 2016-05-23 21:28:37

jimshealy
Member
Registered: 2016-05-23
Posts: 6

Projector Projects before G-code is finished

Hey,

I'm using the nanodlp for a top down style printer and I'm having issues with the software not completing code before projecting an image

I'm using:

-baud rate of 9600
-Top down projection
-Ramps/Sanguinololu Z axis controller connected through serial to RPI

Before each layer I want to use the "gcode before layer" and wait until each command is finished in the in printer profile IE:

G1 Z-[[LayerThickness]] F85
[[WaitForDoneMessage]]
G1 Z-{1} F85
[[WaitForDoneMessage]]
G4 P{1000}
[[WaitForDoneMessage]]
G1 Z{1} F85
[[WaitForDoneMessage]]
G4 P{1000}
[[WaitForDoneMessage]]

however when I try to use the code, the software will start projecting before the "wait for done message" has been recieved. It seems to only wait for one or two commands to finish before going ahead and projecting.

Am I missing something obvious?

Thanks for any help!

-Jim Shealy

Offline

#2 2016-05-23 22:10:47

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

Re: Projector Projects before G-code is finished

Jim,

Could you share nanodlp's terminal tab output after start?

Offline

#3 2016-05-24 16:40:39

jimshealy
Member
Registered: 2016-05-23
Posts: 6

Re: Projector Projects before G-code is finished

I did some looking and reformatting and got it to project at the correct time (although the first layer is intermittently projecting incorrectly). Part of this may have come about by increasing the baud to 115200 and reducing latency.

Also, I'm running build: 1165 (for reference)

Here's the code that worked and the output in the terminal window note that I'm trying to use a dynamic lifting mechanism for various sized objects:

Layer start GCODE:
G1 Z-[[LayerThickness]] F85
[[WaitForDoneMessage]]
G1 Z-{[[LargestArea]]*.02} F85
[[WaitForDoneMessage]]
G4 P{1+[[LargestArea]]*10}
[[WaitForDoneMessage]]
G1 Z{[[LargestArea]]*.02} F85
[[WaitForDoneMessage]]
G4 P{1+[[LargestArea]]*10}
[[WaitForDoneMessage]]

Terminal output:

G1 Z-0.05 F85 
Z_move_comp 
G1 Z-2.0000 F85 
Z_move_comp 
G4 P1.0000 
Z_move_comp 
G1 Z2.0000 F85 
Z_move_comp 
G4 P1.0000 
Z_move_comp 
G1 Z-0.05 F85 
Z_move_comp 
G1 Z-2.0000 F85 
Z_move_comp 
G4 P1.0000 
Z_move_comp 
G1 Z2.0000 F85 
Z_move_comp 
G4 P1.0000 

This leads to a second issue, the variables:

[[TotalSolidArea]]
[[LargestArea]]

do not work correctly while printing early layers I captured some terminal feedback with some commented lines after each layer for debugging:

G1 Z-0.05 F85 
Z_move_comp 
G1 Z-1.0000 F85 
Z_move_comp 
G4 P1.0000 
Z_move_comp 
G1 Z-1.0000 F85 
Z_move_comp 
G4 P10.0000 
Z_move_comp 
;total area 0 ;max area 0 ;Layer number 56 

G1 Z-0.05 F85 
Z_move_comp 
G1 Z1.7944 F85 
Z_move_comp 
G4 P28.9441 
Z_move_comp 
G1 Z1.7944 F85 
G4 P37.9441 
Z_move_comp Z_move_comp 
;total area 52.5008544921875 ;max area 2.7944116592407227 ;Layer number 57 

once it hits ~layer 57 I start seeing the effect kick in. Do you have any idea why the early layers aren't getting variable outputs? fortunately these layers are still supports, but it makes it much harder to achieve a predictable result.

The third issue I noticed was inconsistent behavior with the pixel dimming options. When I uploaded sliced files from creation workshop (a zip of .png layers) no pixel dimming was applied, checkered or homogeneous. Having nanodlp slice a .stl file applied pixel dimming, but the dimmed amount was locked into whatever was set in the printer config when the file was uploaded. Changes to the config later seemed to have no effect. I'm currently working to test the asiga stomp program to see what the slc files will do. They seem to be updating, but I haven't finished investigating.

Offline

#4 2016-05-24 20:54:27

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

Re: Projector Projects before G-code is finished

[[TotalSolidArea]] and [[LargestArea]] are not available until completion of processing, so if you delay your print you could access to all layers. Mostly because it was easier to implement this way but it is possible to give access them immediately too.

No post processing including dimming, anti-alias and mask could be used on zip uploads as they should considered by the program exporting PNG files. But you have them for SLC/SVG/STL uploads.
And they will processed once after upload you could not change it, we have notification for this behaviour on profile edit page.

Offline

#5 2016-05-24 21:08:33

jimshealy
Member
Registered: 2016-05-23
Posts: 6

Re: Projector Projects before G-code is finished

The issue I run into is that even after the build is finished processing, they're still not available until about layer 60. do these layers not get updated if the file began printing before it was finished processing? Does nanodlp process the images for [[TotalSolidArea]] each time it's printed, or just once upon upload?


-Jim Shealy

Offline

#6 2016-05-24 21:37:00

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

Re: Projector Projects before G-code is finished

No it just once per upload and only for STL/SVG/SLC not png files. It should post back any details just after completion. Anyways I will take a look to see if I could share data in realtime without any performance penalty.

Offline

#7 2016-05-25 12:54:05

jimshealy
Member
Registered: 2016-05-23
Posts: 6

Re: Projector Projects before G-code is finished

Realtime processing of the layer data would be extremely helpful!

I tried re-uploading the file and waiting until it was finished processing (uploaded overnight and came back in the morning) and the data was available on all layers as you mentioned. It would be nice if there was a tone or sound that would play when a file was finished processing (similar to the build completion sound).

Thanks for the help and let me know if you get the realtime version running!

Offline

#8 2016-05-26 17:17:05

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

Re: Projector Projects before G-code is finished

It is ready but I will push it as beta later, there are couple of other features need completion.

Offline

Board footer

Powered by FluxBB