Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: SteveCorsi on February 01, 2008, 01:48:21 AM

Title: Initial Loading of g21 and Z axis absolute versus machine cordinates
Post by: SteveCorsi on February 01, 2008, 01:48:21 AM
Hi,

I have just switched to Mach 3 from EMC . I have gone through the Mach 3 manuals but I am not finding what I need. Really hoping some of you experts can help me:

1) I want Mach 3 to load G21 (mm) instead of G20 (Inches) in its intiial startup - I would like to avoid changing the configuration to mm because then I believe I will have to adjust the Motor tuning - (my leadscrews are 20rev per inch and calculating the number of steps per mm will be messy) but if this is the only way I guess I will have to do it.......

2) My system is closed loop- My Machine  coordinates should always stay the same. So when I shut down and then boot up they come up the same as. If I home an axis, the  corresponding absolute position readout will adjust to reflect its new zero point. at any time as the axis moves I can toggle the readouts between the shown absolute position  and the machine coordinates which are always zeroed to an unchanging point-

However, I am noticing that my Z axis is now not working the way I expect. When I shut down, lets say my z axis reads 10 on absolute and -5 on machine, however,when I boot up the Machine coordinate and absolute  coordinate will both display 10. The x and y behave as they should. How do I fix the z axis machine coordinates readout?
(I think I must have messed this up trying to adjust something else)

3) Following from Question 2, I want to set my soft limits base on my machine coordinates is this thinking correct?
if so, how do I select my home position and then zero my machine coordinates?

And then from this home position I can then set my soft limits ie x-100 to +100 etc I am correct? 

This is important because I was informed that I do not need to home my machine with limit switches with this system (which I did before)  because it always knows the position of the axis.  However I want to make sure I am working within a clearly defined envelope.

I really appreciate your help,

Many Thanks,

Steve
Title: Re: Initial Loading of g21 and Z axis absolute versus machine cordinates
Post by: jimpinder on February 01, 2008, 09:21:40 AM
Steve - there are some video tutorials covering the different types of co-ordinate systems.

To cover your points -
I do not see the difficulty in setting up your  machine for metric. The only important entry is the "steps per unit" since it is the only one that affects accuracy. If your leadscrew is imperial, then calculate the "steps per inch" say 48000 in my case, and simply divide by 25.4 to give you step per "mm". For the rest of the setting up (apart from backlash) a divider of 25 should do.

The machine keeps track of it's position in machine co-ordinates and when you home the machine, "ref all home" the machine moves to each home in turn - and zero's the machine co-ordinate. You can then move the machine to a better position for working either by jogging or using one of the g54 etc offsets.

If you have pre programmed the g54 etc offsets, then entering g54 as a command will add the offset to 0.0.0. (the home position) and the D.R.O.'s now show the offset position, so a move to 0.0.0 will move the table away from home to it's work position and all G Code commands will use the offset position as  a reference for 0.0.0, not the machine co-ordinates.

If you wish to move the table to a particular position - say for a tool change - regardless of where or what offset is in force, then you use a G53 command in front of G0. This instructs the machine to move to the machine co-ordinates position specified - this is also known as moving in absolute co-ordinates so as far as I know, machine and absolute co-ordinates are the same.

As far as you Z co-ordinates altering - check the entries in the fixtures table and see there are no stray entries in it. There is one intriguing box in the General Config - copy g59p253 to g54 on start-up - whatever that means.

To avoid changing to metric units, you might want to include G21 on initialization string on General Config before you swap - and see if it has the desired effect - although if you are working in metric, it would be better to have your machine set up in metric.

Yes - you set your limits up as per "machine co-ordinates"

What you seem to be saying, however is that you do not want "home" switches. You want to pick a position and call that home, zero the machine co-ordinates, and then set up all your other limits and offsets around this imaginary position. Yes Mach 3 does keep track of its position as it moves around, but unfortunately things conspire to put it off track. May be a stepper motor misses, a tool jams, etc etc. If this happens - you have no known reference to return the machine to, to pick up your correct position again, because - even if the tool is jammed and the stepper stops, the DROs will carry on counting becasue the computer is still putting out the necessary pulses.

All CNC machines must know where they are. They must start from some pre-determined place. One way is to have home switches. These, as you know, are physical switches that do not move - therefore if the machine references on these, it knows where it is.

On my lathe, however, my home switches are so far away, and speed of travel is so slow, this is not practical. So what I do is take a passing cut off the end of the work, and this position is Z0. I then measure the thickness of the bar and touch the tool up to this thickness - this is X (whatever thickness). The machine now knows where it is in relation to the work. If I am making several of the same part, I do not need to repeat this, because the machine knows where it is, but in case of accident, I can repeat the positioning accurately.

On the miller if I am machining a slab of metal, I touch the tool on the botton side and left hand side - and transfer these positions to the DRO's and again the machine knows where it is.

With any of these methods, if a tool jam, or a stepper misses or a bolt of lightening hits the machine, you can go back to a known position to start again.

I think this is enough diatribe so I will post and let you digest that first.