Wanhao Duplicator D8


#1

Would really like to see export options for the Wanhao Duplicator D8. I love using Formware on our Anycubic Photon and D7, but can’t seem to get it to output compatible files for the D8. Please help!

Thanks,
Will


#2

Hi Will,

Looks like it should be just a zip folder with PNG’s and GCode. Maybe the GCode is the problem. It’s usually a black box what they decide to put on the firmware in the machines…
I will check it and get back to you in a day.

Elco


#3

Hi Elco,

Thanks very much. Yes, I think you are correct. The .Zip structure is like this:

Individual Slice is just .png (8-bit)

Two preview images:
“preview.png,” Full-size preview is dependent on the size of the parts being printed, but is more or less in-line with the projection size
“preview_cropping.png” is also dependent on the size of the parts, but I believe the max size is 640x480.

Gcode file is named “run.gcode”

Here is a snipped of working D8 GCode generated by Chitubox:

Start:
G21;
G90;
M106 S0;
G28 Z0;

Slice:
M6054 “.png”;show Image
G0 Z<retract (ABSOLUTE POSITIONING)> F;
G0 Z<layer height (ABSOLUTE POSITIONING)> F;
G4 P;
M106 S255;light on
G4 P;
M106 S0; light off

End:
M106 S0;
G1 Z180 F25;
M18;

Hopefully that is helpful.

Thanks!
Will


#4

Hi Will,

Thanks for this info. It would translate to:

;START_GCODE_BEGIN
G21;
G90;
M106 S0;
G28 Z0;
;START_GCODE_END

;LAYER_START:$SliceNr
;currPos:($SliceNr * $LayerThickness)
M6054 “($SliceNr).png”;show Image
G0 Z($ZLiftDistance + ($SliceNr * $LayerThickness)) F$ZRetractSpeed;
G0 Z(($SliceNr+1) * $LayerThickness) F($SliceNr < $BtmLyrs?$ZBottomSpeed:$ZLiftSpeed);
G4 P0; optional extra light delay.
M106 S255;light on
G4 P($SliceNr < $BtmLyrs?$ExTimeBottom:$ExTime);
M106 S0; light off
;LAYER_END

;END_GCODE_BEGIN
M106 S0;
G1 Z180 F25;
M18;
;END_GCODE_END

I will create some extra options now to handle the different file naming conventions. Guess we need some more flexibility there anyway…


#5

Hi Will,

I’ve published a version that has the machine in it.
Would be great if you could have a test with it to let me know if it reads the generated GCode and PNG’s ok.

I had to modify some items:

  • 2 previews can be exported now with custom names
  • name of gcode file can be set
    guess this makes it a bit more flexible now…

kind regards
Elco


#6

Hi Elco,

Thank you so much! Alas, it still doesn’t work. When attempting to load the file on the D8, the progress wheel just spins for a few seconds, then fails without an error message.

I did some comparison and testing between a known working slice package of the identical model (and print settings) generated with ChiTuBox 1.3.0.

The only differences I could see in the files themselves were in some spacing and comments in the gcode files, and the preview .png files. I modified the spacing in the gcode file, manually added the comments, removed the additional .xml files from the Formware .zip, and replaced the images in the Formware created file with those from the ChiTuBox file, and it still fails.

The only OTHER difference I see is in the file permissions and Host OS descriptors in the .zip files. ChiTuBox reports host OS as Unix and applies Unix permissions, among other things. I’ve attached two screenshots of the zip files so you can see what i’m talking about, as well as a link to the .zip files themselves, here: https://www.dropbox.com/sh/ouybap2qzuqe98g/AABa-0PzKP7n98SqJWG7ea4qa?dl=0

Hopefully that helps. Thanks again!

Will


#7

Hi Will,

Mmmm always something mysterious going on…

I noticed something else; when you open the run.gcode on windows machine (in notepad) all gcode is in 1 big line. When you open the file formware3d generates you see it’s 1 line per gcode line.
Perhaps they use different line ending characters… do you see the same??

Elco


#8

found another thing… the previews from chitubox are 24bit instead of 32bit png’s… given that the previous wanhao d7 systems also seemed picky about bitness of png’s that might also influence it maybe…


#9

but if you exchange them and it still doesn’t work that shouldn’t matter…

what if you exchange the GCode file only? does it work then? that would immediately rule out any other things… would be good to know to fix further…


#10

checked the byte content of the files you send me, the run.gcode form Chitubox contains only CR (carriage return) as a end of line byte. This probably means the software is created on mac osx.

Windows machines typically use LF (line feed) + CR (carriage return) when writing a textfile.

So it might be that the D8 get’s confused when it only expects CR to read a line; but gets LF…
However if each GCode is split by a semicolumn…
It will depend on how good/clean their firmware is written.

We would know when switching only the GCode files if this is the case… if you have the time please test this.

thx a lot for your feedback,
Elco


#11

Hi Elco,

Ah! I hadn’t noticed the LF+CR because I was viewing in Notepad++. Anyways, I switched the GCode files and it worked! Hopefully that solves it!

Will


#12

ok. So it’s in the GCode… i’ll try change the line ending char in a variable in the afternoon…


#13

Hi will,

I’ve uploaded a version to our website that lets you choose the end of line character.
I’ve defaulted it for the D8 to only Linefeed (that’s what it was in the comparable file)

Hope this fixes the issue…

otherwise i have to copy the entire header… don’t hope so…


#14

Hey Elco,

Sorry for the delay in responding. Good news and bad news: good news - I got it to work. Bad news, it took pasting and tweaking the GCode header from another file.

