Welcome to Our Community

Some features disabled for guests. Register Today.

Ask Grbl CNC questions here.

Discussion in 'Control Software' started by Sonny Jeon, Aug 12, 2015.

  1. Nikola Ivanovic

    Builder

    Joined:
    Jul 14, 2016
    Messages:
    2
    Likes Received:
    0
    Hi Sonny, I have built a machine with a single open loop belt configuration (similar to the AxiDraw by Evil Mad Scientist Laboratories). The mechanics of it works well but the consequence of it is that motion with one stepper motor only results in diagonal motion instead of motion along one axis only. So in order to get pure x and pure y motion, a superposition of the two motors needs to happen. Where in the Grbl Library can I find the code to change in order to send both x and y step commands to both motors simultaneously and to make the direction command send to both as well depending on the combination of directions eg: (1,0) ; (1,1) ; (0,0) ; (0,1).

    Would appreciate your input on this checkmate matter.
    Thanks!
     
  2. Sonny Jeon

    Sonny Jeon Well-Known
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2015
    Messages:
    165
    Likes Received:
    66
    Your AxiDraw looks to be an H-bot configuration, which means that both steppers have to move for a linear motion and one stepper moves in a diagonal motion. Basically what you've seen. Grbl expects the machine to have one motor control one axis, not an interdependent motion. However, Grbl does support CoreXY. It's similar to H-Bots. You can try uncommenting the CORE_XY option in config.h, recompile, and flash. It might work. It might not.
     
    Mark Carew likes this.
  3. Nikola Ivanovic

    Builder

    Joined:
    Jul 14, 2016
    Messages:
    2
    Likes Received:
    0
    That is exactly what I am searching for. Thanks a lot for your swift reply and keep up the good work! Now excuse me while I "Hello World!" my first machine.

    Kind Regards
    Nik
     
  4. nima

    nima New
    Builder

    Joined:
    Jul 15, 2016
    Messages:
    9
    Likes Received:
    0
    Hi
    Sorry for bad english writing .
    can grbl run codes like this?
    N10 G0 Z2
    N20 G0 X0.791 Y0.079
    N30 G1 Z-1
    N40 G1 X5.34 Y0.079
    N50 G1 X5.34 Y0.591
    N60 G1 X4.406 Y0.729
    N70 G1 X4.095 Y0.848
    ...
    if yes , why my grblControl Response : "error: undefined feed rate"

    thank you
     
  5. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,461
    Likes Received:
    1,915
    because you need to set a feed rate before the first G1 command .
    GRBL boots with feedrate = 0
    so you have to tell it in your program what rate to use
    N10 G0 Z2
    N20 G0 X0.791 Y0.079
    N30 G1 Z-1 F10 <--- set 10 inchs/min feed rate
    N40 G1 X5.34 Y0.079
    N50 G1 X5.34 Y0.591
     
    nima likes this.
  6. nima

    nima New
    Builder

    Joined:
    Jul 15, 2016
    Messages:
    9
    Likes Received:
    0
    why i see this error in serial monitor
    ےےےےےےےےےےےےےےےےےےےےےےےےےےےےےےerror: Expected command letter
    arduino uno and cnc shield v3

    and i work whit artcam software , when i want to export my progect to g-code art cam has many cnc machines but there is no grbl , so what is the closest cnc machine to grbl.
     
    #216 nima, Jul 19, 2016
    Last edited: Jul 19, 2016
  7. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,461
    Likes Received:
    1,915
    whatever the simplest machine is. .....
    GRBL only understands the basic commands for movement.
    It does not understand any of the G8x canned cycles, no macros, no tool diam offsets.
    Only G00 G01 G02 G03 for motion, and G90/91 and a few others for control.

    read this too
    The ArtCAM Forum - Community help, support and advice for the ArtCAM family of CADCAM software • View topic - Problems cutting circles??
     
    nima likes this.
  8. MrSurly

    MrSurly New
    Builder

    Joined:
    Jul 20, 2016
    Messages:
    11
    Likes Received:
    0
    Three questions, actually:

    • Does the current "edge" branch of GRBL support modulated spindle speeds based on acceleration, as mentioned in GRBL issue #660?
    • Is this feature expected to be in V1.0
    • Any ETA on V1.0 release?
    Thanks.

    -- Eric
     
  9. Sonny Jeon

    Sonny Jeon Well-Known
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2015
    Messages:
    165
    Likes Received:
    66
    On the modulated spindle speeds, possibly. It's not difficult to add it, so I can't see why not.

    v1.0. Soon. Been having some family health issues since January and have had little time to work on it. But, like I've said before, it's pretty much finished. I just need to polish up a couple things before release.
     
  10. MrSurly

    MrSurly New
    Builder

    Joined:
    Jul 20, 2016
    Messages:
    11
    Likes Received:
    0
    I'm sorry to hear that. =( I hope things are better soon.

    I did look briefly at the GRBL source, and the changes made by Alpharesearch, here. It looks about what I'd expect, carrying the target spindle speed all the way through to the stepper ISR and modulating it by the actual velocity, but I'm sure there are some subtleties of the GRBL base I'm not picking up on.
     
  11. Sonny Jeon

    Sonny Jeon Well-Known
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2015
    Messages:
    165
    Likes Received:
    66
    Yep. That's how I'd do it. It'll also be modulated by the spindle speed override value as well.
     
  12. MrSurly

    MrSurly New
    Builder

    Joined:
    Jul 20, 2016
    Messages:
    11
    Likes Received:
    0
    What about this part?

    if (st.set_rpm == true) {
    OCR_REGISTER = st.exec_segment->spindle_speed_pwm;
    st.set_rpm = false;
    return; // I think this is needed to give the laser a good start, it takes time for the laser to change.
    }

     
  13. MrSurly

    MrSurly New
    Builder

    Joined:
    Jul 20, 2016
    Messages:
    11
    Likes Received:
    0
    So ... if I were to do some merging, would it be best to do it against 'edge' or 'master'?

    Edit: More to the point, will you accept pull requests for either one?
     
    #223 MrSurly, Jul 21, 2016
    Last edited: Jul 22, 2016
  14. Ambrogio

    Ambrogio New
    Builder

    Joined:
    Jun 13, 2016
    Messages:
    19
    Likes Received:
    0
    great GRBL !
    I have my GRBL CNC working well.
    Now I have coupled a PEN HOLDER having two springs directly on the Z axe with the intention to use eatching resistant ink for direct draw of PCB on the copper clad. I have the PCB source file in PDF format and sometime in gerber format. This last should allow for drilling too.
    How to convert Gerber and PDF to Gcode for GRBL use ?
    Any help is verymuch appreciated .
    Thanks
    Ambro
     
  15. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    749
    The way I did it was to use (built-in) GCodeTools in Inkscape to generate the Gcode from scaled vector images, then open that in bCNC and edit as necessary (slices/repetitions, mainly). Can then send it to grbl from inside bCNC.

    It's a super quick and easy workflow, I found.
     
  16. Ambrogio

    Ambrogio New
    Builder

    Joined:
    Jun 13, 2016
    Messages:
    19
    Likes Received:
    0
    Thanks Rob,
    I am not an expert on those things: could you please give some more details on tools chain please ?
    Any useful link ?
    Regard,
    Ambrogio
     
  17. MrSurly

    MrSurly New
    Builder

    Joined:
    Jul 20, 2016
    Messages:
    11
    Likes Received:
    0
    Look into a program called pcb2gcode. It's more for using a router to cut out traces, BUT, you could use your pen plotter with negative photoresist. This has the advantage of using less pen ink. Especially if you use the 'voronoi' option of pcb2gcode.

    What sort of pen are you using?
     
  18. Ambrogio

    Ambrogio New
    Builder

    Joined:
    Jun 13, 2016
    Messages:
    19
    Likes Received:
    0
  19. Ambrogio

    Ambrogio New
    Builder

    Joined:
    Jun 13, 2016
    Messages:
    19
    Likes Received:
    0
    @ Surley,
    could you please give me some more detail / procedure on how to use the program to achieve the painting ?
    Thanks for all .
    Ambro
     
  20. Sonny Jeon

    Sonny Jeon Well-Known
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2015
    Messages:
    165
    Likes Received:
    66
    For the most part, I don't accept pull requests for various reasons, but mainly it's so I can easily keep track of the codebase in my head. If it's simple and follows the development path, I make exceptions. However, I do frequently pull ideas from pull requests and close them when I've implemented them. If you do something, I'd do it against the edge branch, as that's the next release candidate.
     
  21. MrSurly

    MrSurly New
    Builder

    Joined:
    Jul 20, 2016
    Messages:
    11
    Likes Received:
    0
    My statement came with some caveats.

    pcb2gcode is aimed at using a cutting head (a milling machine) to cut away where you don't want copper, which isn't really suitable for for direct-to-copper ink marking.

    I was suggesting that you use the pen in conjunction with the negative photoresist to essentially 'reverse' (dark <--> light) the pen action. Doing it this way means that the un-pen-marked areas of photoresist will harden and protect the copper. The advantages being less pen ink, and less etching time, if you're using the voronoi option, since this maximizes the amount of copper left on the board.
     
  22. MrSurly

    MrSurly New
    Builder

    Joined:
    Jul 20, 2016
    Messages:
    11
    Likes Received:
    0
    ... that, and I'm sure much of the code quality is ... lacking.

    I've tried to make minimal changes (to edge), and to make it a bit more clear with what Alpharesearch was trying to do. I did notice that none of his changes actually modulate the PWM based on actual head speed. Another commenter in that thread had implemented it.

    I've already done much of the work, and I have it working in the simulator (BTW, I'm not sure that unmodified edge will compile in grbl-sim), and I'll do some real testing before making a pull request.

    Big unknown is how to implement the laser power curve, since if I understand correctly laser power is non-linear. More research is needed.

    Thanks.

    -- Eric
     
  23. Joe Pineapples

    Builder

    Joined:
    Jul 26, 2016
    Messages:
    15
    Likes Received:
    1
    Hi all, I want to run GRBL on a Mega256o board but I have failed miserably at the first hurdle. Please be kind and don't laugh too much, I've never used Github and I can't seem to find the actual file I need :(
    I click on the link in Sonny's signature and find a list of entries but don't know what it is I'm looking for or how to download it. I would have expected to find something like "GRBL v0.9 ZIP" with a "DOWNLOAD" option, but clearly it doesn't work this way.
    Would anyone be kind enough to educate me in obtaining the necessary GRBL file(s) please?
     
  24. MrSurly

    MrSurly New
    Builder

    Joined:
    Jul 20, 2016
    Messages:
    11
    Likes Received:
    0
    Perhaps the grbl-builds repo? Don't know if there are any appropriate build for a 2560 ...
     
  25. Joe Pineapples

    Builder

    Joined:
    Jul 26, 2016
    Messages:
    15
    Likes Received:
    1
    Thanks for the quick response!
    As far as I understand it I should be able to use the usual GRBL that would work on an UNO (but would have to make a minor alteration to a file). How would I download GRBL if I had an UNO?
     
  26. Sonny Jeon

    Sonny Jeon Well-Known
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2015
    Messages:
    165
    Likes Received:
    66
    You'll need to alter the CPU define in config.h to CPU_MAP_ATMEGA2560. Recompile and flash. Make sure to edit the file in the Arduino library folder. Also, Grbl has a Wiki page that outlines how to upload Grbl [here](Compiling Grbl · grbl/grbl Wiki · GitHub).
     
  27. Joe Pineapples

    Builder

    Joined:
    Jul 26, 2016
    Messages:
    15
    Likes Received:
    1
     
  28. Joe Pineapples

    Builder

    Joined:
    Jul 26, 2016
    Messages:
    15
    Likes Received:
    1
    That was the first place I looked, it tells me to get GRBL from the lower right of some Home page. I can't seem to find it though.
     
  29. Sonny Jeon

    Sonny Jeon Well-Known
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2015
    Messages:
    165
    Likes Received:
    66
    It's a little outdated but there is a green button on the front page that says "Clone or Download". Click it and you'll see an option for a .ZIP download. FWIW, Github constantly alters how a github page looks. I recall it changing at 5-6 times in the past few years. It's difficult to keep everything updated when they do that.
     
  30. jbell

    jbell New
    Builder

    Joined:
    Jul 24, 2016
    Messages:
    46
    Likes Received:
    2
    I'm just getting started in CNC and right now know absolutly nothing. where can I find a toutorial for GRBL and where can I download it?

    Thanks
    Where would I find a tutorial for Grbl and where could I download the program?
    Thanks
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice