Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: armitage on March 08, 2013, 04:38:02 PM

Title: Tool change location problem
Post by: armitage on March 08, 2013, 04:38:02 PM
I'm experiencing a problem involving manual tool changes, but first I want to ask, where do you set up the default tool change location?  I'm certain I've messed with it before, but now I'm not finding it.

So the problem I had today– at the end of the first tool's operation it went off the part to what I'm assuming is the tool change location.  I had to more it more to do the tool change and when I resumed the code the tool moved further from the part, stopped, and then headed in another direction until it hit the axis limit switch.  I'm not very code savvy but there are no move command in that line that would be sending it out to the wild unknown.  After trying for quite a time I gave up and ran the code from the beginning with the second tool installed (it was small so didn't cause a problem), and it ran through that tool change to the end of the code without a problem. 

Can anyone tell me what the cause of the problem is?

Thanks,
Glenn
Title: Re: Tool change location problem
Post by: Chaoticone on March 11, 2013, 10:41:17 AM
Glenn, there is no default tool change location.  You will need to do all of this in your m6start and/or/maybe your m6end macros and enable the tool change in general config.

Brett
Title: Re: Tool change location problem
Post by: Dadof4 on March 11, 2013, 11:18:05 AM
I just jog to a convenient position to change the tool, change it, reset z using a touch plate, and click "Start".  Mach3  moves x and y back to the correct positions to resume.
Title: Re: Tool change location problem
Post by: armitage on March 11, 2013, 11:23:46 AM
Dadof4-
That's what I've always done, and I usually don't have a problem, so I don't know why I had the problem I had the other day. 

I am going to try to change the tool change location to make things simpler, but I've never messed with the macros before.

Glenn
Title: Re: Tool change location problem
Post by: armitage on March 11, 2013, 03:34:39 PM
Brett, I found the M6 macros and the VB script editor to view them, but I have no idea how to interpret them.  They actually have the exact same code as far as I can tell, and I don't see any distance information anywhere, so I really don't understand what they are doing.  I took screen shots but I don't see how to post them.  Can you direct me to a resource from which to learn about editing these macro?

Thanks, Glenn

Title: Re: Tool change location problem
Post by: Chaoticone on March 11, 2013, 04:15:22 PM
http://www.machsupport.com/docs/Mach3_V3.x_Macro_Prog_Ref.pdf

http://www.machsupport.com/docs/VBScript_Commands.pdf

Brett
Title: Re: Tool change location problem
Post by: armitage on March 12, 2013, 09:42:58 PM
Brett,

I'm sorry, but I'm still not making sense of things.  I wish I had time to learn programing but I just don't.  I manage a multi-function student shop at a small college and am using Mach3 on a bridgeport mill which a student converted to CNC some years ago (he's much brighter than I am).  From what reading I did, it seems that the M6start/end are about returning the machine to the x,y location it was at when the tool change command comes up, after having been moved in order to make the change.

When you say there isn't a default tool change location, you mean that Mach3 doesn't have one?  I thought that there is a location which can be specified for a specific machine in Mach3.  Is that what you were referring to when you wrote, "enable the tool change in general config."?  I looked in general config and couldn't find anything about tool change location (just the 3 button options), or anything at all with x,y coordinates.

What am I missing?

Glenn
Title: Re: Tool change location problem
Post by: jastein on March 12, 2013, 11:16:30 PM
Glenn:   I had a similar problem (though it might not be exactly the same) last week when I tried to "upgrade"  from running Mill .020 to something newer.

The machine would just take off for the north (west) forty so to speak.  I looked at everything I could think of...soft limits, configuration stuff....  Finally in a durr moment, I opened up the m6start macro, and it was the same as the one for .020.  Then, the m6end macro, and sure enough, it has a bunch of code that seemed to be for checking the SafeZ clearance.  The old .020 m6end was actually empty.  A bunch of REM statements, and it works just fine, at least for me!   I am sure it could cause some Safe Z problems, but I run all my tools with preset Z values and it has always worked in the past. 

I will be doing some learning of how to write the scripts when I finally get my tool changer set up in the future, but for now it at least works and makes chips.

