<?xml version="1.0"?>

<!-- PDC for Ultimaker 2 -->

<PrintDeviceCapabilities
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xml="http://www.w3.org/XML/1998/namespace"
    xmlns:psk="http://schemas.microsoft.com/windows/2003/08/printing/printschemakeywords"
    xmlns:psk3d="http://schemas.microsoft.com/3dmanufacturing/2013/01/pskeywords3d"
    xmlns:psk3dx="http://schemas.microsoft.com/3dmanufacturing/2014/11/pskeywords3dextended"
    xmlns:pskv="http://schemas.microsoft.com/3dmanufacturing/2014/11/pskeywordsvendor"
    xmlns:psf="http://schemas.microsoft.com/windows/2003/08/printing/printschemaframework"
    xmlns:psf2="http://schemas.microsoft.com/windows/2013/12/printing/printschemaframework2"
    xmlns="http://schemas.microsoft.com/windows/2013/12/printing/printschemaframework2"
    version="2">
    <CapabilitiesChangeID xsi:type="xsd:string">{9F58AF07-DCB6-4865-8CA3-A52EA5DCB05F}</CapabilitiesChangeID>

  <psk3d:Job3DOutputArea psf2:psftype="Property">
    <psk3d:Job3DOutputAreaWidth>225000</psk3d:Job3DOutputAreaWidth>
    <psk3d:Job3DOutputAreaDepth>225000</psk3d:Job3DOutputAreaDepth>
    <psk3d:Job3DOutputAreaHeight>205000</psk3d:Job3DOutputAreaHeight>
  </psk3d:Job3DOutputArea>

  <psk3d:Job3DMaterials psf2:psftype="Property">

      <psk3dx:MaterialPLA>
         <psk:DisplayName>PLA</psk:DisplayName>
         <psk3d:Job3DMaterialType>psk3d:PLA</psk3d:Job3DMaterialType>
         <psk3d:MaterialColor>#FF0000FF</psk3d:MaterialColor>

         <psk3dx:platformtemperature>60</psk3dx:platformtemperature>
         <psk3dx:filamentdiameter>2850</psk3dx:filamentdiameter>
         <psk3dx:filamentcalibrationoverride>1.0</psk3dx:filamentcalibrationoverride>
         <psk3dx:extrudertemperature>205</psk3dx:extrudertemperature>

         <psk3dx:SpeedFactor>1.0</psk3dx:SpeedFactor>

         <psk3dx:SetupCommands>
            <!-- Executed during pre-commands: nozzle pre-heating, priming, etc --> 
            <psk3dx:command>T0</psk3dx:command>
            <psk3dx:command>M104 S$extrudertemperature$</psk3dx:command>
         </psk3dx:SetupCommands>

         <psk3dx:SelectCommands>
            <!-- Executed during printing: T0/T1 selection, nozzle wiping sequence,turn fan on/off/gradual, retract the material, temperature, etc--> 
            <psk3dx:command>; PLA on</psk3dx:command>
            <psk3dx:command>T0</psk3dx:command>
         </psk3dx:SelectCommands>

         <psk3dx:DeselectCommands>
            <!-- Executed during printing: retract the material, park the nozzle, reduce temperature, etc --> 
            <psk3dx:command>; PLA off</psk3dx:command>
         </psk3dx:DeselectCommands>

      </psk3dx:MaterialPLA>


  </psk3d:Job3DMaterials>

  <psk3dx:MS3DPrinter>

      <psk3dx:communication>
      <!-- communication parameters -->
        <psk3dx:connection name="serialport">
           <psk3dx:comport></psk3dx:comport><!-- or specify a file URI -->
           <psk3dx:baudrate>250000</psk3dx:baudrate>
          <psk3dx:mode>0</psk3dx:mode>
          <psk3dx:timeout>0</psk3dx:timeout>
        </psk3dx:connection>
      </psk3dx:communication>

      <psk3dx:customcommands>
        <psk3dx:precommands>
          <psk3dx:command>;?wait=SD card ok</psk3dx:command>
          <psk3dx:command>M110 N0</psk3dx:command>
          <psk3dx:command>T0</psk3dx:command>
          <psk3dx:command>M104 S$extrudertemperature$</psk3dx:command> <!-- Set extruder temperature -->
          <psk3dx:command>M140 S$platformtemperature$</psk3dx:command> <!-- Set bed temperature -->
          <psk3dx:command>G28</psk3dx:command>
          <psk3dx:command>G1 F12000 X5 Y10 Z20</psk3dx:command><!-- Fast move, but the firmware will limit it to the max Z speed -->
          <psk3dx:command>M109 S$extrudertemperature$</psk3dx:command><!-- Go to temperature -->
          <psk3dx:command>M190 S$platformtemperature$</psk3dx:command><!-- Go to temperature -->
          <psk3dx:command>M106 S$rampup$</psk3dx:command><!-- Start the fan -->
          <psk3dx:command>G92 E0</psk3dx:command><!-- Prepare for primary extrusion -->
          <psk3dx:command>G1 E20 F200</psk3dx:command><!-- Revert the 20mm end-of-print retraction -->
          <psk3dx:command>G1 E27.8 F50</psk3dx:command><!-- Extrude ~50mm^3 material to prime the nozzle, at ~5mm^3/sec -->
          <psk3dx:command>G92 E0</psk3dx:command>
          <psk3dx:command>G1 E-4 F500</psk3dx:command><!-- -->
          <psk3dx:command>G1 X100 F10000</psk3dx:command><!-- -->
          <psk3dx:command>G1 E0</psk3dx:command><!-- -->
        </psk3dx:precommands>

        <psk3dx:postcommands>
          <psk3dx:command>G91</psk3dx:command>
          <psk3dx:command>G1 E-5 F300</psk3dx:command>
          <psk3dx:command>G92 E0</psk3dx:command>
          <psk3dx:command>G1 Z1 F1200</psk3dx:command>    
          <psk3dx:command>G90</psk3dx:command>
          <psk3dx:command>G28</psk3dx:command>
          <psk3dx:command>M104 S0</psk3dx:command>
          <psk3dx:command>M140 S0</psk3dx:command>
          <psk3dx:command>M106 S0</psk3dx:command>
        </psk3dx:postcommands>

        <psk3dx:failsafepostcommands>
          <psk3dx:command>G92 E0</psk3dx:command>
          <psk3dx:command>G1 E-20 F300</psk3dx:command>
          <psk3dx:command>M104 S0</psk3dx:command> <!-- Turn off heater -->
        </psk3dx:failsafepostcommands>

        <!-- Commands sent between layers -->
        <psk3dx:layer>
          <psk3dx:command>M106 S$rampup$</psk3dx:command>
        </psk3dx:layer>

      </psk3dx:customcommands>

      <psk3dx:print>
        <psk3dx:medium default="true"> <!-- model parameters -->
          <!-- Missing parameters compared to Cura, for better printing: "top/bottom skin speed" "sparse infill speed" -->
          <!-- Temporary layer height boost to 200 to increase print speed -->
          <psk3dx:layerthickness>200</psk3dx:layerthickness> <!-- layer thickness (micron) -->
          <psk3dx:maxlayerthickness>250</psk3dx:maxlayerthickness><!-- maximum  layer thickness (micron) -->
          <psk3dx:minlayerthickness>40</psk3dx:minlayerthickness><!-- minimum layer thickness (micron) -->
          <psk3dx:pathwidth>400</psk3dx:pathwidth> <!-- path width (micron) -->
          <psk3dx:shells>2</psk3dx:shells> <!-- number of perimeters (zero would make the infill visible) -->
          <psk3dx:shelloffset>0</psk3dx:shelloffset><!-- offset of the shells (micron) -->
          <psk3dx:topsurfacelayers>6</psk3dx:topsurfacelayers> <!-- number of solid top surface layers -->
          <psk3dx:bottomsurfacelayers>6</psk3dx:bottomsurfacelayers> <!-- number of solid bottom surface layers -->
          <psk3dx:filllow>0.13</psk3dx:filllow> <!-- low density sparse infill fraction (between 0 and 1, inclusive) -->
          <psk3dx:fillmedium>0.25</psk3dx:fillmedium> <!-- medium density sparse infill fraction (between 0 and 1, inclusive) -->
          <psk3dx:fillhigh>0.45</psk3dx:fillhigh> <!-- high density sparse infill fraction (between 0 and 1, inclusive) -->
          <psk3dx:fillangle>45</psk3dx:fillangle> <!-- intial fill angle (degrees) -->
          <psk3dx:filloverlap>0.15</psk3dx:filloverlap> <!-- infill overlap (between 0 and 1 of the path width, inclusive) -->
          <psk3dx:speed>40000</psk3dx:speed> <!-- speed of normal printing movements (micron/s) -->
          <psk3dx:speedouter>30000</psk3dx:speedouter> <!-- speed of outer perimeter (micron/s) -->
          <psk3dx:speedfirst>15000</psk3dx:speedfirst> <!-- speed of first layer (micron/s), supercedes speedOuter -->
          <psk3dx:speedtravel>150000</psk3dx:speedtravel> <!-- speed of non-extrusion moves (micron/s) -->
          <psk3dx:speedretract>25000</psk3dx:speedretract><!-- speed of filament retraction (micron/s) -->
          <psk3dx:retraction>4750</psk3dx:retraction><!-- amount of retraction (micron) -->
          <psk3dx:rampuptarget>500</psk3dx:rampuptarget><!-- Z target for the fan to run at full speed -->
          <psk3dx:supportorientationoptimization>0</psk3dx:supportorientationoptimization> <!-- Apply the best orientation -->
          <psk3dx:supportoverhangangle>45</psk3dx:supportoverhangangle> <!-- The minimum overhang angle to generate support -->
          <psk3dx:supportzgap>150</psk3dx:supportzgap> <!-- The Z gap in micron -->
          <psk3dx:supportxygap>700</psk3dx:supportxygap> <!-- The XY gap in micron -->
          <psk3dx:supportfill>0.2</psk3dx:supportfill> <!-- sparse infill fraction for support (between 0 and 1, inclusive) -->
          <psk3dx:raftlayers>0</psk3dx:raftlayers><!-- number of solid raft layers -->
          <psk3dx:raftlayerthickness>1000</psk3dx:raftlayerthickness><!-- layer thickness of the raft (micron) -->
          <psk3dx:raftpathwidth>2000</psk3dx:raftpathwidth><!-- path width of raft (micron) -->
          <psk3dx:raftfill>0.6</psk3dx:raftfill><!-- sparse infill fraction for support (between 0 and 1, inclusive) -->
          <psk3dx:raftoffset>8000</psk3dx:raftoffset><!-- size of the raft (micron) -->
          <psk3dx:raftzgap>500</psk3dx:raftzgap><!-- The Z gap (micron) -->
          <psk3dx:raftspeedfirst>20000</psk3dx:raftspeedfirst> <!-- speed of raft first layer (micron/s) -->
          <psk3dx:coolingtime>5</psk3dx:coolingtime><!-- cooling time for a layer (second) -->
          <psk3dx:mincoolingspeed>10000</psk3dx:mincoolingspeed><!-- the minimum cooling speed for a layer (micron/s) -->
          <psk3dx:bridgingspeed>20000</psk3dx:bridgingspeed><!-- the speed for bridging (micron/s) -->
        </psk3dx:medium>
        <psk3dx:high default="false"> <!-- model parameters -->
          <psk3dx:layerthickness>60</psk3dx:layerthickness> <!-- layer thickness (micron) -->
          <psk3dx:maxlayerthickness>250</psk3dx:maxlayerthickness><!-- maximum  layer thickness (micron) -->
          <psk3dx:minlayerthickness>40</psk3dx:minlayerthickness><!-- minimum layer thickness (micron) -->
          <psk3dx:pathwidth>400</psk3dx:pathwidth> <!-- path width (micron) -->
          <psk3dx:shells>3</psk3dx:shells> <!-- number of perimeters (zero would make the infill visible) -->
          <psk3dx:shelloffset>0</psk3dx:shelloffset><!-- offset of the shells (micron) -->
          <psk3dx:topsurfacelayers>6</psk3dx:topsurfacelayers> <!-- number of solid top surface layers -->
          <psk3dx:bottomsurfacelayers>6</psk3dx:bottomsurfacelayers> <!-- number of solid bottom surface layers -->
          <psk3dx:filllow>0.13</psk3dx:filllow> <!-- low density sparse infill fraction (between 0 and 1, inclusive) -->
          <psk3dx:fillmedium>0.25</psk3dx:fillmedium> <!-- medium density sparse infill fraction (between 0 and 1, inclusive) -->
          <psk3dx:fillhigh>0.45</psk3dx:fillhigh> <!-- high density sparse infill fraction (between 0 and 1, inclusive) -->
          <psk3dx:fillangle>45</psk3dx:fillangle> <!-- intial fill angle (degrees) -->
          <psk3dx:filloverlap>0.15</psk3dx:filloverlap> <!-- infill overlap (between 0 and 1 of the path width, inclusive) -->
          <psk3dx:speed>40000</psk3dx:speed> <!-- speed of normal printing movements (micron/s) -->
          <psk3dx:speedouter>30000</psk3dx:speedouter> <!-- speed of outer perimeter (micron/s) -->
          <psk3dx:speedfirst>15000</psk3dx:speedfirst> <!-- speed of first layer (micron/s), supercedes speedOuter -->
          <psk3dx:speedtravel>150000</psk3dx:speedtravel> <!-- speed of non-extrusion moves (micron/s) -->
          <psk3dx:speedretract>25000</psk3dx:speedretract><!-- speed of filament retraction (micron/s) -->
          <psk3dx:retraction>4750</psk3dx:retraction><!-- amount of retraction (micron) -->
          <psk3dx:rampuptarget>500</psk3dx:rampuptarget><!-- Z target for the fan to run at full speed -->
          <psk3dx:supportorientationoptimization>0</psk3dx:supportorientationoptimization> <!-- Apply the best orientation -->
          <psk3dx:supportoverhangangle>45</psk3dx:supportoverhangangle> <!-- The minimum overhang angle to generate support -->
          <psk3dx:supportzgap>150</psk3dx:supportzgap> <!-- The Z gap in micron -->
          <psk3dx:supportxygap>700</psk3dx:supportxygap> <!-- The XY gap in micron -->
          <psk3dx:supportfill>0.2</psk3dx:supportfill> <!-- sparse infill fraction for support (between 0 and 1, inclusive) -->
          <psk3dx:raftlayers>0</psk3dx:raftlayers><!-- number of solid raft layers -->
          <psk3dx:raftlayerthickness>1000</psk3dx:raftlayerthickness><!-- layer thickness of the raft (micron) -->
          <psk3dx:raftpathwidth>2000</psk3dx:raftpathwidth><!-- path width of raft (micron) -->
          <psk3dx:raftfill>0.6</psk3dx:raftfill><!-- sparse infill fraction for support (between 0 and 1, inclusive) -->
          <psk3dx:raftoffset>8000</psk3dx:raftoffset><!-- size of the raft (micron) -->
          <psk3dx:raftzgap>500</psk3dx:raftzgap><!-- The Z gap (micron) -->
          <psk3dx:raftspeedfirst>20000</psk3dx:raftspeedfirst> <!-- speed of raft first layer (micron/s) -->
          <psk3dx:coolingtime>5</psk3dx:coolingtime><!-- cooling time for a layer (second) -->
          <psk3dx:mincoolingspeed>10000</psk3dx:mincoolingspeed><!-- the minimum cooling speed for a layer (micron/s) -->
          <psk3dx:bridgingspeed>20000</psk3dx:bridgingspeed><!-- the speed for bridging (micron/s) -->
        </psk3dx:high>
        <psk3dx:draft default="false"> <!-- model parameters -->
          <psk3dx:layerthickness>150</psk3dx:layerthickness> <!-- layer thickness (micron) -->
          <psk3dx:maxlayerthickness>250</psk3dx:maxlayerthickness><!-- maximum  layer thickness (micron) -->
          <psk3dx:minlayerthickness>40</psk3dx:minlayerthickness><!-- minimum layer thickness (micron) -->
          <psk3dx:pathwidth>400</psk3dx:pathwidth> <!-- path width (micron) -->
          <psk3dx:shells>2</psk3dx:shells> <!-- number of perimeters (zero would make the infill visible) -->
          <psk3dx:shelloffset>0</psk3dx:shelloffset><!-- offset of the shells (micron) -->
          <psk3dx:topsurfacelayers>6</psk3dx:topsurfacelayers> <!-- number of solid top surface layers -->
          <psk3dx:bottomsurfacelayers>6</psk3dx:bottomsurfacelayers> <!-- number of solid bottom surface layers -->
          <psk3dx:filllow>0.13</psk3dx:filllow> <!-- low density sparse infill fraction (between 0 and 1, inclusive) -->
          <psk3dx:fillmedium>0.25</psk3dx:fillmedium> <!-- medium density sparse infill fraction (between 0 and 1, inclusive) -->
          <psk3dx:fillhigh>0.45</psk3dx:fillhigh> <!-- high density sparse infill fraction (between 0 and 1, inclusive) -->
          <psk3dx:fillangle>45</psk3dx:fillangle> <!-- intial fill angle (degrees) -->
          <psk3dx:filloverlap>0.15</psk3dx:filloverlap> <!-- infill overlap (between 0 and 1 of the path width, inclusive) -->
          <psk3dx:speed>80000</psk3dx:speed> <!-- speed of normal printing movements (micron/s) -->
          <psk3dx:speedouter>40000</psk3dx:speedouter> <!-- speed of outer perimeter (micron/s) -->
          <psk3dx:speedfirst>30000</psk3dx:speedfirst> <!-- speed of first layer (micron/s), supercedes speedOuter -->
          <psk3dx:speedtravel>150000</psk3dx:speedtravel> <!-- speed of non-extrusion moves (micron/s) -->
          <psk3dx:speedretract>25000</psk3dx:speedretract><!-- speed of filament retraction (micron/s) -->
          <psk3dx:retraction>4750</psk3dx:retraction><!-- amount of retraction (micron) -->
          <psk3dx:rampuptarget>500</psk3dx:rampuptarget><!-- Z target for the fan to run at full speed -->
          <psk3dx:supportorientationoptimization>0</psk3dx:supportorientationoptimization> <!-- Apply the best orientation -->
          <psk3dx:supportoverhangangle>45</psk3dx:supportoverhangangle> <!-- The minimum overhang angle to generate support -->
          <psk3dx:supportzgap>150</psk3dx:supportzgap> <!-- The Z gap in micron -->
          <psk3dx:supportxygap>700</psk3dx:supportxygap> <!-- The XY gap in micron -->
          <psk3dx:supportfill>0.2</psk3dx:supportfill> <!-- sparse infill fraction for support (between 0 and 1, inclusive) -->
          <psk3dx:raftlayers>0</psk3dx:raftlayers><!-- number of solid raft layers -->
          <psk3dx:raftlayerthickness>1000</psk3dx:raftlayerthickness><!-- layer thickness of the raft (micron) -->
          <psk3dx:raftpathwidth>2000</psk3dx:raftpathwidth><!-- path width of raft (micron) -->
          <psk3dx:raftfill>0.6</psk3dx:raftfill><!-- sparse infill fraction for support (between 0 and 1, inclusive) -->
          <psk3dx:raftoffset>8000</psk3dx:raftoffset><!-- size of the raft (micron) -->
          <psk3dx:raftzgap>500</psk3dx:raftzgap><!-- The Z gap (micron) -->
          <psk3dx:raftspeedfirst>20000</psk3dx:raftspeedfirst> <!-- speed of raft first layer (micron/s) -->
          <psk3dx:coolingtime>5</psk3dx:coolingtime><!-- cooling time for a layer (second) -->
          <psk3dx:mincoolingspeed>10000</psk3dx:mincoolingspeed><!-- the minimum cooling speed for a layer (micron/s) -->
          <psk3dx:bridgingspeed>20000</psk3dx:bridgingspeed><!-- the speed for bridging (micron/s) -->
        </psk3dx:draft>
      </psk3dx:print>

  </psk3dx:MS3DPrinter>

</PrintDeviceCapabilities>
