Hello Guest it is March 29, 2024, 05:46:42 AM

Author Topic: Tool changer routine with hot swap  (Read 34466 times)

0 Members and 1 Guest are viewing this topic.

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Tool changer routine with hot swap
« Reply #10 on: March 22, 2008, 07:01:57 AM »
Hmmm yes - in my enthusiasm to discuss the logic of the indirection table I completely forgot the VB context issue - darn it!
OK - so the principle remains but the issue of persisting the table accross VB contexts is the next hurdle. As has been said you could use DROs or external means as per poppabears. One other method would be to use gcode variables instead of or in association with a VB array. Probably easier just to use the vars without any array.

So I gues I can't just assign 30 variables as tool slot# and populate the vars with tool#s then as each tool cycle takes place update the vars accordinly.????

Yes, that's the idea... but the other way round. The 30 vars would be the 30 tools and the value in the var would be the slot. Remember you're going to come into your routine with a tool number not a slot number. You'd use the tool number to focus on one of the 30 vars and then get the value in the var to tell you which slot to go for to get that tool. Then as you go you just change the values in the vars. So to start for example #1001=1 means tool 1 (1001-1000) is in slot 1. At some time later maybe #1001=5 so tool 1 (1001-1000) is in slot 5, if you get my drift?  :)
« Last Edit: March 22, 2008, 07:17:04 AM by stirling »

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Tool changer routine with hot swap
« Reply #11 on: March 23, 2008, 07:21:48 AM »
Hi Terry - had a bit of a play with this this morning - please see attached zip.
Save your existing M6start.m1s somewhere or rename it and replace it with the attached version. Also drop M1000.m1s into your macro folder. Then load the .tap file into Mach.

M1000.m1s sets up a virtual carousel with 8 tools.
M6Start.m1s demonstrates a possible hotswap mechanism.
hotswap.tap tests it.

Cheers

Ian

vmax549

*
Re: Tool changer routine with hot swap
« Reply #12 on: March 23, 2008, 01:11:59 PM »
Ian I will try your ruotine later today.   Two things I have thought of Mach must store the T# that is in the gcode in a variable to have it ready to go. We need to access that VAR to have the toolchanger move to that slot in advance of the toolchange. THat way when mach sees the T# and stores the var the carousel can rotate into position and when the M6 is called it will already be at location. Fanuc style.

Also we need to have an input table/page? to fill in as to what tools from the tool table are to populate what slots in the initial loading of the carousel. ALso a veiw slot load window is need to be able to pull up the current slot/tool3 to be able to verify the tool loading is correct to the slots.

IE:

code
code
code
T6
code
code
code
M6
T7
code
code
code
code
M6
T8
etc,etc

THanks for the help(;-) If we can get this model working it will provide a template for others with mills and toolchangers to model by. It will help out a great deal in making MACH a viable option for the small machine shop to UPDATE their OLD iron to a moderm controller economically.

NOW I know some people say it is best left up to PLC to do the work, BUT the way I see it MACH is really NOT doing anything special at tool change time(;-)Axis's are normally idle why not put it to work taking care of the tool changer as well(;-) We have a TON of processor why not use it?????

(;-) TP

« Last Edit: March 23, 2008, 01:25:31 PM by vmax549 »

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Tool changer routine with hot swap
« Reply #13 on: March 23, 2008, 03:03:20 PM »
what's with the WE Kimasabi? - it's your baby  ;D

Two things I have thought of Mach must store the T# that is in the gcode in a variable to have it ready to go. We need to access that VAR to have the toolchanger move to that slot in advance of the toolchange. THat way when mach sees the T# and stores the var the carousel can rotate into position and when the M6 is called it will already be at location. Fanuc style.

Well yes and no. If you want this then you'd have to pre-process the g-code (messy) or somehow dig into Mach's lookahead mechanism (I wish you luck). Its a reasonable thought sure, but on the other hand, when Mach hits a T# the axis have to move to the toolchange position anyway. Couldn't the carousel just spin at the same time whilst the axis are getting there?
(I just took a quick look to see if the fact that Mach can pre-process macros as it builds the toolpath could be used - but it seems M6 is a special case and is not pre-run at this time - unlike user macros for example)

NOW I know some people say it is best left up to PLC to do the work, BUT the way I see it MACH is really NOT doing anything special at tool change time(;-)Axis's are normally idle why not put it to work taking care of the tool changer as well(;-) We have a TON of processor why not use it?????