Just something you might check.

Jim
Title: Re: Tool change location problem
Post by: Chaoticone on March 13, 2013, 08:48:28 AM
Hey Glenn, I'm sorry, I also meant to tell you how to post pictures.  When your typeing a reply or new topic you will see additional options below where you type.  Click on it and it will let you browse for an attachment.  Make sure it has a unique name and isnt too large.

I'm almost in the same boat with you on being able to write macros.  Anything I do in programming is a struggle for me but some of the other guys could write it in their sleep I think.  You need to figure out exactly what you want it to do first.  Lots to consider really.  I'm assuming you will want the tool data updated.  If so, where does this data come from?  Are your tools preset?  If not, how do you set them?  Do you need anything else to happen, turn off coolant, vaccum, etc. then turn it back on when you press cycle start again or when it returns to a specific location?  Get all this figured out and post it and maybe some of the guys who already know how to make the magic happen will help.

Brett
Title: Re: Tool change location problem
Post by: armitage on March 13, 2013, 12:48:31 PM
Thanks for the comments guys.  Today I worked with the machine again with the same problem, but then I set a different origin location for the piece and the machine didn't run outside of its limits on the tool change.  I'm still trying to understand where the location command is coming from for the tool change.  I hope someone can look at the attached code and tell me what it's saying.

Thanks
Glenn
Title: Re: Tool change location problem
Post by: Chaoticone on March 13, 2013, 01:03:17 PM
On your settings page, you have a set of tool change position DROS.  If you change the value in those does it go to a different location when a tool change is called?

Brett
Title: Re: Tool change location problem
Post by: armitage on March 13, 2013, 03:31:58 PM
Brett,

Thanks for getting me to see those buttons on the screen below the menu bar.  I knew I had seen that tool change location somewhere.  I've played around with altering the tool change location, and though I've seen some differences in where the machine goes, the changes in movement are neither in the direction or on the scale of those that I make on the settings page.

Any other ideas?

Glenn
Title: Re: Tool change location problem
Post by: Chaoticone on March 13, 2013, 03:40:49 PM
Are the tool change position DROs in machine coordinates and your looking for moves in work coordiantes or vise versa?  If changeing those dros changes the tool change position, you just need to figure out what coordinates the dros are relative to I think.  Could open the screen in Machscreen and find out what the dros really are.

Brett
Title: Re: Tool change location problem
Post by: armitage on March 13, 2013, 04:09:53 PM
I believe the DRO positions are machine coordinates, but the machine is moving neither the amount shown or to that machine position.  Think you could tell me how to open the screen in Machscreen?

Glenn
Title: Re: Tool change location problem
Post by: Chaoticone on March 13, 2013, 04:22:00 PM
I just looked and the 1024 set has those as user defined dros. 1200, 1201 and 1202.  The m6end code you posted is telling the machine to return to the position that the M6 was called  (The default script here moves the tool back to m6start if any movement has occured during the tool change)  .  You can download Machscreen and watch some tutors on it here.  http://www.kd-dietz.com/klausphp/pages/eng/machscreen/description/ms_description.html

Brett
Title: Re: Tool change location problem
Post by: armitage on March 14, 2013, 03:13:49 PM
That's what it looked like that code was doing, so at least I'm understanding something.  But it still seems to me that there is nothing telling the machine to go to its tool change location.  Would that be a different code?

The first sentence of you last post, "I just looked and the 1024 set has those as user defined dros. 1200, 1201 and 1202", is gibberish to me.  Is it something useful for me to understand?

Glenn

Title: Re: Tool change location problem
Post by: Chaoticone on March 14, 2013, 05:37:07 PM
That's what it looked like that code was doing, so at least I'm understanding something.  But it still seems to me that there is nothing telling the machine to go to its tool change location.  Would that be a different code?

The first sentence of you last post, "I just looked and the 1024 set has those as user defined dros. 1200, 1201 and 1202", is gibberish to me.  Is it something useful for me to understand?

Glenn



Yes, you will need to add some code to do what ever it is you want to do.  Those DRO numbers are where you will get the tool change position from.

Brett