1. Hey guyz. Welcome to the All New Phlatforum!



    Sign Up and take a look around. There are so many awesome new features.

    The Phlatforum is a place we can all hang out and

    have fun sharing our RC adventures!

  2. Dismiss Notice

Correct "g00" to "G00" in phlatmill.rb

Discussion in 'SketchUcam Bugs' started by blamarpa, May 28, 2015.

  1. blamarpa

    blamarpa New Member

    Offline
    Messages:
    6
    Trophy Points:
    1
    Location:
    Valladolid - SPAIN
    In line 111? (I have added comments in my file):
    command_out += "g00" + format_measure("z",sh) # retract to reduced safe
    changed to:
    command_out += "G00" + format_measure("z",sh) # retract to reduced safe

    Thanks for your fabulous job.
     
  2. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    why do you need this? I don't know of any controllers (except really old ones that read paper tapes) that are still case sensitive.
    I am not saying it should not be done, I just want to know why (-:

    (changes in other places, particularly G0 and G00 in the retract preventer, should be done with extreme care since I use the difference between those to trigger certain things in the Phlatmill.rb code)
     
  3. blamarpa

    blamarpa New Member

    Offline
    Messages:
    6
    Trophy Points:
    1
    Location:
    Valladolid - SPAIN
    Good morning swarfer,
    I am trying to construct a 3d printer and using Marlin's firmware. When I saw that it supports a basic g-code set of instructions, the extruder was replaced with a drill so now I have a CNC able to make PCBs and have learmed to do basic jobs using just the notepad and https://github.com/pknoe3lh/cncgcodecontroller.
    Phlatboyz is a fantastic tool but somethings dont run with my Marlin's cnc, I have had to modify somo lines in order to obtain complete g-code lines. You have added a few conditions "if (cso != @cc)" that generates simplest lines saying " X10 Y10" after a G command and Marlin's need complete lines like "G01 X10 Y10" so I have had to search, try to understand what it does and edit the code. Also Marlin's is case sensitive, I don't know if others cnc are, but thougth it would be better to avoid future incompatibilities with other cnc.
    Have a good day.
     
  4. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    ah yes, I had forgotten about Marlin.
    the Gcode standard says that G00 G01 G02 G03 are 'modal', this means they stay active until some other code changes the state.
    so the code output by SketchUcam is standard compliant in outputting code like
    G01 x4 y6
    x4 y7
    x6
    Y8
    G00 z1

    so, it is Marlin that needs to be fixed, have you let the developers know?

    as to case sensitive, yep, RS274-D likes all uppercase letters in the code, and the latest version will output all uppercase.
    (it will be released in an hour or two as V1.3a)

    you can safely remove most or all of the
    "if (cso != @cc)"
    type codes. What it is doing is storing the last instruction output so that it does not get repeated. if you remove the IF statements then it will always output the G codes.

    alternately one could add a 'force' clause to all those ifs
    gforce = true
    "if ((cso != @cc) || gforce)"

    that way 'gforce' can be made into a user selectable option. let me look at that.... maybe it is simple enough to release in 1.3a (but really Marlin should be fixed!)
     
  5. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    I have released V1.3a which includes the option of forcing all gcodes to be outputs, see the Feature Options menu
     
  6. blamarpa

    blamarpa New Member

    Offline
    Messages:
    6
    Trophy Points:
    1
    Location:
    Valladolid - SPAIN
    :doubleup: will test it, thanks a lot.
    Yes, I agree about Marlin's firmware have to be upgraded. There is problems also with G2 G3 radius movements. Your code seens simplest to me in order to understand and propose simple changes, and to make temporal tricks that solve some problems.
    It's easy to edit Marlin and include and OR when it finds "G..." or "g..." but there is a lot of people developing it and don't want to distract his attention in minor changes. Of course I will try to help Marlin (if I am able to) adding R circular movements and G17 support (i dont know yet if it is supported).
    Have a good day.
     
    Last edited: Jun 1, 2015

Share This Page