Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: OB Cues on February 10, 2015, 06:11:41 PM

Title: Tool sensing with ATC
Post by: OB Cues on February 10, 2015, 06:11:41 PM
Hello all!

I have a CNC router with a Fischer Precise spindle with ATC capabilities.

I recently set it up as a fully operating ATC system using the macro from the machsupport site and small spring loaded grippers as tool holders. The grippers grab the locating collar on the small end mill tools I use. (pool cue inlay work on this machine)

It was pretty straight forward. I only had to incorporate some of the spindles extra features like "spindle>0" and "RPM Low". It does work very well, and saves a ton of time.

What I want to do now is really more of a problem prevention thing than anything else. I want to pass my current tool through an optical switch to make sure it's not broken before I do the tool change. I'd also like to pass through the gate again to make sure it did release the tool, and I'd like to pass the new tool through the same gate to make sure it picked up the tool as it was supposed to. I don't need to really measure the tool for Z because I use the depth collars on all of the tools. They're all small 1/8" shank tools, and I have a depth ring installer already.

I've looked into the G31 function used with touch probes, but I'm not quite sure how it programs, and I've heard of issues with the smoothstepper. I do use an ESS on this machine.

So, if anyone has any suggestions as to how to program something to work, I'm all ears. I would think that I could create some sort of a "flag" of some kind so that when the tool is passed through the gate any signal would trip the flag. I just don't know how to setup anything like this.

I've also heard of a "high speed skip". I think that's something similar to the G31, but I'm not sure.

Any help would be greatly appreciated.

Thanks

Royce
Title: Re: Tool sensing with ATC
Post by: BR549 on February 10, 2015, 10:03:59 PM
You would not want to use the G31(high speed skip) Because every time you passed a tool through it  the machine would stop. YOU want the opposite.

So you simply set up a tool slot gate with a very small optical beam  Then position the tool in the centerline of the beam so that it blocks the beam.

So when you are finished with a work segment and want to change tools you simply move the tool to the Tool Check  point and IF the beam is not blocked(tool Missing/broken) then STOP the machine and call for HELP(;-). IF the beam is blocked(tool OK) continue on the to the next tool change position. Pick up a tool and loop through the tool check position on the way back and check IF a tool is picked up.

You can do the same thing for a missing or present tool holder only position it to check the tool holder instead of the tool bit.

Build your gate to be able to check both with one gate. Make it wide enough to pass either through it.

Does your spindle have an output signal to verify the tool holder is present ??

(;-) TP
Title: Re: Tool sensing with ATC
Post by: OB Cues on February 10, 2015, 10:28:40 PM
BR549

I really like your screen name!

I completely understand what you're suggesting. Actually, I've considered doing exactly that. But, and there's always a but isn't there. Some of the tools I use are very small. I'm not confident that the smallest ones would completely block an optical beam. I mean, I'm talking .005" with a tiny depth of cut. For the same reason, I don't really want to come down on top of a touch plate either. They're kind of pricey and the tiniest corners of the bits can break and ruin the cut.

As for the tool holders, I don't really have any holders. The spindle just uses an air powered draw bar attached to the actual collet. My tools, all with 1/8" shanks, are dropped off and picked up by the shanks. Just the collet and the tools, no holders necessary.

In typing this, I realize that if my tool won't block a light sitting still, it might not block it while moving through it either. I guess I need to take a closer look at the optical switches and their specs. I currently use them for homing, and they are extremely accurate. Much more so than mechanical switches. I currently use the Optek OPB941W51Z for the home switches. They do offer a wider version, and the sensor aperture is only .010", so it just might work. It typically only requires about 40 to 50% of the light to be blocked for activation.

I would still like to learn how to turn a flag on and off though if possible. I think it could come in pretty handy at some time or another.

Royce
Title: Re: Tool sensing with ATC
Post by: BR549 on February 10, 2015, 10:39:47 PM
You can use a simple micro switch with a lever as well. They require very little pressure to work. Just brush it passed the switch lever  an see IF it trips or NOT.

