Hi.. Is it possible to create a new software like GRBL or is there any other way to convert G codes into Arduino without using GRBL type programs?
Basically, i have to read the G codes and execute it on Arduino without using GRBL but to use something else... Is it possible?
muthu2103:
is there any other way to convert G codes into Arduino without using GRBL type programs?
What do you mean? G code is for controlling tool(s) movement. Arduino by itself could not move.
Yes, but why? Why not use the good code that's already been produced?
It is not too difficult to write code that can interpret GCode and produce appropriate numbers of steps for stepper motors. I did it (for a small subset of GCodes) with a Python program on my PC that just sends the numbers of steps to the Arduino.
Interpreting GCode does NOT involve "converting GCode into Arduino"
But as others have said, why bother when GRBL can already do it for you?
...R
My project panel member has asked us to do without using GRBL. So i am asking is there any other way around?
muthu2103:
My project panel member has asked us to do without using GRBL. So i am asking is there any other way around?
Yes.
...R
Robin2:
Yes....R
Can you please help me out?
My project panel member has asked us to do without using GRBL. So i am asking is there any other way around?
Look at this project, here is code that does it without using GRBL.
http://www.thebox.myzen.co.uk/Hardware/CNC_Conversion.html
Only look at this link if you want to cheat because I think they want you to write it yourself and so far you don't seem to have a clue about what you are being asked to do.
Robin2:
It is not too difficult to write code that can interpret GCode and produce appropriate numbers of steps for stepper motors. I did it (for a small subset of GCodes) with a Python program on my PC that just sends the numbers of steps to the Arduino.Interpreting GCode does NOT involve "converting GCode into Arduino"
But as others have said, why bother when GRBL can already do it for you?
...R
Is it possible for you to share the Python program?
Grumpy_Mike:
Look at this project, here is code that does it without using GRBL.
http://www.thebox.myzen.co.uk/Hardware/CNC_Conversion.htmlOnly look at this link if you want to cheat because I think they want you to write it yourself and so far you don't seem to have a clue about what you are being asked to do.
Thanks a lot
muthu2103:
My project panel member has asked us to do without using GRBL. So i am asking is there any other way around?
Another XY problem. What exactly is your panel supposed to do? Why have they picked G-code? Do they have a clue what G-code is?
Paul
muthu2103:
Is it possible for you to share the Python program?
Sorry, but no. It would require too much follow-up support and I am not prepared to provide that.
GCode is actually very simple. For example (from this tutorial) picked at random
G1 X0 Y0 F2400 ; move to the X=0 Y=0 position on the bed at a speed of 2400 mm/min
...R
Paul_KD7HB:
Another XY problem. What exactly is your panel supposed to do? Why have they picked G-code? Do they have a clue what G-code is?Paul
I do know what a G code is. We have a 3 axis X,Y and Z. We are supposed to read the G code and and put it in the arduino without using GRBL... So, i need help
Basically, i have to read the G codes and execute it on Arduino without using GRBL but to use something else... Is this possible?
Yes it is. After all, that's what GRBL does. It sounds like you're being asked to write your own version of it, likely a subset of what it does, perhaps to get a better understanding of how it works.
What Gcodes does your device need to understand?
wildbill:
Yes it is. After all, that's what GRBL does. It sounds like you're being asked to write your own version of it, likely a subset of what it does, perhaps to get a better understanding of how it works.What Gcodes does your device need to understand?
Basically we are making a Milling tool with 3 axis using Stepper motor. So, all the G codes required for that, our device needs to understand.
So, how do we write an own version?
Grumpy_Mike:
Look at this project, here is code that does it without using GRBL.
http://www.thebox.myzen.co.uk/Hardware/CNC_Conversion.htmlOnly look at this link if you want to cheat because I think they want you to write it yourself and so far you don't seem to have a clue about what you are being asked to do.
Basically, i have to read the G codes and execute it on Arduino without using GRBL but to use something else... Is this possible?
muthu2103:
So, all the G codes required for that, our device needs to understand.
Start by making a list of the G codes that you will need to use.
It will be quite impossible to make an interpreter without knowing exactly what you need to interpret.
At the moment your questions and responses give the impression that it is possible to "wave a magic wand" and have a program that interprets Gcode and controls a CNC machine. It won't be like that. You will need to create a little piece of code to interpret each different Gcode message. And you will need a clear concept of how to convert the Gcode measurements (which will probably be in millimetres (or hundredths of mm) into steps and speeds for your stepper motors.
...R
PS ... It would probably also be useful to have a clear concept of the thing you want the milling machine to make - presumably something simple to start with so that you can easily verify that the machine is doing what you expect without breaking anything. I came across a nice YouTube video a few days ago about professional CNC machines breaking things - looked very expensive.
muthu2103:
Basically, i have to read the G codes and execute it on Arduino without using GRBL but to use something else... Is this possible?
You have asked this multiple times. And the answer has consistently been, Yes, you can.
Do you have drivers for your stepper motors?
Have you written test code to make those motors move? I would start with a program that moves the motors to the home position.
Have you written test code to read the G-code file? I would start by just reading each line and serial.print() it to the monitor. Then I would write code to break out each of the g-code elements.
Then you can combine the 2.
Let us know if you run into difficulties with these steps. Don't forget to use code tags when posting code.
And tell us WHERE the G-code is coming from!!!!! Part of processing G-code is telling the source of the code you are ready for the next line of G-code. IF you are getting the line of G-code from a serial port on a PC, then you need to tell the PC program to send the next line.
Paul