gnea / grbl-Mega

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on an Arduino Mega2560
https://github.com/gnea/grbl/wiki
Other
491 stars 226 forks source link

Ramps 1.4 #11

Open Gummibaer opened 7 years ago

Gummibaer commented 7 years ago

Please add Support for Ramps 1.4.

chamnit commented 6 years ago

@DarkAlchy : I just tried it with the Arduino IDE uploading. It worked with no errors or warnings. Make sure that you don't have any other grbl source code in your library and the Mega2560 is selected as your board type in the IDE Tools menu.

Also comment the two lines about the RAMPS configuration lines, just as the instructions say.

DarkAlchy commented 6 years ago

@chamnit I have a question and that is I have my define.h setup and my config.h has my ramps uncommented and the other two commented and when I do a $$ I am getting back the generic defaults. What I tried was just having the ramps defaults in the file with no ifs in it just hard defines and still $$ had the generic defaults. Is this a bug or am I doing something wrong?

chamnit commented 6 years ago

@DarkAlchy : While Marlin is a fork of Grbl, it doesn't handle the EEPROM the same. Grbl has hard defaults only when the EEPROM needs to be wiped (there is a bug that fails to detect fresh installs that won't be fixed due to several good reasons). You can issue a $RST=* command to Grbl to wipe and restore EEPROM to defaults manually.

DarkAlchy commented 6 years ago

Thank you as I was trying $RST= nut it was an unknown command and $ came back with a few command but $RST was not listed.

chamnit commented 6 years ago

Please read the wiki pages. It's all listed and explained there. You are missing an asterisk.

DarkAlchy commented 6 years ago

Just to let you know this thing works a treat and is lightning fast. USB 250k connection. Marlin over USB maxes out around 50mm/s and SD card about 80-90mm/s but this beast I max out around 16k-18k mm/min over USB and if it had SD card abilities I bet I could get even faster. So, around 300mm/s using everything the same. That is a HUGE increase in speed which means I can use my laser more at full power (full spectrum range without it burning). I am very pleased to say the least. I use 3k acceleration in Marlin but with this about 5k though I haven't had a chance to really tweak yet either because at 300mm/s my machine is throwing stuff off of my table it is going so fast (a wobbly card playing like table you see at fairs and exhibitions etc...).

chamnit commented 6 years ago

Good to hear. Don’t forget to try the dynamic laser mode via the M4 command when laser mode is enabled. It’ll make crisper burns with less over burning in corners.

DarkAlchy commented 6 years ago

@chamnit Have any idea why in my defaults I have X,Y acceleration set to 3000 and Z to 100 but when I do a $RST=* it sets 120/121/122 = 0.838??? I have to go in and hard set them for some odd reason but everything else in my defaults.h gets ported over just fine. Acts like it is doing some sort of calculation on its own and ignoring my defaults.h file.

chamnit commented 6 years ago

Please look at the other defaults. There should be a /(60.0*60.0) in each entry.

DarkAlchy commented 6 years ago

@chamnit Take this line DEFAULT_X_ACCELERATION that only appears in two files DEFAULT.h and SETTINGS.c and in the settings it is only one line which is settings.acceleration[X_AXIS] = DEFAULT_X_ACCELERATION;

What you are saying is that I need to multiply those values from X to X*3600 to get the real value I am after?

chamnit commented 6 years ago

What I’m saying is that look at the comments next to the acceleration defaults in the default.h file. It spells it out completely and clearly.

DarkAlchy commented 6 years ago

@chamnit Ahhh, I went straight to the Ramps section as that is the only part of the define I cared about and that is not there.

define DEFAULT_X_MAX_RATE 18000.0 // mm/min

define DEFAULT_Y_MAX_RATE 18000.0 // mm/min

define DEFAULT_Z_MAX_RATE 300.0 // mm/min

define DEFAULT_X_ACCELERATION 3000

define DEFAULT_Y_ACCELERATION 3000

define DEFAULT_Z_ACCELERATION 100

define DEFAULT_X_MAX_TRAVEL 200.0 // mm

define DEFAULT_Y_MAX_TRAVEL 200.0 // mm

define DEFAULT_Z_MAX_TRAVEL 200.0 // mm

Notice the missing comments for that in that section.

bigshug commented 6 years ago

" I also changed the spindle to work on digital pin 8 as this has a 12v output that can be PWM controlled"

So are you using PIN 8 for 12v PWM? Can it be used for 0-5v PWM?