If you need help, glad to help out.  A simple Mcode(macro) would do the job.    and between checking teh tool OR tool holder is just a matter a Z height using a single switch. Peace of Cake(;-)

NOW of course you will have to reference the machine on startup to the same spot. But you will need that for selecting tools anyway so that Mach3 knows where everything is located.

he code to see the switch is simple. You would have brought the switch wiring to a PIN then assigned it as an input.  Then as part of the tool changer code you park it at the Tool check spot then look at the inout to see IF it is active.

IF not IsActive(input5) then         'If the switch did not trip
      MsgBox("Tool Bit is Broken")   ' Popup message box
      DoButton(3)                         'Stop the program run to allow you to fix the problem         
else
Message" Good To Go "    ' Sends message to status line in Mach3 and continues Program.
End IF
End

If you need help with the Macro coding side just holler, Glad to help




(;-) TP

(;-)TP
Title: Re: Tool sensing with ATC
Post by: OB Cues on February 10, 2015, 11:00:24 PM
I do reference the machine at start up, so that's not a problem. I'm able pick up a .125" diameter tool with a collet, so I only have a few thou to work with as it is. I have 6 tools that I choose from, and they are all at the other end of the table from the home switches. I don't have any issues with being in the right place

What I'm not familiar with is how to make a move, and watch for a signal while it's moving. That's why I thought of the "flag" concept. I'm not a normal computer guy, so much of the language is new to me.

How do I program a move, in machine coordinates, and during that move, recognize a signal or not? All in a macro, of course. I'm not well versed in VB.


Royce
Title: Re: Tool sensing with ATC
Post by: BR549 on February 11, 2015, 09:24:29 AM
Actually you would just MOVE to the check position Stop Then look at the input( switch) to see IF it is active or not. It will do it fast enough that you won't notice much lag time.

(;-) TP
Title: Re: Tool sensing with ATC
Post by: OB Cues on February 11, 2015, 11:47:24 AM
BR549

Yes, I knew that I could just stop in the beam and then read the input as to whether it was active or not. I'm sure this is what I'll end up doing. As long as the smallest tools still block enough of the beam I'll be ok.


I guess I just wanted to be fancy and see if I could just pass it through and trip a flag.

I guess I could setup a brain to constantly monitor that input, and when it saw it active, set a variable to a given number, say 10. Then, during the tool change macro, I could just set the variable to 0 before passing through the gate, and then look at it afterwards to see if it's now 10.

I might try that.

I've been very happy with using brains for various things. I have one that monitors all the spindle amplifier's signals. If it sees any faults, it essentially presses the stop button. I have the safe Z turned on, and set above my work. It will actually save a .020" cutter working at 50 ipm if the spindle faults!

Thanks for all your input.


Royce
Title: Re: Tool sensing with ATC
Post by: BR549 on February 11, 2015, 06:41:11 PM
You are only limited by your imagination (;-) Go for it.

Now keep this in Mind Mach only looks at the inputs 10 times per sec. IF you pass through fast enough considering the very narrow wideth of the beam Mach may NOT see the input. That is WHY I suggested a stop and look approach.

(;-) TP
Title: Re: Tool sensing with ATC
Post by: OB Cues on February 11, 2015, 07:33:28 PM
You are only limited by your imagination (;-) Go for it.

Now keep this in Mind Mach only looks at the inputs 10 times per sec. IF you pass through fast enough considering the very narrow wideth of the beam Mach may NOT see the input. That is WHY I suggested a stop and look approach.

(;-) TP


TP

I'll have to go back and look, but I was pretty sure that brains run very fast. Like 10 times, or even 100 times faster than just the regular Mach stuff like modbus.

It may be a little bit before I get it all setup, but when I do, I'll post about it here.

Here's a link to a video of my current tool change system with the Precise spindle.

