Jump to content

Strange gcode commands


Thomas-S

Recommended Posts

Posted · Strange gcode commands

Hello,

 

I am trying to produce a Python program which can find the centre of mass of an object from gcode. To help me with this, I have been using the "Turtle" module to draw each layer however, I am rather confused by the gcode that Cura is outputting. I am unable to work out which lines of code tell the extruder to move, and which ones actually command it to feed out filament. In normal gcode G0 indicates a move, and G1 indicates an extrusion, however this leads to gaps in my drawing due to large sections of G0 commands. Can anyone help me?

 

Thanks!

 

 

Cura seems to interpret all of these commands as extrudes, however by normal gcode the G0 commands should be moves.

 

G1 X112.925 Y123.311 E15.77568
G1 X113.785 Y123.718 E15.80733
G1 X114.682 Y124.039 E15.83901
G1 X115.606 Y124.269 E15.87068
G1 X116.548 Y124.409 E15.90236
G1 X117.5 Y124.456 E15.93406
G0 F6000 X117.5 Y124.896
G1 F1500 E9.43406
G0 F6000 X117.5 Y124.566
G0 X118.47 Y124.579
G0 X120.368 Y124.202
G0 X122.156 Y123.461
G0 X123.766 Y122.386
G0 X125.136 Y121.016
G0 X126.211 Y119.406
G0 X126.952 Y117.617
G0 X127.329 Y115.72
G0 X127.329 Y113.78
G0 X126.952 Y111.882
G0 X126.211 Y110.094
G0 X125.136 Y108.484
G0 X123.766 Y107.114
G0 X122.156 Y106.039
G0 X120.981 Y105.478
G0 X121.922 Y105.725
G0 X122.958 Y106.166
G0 X124.241 Y106.918
G0 X125.509 Y107.955
G0 X126.625 Y109.207
G0 X127.531 Y110.617
G0 X128.227 Y112.212
G0 X128.666 Y113.895
G0 X128.835 Y115.776
G0 X128.713 Y117.505
G0 X128.516 Y118.476
G0 X127.867 Y120.019
G0 X127.01 Y121.443
G0 X125.814 Y122.88
G0 X124.609 Y123.952
G0 X123.245 Y124.859
G0 X121.769 Y125.567
G0 X120.196 Y126.062
G0 X118.74 Y126.3
G0 X117.477 Y126.35
G1 F1500 E15.93406
G0 F6000 X117.476 Y126.55
G1 F1200 X116.916 Y126.535 E15.95269
G1 X116.369 Y126.495 E15.97093
G1 X115.806 Y126.427 E15.9898
G1 X115.257 Y126.335 E16.00831
G1 X114.723 Y126.219 E16.02649
G1 X114.183 Y126.073 E16.04509
G1 X113.642 Y125.902 E16.06396

  • Link to post
    Share on other sites

    Posted · Strange gcode commands

    G1 X117.5 Y124.456 E15.93406  > If there is an X and a Y and an E it's an extrusion
    G0 F6000 X117.5 Y124.896         > If there is an X and a Y (and maybe Z) without an E it's a travel move only
    G1 F1500 E9.43406                      > If there is no X and no Y but there is an E it's a retraction or prime.

    G92 E0    > Resets the extruder to 0.  Cura does that about every 10,000mm³ to minimize "rounding" errors.

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.8 Stable released 🎉
        In the Cura 5.8 stable release, everyone can now tune their Z seams to look better than ever. Method series users get access to new material profiles, and the base Method model now has a printer profile, meaning the whole Method series is now supported in Cura!
        • 5 replies
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
    ×
    ×
    • Create New...