Hello Guest it is March 28, 2024, 08:39:22 AM

Author Topic: Automoatic tool changer macros & sensing  (Read 8352 times)

0 Members and 1 Guest are viewing this topic.

Automoatic tool changer macros & sensing
« on: September 27, 2010, 11:57:02 AM »
Hey all,  I have recently been playing with my new toy - a denford orac which i have fitted with a C11G and index pulse board from CNC4PC driving  two gecko 201's and it works great :D

My new set-up in a PC case:




It also came with an automatic tool changer and three burnt out dc motors to operate it.  They rattle, whine and burn out as they are used to keep the ratchet against its pawl in 12v reverse mode.  Well, I have fitted a small stepping motor to it with the idea that using the grey code that the 3 sensors produce with its reflective disk, it could tell where it is, rotate a set number of steps for the tool change (it operated a work at 40:1) and reverse a small amount onto the pawl, skipping a step or two and then hold. I was going to use a small cheap driver such as this http://proto-pic.co.uk/products/EasyDriver-Stepper-Motor-Driver.html.  Is this an ok idea? and can someone please give me an idea of how to write a macro for it.  I can build a system, do gcode etc but macro's scare me.  I have no idea if the greycode produced by the sensors can be used???




denford sensor drawings:

http://www.denfordata.com/bb/download/file.php?id=598
http://www.denfordata.com/bb/download/file.php?id=597

Any help would be amazing :)

Rob.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Automoatic tool changer macros & sensing
« Reply #1 on: September 27, 2010, 12:19:52 PM »
I have it in my mind I helped someone with something similar but cant remember if it was on the forum or offline.
Will see if I can remember later on when I get home from the workshop.
Hood
Re: Automoatic tool changer macros & sensing
« Reply #2 on: September 27, 2010, 12:24:11 PM »
Hood, I salute you sir.  I really want to get all the machining/mechanical stuff done before I go back to uni next week as the wiring/computer stuff can be done in my room. 

Rob.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Automoatic tool changer macros & sensing
« Reply #3 on: September 27, 2010, 02:50:27 PM »
Have a look through this thread and see if it helps.
http://www.machsupport.com/forum/index.php/topic,14745.0.html

Hood
Re: Automoatic tool changer macros & sensing
« Reply #4 on: September 27, 2010, 07:36:06 PM »
Hmm, that was a good read and gives me my starting point.  I will have to learn how to write a macro me thinks!  Thanks allot hood, always very helpful.

Im hoping to use the signals generated by the three sensors to give it its position, for example have a table stating that if 1,1,0 is active then for tool number * it must rotate so many steps then reverse 10.  It may be a long macro but it should work well as long as i can get it to read the input signals. 

Can anyone recommend me a cheap, preferably UK based break out board that would be suitable just for this purpose and maybe a few relays for other things as I have a second parallel port. 

 Rob. 

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Automoatic tool changer macros & sensing
« Reply #5 on: September 28, 2010, 02:10:58 AM »
Reading the sensors will not be a problem as long as you have the inputs available. I am not great at VB but can try and give you a hand when you are ready.
Hood

Re: Automoatic tool changer macros & sensing
« Reply #6 on: September 29, 2010, 12:59:47 PM »

Interesting thread, I have one of these in it's original form and I like what you did with the stepper there, do you have any details of the coupling.


I've attached my macro for you to look at, It uses the original sensors so there are bits of code that may interest you.
Re: Automoatic tool changer macros & sensing
« Reply #7 on: September 29, 2010, 02:40:07 PM »
Thanks for that macro, although I must download something to view them properly as I'm using notepad and its all in a single string - not easy to read at all (as you can tell, haven't even thought about macro's until 4 days ago). 

I'm all electrically hooked up now except for my stepper driver which was deemed 'out of stock' this afternoon :(
This is what my new cable looks like inside : (i have used 20 core video cable and tripled the wires for the stepper - its nice and flexible and screened too)


An aluminium adapter plate was made a tad less than 1/4" thick.  The spindle of the stepping motor is 6mm and locates in the hole of the worm wheel shaft which seems to be smaller than 1/4" by a tad (drill blank wouldn't go in).  A 3/32 hole was made through the motor spindle 1/8" from the end and a cross pin pressed in.  This locates in the slot in the end of the worm wheel shaft.  This pin has to be fairly accurately drilled. 


This board operates on 12v, so three 12to5v DC-DC converters were used to step down the output signal voltage to a high of 5.1v and a low of 0.8v when measured with a multimeter.  These outputs were then connected to pins 11, 12 & 13 on the C11G and mach reads them without a problem. 


All i need to do know is get my head around Macros and make an efficient program.  Tis all good fun :D 

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Automoatic tool changer macros & sensing
« Reply #8 on: September 29, 2010, 02:43:23 PM »
Thanks for that macro, although I must download something to view them properly as I'm using notepad and its all in a single string - not easy to read at all (as you can tell, haven't even thought about macro's until 4 days ago). 


Open Mach, go to Operator Menu and Choose VB Script Editor. You can then browse to the location you downloaded the macro to and open it and it will display properly.
Hood
Re: Automoatic tool changer macros & sensing
« Reply #9 on: September 29, 2010, 07:17:13 PM »
It's easy once you know  :D

Right, nows the time to learn some visual basic.  I will take the two examples provided and have a play although I cannot really do much until my ATC driver appears which is annoying.  I will have a look at some of the visual basic tutorials tomorrow too.  It can't be that difficult, can it? 

Rob.