I need to take GRBL [GRBL v1.1h (2019-08-25) Release or any other previous release] and repurpose X & Y into B & C rotational axis and remove Z axis, any spindle related and coolant related items as just M code commands that I can use other than spindle or coolant control. ie: laser on off commands, engage into X,Y,Z axis CNC driven by another system etc. just need to simplify everything that is needed and remove everything that is not needed for this purpose. I don't want to use any other board other than UNO. I still require it to receive g-code commands from GUI [something like a UGS] and functions just like the original GRBL file would. any thoughts and help please?
Why do you want to remove the command handlers as opposed to just not using those commands?
Please, can you elaborate? how can I achieve repurposing of X & Y into B & C rotational axis and remove Z axis, at the same time; spindle and coolant related items as just M code commands.
Sounds like you need to be modifying code ...
why do you have those constraints ?
you need to modify the code that handles axis definitions and motion control.
(update the axis definitions in the firmware’s configuration files and code to recognize B and C instead of X and Y and adjustments in how the firmware processes G-code commands for rotational movements. You'll also have to modify the motion control algorithms to handle rotational motion. GRBL's original algorithms are designed for linear motion, so adapting them for rotational axes involves understanding and altering the underlying kinematic equations)...
Please, can you expand on that?
Not really
Basically you need to hack into the code and it’s not a small task.
I agree in regards to its a big task. However, has anyone tried this? is there a library that functions just like GRBL for 2 rotational axis?
I started working on trying to hack the core code (ie: config.h/motion_control.c/settings.h/planner.c/gcode.c/ cpu_map.h), however, I am getting compilation errors on them. I would like to post these on here for someone to help me, however these library files are very long. any suggestions please?
I agree, this will keep things simpler, I would like you to expand on this please. without removing the command handlers, just not use them: did you supress (comment them out) or just not call them on the g-code?
Can you explain why you have these constraints?
I didn't do anything! I'm asking you why you need to do that.
I don't know if it is a possibility, but when the kinematics of the project does not match the kinematics of the controller, some folks reprocess the G-code to work with the controller.
Early versions used preprocessing of the non X-Y motions into X-Y Gcode, but later versions built the transformations into a version of Marlin.
Makes a heck of a lot more sense to me!
because of the space constraints, although I've heard that GRBL for MEGA has 5 axis operational option with 4th and 5th as rotational, but I can't place Mega within the box that I am going to be using. it is too large and its a waste as I just need two axis, it seems a bulky hardware to use.
As I pointed out, I would prefer the latest GRBL [GRBL v1.1h (2019-08-25) Release or any other previous release], Will it be easier with an older version of GRBL?
the Mega mini would likely be small enough and you can get GitHub - 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
You get all the modes you might need and more…(and it’s cheaper than the UNO)
Ok, what would you suggest? keep them but not use them? so that the GRBL will work as is, I would need to use them, if then wouldn't the instructed M-code get lost if it wasn't specific? I suppose you are meaning that; so long as the M-codes are instructed it doesn't matter what they are called.
ah... that's looks like what I need.
Ok, now I don't need X,Y, Z axis, how do I go about with just using the 4th and 5th rotational axis?
Ah yes the rotational stuff.
Look for "GRBL-Mega-5X firmware" and you’ll get hits like GitHub - alnwlsn/grbl-Mega-5X-alnwlsn: 5/6 Axis version of Grbl, the open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on an Arduino Mega2560
So, I take it that I leave the GRBL as is and just send G-code instructions to 4th and 5th Rotational axis and ignore X,Y,Z axis I will get it to do what I want?
do you know if there is any screw terminal breakout board for this Mega2560 Pro Mini?0
I don’t
The form factor is such that it’s easy to build using a perfboard and a bit of soldering. You can tailor that to your exact needs (or build a simple PCB)
Yes I would try to stay away from hacking into the source code
Thanks J-M-L, I think I will give it a go on both counts.
I will design a PCB terminal board for this MEGA mini PRO and get it printed from PCB way. Also use the GRBL as is without hacking the source code.