Hello Guest it is March 28, 2024, 03:01:14 PM

Author Topic: re tool change macro  (Read 4586 times)

0 Members and 1 Guest are viewing this topic.

re tool change macro
« on: October 04, 2008, 10:15:05 PM »
i have been trying to set up a manual tool change macro and have been trying to get something to work .I have tool holders for length off sets of tools and i have the auto tool zero screens from ernie bro with the tool zero arrow i found one macro here but i don't know how to set it up with the correctly numbers in the correct place i figured out the tool change dro location and part of the auto zero but when i auto zeroed it touched off the 1.0 gauge block and then tried to drive it through the gauge block.I use bob cad v22 and it outputs a g53 z0 it also has tool tables that you can use .i just need it to get the correct tool and out put the correct offset for the tool my software outputs spindle stop and coolant off and coolant on and spindle on and i would like to get the auto zero set up so it goes to the gauge block and backs off to .025 any one that could help it would be greatly appreciated i should mention the mill has about 14" of z height . I am about to shoot this thing and put it and me out of my misery. ???

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: re tool change macro
« Reply #1 on: October 05, 2008, 05:49:17 AM »
I don't know where you are in setting up your machine, so a lot of what I write you will probably know.

Mach 3 keeps track of a machines position in Machine Co-ordinates. This is displayed on the DRO's when the Machine Co-ords button is pressed and lit.The only way you can affect the machine co-ords is by homing the machine, in which case the machine moves to it's switches in turn and then zeros all the DRO's.

If you do not have switches fitted (or they are turned of on the Config page) then Ref All Home will zero the machine co-ordinates at any position - but this is of little use, unless you know where that is.

It is unlikely that the position the switches are fitted will be any good for machining, and certainly will not be the point for your program start or program 0.0.0. and this is where program co-ordinates come into use. These are displayed on the DRO's when the machine co-ords button is pressed and NOT lit.

If you home your machine (and therefore zero the machine co-ordinates) then press the machine co-ordinates button and zero the program co-ordinates, then both your systems are together, and if you look in the offsets page in Config (actually shown as FIXTURES) you will see that the offset G54 is all zero. (All the others should be, unless you have filled them in). G54 is the default offset and is set as the machine starts up. G54 is zero because there is no offset between your machine co-ordinates and your program co-ordinates at the moment.

If you now display program co-ordinates and jog to where your program starts, and zero the display, this now tells the machine that any program you enter must use that position as it's 0.0.0. If, however, you look at the machine co-ordinates, you will see that these have not changed, and if you look in the FIXTURES you will see that G54 has altered and now reflects the OFFSET between the machine and program co-ordinates.

It is important to understand that Mach 3 still keeps track of it's position in machine co-ordinates, the only reason it display program co-ordinates is so that we mere mortals can relate what we see to the program.

How does this affect tool offsets ???

It works in exactly the same way. One tool is your standard. It need not be an actual tool, it could be a pointer, but it needs to locate on a position on your machine that you can easily identify. This might be on the corner of a milling vice, so that you can position your work in the same place each time. Set this up and (if on a mill, and it is the tool length you are bothered about) position it at your X0 Y0 position, with the tool or pointer touching your block or workpiece.

Zero your Program Co-ordinates. Have a look at your FIXTURES table and note what G54 says now. If you have home switches fitted, then you can home your machine, type in the MDI line G54 followed by G0 X0 Y0 Z0 and the machine should move back to where you set it. Do not touch your program co-ordinates button again, until you have then set up your tool table.

Put each tool in turn, in the tool holder, and jog it to the correct height (if it is height you are bothered about) I use a lathe, so I have X and Z to worry about. Note the reading on the Z DRO. This is the tool offset for THAT tool. All your tools should be numbered and entered in the tool table with their offset. It is essential, however, that each tool can be subsequently placed in the tool holder in the exact same position, or all this is a waste of time.

So what is the result of all this.

If the position you set up on is one you are going to use a lot, then transfer the offset information you noted from G54 to say G55. There are 255 offsets to go at.

Home your machine. Type in G55 - this sets the program offset, type in T (whatever tool number you want) - this sets the tool offset, then type G0 X0 Y0 Z0 and the machine should move your tool to the correct start position that you set up on. (make sure there is nothing in the way - other wise you might have to make use of the 14inches of  space by typing G0 Z 5 or 6 or whatever to lift the tool out of the way, G0X0Y0 and the G0Z0 as seperate moves, but the result should be the same.

Once you have set up the tool table, it is final and should not be altered, unless you get some new tool, or alter the tool holders etc. the relative position of your tools to each other DOES NOT CHANGE, and this is what you want - all measured from your first tool, or pointer (This is actually tool 0 - but does not appear on the table - since there is no offset)

If you do not have homing set up on your machine, then you can either set up a position that you can always go to repeatedly and accurately (which is what homing is) and then carry on as I have said, or jog to the start position of your program (not the position you set your tools up in, unless they are the same position). When you are there, zero your program co-ordinates - telling the machine this is where you are going to start. Your tool - table will then take it's offsets from that position.

The machine applies offsets in strict order - so the first is your program offset, and then it applies the tool offset, and then it applies any other offsets, i.e. left or right hand cutting etc. So before you apply the tool offset, you must make sure the program offset is applied, either by typing in the offset G code, or zeroing the program co-ordinates at the correct position.

I hope this makes a bit of sense















 








Not me driving the engine - I'm better looking.

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: re tool change macro
« Reply #2 on: October 05, 2008, 05:55:20 AM »
Once you have done all that ( which actually doesn't take that long, you can write a macro to do what you like. The M6 macro used for tool change is is two birt, and there is a video tutorial on how to change it. It is essential that you understand the offsets first.

A knowledge of visual basic is necessary, but not difficult.
Not me driving the engine - I'm better looking.