I did have one mounted on an inlay machine at one time. I now have 2 NSK's on one machine, and a Fischer Precise on the other. All with ATC. I've got the single Precise working very well right now with fully automated tool changes. Here's a video of it in action. It's really cool.

https://www.youtube.com/watch?v=scZmBhma3fU

Royce
Title: Re: Tool sensing with ATC
Post by: BR549 on February 11, 2015, 08:24:40 PM
NOPE 10hz is it on input reads, always has been.  NOW on things like limits, homing,probing it reads at kernal speed.

Just a thought, (;-) TP
Title: Re: Tool sensing with ATC
Post by: OB Cues on February 14, 2015, 02:29:43 PM
Well, I think 10 times a second should be ok.

I was able to make a quick simple little brain that took the input, and created a timed one shot control of an output.

I'll pass through the gate, and then read whether the output is on or not.

I'm waiting on some opticals big enough for my largest tool to pass through. Once they get here, I'll give it a shot.


Thanks for all your help

Royce
Title: Re: Tool sensing with ATC
Post by: BR549 on February 14, 2015, 02:57:28 PM
10 hz is not very fast but only testing will actually tell the story. In the worse case all you would need to do is slow down the pass through the gate.

Another thought, Using the Brains it will be HARD to set a flag. Doing it from a macro you can store the flag as a #var >500  and < 600 and it will be available anytime you need it.

Keep us up to date (;-),

(;-) TP
Title: Re: Tool sensing with ATC
Post by: OB Cues on February 15, 2015, 10:21:04 AM
br549

Originally, I was planning to use a variable like #501 etc. But when I looked into brains, it only shows Local Variables, and I'm not familiar with them. Do they work the same?

I use variables in many of my programs, but I've never worked with the local variables. In brains, variables used as a termination, it lists V1 through V99. It also talks about using bits. I'm not sure I would know how to set it up. I do have an old Fanuc 6T control on a Hardinge CHNC and I've read various parameters which are listed through bits. IE for a particular parameter, bit 3 would be the 5th one from the left and it would be a 1 or 0 for on or off.

Would the Local Variables be similar? If so, how would I read them in a Macro? It's always the language and syntax that gets me.

What I was able to come up with using brains is this:

1. I made a brain, a really simple one, that watched the input for my optical switch. When it sees the trip, it uses a timer to turn on an output for 5 seconds.
2. In my macro for the tool change, I can program all the moves to go to and pass through the gate.
3. Immediately after passing through the gate, I can use an If-Then statement to read the output that is held high for 5 seconds, and then program accordingly.

I can use this whether I need to see a tool or not, and I don't need to reset it as it turns back off after a programmable time.


I'm  very interested in your methods for using the variables. I like to learn, and doing it both ways will help me to learn more than just using one. I think I can make the brains side of it work, but if you could point me in the right direction to do it using macros and variables, I'd really appreciate it.

Just a note about me. I'm definitely a rookie with all this special programming and I don't have any formal CNC training. I do learn well, and am not afraid of work. I built from scratch most of the machines that I use.

I look forward to any direction you have to offer.


Thanks

Royce
Title: Re: Tool sensing with ATC
Post by: BR549 on February 15, 2015, 11:04:18 AM
The brains local var is just that a local var that does not exist outside of the brains.


The macropump ( the CB/vb side of mach3) reads at the same rate as a brain. It is a continuous loop, when it ends it starts again.  The macropump has access to ALL of the Mach3 programable functions. BUT if really large in size it CAN carry more overhead for mach3.

Code in the macropump could look for the signal and trip a flag as well and store it as a #var . #var 500-600 are persitant vars. They remain IF mach3 is shut down. The pump could also drive a LED for you to visually see if it tripped.

The advantage of teh brain is it runs at kernal speed internally where as the machrpump is limited to 10 hz internally. BUT both read the inouts at the same speed 10hz.

The advantage of the macropump is it has access to all mach3 internal functions. It can also call other macros into play.

(;-) TP