Darc,
In standard gcode, you need to use a G54 work offset. There are more than that one available, but let's keep it simple.
If you look through the default Camsoft gcode.fil, you should see some commands written into the G53 to G58 area of the file. These are simply calls to use the values that you need to enter into the offset tables. You access these tables in the GUI, by opening the tool parameters window.
Now, let's backtrack a little bit. When you power up and home your machine, the displays show you the current position, without any work offsets applied. In standard practice, the machine is working in the G53 machine coordinate system at this time. This is what G53 does in Camsoft, when it calls for Offset 0: it puts you back in the original coordinate system the machine uses to home in.
So now, let's say you have homed the machine. For simplicity, we can say that a tool mounted in the spindle is at G53 X0 Y0 Z0.
Now, your workpiece is clamped down some distance away from where the tool is located. This is where we begin to work in imaginary coordinate systems. If the part is a simple square, then we would usually pick one corner of the part as X0Y0Z0, in the G54 coordinate system.
Obviously, there is some distance between the current display position of the tool, and the part. So we carefully jog around and bring the tool over til it is right above the corner of the part. We note the display positions and enter these values into the first work offset table in the tool parameters screen (Don't confuse this with the tool length offsets in the same window!)
In your Gcode program, you will, somewhere before the first axis movement, place a call to G54, then move to G00 X0Y0Z1. The tool will move to the corner of your part, 1" above. I simplistically left out the call to the tool length offset here.
Anyways, this would be the rough outline of what you would be advised to practice. What you actually asked in your question implies that you want to only work in the machine coordinate system itself. This is not advisable practice for cnc machine operation. Its simply too confusing to try to make part positioning in a CAD system to try to correspond with how the part happened to be located on the machine table. That's why its done this way.
There is another method which is kind of obsolete, using G92.
Camsoft uses:
MACHZERO x;y;z
This is frowned upon generally, because the machine coordinate system is being tampered with, in essence, it could be lost.
I prefer to use this logic, because the machine coordinate system is maintained in the background.
SLEEP .2
ISTHERE Z;\404;\405
IF\404>0THENHOME1 z
ISTHERE X;\406;\407
IF\406>0THENHOME2 x
ISTHERE Y;\407;\408
IF\408>0THENHOME2 y
-----G92
The method in this case still kind of overlaps the G54 work offset method. You still need to make the measurement of the difference between the tool at machine home and some reference point on the work. You then execute a command like
G92 X40. in mdi mode. This resets the display. The bad quality of using a G92 inside of a part program, is the accidental resetting of the position when the machine is not at home position. This is the "gotcha" that they talk about with G92.
So use G54 and the offset tables instead.
__________________ First you get good, then you get fast. Then grouchiness sets in.
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |