dbrook wrote:Thank you Adrian and ger21 for the prompt reply. When I checked the soft limits on Z there was a value of 8.000 set in the Z offset column. When I changed the Z offset to 0.000 the DRO’s showed x 0.000., y 0.000 and z 0.000.
It seems to me that when the VB script was run the spindle should move down to the 4” position. I guess I am thinking about it wrong.
Please tell me why you would want the 8.000 offset in in the Z soft limit?
On that machine you don't want anything but 0 in that offset.
The thing to remember about homing a machine is that it tells the machine where it is space. Those are machine zeroes, not part program zeroes. You do NOT want to attempt to run any program with the machine zeroes as your part program zero.
Edit: As Isla mentioned, G53 is a special case, you should not be using it for programming parts. Your mach3 post processor automatically puts a G54 in the beginning of the program to prevent the G53 from being the workpiece coordinate system.
There are a slew of "offsets" aka "workpiece coordinates" that are used to tell a machine where part program zero is located in reference to the machine home/origin. Most of the time on that machine (mine is a CNC RP type machine with Mach 3 also) the program will contain the command "G54" at the beginning. That command references the workpiece offset that has been set in X,Y,Z axis. When you move the axis to the zero point on your workpiece and press the X,Y,Z zero buttons what happens is those values are stored in the G54 offset registers. From then on the machine control does the math between the G53 registers (machine origin) and the G54 registers to position the machine while the part program is running.
Why so "complicated"? Because it is handy to be able to program multiple fixtures (locations) on the table with each one having its own zero points. Quite often I have two vises on my machine. Both of them use the rear jaw and the right end of that jaw as zero. So when I program I can just program each part individually and not worry about the relationship to the other part. I set G55 for one and G56 for the other one. Those are also workpiece registers.
So what I am getting at here is that after you home the machine, then you need to move to zero positions and set them. So if you set Z zero at the top of the workpiece when you command Z4.00 the Z axis will move 4 inches above the surface of the workpiece.
It sounds to me like someone was trying to program the machine from machine origins and figured that since the axis could move 8 inches that was a good number to use. The problem with that is each tool sticks out of the spindle a different amount. In other words, trying to program from machine zero does not work.
"If you see a good fight, get in it." Dr. Vernon Jones