<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[SoliForum - 3D Printing Community — xyzprinting da Vinci Jr. 2.0 Mix and cura]]></title>
	<link rel="self" href="https://www.soliforum.com/feed/atom/topic/18980/" />
	<updated>2022-01-30T22:05:04Z</updated>
	<generator>PunBB</generator>
	<id>https://www.soliforum.com/topic/18980/xyzprinting-da-vinci-jr-20-mix-and-cura/</id>
		<entry>
			<title type="html"><![CDATA[xyzprinting da Vinci Jr. 2.0 Mix and cura]]></title>
			<link rel="alternate" href="https://www.soliforum.com/post/155223/#p155223" />
			<content type="html"><![CDATA[<p>Hello,</p><p>This post is to share how I (try to) use cura with a da Vinci Jr. 2.0.</p><p>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.</p><p>The Jr 2.0 Mix is strange, with one extruder and 2 spools</p><p>I would like to use cura because :<br />- I would like to have choices for my slicer, and not locked with the XYZWare software<br />- I would like to have more choices for infill types</p><p>What I&#039;ve lost :<br />- the simple software XYZware, which works out of the box<br />- 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.<br />- the display of the time during the printing phase, on the printer.</p><p>I&#039;ve read the amazing &quot;print gcode files to miniMaker&quot;&nbsp; ( <a href="http://www.soliforum.com/topic/17028/print-gcode-files-to-minimaker/">http://www.soliforum.com/topic/17028/pr … minimaker/</a> ), and I&#039;ve adapted the code for my 3D Printer.</p><p>I’ve modified the following lines :<br /></p><div class="codebox"><pre><code>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 = &quot;v0.9.6 Beta&quot;;
+const char *g_ver = &quot;v0.9.6 Mix2&quot;;

 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 &#039;p&#039;: // printer model number, p:mn - model_num
-                               //p:dv1MX0A000
+                               //p:dv2JW0A000
                                sscanf(str, &quot;p:%s&quot;, 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(&quot;dv1MX0A000&quot;);                // miniMaker
+               info = XYZV3::modelToInfo(&quot;dv2JW0A000&quot;);                // Da Vinci Jr Mix 2.0
                //info = XYZV3::modelToInfo(&quot;dvF100B000&quot;);              // 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] = &quot;T0 P0.500&quot;;
                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, &quot;T0 P&quot;))
+                                                strcpy(t0, lineBuf);
+
+                                       // convert G0 to G1 + T0
                                        char *s = strstr(lineBuf, &quot;G0&quot;);
                                        if(!s)
                                                s = strstr(lineBuf, &quot;g0&quot;);
                                        if(s)
+                                        {
                                                s[1] = &#039;1&#039;;
-
-                                       // 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, &quot;M104 S0&quot;))
+                                                {
+                                                       // copy to file
+                                                       strcpy(bBuf + bbufOffset, lineBuf);
+                                                       bbufOffset += strlen(lineBuf);
+                                                }
+                                        }
                                }

                                tcode = readLineFromBuf(tcode, lineBuf, lineLen);</code></pre></div><p>and in the folder miniMoverConsole, with gpp and make, I’ve generated the minimover command.</p><p>Cura generates gcode, minimover converts the gcode into 3w, and I use the SDCard or XYZware to transfert the 3w file to the printing.</p><p>About the gcode, <br />M104 can set the temperature ( M104 S195 )<br />M109 should wait for temperature to be reached, but I can’t confirme that. ( M109 S195 )<br />I’ve used that for a temperature tower.</p><p>the gcode T0 is used to set the pourcentage of the spool #1. Spool #2 is calculated with this number also.<br />T0 P0.200 is to set spool #1 20% and spool #2 80%<br />T0 P1.000 is to set spool #1 100%<br />T0 P0.000 is to set spool #1 0% and spool #2 100%<br />The gcode T0 have to be set after each move without using the spool (G0 or G1 without Exxx)</p><br /><p>Inside cura, I’ve created a printer with 5 extruders<br />150mm x 150 mm x 150 mm<br />Build plate shape : rectangular<br />G-code flavor : Marlin<br />Printhead settings : Xmin 0, Ymin -10, Xmax 10, Ymax 10<br />Gantry Height 100<br />Number of Extruders 5<br />Apply Extruder offsets to Gcode : checked (yes)</p><br /><p>Start gcode<br /></p><div class="codebox"><pre><code>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</code></pre></div><p>End gcode<br /></p><div class="codebox"><pre><code>T0 P0.5
G92 E0
M84 ; disable motors</code></pre></div><br /><p>For each Extruder <br />Nozzle size 0.4mm<br />compatible material diameter 1.75mm<br />Nozzle offset X and Y 0<br />Cooling Fan Number 0<br />Extruder Start gcode<br /></p><div class="codebox"><pre><code>T0 P1.000 ; 100% filament #1
G1 F1800.000 E4.00000
T0 P1.000</code></pre></div><p>Extruder end gcode<br /></p><div class="codebox"><pre><code>G1 F1800.000 E-4.00000</code></pre></div><p>Change the % on each Extruder : Extruder #1 100 %, Extruder #2 80 %, Extruder #3 50 %, Extruder #4 20 % and Extruder #5 0 %.<br />You can create more Extruder, if you wish.</p><p>I’ve created material with these pourcentages, and associated them to the extruder to view the pourcentage.</p><p>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.</p>]]></content>
			<author>
				<name><![CDATA[pfi93000]]></name>
				<uri>https://www.soliforum.com/user/26586/</uri>
			</author>
			<updated>2022-01-30T22:05:04Z</updated>
			<id>https://www.soliforum.com/post/155223/#p155223</id>
		</entry>
</feed>
