Machsupport Forum
G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: jdm033056 on October 12, 2020, 11:51:21 PM
-
So I am brand new to CNC and after a 2.5 year battle over receiving a machine that was being built for me and then receiving an incomplete pile of pieces I have my machine together and moving. I have no experience with G Code but love to learn new things. Tonight I tested movement with code for the first time. I wrote a simple code to start in the middle of a square, move out, move around and back to the center just moving air. Here is the code
% (1)
G01
F50
Y-2
X2 (5)
Y4
X-4
Y-4
X2
Y2 (10)
%
The machine ran blocks 3-8 exactly as it should but it moved block 9. 4 inches and block 10. 4 inches. So it didn't end up back at center but rather at the back right corner. I ran it many times with the same result. Running Mach 3 with motors calibrated and tuned. Do I have a setting wrong in Mach, or am I not understanding the code or what? I know this seems ridiculously simple to most, but a guys gotta start somewhere. Even at 64. :) Thanks for your help
-
Hi,
Your Gcode ran just fine here so it is not that which is causing the problem.
I know it sounds basic but perhaps check the mechanicals of your machine for tightness or binding of an axis or even slippage of a coupling, looseness of a grub screw, etc.
Tweakie.
-
Hello,
your code will only work, if you are in incremental mode (G91), not if you are in absolute (G90)
-
Excellent. :D
TPS has solved the mystery.
Tweakie.
-
Hello,
your code will only work, if you are in incremental mode (G91), not if you are in absolute (G90)
Thanks to you both, to prove that I am a noob :) where do I check and change that? I've seen it but don't remember where. Also is one better for common usage.
-
hello jdm033056 ,
the best Thing is to add it to your code.
for example:
% (1)
G91 (it is allways good to put a Header line in G-Code not only G91 or G90 some other basic's would be good)
G01
F50
Y-2
X2 (5)
Y4
X-4
Y-4
X2
Y2 (10)
%
-
Thank you. TPS