PDA

View Full Version : Where does gcode start?



Bruce Golling
09-29-2016, 10:26 AM
This is a beginners question that I could use some help with. I have a Chinese K40 laser that I added smoothieboard to. A lot of people use laserweb to control their laser but I would prefer use something like inkscape to design and produce gcode and Pronterface to control the laser.
That being said one the biggest problems I am having regardless of whether it is Laserdrw or pronterface is synchronizing computer interface with the laser.
Simply put, I can produce gcode and load it onto my smoothieboard and pronterface will run it. How do take a certain spot on the laser and tell the control program that this is where x0, y0 is. Do I need to study gcode theory or am I okay with just letting inkscape produce? I am not even really sure if I can explain my situation well enough for someone to understand my question.

David Sharp02
09-29-2016, 10:55 AM
I'm not familiar with the dialect of gcode used by the SmoothieBoard, but for my 3D printer that uses Marlin, I can set the current position using G92. So if I enter: G92 X0 Y0 then wherever the head is currently located becomes the origin. So I suspect you can do the following:

1. Load your g-code into Pronterface.
2. Move the laser head to where you want the origin.
3. Enter G92 X0 Y0 in pronterface.
4. Click the Print in pronterface to run the g-code that's been loaded.

If the g-code dialect used by Smoothieboard does not use G92 then this probably won't work.

Dave

Clark Pace
09-29-2016, 2:35 PM
I use Mach on my mini CNC and a custom board on our mill at work. On both of those all you have to do is move you x y position to where you want zero to be and then set them
To zero from the cam software. It is not set in the gcode. It is set from the cam software