Cutting Error: Lost Steps

LaserWeb information

On the About page, I see that I have:

  • Frontend version: 4.0.998
  • Backend version: 4.1.000

My settings are:

{
  "settings": {
    "__version": "4.0.998",
    "__selectedProfile": "Laser-Cutter",
    "__latestRelease": "2019-11-26T10:45:07Z",
    "showMachine": false,
    "machineWidth": 1070,
    "machineHeight": 480,
    "machineBeamDiameter": 0.2,
    "machineBottomLeftX": 0,
    "machineBottomLeftY": 0,
    "machineFeedRange": {
      "XY": {"min": 2500, "max": 4000},
      "Z": {"min": 1, "max": 50},
      "A": {"min": 1, "max": 50000},
      "S": {"min": 0, "max": 30000}
    },
    "machineXYProbeOffset": 0,
    "machineZEnabled": true,
    "machineZMatThickness": 0,
    "machineZToolOffset": 0,
    "machineZStartHeight": "2",
    "machineZProbeOffset": 0,
    "machineAEnabled": false,
    "machineBlowerEnabled": false,
    "machineBlowerGcodeOn": "",
    "machineBlowerGcodeOff": "",
    "pxPerInch": 96,
    "forcePxPerInch": false,
    "dpiBitmap": 300,
    "toolGridWidth": 1070,
    "toolGridHeight": 480,
    "toolGridMinorSpacing": 10,
    "toolGridMajorSpacing": 50,
    "toolSafetyLockDisabled": true,
    "toolCncMode": false,
    "toolImagePosition": "TR",
    "toolUseNumpad": false,
    "toolDisplayCache": false,
    "toolUseGamepad": false,
    "toolCreateEmptyOps": false,
    "toolVideoDevice": null,
    "toolVideoPerspective": {"enabled": false},
    "toolVideoLens": {"a": 1, "b": 1, "F": 1, "scale": 1},
    "toolVideoFov": {"x": 1, "y": 1},
    "toolVideoResolution": "720p(HD)",
    "toolVideoOMR": false,
    "toolVideoOMROffsetX": 0,
    "toolVideoOMROffsetY": 0,
    "toolVideoOMRMarkerSize": 20,
    "toolWebcamUrl": "http://192.168.1.80:8081/",
    "toolFeedUnits": "mm/min",
    "toolTestSValue": 1,
    "toolTestDuration": 0,
    "gcodeStart": "G21         ; Set units to mm\nG90         ; Absolute positioning\nG28\nM400\nM42 P58 S0 ; Fan on\nM106 ; lights on\nG0 F2500 ; Set feedrate to 2500\nM400",
    "gcodeEnd": "M5          ; Switch tool offEnd\nM400\nG0 F2500 X0 Y480 \nM400\nM42 P58 S255 ; Fan off\nM107 ; lights off\nM18; disable steppers\n\n\n",
    "gcodeHoming": "G28",
    "gcodeGenerator": "marlin",
    "gcodeToolOn": "M4",
    "gcodeToolOff": "M5\nG0 F2500 ; Set feedrate to 2500",
    "gcodeLaserIntensity": "S",
    "gcodeLaserIntensitySeparateLine": false,
    "gcodeSMinValue": 0,
    "gcodeSMaxValue": 255,
    "gcodeCheckSizePower": 20,
    "gcodeToolTestPower": 100,
    "gcodeToolTestDuration": 5,
    "gcodeConcurrency": 2,
    "gcodeCurvePrecision": 0.1,
    "comServerVersion": "4.1.000",
    "comServerIP": "192.168.1.80:8000",
    "comServerConnect": false,
    "comInterfaces": ["USB", "ESP8266", "Telnet"],
    "comPorts": [
      {"comName": "/dev/ttyAMA0"},
      {
        "manufacturer": "Arduino (www.arduino.cc)",
        "serialNumber": "55736313337351519102",
        "pnpId": "usb-Arduino__www.arduino.cc__0042_55736313337351519102-if00",
        "vendorId": "2341",
        "productId": "0042",
        "comName": "/dev/ttyACM0"
      }
    ],
    "comAccumulatedJobTime": 10976,
    "connectVia": "USB",
    "connectPort": "/dev/ttyACM0",
    "connectBaud": "115200",
    "connectIP": "",
    "jogStepsize": 10,
    "jogFeedXY": 1800,
    "jogFeedZ": 300,
    "macros": {
      "*GotoXY0": {
        "label": "Goto XY zero",
        "gcode": "G0 X0Y0",
        "keybinding": "ctrl+f1",
        "_locked": false
      },
      "*LaserOff": {
        "label": "LASER OFF",
        "gcode": "M5",
        "keybinding": "ctrl+f2",
        "_locked": false
      },
      "a9f345a3-1f71-4435-a780-400a325db10a": {
        "keybinding": "ctrl+alt+T",
        "label": "Test Laser",
        "gcode": "M3 S125\nG4 P50\nM5"
      },
      "c0165a0c-2832-4dce-a28d-06cc1def844d": {
        "keybinding": "+ctrl+shift+A+B+C",
        "label": "Disable Steppers",
        "gcode": "M18"
      },
      "778e0c5a-2c97-4b0f-97cb-732c291b7e37": {
        "keybinding": "",
        "label": "Test Laser FULL",
        "gcode": "M3 S255\nG4 P100\nM5"
      },
      "fcf258b0-7d0a-4ea5-973e-e657795ffa7b": {
        "keybinding": "",
        "label": "Fan On",
        "gcode": "M42 P58 S0"
      },
      "c1650e3a-7821-4415-8ac0-894299f27311": {
        "keybinding": "",
        "label": "Fan Off",
        "gcode": "M42 P58 S255"
      },
      "7b3525b0-2173-44d2-96f5-ac9acefe90b7": {
        "keybinding": "",
        "label": "Light On",
        "gcode": "M106"
      },
      "5d67298d-16ae-4954-be31-10741c288c16": {
        "keybinding": "",
        "label": "Light Off",
        "gcode": "M107"
      }
    },
    "uiFcDrag": {"x": -170.87941088313963, "y": 364.42622726412526}
  }
}
<go to Settings / Tools and save your LaserWeb Settings to a json file, 
then open that file with a text editor and copy/paste the content here>

