Hello All; After avoiding it for as long as I reasonably could, I have finally decided to delve into the mysteries of G-code.
I have some G-code that I would like to adjust for SM1. My code sample starts like this…
G1 Z3.810 F228.6
G0 X43.228 Y12.499
G1 Z-0.700 F228.6
A whole string of G1 commands follow and these are interspersed with the occasional G0 command. At the end of the file the last G1 command is followed by…
G1 Z3.810 F228.6
G0 X0.000 Y0.000
My first observation is this:
All Luban generated CNC files have an extensive header and the last line states ;Header End I guess that any comment preceded by a semicolon is the computer marking the term as information rather than a command to be executed.
The code I want to adjust has no header information (not even the software that generated it is mentioned). Does this have any implication for where the module head starts?
I would like SM1 to start at 0,0 once I know where that is. Is it adjustable in G-Code? Is the 0,0 (or starting point) in SM1 always at the centre of the table? Could the G-code start the machine in the bottom left hand corner for example?
Here is what I think I know.
G21 specifies metric units
G90 specifies absolute coordinates
G1 Specifies a coordinated movement
F228.6 specifies the feed rate in millimetres per minute
G4 I believe specifies Dwell time (pause or halt)
I have no idea about what the associated P0.1 means.
If I were to specify relative coordinates (G92 instead of G90) at the beginning of the code, would it be possible to adapt the code to start at the specified origin point… which is what I am thinking the jogging of the module head to the geometric centre of the workpiece achieves.
The obvious corollary is what are the coordinates for SM1 at the centre of the table? Are they actually 0,0 for X & Y or is there another coordinate set that I could use to ensure the code starts with my workpiece at the centre of its travel?
Any and all answers would be most welcome. Thank you.