Seems reasonable to me.

BTW in your example code you've got an M6 followed on the next line by a T#. Is that just a typo? I always thought the syntax was T# before the M6 (and usually on the same line) yes/no?

Cheers

Ian

A quick edit:

NOW I know some people say it is best left up to PLC to do the work, BUT the way I see it MACH is really NOT doing anything special at tool change time(;-)Axis's are normally idle why not put it to work taking care of the tool changer as well(;-) We have a TON of processor why not use it?????

Actually I'm not so sure... I'm thinking maybe you have to have independant control of the arm and carousel... thinks...
« Last Edit: March 23, 2008, 03:17:27 PM by stirling »

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Tool changer routine with hot swap
« Reply #14 on: March 23, 2008, 03:38:09 PM »
Yes,  The reason I went with a PLC is so after mach changes to the New tool, Mach continues on cutting, mean while the PLC will rotate the Carracell to the next New tool  position for the next tool swap. The PLC operates independantly of Machs M6 routine.  If you try to tie Mach into doing all the Tool change the you lose ALL the advantage of having a Read-A-Head Swap Arm tool changer since it will change the tool, then rotate to next tool then drop out, mean while your wasting cut time going through the double cycle that you didnt want to lose time on in the first place.

Since Mach doesnt have "Read A Head" for Next Tool, you have to do a work around. In your CAM you have to post: Next Tool then, Current tool and store the next tool for the caracell rotation. Further at the end of the run, you might have to tie in some intellegence in your Macropump to watch for the Last Tool change and do a repeat so your code will drop out and not get your caracell out of sync with your PLC.

Scott
fun times

vmax549

*
Re: Tool changer routine with hot swap
« Reply #15 on: March 23, 2008, 05:55:42 PM »
HI IAN, I am not the lone ranger when it comes to programing(;-). But I can stick to I if needed.(;-)

THe reason the gcode example is that way ?, that is the faunuc style . You can put in the T6 at anytime ahead of the m6 and it is stored in a VAR i believe. That way the tool changer can start early and have the tool sitting in the correct slot at tool time then when the M6 is called the tool is ready for a swap. As soon as the tool swap takes place then the next t# allows the tool changer to bring the next tool required into position.

I will dive into that part and see HOW Mach handles the T# call. We do have a VAR monitor now, just have to figure out the super secret code to test.


Hi Bear, Mach has to store that tool#info somewhere, just need to figure out where. OR it can only process it along with the m6 call????  I'll Test to see IF it can conform to the fanuc standard.

(;-) TP

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Tool changer routine with hot swap
« Reply #16 on: March 23, 2008, 06:42:53 PM »
NOTE:

I can save you some time, been there done that.........
You currently have two varibles: GetCurrentTool() and GetSelectedTool()
When you come to a M6, mach stores the current tool in current tool, and the new tool in selected tool.
Unfortunatly, (at current this current mach time), when you initially Parse the Gcode to build you Tool path there is now way to store a list and order of use of needed tools.
(Yes, I have asked Brian for a way, when I started mine).
For me, I put my current tool and next tool both before the M6, that way I can stay ahead of the game.

scott
fun times

vmax549

*
Re: Tool changer routine with hot swap
« Reply #17 on: March 23, 2008, 06:45:23 PM »
Hi Ian, tests reveal that MACH CAN follow the fanuc T#/M6  convention, so it MUST store that T# info away in a buffer or VAR somewhere. NOW where?????

(;-) TP

vmax549

*
Re: Tool changer routine with hot swap
« Reply #18 on: March 23, 2008, 07:11:36 PM »
Bear I am confused. WHat does that mean?

GetCurrentTool()    Is this the current tool mach is running?

GetSelectedTool()  Is this the "next" tool in line to be used at the next M6  ??

 If so this is the Var I need to initiate the carousel rotation to the next position??

(;-) TP

vmax549

*
Re: Tool changer routine with hot swap
« Reply #19 on: March 23, 2008, 08:31:45 PM »
Hi IAN, Test confirmed that Mach does store the next tool# in line to be used and it is retreived with Getselectedtool().

AND it does work with your example code(;-)  SWEET!!!!!!    COuld you modify your example to indicate what tool is due up next.  Like you indicate which tool is IN THE SPIDLE????

So "WE" CAN use the fanuc convention for tool changes. (;-)

(;-) TP

« Last Edit: March 23, 2008, 08:56:33 PM by vmax549 »