Problem description

When I run the attached GCODE, a repeatable error occurs - the machine sems to lose steps on the x-axis and so a part is shifted to the left.The preview of the part in LaserWeb:

And this is how it turned out:

An arch was shifted to the left. However, I was in the room throughout the job and didn’t hear the stepper motors struggling or skipping steps. Hence it seems to me to be a software issue. Unfortunately after aborting the job, I didn’t take note of the displayed position of the laser head.

I have attached the GCODE below but it seems fine since NC Viewer displays the job correctly:

GCODE file: here

System description

  • My machine is a CO2 Laser

  • I have a RAMPS1.4_SF

  • It has Marlin version 2.0.x installed

  • I connect via USB

  • My computer(s) on which I run LaserWeb run(s) Raspberry Pi 3B on Jessie (as per the RPi setup instructions). The Pi also runs an instance of Motion for remote webcam monitoring.

Here is my configuration:

{
  "machineProfiles": {
    "*gen_grbl": {
      "machineLabel": "Generic GRBL machine",
      "machineDescription": "Use this if you have a GRBL machine",
      "settings": {
        "machineWidth": 300,
        "machineHeight": 200,
        "machineBeamDiameter": 0.2,
        "toolSafetyLockDisabled": false,
        "toolCncMode": false,
        "toolImagePosition": "BL",
        "toolUseNumpad": false,
        "toolUseVideo": false,
        "toolWebcamUrl": "",
        "gcodeStart": "G21         ; Set units to mm\r\nG90         ; Absolute positioning\r\nM4 S0       ; Enable Laser/Spindle (0 power)\r\n",
        "gcodeEnd": "M5          ; Disable Laser/Spindle\r\n",
        "gcodeHoming": "$H",
        "gcodeToolOn": "",
        "gcodeToolOff": "",
        "gcodeSMaxValue": 1000,
        "toolGridWidth": 400,
        "toolGridHeight": 300
      },
      "_locked": true
    },
    "*gen_smoothie": {
      "machineLabel": "Generic SMOOTHIE machine",
      "machineDescription": "Use this if you have a SMOOTHIE machine",
      "settings": {
        "machineWidth": 300,
        "machineHeight": 200,
        "machineBeamDiameter": 0.2,
        "toolSafetyLockDisabled": false,
        "toolCncMode": false,
        "toolImagePosition": "BL",
        "toolUseNumpad": false,
        "toolUseVideo": false,
        "toolWebcamUrl": "",
        "gcodeStart": "G21         ; Set units to mm\r\nG90         ; Absolute positioning\r\n",
        "gcodeEnd": "M2          ; End\r\n",
        "gcodeHoming": "",
        "gcodeToolOn": "",
        "gcodeToolOff": "",
        "gcodeSMaxValue": 1,
        "toolGridWidth": 400,
        "toolGridHeight": 300
      },
      "_locked": true
    },
    "*emblaser2": {
      "machineLabel": "Emblaser 2",
      "machineDescription": "Use this if you have an Emblaser 2 from Darkly Labs",
      "machineAbout": "emblaser2.md",
      "helpUrl": "https://darklylabs.zendesk.com/hc/en-us/community/topics/115000181507-Laserweb",
      "tutorialsUrl": "https://darklylabs.zendesk.com/hc/en-us/categories/202585917-Tutorials",
      "settings": {
        "machineWidth": 500,
        "machineHeight": 300,
        "machineBeamDiameter": 0.2,
        "machineOriginX": 0,
        "machineOriginY": 0,
        "machineFeedRange": {
          "XY": {"min": 100, "max": 6000},
          "Z": {"min": 1, "max": 1250},
          "A": {"min": 1, "max": 50000},
          "S": {"min": 0, "max": 30000}
        },
        "machineZEnabled": true,
        "machineZMatThickness": 0,
        "machineZToolOffset": 0,
        "machineZStartHeight": "",
        "machineBlowerEnabled": true,
        "machineBlowerGcodeOn": "M08",
        "machineBlowerGcodeOff": "M09",
        "pxPerInch": 72,
        "dpiBitmap": 72,
        "toolSafetyLockDisabled": false,
        "toolCncMode": false,
        "toolImagePosition": "BL",
        "toolUseNumpad": false,
        "toolVideoDevice": null,
        "toolVideoPerspective": {
          "enabled": false,
          "before": [
            170.66666666666666,
            384,
            682.6666666666666,
            384,
            682.6666666666666,
            96,
            170.66666666666666,
            96
          ],
          "after": [
            170.66666666666666,
            384,
            682.6666666666666,
            384,
            682.6666666666666,
            96,
            170.66666666666666,
            96
          ]
        },
        "toolVideoLens": {"a": 1, "b": 1, "F": 1, "scale": 1},
        "toolVideoFov": {"x": 1, "y": 1},
        "toolVideoResolution": null,
        "toolWebcamUrl": "",
        "toolFeedUnits": "mm/min",
        "toolTestSValue": 1,
        "toolTestDuration": 0,
        "gcodeStart": "G21\nG90\n",
        "gcodeEnd": "M2\nG0Z50\nG0X0Y300\nM911G4P500M912G4P100M911G4P100M912G4P50M911G4P100M912",
        "gcodeHoming": "G1Z60F1000S0\nG92Z50\nG28X0Y0\nM911G4P100M912G4P50M911G4P100M912",
        "gcodeToolOn": "",
        "gcodeToolOff": "",
        "gcodeSMaxValue": 1,
        "gcodeCheckSizePower": 1,
        "gcodeToolTestPower": 50,
        "gcodeToolTestDuration": 1000,
        "connectVia": "USB",
        "connectBaud": "115200",
        "jogStepsize": 1,
        "jogFeedXY": 6000,
        "jogFeedZ": 1000,
        "macros": {
          "*GotoXY0": {
            "label": "Goto XY zero",
            "gcode": "G0 X0Y0",
            "keybinding": "f1"
          },
          "*LaserOff": {"label": "LASER OFF", "gcode": "M5", "keybinding": "f2"}
        },
        "machineBottomLeftX": 0,
        "machineBottomLeftY": 0,
        "machineAEnabled": false,
        "toolGridWidth": 500,
        "toolGridHeight": 300
      },
      "_locked": true
    },
    "*FabKit": {
      "machineLabel": "FabKit",
      "machineDescription": "Use this if you have an FabKit from FabCreator",
      "machineAbout": "fabkit.md",
      "settings": {
        "machineWidth": 680,
        "machineHeight": 450,
        "machineBeamDiameter": 0.1,
        "machineZEnabled": false,
        "machineZMatThickness": 0,
        "machineZToolOffset": 0,
        "machineBlowerEnabled": false,
        "machineAEnabled": false,
        "machineBlowerGcodeOn": "",
        "machineBlowerGcodeOff": "",
        "pxPerInch": 72,
        "dpiBitmap": 300,
        "toolSafetyLockDisabled": false,
        "toolCncMode": false,
        "toolImagePosition": "BL",
        "toolUseNumpad": true,
        "toolVideoDevice": null,
        "toolVideoPerspective": {
          "enabled": false,
          "before": [
            170.66666666666666,
            384,
            682.6666666666666,
            384,
            682.6666666666666,
            96,
            170.66666666666666,
            96
          ],
          "after": [
            170.66666666666666,
            384,
            682.6666666666666,
            384,
            682.6666666666666,
            96,
            170.66666666666666,
            96
          ]
        },
        "toolVideoLens": {"a": 1, "b": 1, "F": 1, "scale": 1},
        "toolVideoFov": {"x": 1, "y": 1},
        "toolVideoResolution": "720p(HD)",
        "toolWebcamUrl": "",
        "toolFeedUnits": "mm/s",
        "toolTestSValue": 1,
        "toolTestDuration": 0,
        "gcodeStart": "G21         ; Set units to mm\nG90         ; Absolute positioning\nM3           ; Laser On\nM106       ; Compressor On",
        "gcodeEnd": "M5                       ;Laser off\nG28.2XY              ; Home X & Y\nM107                   ;Compressor Off",
        "gcodeHoming": "G28.2XY     ;Home X & Y",
        "gcodeToolOn": "",
        "gcodeToolOff": "",
        "gcodeSMaxValue": 1,
        "gcodeToolTestPower": 0,
        "gcodeToolTestDuration": 0,
        "connectVia": "USB",
        "connectBaud": "115200",
        "jogStepsize": 100,
        "jogFeedXY": 500,
        "jogFeedZ": 5,
        "machineBottomLeftX": 0,
        "machineBottomLeftY": 0,
        "toolGridWidth": 800,
        "toolGridHeight": 600
      },
      "_locked": true
    },
    "Laser-Cutter": {
      "machineLabel": "Laser Cutter",
      "settings": {
        "__version": "4.0.998",
        "__selectedProfile": "Laser-Cutter",
        "__latestRelease": "2019-11-26T10:45:07Z",
        "showMachine": false,
        "machineWidth": 1070,
        "machineHeight": 480,
        "machineBeamDiameter": 0.2,
        "machineBottomLeftX": 0,
        "machineBottomLeftY": 0,
        "machineFeedRange": {
          "XY": {"min": 2500, "max": 4000},
          "Z": {"min": 1, "max": 50},
          "A": {"min": 1, "max": 50000},
          "S": {"min": 0, "max": 30000}
        },
        "machineXYProbeOffset": 0,
        "machineZEnabled": true,
        "machineZMatThickness": 0,
        "machineZToolOffset": 0,
        "machineZStartHeight": "2",
        "machineZProbeOffset": 0,
        "machineAEnabled": false,
        "machineBlowerEnabled": false,
        "machineBlowerGcodeOn": "",
        "machineBlowerGcodeOff": "",
        "pxPerInch": 96,
        "forcePxPerInch": false,
        "dpiBitmap": 300,
        "toolGridWidth": 1070,
        "toolGridHeight": 480,
        "toolGridMinorSpacing": 10,
        "toolGridMajorSpacing": 50,
        "toolSafetyLockDisabled": true,
        "toolCncMode": false,
        "toolImagePosition": "TR",
        "toolUseNumpad": false,
        "toolDisplayCache": false,
        "toolUseGamepad": false,
        "toolCreateEmptyOps": false,
        "toolVideoDevice": null,
        "toolVideoPerspective": {"enabled": false},
        "toolVideoLens": {"a": 1, "b": 1, "F": 1, "scale": 1},
        "toolVideoFov": {"x": 1, "y": 1},
        "toolVideoResolution": "720p(HD)",
        "toolVideoOMR": false,
        "toolVideoOMROffsetX": 0,
        "toolVideoOMROffsetY": 0,
        "toolVideoOMRMarkerSize": 20,
        "toolWebcamUrl": "http://192.168.1.80:8081/",
        "toolFeedUnits": "mm/min",
        "toolTestSValue": 1,
        "toolTestDuration": 0,
        "gcodeStart": "G21         ; Set units to mm\nG90         ; Absolute positioning\nG28\nM400\nM42 P58 S0 ; Fan on\nM106 ; lights on\nG0 F2500 ; Set feedrate to 2500\nM400",
        "gcodeEnd": "M5          ; Switch tool offEnd\nM400\nG0 F2500 X0 Y480 \nM400\nM42 P58 S255 ; Fan off\nM107 ; lights off\nM18; disable steppers\n\n\n",
        "gcodeHoming": "G28",
        "gcodeGenerator": "marlin",
        "gcodeToolOn": "M4",
        "gcodeToolOff": "M5\nG0 F2500 ; Set feedrate to 2500",
        "gcodeLaserIntensity": "S",
        "gcodeLaserIntensitySeparateLine": false,
        "gcodeSMinValue": 0,
        "gcodeSMaxValue": 255,
        "gcodeCheckSizePower": 20,
        "gcodeToolTestPower": 100,
        "gcodeToolTestDuration": 5,
        "gcodeConcurrency": 2,
        "gcodeCurvePrecision": 0.1,
        "comServerVersion": "4.1.000",
        "comServerIP": "192.168.1.80:8000",
        "comServerConnect": false,
        "comInterfaces": ["USB", "ESP8266", "Telnet"],
        "comPorts": [
          {"comName": "/dev/ttyAMA0"},
          {
            "manufacturer": "Arduino (www.arduino.cc)",
            "serialNumber": "55736313337351519102",
            "pnpId": "usb-Arduino__www.arduino.cc__0042_55736313337351519102-if00",
            "vendorId": "2341",
            "productId": "0042",
            "comName": "/dev/ttyACM0"
          }
        ],
        "comAccumulatedJobTime": 10976,
        "connectVia": "USB",
        "connectPort": "/dev/ttyACM0",
        "connectBaud": "115200",
        "connectIP": "",
        "jogStepsize": 10,
        "jogFeedXY": 1800,
        "jogFeedZ": 300,
        "macros": {
          "*GotoXY0": {
            "label": "Goto XY zero",
            "gcode": "G0 X0Y0",
            "keybinding": "ctrl+f1",
            "_locked": false
          },
          "*LaserOff": {
            "label": "LASER OFF",
            "gcode": "M5",
            "keybinding": "ctrl+f2",
            "_locked": false
          },
          "a9f345a3-1f71-4435-a780-400a325db10a": {
            "keybinding": "ctrl+alt+T",
            "label": "Test Laser",
            "gcode": "M3 S125\nG4 P50\nM5"
          },
          "c0165a0c-2832-4dce-a28d-06cc1def844d": {
            "keybinding": "+ctrl+shift+A+B+C",
            "label": "Disable Steppers",
            "gcode": "M18"
          },
          "778e0c5a-2c97-4b0f-97cb-732c291b7e37": {
            "keybinding": "",
            "label": "Test Laser FULL",
            "gcode": "M3 S255\nG4 P100\nM5"
          },
          "fcf258b0-7d0a-4ea5-973e-e657795ffa7b": {
            "keybinding": "",
            "label": "Fan On",
            "gcode": "M42 P58 S0"
          },
          "c1650e3a-7821-4415-8ac0-894299f27311": {
            "keybinding": "",
            "label": "Fan Off",
            "gcode": "M42 P58 S255"
          },
          "7b3525b0-2173-44d2-96f5-ac9acefe90b7": {
            "keybinding": "",
            "label": "Light On",
            "gcode": "M106"
          },
          "5d67298d-16ae-4954-be31-10741c288c16": {
            "keybinding": "",
            "label": "Light Off",
            "gcode": "M107"
          }
        },
        "uiFcDrag": {"x": -170.87941088313963, "y": 364.42622726412526}
      }
    }
  }
}

I’ve tried rebooting the Raspberry Pi as well as the frontend of LaserWeb. Next, I’ll try re-generating the GCODE after re-ordering the cut paths and if that fails I’ll disable motion and try again. However, I was hoping for a more long-term fix to this. My prime suspect is Motion as I’ve heard it’s resource heavy on the Pi.

Has anyone experienced similar problems before? Would be most appreciative of any advice!

Cheers,
Ethan

LaserWeb should just be faithfully passing on the generated Gcode via the Pi and into your Ramps/Marlin controller. I’d be very surprised if anything was being skipped there. If the Pi is overloading you might see stops and stutters, but not a wholesale displacement on the x axis like that.
The most likely candidate is the controller missing steps during high-speed X moves, Try lowering the default travel (G0) speed in your controller config.

I’m not very marlin literate but AFIK you can view them with this:
https://marlinfw.org/docs/gcode/M503.html
And set them with:
https://marlinfw.org/docs/gcode/M203.html

3 Likes

It seems that after re-arranging the cut paths and re-generating the GCODE, the problem went away. Have been running a bunch of jobs non-stop for a while and it seems to be gone for good.

@easytarget thanks for the suggestion! Will try reducing the feedrate if the issue crops up again.

Cheers,
Ethan

1 Like