luisluna2 commented 6 years ago

Hello friends, one question: How can SWAP the ZAXIS motor to YAXIS motor?

I try change pins in cpu_map.h but when I change the pins it does not work any axis, I wanna change the motor for have 2 Conetors Y and 1 Conestor for Z.

Thank you for your coments and help!

chamnit commented 6 years ago

@luisluna2 : Please stop hijacking unrelated issues threads with your questions and posting multiple times. This is at least the third one I've found this morning. Posting multiple places wastes a lot of people's time. Post in one place in a new thread and wait patiently for an answer.

luisluna2 commented 6 years ago

@chamnit so sorry my friend, I do not want to bother, I just wanted to know how to do it. Thank you very much, it will not happen again.

rasciodc commented 6 years ago

I was very surprised to see a 2560 version of GRBL and even more when I crossed with this issue to use the RAMPS board...

Is there any news on this topic? I saw some developments going on and just would like to know what is the status on it. Tks!

DarkAlchy commented 6 years ago

@rasciodc It works as GRBL without issue but if you are meaning will GRBL work as a 3d printer controller that will never happen I think.

rasciodc commented 6 years ago

Thanks for the quick reply.

I'm intending to use it as mill, not 3D printer...

Is there an easy way to clone Y (or X) axis to the E0 or E1 axis on Ramps via code? I was able to do that on the GrblForCyclone but it wasn't an optimal implementation...

spikedrba commented 6 years ago

hi, wondering why this issue is still open... as far as I can see a pull request to add RAMP 1.4 support was accepted a year+ ago and as far as my preliminary testing goes it's all working (altho still fighting with some issues).

did I miss anything? should I expect some kind of problem going down this route?

and thanks to @chamnit @jekhor and @docwelch for making this possible! :+1:

dennishatton commented 6 years ago

I'm using ramps 1.4 with N.O. limit switches I can't get them to cause an alarm in bcnc or gcodesender If check status with a terminal program, I can see pn:x or y or z when I trip micro switches

I have un commented in config.h //#define DEFAULTS_RAMPS_BOARD //#define CPU_MAP_2560_RAMPS_BOARD

dennishatton commented 6 years ago

Is there a problem with pin change interrupts for ramps? They are commented out When I put them back in It won't compile

tkurbad commented 6 years ago

@dennishatton, as I had to realize earlier in this issue's discussion, hardware limit switches for ramps a.t.m. only work for homing. During operation you have to use soft limits, which works for me. One of the problems is that the ramps board supports separate upper/lower limit switches, while grbl a.t.m. only supports one limit switch (connection) per axis. To support limits for ramps would require lots of code changes within the grbl code itself as far as I was able to deduce.

@chamnit is apparently working on a HAL solution for grbl, which isn't ready for release yet. If this is done, it will be much easier to implement all kinds of stuff for different hardware - so we ramps (or in my case Azteeg X3) owners have to stay tuned...

dennishatton commented 6 years ago

Ok, thanks

rasciodc commented 6 years ago

Have anyone tried to clone X, Y or Z axis on motors E0 or E1? I've put some hours on it but was unsuccessful.... It would be great if anyone could point me to the right direction...

Apperently it should only require to have the bits being written to [X,Y or Z] axis to be applied on the [E0 or E1] Port on the stepper.c file but I think I'm missing something else....

Thanks!

garyebersole commented 5 years ago

I have been trying to get grbl-Mega to run on a Mini-Rambo 1.3a board which is an Arduino Mega 2560 with on-board support for RAMPS 1.4. My goal is to replace the Marlin controller that came with the LowRider2 CNC (derived from the MPCNC design) with real CNC software. I modified the config.h file as noted earlier and flashed the Mini-Rambo. Using Universal Gcode Sender (Platform version), I am able to connect to the controller (the 'Grbl.1.1g' header is printed) but the '$$' and '$G' commands are not executed.

As a test, I flashed the grbl-Mega-5X fork from @fra589. It actually worked with no changes logging the header as well as the results from the '$$' and the '$G' commands. Unfortunately, it threw an alarm ('Safety door detected as opened and door state initiated.') which blocks further interaction with the controller.

I'm either missing other obvious basic settings, configuration variables and defaults that must be set to work or there are code changes that @fra589 made as he added the support for additional axes. Any thoughts to what I might need to do to make progress?

Thanks. I use grbl on a desktop CNC and really hope I can get it working on the big CNC I am building.