;fileName:(filename here).stl #0 (I don’t know what #0 is)
;machineType:WanHao D8
;estimatedPrintTime:(estimated print time)
;volume:(estimated print volume in s)
;resin:normal (I think this corresponds to the resin settings stored in the D8, but since the GCode overrides it, I’m not sure why it would be needed)
;weight:(estimated weight in g)
;price:(This comes out of ChituBox, and I don’t know if it is needed. I filled with 0.)
;layerHeight:(layer height in mm, like 0.05)
;resolutionX:2560 obvious
;resolutionY:1600 obvious
;machineX:192 obvious
;machineY:120 obvious
;machineZ:180 obvious
;projectType:LCD_mirror
;normalExposureTime:(normal exposure time in SECONDS (not MS))
;bottomLayExposureTime:(bottom layer exposure time in SECONDS (not MS))
;normalDropSpeed:(normal retract speed in mm/min)
;normalLayerLiftHeight:(Z Lift Distance, in mm)
;zSlowUpDistance:0 (Maybe just leave this at 0?)
;normalLayerLiftSpeed:(Z Lift Speed in mm/min)
;bottomLayCount:5 obvious
;mirror:1
;totalLayer:(total layers)
;bottomLayerLiftHeight:(will be the same as Z Lift Distance, in mm)
;bottomLayerLiftSpeed:<Z Bottom Speed in mm/min)
;bottomLightOffTime:(will be the same as Off time between layers, IN SECONDS (not ms))
;lightOffTime:(Off time between layers, IN SECONDS (not ms))

Also, the print profile still defaulted to LF+CR for me, so I changed it to LF only.

My suspicion is that they are using some of the commented header lines to drive the data shown on the display while printing. It’s ridiculous and sloppy when the data is all there in the GCode anyways, but less parsing, I suppose. It likely also explains why when you start printing something, the estimated completion time is always way off and slowly “homes in” as you print. It probably starts by displaying the “estimatedPrintTime” from the header, then calculates as it goes.

If my hunch is correct, then the three values which need to be more or less correct (because they are displayed on screen) are:

estimatedPrintTime
totalLayer
layerHeight

One more thing: the .zip filename MUST start with “_” so maybe you can add that to the profile as well. Again… why?

Anyways, I think success is in sight! Thank you so much for your help!

Will


#15

Hi Elco,

Update on this - I’ve been manually editing the header and getting some success in using Formware with the D8, and the printer does take quite a bit of information from the header, so the following parameters need to be populated with actual data:

machineType
estimatedPrintTime (just cannot be blank)
layerHeight
resolutionX
resolutionY
machineX
machineY
machineZ
projectType
normalExposureTime
bottomLayExposureTime
normalDropSpeed
normalLayerLiftHeight
zSlowUpDistance
normalLayerLiftSpeed
bottomLayCount
mirror
totalLayer
bottomLayerLiftHeight
bottomLayerLiftSpeed
bottomLightOffTime
lightOffTime

The following settings have been working reasonably well with Monocure Rapid Gunmetal Gray, and might be useful for a default setting:

normalExposureTime:11 (11000ms)
bottomLayExposureTime:60 (60000ms)
normalDropSpeed:150
normalLayerLiftHeight:6 <–This can probably be smaller, like 4mm.
zSlowUpDistance:0 <—I am going to experiment with this more, because I think it could be useful. I am getting separation in prints sometimes when transitioning from bottom to main layers, and this might help.
normalLayerLiftSpeed:150
bottomLayCount:5
mirror:1 <-- I confirm this does need to be 1 assuming “mirror Y” is checked in Formware. Interestingly enough, using the D8’s built-in wifi slicer, models are reversed when printed. An annoying find when printing a large part which needed to be oriented correctly.
bottomLayerLiftHeight:6
bottomLayerLiftSpeed:150
bottomLightOffTime:5
lightOffTime:1

Thanks!
Will


#16

Hi Will,

Thanks for all this input.

  • I’ve just expanded the range of variables available for parsing and duplicated all these header values. (see below)
  • Header of the GCode made the same with help of these variables
  • EOL character; this is defaulted to LF now.
  • printtime adjusted the calculation to exposuretimes + axis movement
  • resincost/resin desnity added in profiles
  • jobfilename for D8 starts with _
  • entered your values as default where possible

I will send you a beta installer to test over wetransfer. I think i have your email from our inbox.

Thanks for testing !

Elco

· $FirstPartName: name of the first part in your project
· $PrintTimeEstimate: estimate of the print time in seconds. Based on exposure time + axis speed
· $VolumeMl: volume of the print in milliliters
· $ProfileName: print profile name
· $Weight: weight of your print in grams
· $Price: price of your print in user defined currency
· $PixelsX: pixels in X direction
· $PixelsY: pixels in Y direction
· $MachineSizeX: machine size in X direction in millimeter
· $MachineSizeY: machine size in Y direction in millimeter
· $MachineSizeZ: machine size in Z direction in millimeter
· $ExpTimeSeconds: exposure time for each layer in seconds (instead of ms)
· $ExpTimeBottomSeconds: exposure time for bottom layers in seconds (instead of ms)
· $AutoDelay: calculates the total move time going up and down in ms. Use i.e. like “;DELAY$AutoDelay”"
· $OffTimeBetweenLayersSeconds: off time between layers in seconds.

#17

Hi Elco,

Success!!!

Running a test print now, and I’ll let you know if I see anything else that needs to be tweaked.

Thanks so much for all your help!
Will


#18

No problem! Happy to have someone testing it to find all hidden secrets in these machines :slight_smile: !

Elco