1 (edited by pfi93000 2022-01-30 22:19:42)

Topic: xyzprinting da Vinci Jr. 2.0 Mix and cura

Hello,

This post is to share how I (try to) use cura with a da Vinci Jr. 2.0.

Since january 2020, some 3D printers from XYZPrinting can received gcode from cura (nano Series: da Vinci nano, da Vinci nano w, mini Series: da Vinci miniMaker, Vinci mini w, Vinci mini w+, Jr. Series: da Vinci Jr. 1.0, da Vinci Jr. 1.0 w, da Vinci Jr. 1.0 3-in-1, Pro Series: da Vinci Jr. 1.0 Pro, da Vinci Jr. 1.0 A Pro, da Vinci Jr. WiFi Pro), but not the da Vinci Jr 2.0 Mix.

The Jr 2.0 Mix is strange, with one extruder and 2 spools

I would like to use cura because :
- I would like to have choices for my slicer, and not locked with the XYZWare software
- I would like to have more choices for infill types

What I've lost :
- the simple software XYZware, which works out of the box
- the change of mixing the 2 spools inside one item. I can have only one mix for each item (sample : item 1 with 10% spool #1 and 90% spool #2 from bottom to the top). A cura plugin could be developt for that, I think.
- the display of the time during the printing phase, on the printer.

I've read the amazing "print gcode files to miniMaker"  ( http://www.soliforum.com/topic/17028/pr … minimaker/ ), and I've adapted the code for my 3D Printer.

I’ve modified the following lines :

diff --git a/miniMoverLib/xyzv3.cpp b/miniMoverLib/xyzv3.cpp
index 3a217f9..6e27d84 100644
--- a/miniMoverLib/xyzv3.cpp
+++ b/miniMoverLib/xyzv3.cpp
@@ -38,7 +38,7 @@
 // uncomment to force wifi connections to close between messages
 //#define CLOSE_ON_WIFI

-const char *g_ver = "v0.9.6 Beta";
+const char *g_ver = "v0.9.6 Mix2";

 const XYZPrinterInfo XYZV3::m_infoArray[m_infoArrayLen] = { //  File parameters        Machine capabilities
        //   modelNum,       fileNum, serialNum,          webNum,    IsV5, IsZip, comV3,   tmenu, hbed,  dExtr, wifi,  scan, laser,    len, wid, hgt,   screenName
@@ -569,7 +569,7 @@ void XYZV3::parseStatusSubstring(const char *str)
                                break;

                        case 'p': // printer model number, p:mn - model_num
-                               //p:dv1MX0A000
+                               //p:dv2JW0A000
                                sscanf(str, "p:%s", m_status.pMachineModelNumber);
                                m_info = XYZV3::modelToInfo(m_status.pMachineModelNumber);
                                break;
@@ -2984,7 +2984,7 @@ bool XYZV3::encryptFile(const char *inPath, const char *outPath, int infoIdx)
                info = XYZV3::indexToInfo(infoIdx);
 #ifdef _DEBUG
        if(!info)
-               info = XYZV3::modelToInfo("dv1MX0A000");                // miniMaker
+               info = XYZV3::modelToInfo("dv2JW0A000");                // Da Vinci Jr Mix 2.0
                //info = XYZV3::modelToInfo("dvF100B000");              // 1.0
 #endif

@@ -4129,7 +4129,7 @@ bool XYZV3::processGCode(const char *gcode, const int gcodeLen, const char *file
                                // and capture info if possible
                                // ; filename = temp.3w
                                // ; print_time = {estimated time in seconds}
-                               // ; machine = dv1MX0A000 // change to match current printer
+                               // ; machine = dv2JW0A000 // change to match current printer
                                // ; facets = {totalFacets}
                                // ; total_layers = {totalLayers}
                                // ; version = 18020109
@@ -4182,10 +4182,11 @@ bool XYZV3::processGCode(const char *gcode, const int gcodeLen, const char *file
                        tcode = readLineFromBuf(tcode, lineBuf, lineLen);
                }

-               // create working buffer with extra room
-               int bBufMaxLen = gcodeLen + 1000;
+               // create working buffer with extra room (for T0 lines and header)
+               int bBufMaxLen = ( 2 * gcodeLen ) + 1000;
                int bbufOffset = 0;
                char * bBuf = new char[bBufMaxLen];
+                char t0[1024] = "T0 P0.500";
                if(bBuf)
                {
                        // make a fake header to keep printer happy
@@ -4267,16 +4268,33 @@ bool XYZV3::processGCode(const char *gcode, const int gcodeLen, const char *file
                                        if(wasHeader)
                                                headerEnd = bbufOffset;

-                                       // convert G0 to G1
+                                        // save T0 lines
+                                        if(strstr(lineBuf, "T0 P"))
+                                                strcpy(t0, lineBuf);
+
+                                       // convert G0 to G1 + T0
                                        char *s = strstr(lineBuf, "G0");
                                        if(!s)
                                                s = strstr(lineBuf, "g0");
                                        if(s)
+                                        {
                                                s[1] = '1';
-
-                                       // copy to file
-                                       strcpy(bBuf + bbufOffset, lineBuf);
-                                       bbufOffset += strlen(lineBuf);
+                                                // copy to file G1
+                                                strcpy(bBuf + bbufOffset, lineBuf);
+                                                bbufOffset += strlen(lineBuf);
+                                                // copy to file T0
+                                                strcpy(bBuf + bbufOffset, t0);
+                                                bbufOffset += strlen(t0);
+                                         } else {
+                                         // other than G0 lines
+                                                // and other than M104 S0
+                                                if(!strstr(lineBuf, "M104 S0"))
+                                                {
+                                                       // copy to file
+                                                       strcpy(bBuf + bbufOffset, lineBuf);
+                                                       bbufOffset += strlen(lineBuf);
+                                                }
+                                        }
                                }

                                tcode = readLineFromBuf(tcode, lineBuf, lineLen);

and in the folder miniMoverConsole, with gpp and make, I’ve generated the minimover command.

Cura generates gcode, minimover converts the gcode into 3w, and I use the SDCard or XYZware to transfert the 3w file to the printing.

About the gcode,
M104 can set the temperature ( M104 S195 )
M109 should wait for temperature to be reached, but I can’t confirme that. ( M109 S195 )
I’ve used that for a temperature tower.

the gcode T0 is used to set the pourcentage of the spool #1. Spool #2 is calculated with this number also.
T0 P0.200 is to set spool #1 20% and spool #2 80%
T0 P1.000 is to set spool #1 100%
T0 P0.000 is to set spool #1 0% and spool #2 100%
The gcode T0 have to be set after each move without using the spool (G0 or G1 without Exxx)


Inside cura, I’ve created a printer with 5 extruders
150mm x 150 mm x 150 mm
Build plate shape : rectangular
G-code flavor : Marlin
Printhead settings : Xmin 0, Ymin -10, Xmax 10, Ymax 10
Gantry Height 100
Number of Extruders 5
Apply Extruder offsets to Gcode : checked (yes)


Start gcode

G21 ; set units to millimeters
M107
M104 S200
M109 S200
M191 ; display cancel menu
G90 ; use absolute coordinates
T0 P0.5
G1 F1800.000 E-7.50000
G92 E0
M82 ; use absolute distances for extrusion

End gcode

T0 P0.5
G92 E0
M84 ; disable motors

For each Extruder
Nozzle size 0.4mm
compatible material diameter 1.75mm
Nozzle offset X and Y 0
Cooling Fan Number 0
Extruder Start gcode

T0 P1.000 ; 100% filament #1
G1 F1800.000 E4.00000
T0 P1.000

Extruder end gcode

G1 F1800.000 E-4.00000

Change the % on each Extruder : Extruder #1 100 %, Extruder #2 80 %, Extruder #3 50 %, Extruder #4 20 % and Extruder #5 0 %.
You can create more Extruder, if you wish.

I’ve created material with these pourcentages, and associated them to the extruder to view the pourcentage.

My first try was with a too slow speed and a too high temperature. The nozzle has been captured inside a too much amount of cold filament. I’ve to find the good speed and temperature.

XYZPrinting da Vinci Jr 2.0 Mix