I have been trying to accomplish the goal of eliminating the use of a laptop and Universal Gcode sender software to send Gcodes to the arduino. I require an application such as, storing multiple Gcode files in an SD card, Connect the SD card to the arduino and then accessing the necessary code for the desired option.
Any comments and suggestions will be helpfull.
Please and Thanks
Thanks. Yes, I can tell you the basic working principle of the G code. Unfortunately, I can't attach any files due to my newly created profile.
2 axis Semi automated head Polisher. Grinding the Distilling tank heads and cones. Fixed rotating base, Grinder follows the contour along the XZ plane. Motion is implemented using Stepper motors and rack and pinion. Arduino controlled Stepper motor drivers. Prefeed G codes in SD card for accessing them as per the input.(Can't use a laptop due to harsh environment conditions).
Seems you are considering a program to read a line from the SD card and send it to the machine. Right?
How many milliseconds do you expect it will take to send each line to the machine? What will the machine be doing while these lines are being sent? Will the machine just store them?
I have a CNC (by myself) and I use Mach3 to control it.
The CNC is connected to the PC's parallel output.
How the control works in a very simplified way...
Mach3 sends a command, (a GCODE line), to the CNC, waits for the completion of the sent command, then sends a new command.
How do you know the command execution is finished?
Mach3 sends pulses (calculated by it) to the CNC to move the motor specified by the GCODE, and when it has sent all pulses, the operation is finished.
I don't know what control software you are currently using.
When using the GCODE lines read from an SD card and sent to your "CNC", you will have to use a software that "knows" when each command has finished and then sends the next command.
This message that indicates the Gcode device has done all you have sent to it and is waiting for a new command is simply the two text letters "OK".
In this project:- CNC Conversion
I wrote some software that sends a Gcode file to Gcode device. It is software that is running on a computer using the processing language. The source code is available on that page.
There is no reason why that should not be converted into C and run on an Arduino from an SD card. The processing language is based on Java and java is implemented with a C syntax so it is not so difficult to translate it into Arduino.
However, it does have some graphics controls to help you do things like set offsets and position starting X-Y-Z points which might not be so easy to emulate but it will be possible.
So then it is even simpler with only one processor providing you have the room for the code. In essence you simply need to replace the bit in the code that waits for an input with the read from the SD's file.
In practice, it is a bit more difficult because you have the problem of all the other stuff that you have to do before you start reading the Gcode file. Like choosing the file name to run, nudging the tool into the correct starting position, emergency stop, and so on.
Thankyou,It’s practically just a grinder hanging off the linear actuator, so there will be only the jogging. Which i can do using the Arduino logic itself. But after reaching the first point, we will use gcodes.