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. Marcio Moraes

    Builder

    Joined:
    Jul 3, 2017
    Messages:
    3
    Likes Received:
    0
    Hi guys. I built a cnc laser with arduino and grbl 1.1. I changed the grbl to laser mode and try to use the PWM feature at D11.
    I change the config.h to use variable speed, but when the grbl starts the laser is already turn on, in fact the laser is alway on even when M05. I checked the D11 with
    multimeter and saw that it was always around 1.3V. Someone can help me? I have no ideia to try. Thanks.
     
  2. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,239
    Likes Received:
    1,815
    we will need more information.
    what laser, what laser driver.
    what happens if you disconnect the laser, what voltage do you get then (at full power of course, a voltmeter will not measure correctly at partial power settings))?
    did you change $30 and $31?
     
  3. Marcio Moraes

    Builder

    Joined:
    Jul 3, 2017
    Messages:
    3
    Likes Received:
    0
  4. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,239
    Likes Received:
    1,815
    I have a similar laser but have not connected it up yet.
    $30 and $31 affect how your Gcode needs to be generated to adjust laser power.
    you can set them to 0 and 100 and then the gcode can use
    M3 S100
    for full power
    M3 S50 for half power, etc. (but note that PWM to actual laserpower is non linear and differs across drivers and other factors)

    Don't omit to read the GRBL Wiki about using the laser mode. M3 and M4 are different....
     
  5. David Glicksman

    Builder

    Joined:
    Jul 23, 2017
    Messages:
    11
    Likes Received:
    3
    Seems like the answer is no, but:
    Is there any way to control the speed of each axis independently?
    I'm using the CNC xPro board and GRBL for a project that is not a CNC machine. I'm controlling motors for a sculpture that each move independently, so my X, Y, and Z axes are really just Motors 1,2, and 3 to me.
    If I issue a command like G1 X100Y50Z300 F10000, I know that under the hood it's telling each motor to run at a different speed so that the vector of 100,50,300 comes out to a travel speed of 10000mm/m.

    Is there some advanced GCode I'm missing that would allow me to specify a feedrate for each axis manually? something like G1 X100 FX5000 Y50 FY1000 Z300 FZ10000?

    Thanks all
     
  6. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,239
    Likes Received:
    1,815
    you have missed no code, because there is no code for that.

    seems to me what you need is either custom software, ie pay someone to make this work for you, or you need 3 Arduinos with GRBL and to feed each one the speed and distance you need.
     
  7. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    312
    Likes Received:
    137
    If you are at all a programmer, take a look at the Arduino library accelstepper. I'm not a huge fan of the library but use it in one of my projects. Lots of example code out there.
     
  8. David Glicksman

    Builder

    Joined:
    Jul 23, 2017
    Messages:
    11
    Likes Received:
    3
    Yeah, that's about what I was expecting. One of those moments where you really hope you're missing something obvious.

    That said, the GRBL code base is some of the best commented, easiest to digest code I've seen. If I don't just switch to AccelStepper, I'll see what I can do to fork it.

    Thanks for the input!
     
  9. David Glicksman

    Builder

    Joined:
    Jul 23, 2017
    Messages:
    11
    Likes Received:
    3
    It looks like I'll be doing exactly that. AccelStepper maxes out at 4Khz, which isn't quite fast enough for my purposes, but I'm experimenting with using half or even full steps to speed things up. Gotta find that sweet spot between speed and smoothness.

    Thanks for the input!
     
  10. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    312
    Likes Received:
    137
    I've never been able to drive accelstepper at even 4K and this is on a Teensy 3.2 running 96 Mhz (vs 16 on an arduino). I use it for a macro photography focus rail that I built but am thinking of writing my own code as I'm pretty sure I can get a much higher step rate.
     
  11. David Glicksman

    Builder

    Joined:
    Jul 23, 2017
    Messages:
    11
    Likes Received:
    3
    Ok so I've looped all the way back around to basic ignorance. I've spent the last week jumping back and forth between GRBL and accelStepper, and maybe what I need is very simple. Pardon the long post.

    I'm building a kinetic sculpture that's meant to play back animation from my 3D software. I've written some scripts that convert my animation into position data, with 30 "frames" per second. Easy Peasy. AccelStepper works exactly the way I want (always tries to hit its new target, but doesn't worry about reaching it - nice and smooth), but with that <4Khz pulse rate it's just nowhere near fast enough. I tried removing all microstepping but that gave me jerky, loud motion. So back to GRBL.

    I tweaked my script to output gcode, but now I have the opposite problem. By chopping my animation into 30ths of a second, I'm giving it the classic Lots Of Short Line Segments problem. I get really jerky motion because GRBL actually moving too fast. The motor reaches its position in like a 100th of a second, then has to wait for the next instruction.

    The last thing I tried was using the G93 feed rate mode. Brilliant! I can just tell each move how long to take! But I'm still getting lots of short pulses. As best I can tell it's still ramping up to speed, hitting speed, and ramping down with each step. Just, really really fast. I'm hoping that the solution can be found in feeding GRBL better gcode. I can't feed it fewer points because I need exact control of the motion and timing (as opposed to just feeding it key moments and trusting the built-in smoothing curves), but I'm not out of options yet either.

    So here's some specific questions (thanks for your patience!):
    -I'm writing my own UI and feeding GRBL new lines of gcode one at a time. I assume this is keeping GRBL's planner from doing its job properly, but I don't know what to do about that. How do apps like chiliPeppr or Universal Gcode Sender keep from overflowing the read buffer? I have thousands of lines of code to send.

    -I would have assumed that G64 (path blending) would smooth out that problem for me but it has no effect. Is that because of question #1? Or am I missing something else?

    -Is it even worth diving down the G5 rabbit hole of trying to define splines or NURBS curves? Seems like a combination of difficult and inaccurate that I just don't want to mess with. But I will if it's worth it.


    For what it's worth, here's the project I'm building (going to use three xPro boards in tandem):


    Thanks for any help you can offer - and all your help so far!
    --David
     
  12. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    312
    Likes Received:
    137
    Very cool!

    Have you looked at this section of the Grbl wiki? It might help you.

    Also, you might want to consider using separate stepper drivers and arduinos running grbl to control them - 3 xPros (plus a spare?) adds up to a lot of money and they are basically just an arduino with stepper drivers. It would use the exact same grbl interface. I'm pretty sure you could do it for a lot less money. I have some bare Arduino-Mega grbl shield boards that I made that I'd be happy to give you. If you can wait a bit I'll have an Arduino Nano shield. Nanos cost almost nothing - I bought 5 for $15 off ebay from a US vendor. You'd need to solder SMDs but it's not hard if you know how to solder.
     
  13. David Glicksman

    Builder

    Joined:
    Jul 23, 2017
    Messages:
    11
    Likes Received:
    3
    Wow, thanks - looks like exactly the section I need to (should have) read!
    And thanks for the kind offer but, for once, I'm actually within budget and already have the boards in hand. Besides, these boards are still cheaper than blowing out another few Adafruit Motor Shields do to high voltage and low intelligence.

    I'll keep your offer in mind though - and I'll let you know if I end up with spare goodies in return.
     
  14. David Glicksman

    Builder

    Joined:
    Jul 23, 2017
    Messages:
    11
    Likes Received:
    3
    Yeah, turns out to have been the first issue - I was starving the GRBL input buffer, and it was in fact finishing every move before it got the next instruction. Generating a .nc file and running it through Universal gcode sender gave be perfectly smooth, beautiful playback with nearly perfect synch (I have a <1 second deviation in a 10 minute animation)!

    Now I "just" have to rewrite their streaming.py example to run natively in Touch Designer. Now I know it'll work, so it's worth the slog.

    Thanks for all your help!
     
  15. XYZ+

    XYZ+ New
    Builder

    Joined:
    Sep 5, 2017
    Messages:
    1
    Likes Received:
    0
    Hi All,

    This is my first ever post, so here goes...

    I'm interested in making controllers that can take Gcode to move an XYZ stage for a range of different applications. I have used CNC machines and laser cutters before, but I am totally new to building DIY systems. The Ardunino/GRBL package seemed ideal and so I bought an Arduino Uno 328 and a CNC shield.

    Last night I followed the steps on the GRBL website, but when I tried to upload GRBL to the Arduino, it threw up several error codes and would not upload. The Arduino seems to be talking to the IDE, it detects the board type and the com port and will read the board info. The Arduino power light is on and LED on pin 13 is blinking.

    Here is the error output from the upload...can you see where I've gone wrong?

    Arduino: 1.8.4 (Windows 10), Board: "Arduino/Genuino Uno"

    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\No. 1 User\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10804 -build-path C:\Users\NOD6FE~1.1US\AppData\Local\Temp\arduino_build_52441 -warnings=none -build-cache C:\Users\NOD6FE~1.1US\AppData\Local\Temp\arduino_cache_381527 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\grbl-1.1f.20170801\grbl\examples\grblUpload\grblUpload.ino
    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\No. 1 User\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10804 -build-path C:\Users\NOD6FE~1.1US\AppData\Local\Temp\arduino_build_52441 -warnings=none -build-cache C:\Users\NOD6FE~1.1US\AppData\Local\Temp\arduino_cache_381527 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\grbl-1.1f.20170801\grbl\examples\grblUpload\grblUpload.ino
    Using board 'uno' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
    Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
    Detecting libraries used...
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\NOD6FE~1.1US\AppData\Local\Temp\arduino_build_52441\sketch\grblUpload.ino.cpp" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\NOD6FE~1.1US\AppData\Local\Temp\arduino_build_52441\sketch\grblUpload.ino.cpp" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\coolant_control.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\eeprom.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\gcode.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\jog.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\limits.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\main.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\motion_control.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\nuts_bolts.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\planner.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\print.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\probe.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\protocol.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\report.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\serial.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\settings.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\spindle_control.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\stepper.c" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\No. 1 User\Documents\Arduino\libraries\grbl\system.c" -o "nul"
    Generating function prototypes...
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\No. 1 User\Documents\Arduino\libraries\grbl" "C:\Users\NOD6FE~1.1US\AppData\Local\Temp\arduino_build_52441\sketch\grblUpload.ino.cpp" -o "C:\Users\NOD6FE~1.1US\AppData\Local\Temp\arduino_build_52441\preproc\ctags_target_for_gcc_minus_e.cpp"
    In file included from C:\Users\No. 1 User\Documents\Arduino\libraries\grbl/config.h:30:0,

    from C:\grbl-1.1f.20170801\grbl\examples\grblUpload\grblUpload.ino:1:

    C:\Users\No. 1 User\Documents\Arduino\libraries\grbl/grbl.h:68:4: error: #error "Required HOMING_CYCLE_0 not defined."

    #error "Required HOMING_CYCLE_0 not defined."

    ^

    C:\Users\No. 1 User\Documents\Arduino\libraries\grbl/grbl.h:108:4: error: #error "WCO refresh must be greater than one."

    #error "WCO refresh must be greater than one."

    ^

    C:\Users\No. 1 User\Documents\Arduino\libraries\grbl/grbl.h:111:4: error: #error "Override refresh must be greater than zero."

    #error "Override refresh must be greater than zero."

    ^

    Using library grbl in folder: C:\Users\No. 1 User\Documents\Arduino\libraries\grbl (legacy)
    exit status 1
    Error compiling for board Arduino/Genuino Uno.


    Thanks for your help,

    XYZ+
     
  16. David Glicksman

    Builder

    Joined:
    Jul 23, 2017
    Messages:
    11
    Likes Received:
    3
    Never seen that before, but
    C:\Users\No. 1 User\Documents\Arduino\libraries\grbl (legacy)
    looks a little fishy, but that could just be something the compiler added. If you have a "grbl (legacy)" directory, best to toss it and start over.

    It also looks from some of those lines like you're running the GrblUpload sketch from your downloads folder rather than the one from your arduino library.

    Good luck!

     
  17. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    312
    Likes Received:
    137
    try deleting the grbl library (in your user/arduino/grbl and then follow the instructions in the wiki about how to install the grbl library.
     
  18. Jay Perez

    Jay Perez New
    Builder

    Joined:
    Feb 1, 2017
    Messages:
    1
    Likes Received:
    0
    Hi,

    Hope I'm posting correctly.

    I'm converting a small Unimat lathe to CNC using a Arduino UNO with a GRBL 3.0 shield and GRBL v1. 1.

    I had dialed in the steps per mm very carefully and was consistently getting positioning and repeatability of less than .001" using a dial indicator with 1" of travel. I continued to adjust the other settings such as acceleration and maximum speed and noticed that every time I made a change to any setting it affected the positioning accuracy. I'm new to all of this but thought that as long as I didn't change the micro-stepping or have too much friction in my system that a given number of pulses would consistently rotate the shaft the same number of degrees.

    Can you please tell me if what I'm seeing is 'real' and if so how to prevent it or deal with it ?
    I spent quite a bit of time looking for something that recommended the best sequence for setting the variables but didn't find anything.

    I struggled a long time trying to get the stepper motors to move the correct distance but the changes I was making did not give the predictable results I was expecting. (I would change the value just a few points and it seemed to be heading in the right direction and then change it a few more points and it would then go a large amount in the opposite direction.)

    Eventually I discovered that I had to adjust the maximum feedrate before I could get any of the other parameters to behave as anticipated. I couldn't find this documented anywhere though. That's also when I saw how these changes impacted my accuracy for the first time.

    There's a high probability that I don't know what the heck I'm talking about but on the off-chance that what I described actually happened can you please offer some advice ?

    Thanks !

    Jay
     
  19. m-Kresol

    m-Kresol New
    Builder

    Joined:
    Sep 18, 2017
    Messages:
    3
    Likes Received:
    0
    Hey guys,
    first post with a problem ;) I have no experience with Arduinos or programming and am looking for some help.

    I recently aquired a EleksLaser A3 with a 2.5W diode laser and a ManaSE controler. I am trying to use it with grbl1.1f + universal g-code sender on my mac. I have no problems flashing the arduino or connecting to it. I can also operate the x and y motors without problems. However, I cannot control the laser at all. It comes to live very short when connecting to the arduino, but nothing after that.

    I switched to laser mode and altered the x/y acceleration. I left everything else as is.

    I tried the following:
    measuring voltages: M03/M04 changes D13 high and low, but D11 is always LOW (independent of spindle speed setting with S... command. I tried everything from S0 to S1000, although max speed is defined at 255). I also didn't measure any PWM modulation with my cheap scope. tried to enable "use_spindle_dir_as_spindle_enable", but without success (was a long shot and not really knowing why I tried). I disengaged "define variable_spindle" and m03/m04 changed D13 as well as pulling D12 high! The laser however is wired to D11, so this was more for confimation of my sanity than anything else.

    I also tried the following code:
    Code:
    int ledPin = 11;                 // LED connected to digital pin 11
    
    void setup()
    {
      pinMode(ledPin, OUTPUT);      // sets the digital pin as output
    }
    
    void loop()
    {
      digitalWrite(ledPin, HIGH);   // sets the LED on
      delay(2000);                  // waits for 2 seconds
      digitalWrite(ledPin, LOW);    // sets the LED off
      delay(5000);                  // waits for 5 seconds
    }
    
    this toogles the laser ON and OFF as advertised, so I know the laser works properly. I'm led to believe that there is a bug somewhere hidden in the code concerning the definition of D11 as PWM and enable output pin. No idea how to find and more importantly recognize the problem, so I was hoping for your help.

    EDIT: Read some stuff about a jumper underneath the arduino. The jumper is not connected. Please let me know, if this is correct.

    let me know, if you need any further information. Thanks for looking!
    cheers,
    Felix
     
    #649 m-Kresol, Sep 18, 2017
    Last edited: Sep 18, 2017
  20. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    312
    Likes Received:
    137
    I'm traveling so can't check but you need to have the correct config of grbl. What version do you have? Also, read the grbl config.h. even if you aren't a programmer it will give a lot of info.
     
  21. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,239
    Likes Received:
    1,815
    maybe these guys can help you (the actual Mana SE forum :)
    EleksMana SE
     
  22. m-Kresol

    m-Kresol New
    Builder

    Joined:
    Sep 18, 2017
    Messages:
    3
    Likes Received:
    0
    I tried that forum (and benboxlaser.us actually) too, but haven't had any luck. The general thing to do is to just buy a windows computer or run bootcamp, but I would prefer not to spend more money.

    Thanks for your reply. I'll check the config.h more closely. Just had a quick look at it. I use grbl 1.1f.
     
  23. m-Kresol

    m-Kresol New
    Builder

    Joined:
    Sep 18, 2017
    Messages:
    3
    Likes Received:
    0
    I finally got it working!

    So, I tried several things, but nothing was doing the trick: D11 (engaging and PWM pin for the laser) was always low, but I could toggle it on and off with a simple line of code. Thus, I knew that there was only a software bug hidden somewhere in the grbl code.

    Zax (the guy that developed T2Laser) indirectly led me to the solution. He mentioned that I should use M03 command to turn the laser on and S... to adjust the power. In grbl it's up to 255 and in the elekslaser firmware up to 1000. So, I thought I should give the elekslaser firmware another go (when I tried it, I wasn't aware of the M03 command). After flashing the arduino and typing M 0 3 S 1 0 0 0 very slowly to build up tension, the laser came to life. Oh, what bliss! Now I just hope my fire alarm doesn't go off ;)

    So the trick is to use the elekslaser firmware (basically an altered version of grbl 0.9i. I was trying to use 1.1f since it has a specific laser mode) and then you can use the universal gcode sender. if anyone on mac/linux is wondering. the code to flash the .hex to the arduino is:

    Code:
    /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/cu.wchusbserial1410 -b57600 -D -Uflash:w:/Applications/ManaSE_v3.7.hex:i
    
    MAKE SURE TO ADJUST THE FILE PATHS!
    
    Another thing, which is already included in the ManaSE firmware: the steps/mm for x and y axis is 80!

    Now I just need to find a good way to generate gcode from png picture files. I usually use gimp to design my graphics. there are plugins for inkscape, but the one I used for trials only does outline, but I need full area too. any recommendations?

    Also, if anyone knows where the bug in the grbl 1.1f is, I'd be happy for any advice. The manaSE firmware is supplied as a hex, so no way to find out the differences.
     
  24. aqibi2000

    aqibi2000 New
    Builder

    Joined:
    Nov 8, 2017
    Messages:
    1
    Likes Received:
    0
    Hi, I think I'm finally in the correct medium to be asking my questions: My GRBL controlled machine is 2.5 Axis, Z axis home calibration is disabled.

    Manual jogging of the machine works with $20,21,22,23 etc all switched off

    ($5 = 0), and using pull up resistors with Normally Open switches. LIM Function reports the switches to be working properly.

    Homing sequence issue as per github:

    The Sequence s:
    X and Y axis
    X, Y Axis move both to Homing direction at fast rate ($25)
    The first Axis triggers the switch will stop and wait for the second axis to trigger
    When second axis triggers the switch, both axis back off a distance ($27)
    Both X and Y axis will move toward switches again slowly, until both switches triggered again ($24)
    Both X and Y axis will back off a small distance ($27)

    My machine after pressing $H the machine just moves the distance $27 on both X and Y once.
    This means the program is not processing the homing sequence because it is meant to perform the triggering twice per axis if it assumes it is seeing the home button (High speed movement to trigger the axis, then the low speed movement to perform precise homing)


    Possibility 1 Limit switches button is constantly triggered throughout the whole process, hence doesn't feel the need to perform the re-trigger.........even though the feedback I get from the LIM function which is reporting back all 4 switches work correctly for X and Y axis only trigger when pressed. ($5 = 0), and using pull up resistors with Normally Open switches.

    Possibility 2
    I'm not able to CNC
     
    #654 aqibi2000, Nov 8, 2017
    Last edited: Nov 8, 2017
  25. Sonny Jeon

    Sonny Jeon Well-Known
    Staff Member Moderator Builder

    Joined:
    Aug 6, 2015
    Messages:
    165
    Likes Received:
    66
    Please stop posting on multiple sites. This has been already been addressed on the Grbl issues threads.
     
  26. Sloppsta

    Sloppsta New
    Builder

    Joined:
    Nov 8, 2017
    Messages:
    2
    Likes Received:
    0
    I have seen so many people jogging their machines with ps3/xbox controllers. this looks awesome. I was wondering if grbl supports this and if so how to implement it. any guides or links to resources would be greatly appreciated.
     
  27. phil from seattle

    phil from seattle Journeyman
    Builder

    Joined:
    Mar 17, 2017
    Messages:
    312
    Likes Received:
    137
    Grbl itself doesn't, it is the gcode sender application that would do that. I know that bCNC can be set up to use an xbox controller. I've tried to do it on a RaspPI but had some problems. Need to get back to figuring it out. There is a post in tutorials that talks about it.
     
    #657 phil from seattle, Nov 8, 2017
    Last edited: Nov 9, 2017
  28. mikememmi

    mikememmi New
    Builder

    Joined:
    Sep 28, 2017
    Messages:
    10
    Likes Received:
    7
    Hi Sonny, Your expertise will be wasted on this simple question. Can you point me to more detail on the limit switches and an e-stop please? For example Limit Z. Is that Pin 12 --> through the switces --> to ground / or to 5v? (for always closed) Thanks Grbl_Pin_Diagram_v0.9+.png
     
  29. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    13,753
    Likes Received:
    4,070
    Refer to the wiki, it has a detailed page about this: Wiring Limit Switches · gnea/grbl Wiki · GitHub
     
  30. mikememmi

    mikememmi New
    Builder

    Joined:
    Sep 28, 2017
    Messages:
    10
    Likes Received:
    7
    perfect!!!
    Hi Peter, I have seen a two hour set up video mentioned in other comments. Do you have a link to that?
    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