Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: rkdygert on December 11, 2007, 09:41:40 PM

Title: ATC using stepper motor on A axis
Post by: rkdygert on December 11, 2007, 09:41:40 PM
I figured out how to cram a stepper motor in my CHNC in place of the air motor which originally rotated the turret but I need to know if I can drive it.  I would like to wire the stepper into a Gecko drive and control it as an auxiliary axis, that way I can tell the turret to rotate a certain number of steps to go to the proper tool, etc.  Is it possible to write a tool change macro or use brains to control an axis in this way?  I've been looking it over and I understand how to control a simple output like a solenoid or something, but I don't see how to use it for step/dir output (if it can).  Can it?

-Ryan
Title: Re: ATC using stepper motor on A axis
Post by: Chaoticone on December 11, 2007, 10:05:29 PM
Yes, you most certainly can. I'm no VB GURU like some of the guys here but will try to think of where I saw an example. If I forget, please remind me. I have had a more than full plate latley.

Brett
Title: Re: ATC using stepper motor on A axis
Post by: CUTMORE on December 12, 2007, 06:56:19 AM
Ryan,Brett,
Try this link from poppabear,
http://www.machsupport.com/forum/index.php/topic,4191.0.html
I think this is what you were looking for.

Regards,
Cutmore
Title: Re: ATC using stepper motor on A axis
Post by: rkdygert on December 12, 2007, 07:52:36 PM
Thanks guys, at least I know I can go ahead with the hardware end of things.  I did see that post from poppabear but I can't figure out what part of the code is actually doing the step/direction output.  Time to do more digging...where can I find a listing and description of what all the command words mean?

-Ryan
Title: Re: ATC using stepper motor on A axis
Post by: N4NV on January 06, 2008, 09:11:43 PM
My CHNC is missing the air motor.  Can you provide more information on the type of stepper you got to fit?  Any other information would be usefull, like what type of worm screw you used.

Thanks

Vince
Title: Re: ATC using stepper motor on A axis
Post by: rkdygert on January 30, 2008, 10:53:41 AM
Vince,

Sorry, I didn't notice your post before. 

I'll have to take some pics of the setup to show you what I did exactly but I'll tell you quick anyway.  I couldn't find a stepper to fit directly where the airmotor was so I mounted one on the steel plate at the end of the carriage (the plate the wires pass through) and ran a driveshaft out to the worm.  Actually, I used parts from the old airmotor to mount the driveshaft in the casting.  The only downside is that you need to put a 1/2" spacer between the rear cover and the carriage to clear the stepper...not a bad compromise I figured though.

I'll try to get some pictures for you when I get a chance.

I don't know much about the worm as far as part numbers go...I just used the one that was in the machine originally.

-Ryan
Title: Re: ATC using stepper motor on A axis
Post by: jimpinder on January 30, 2008, 01:14:51 PM
I think the easiest way to drive the thing woud be to  alter the steps per unit configuration, so that for a unit of "one" the stepper motor moved enough to move your turret one position. You could then move it backwards or forwards as though it were a rotary axis using G Code.

Once you have got to this, a simple Vis Basic program (which writes GCode anyway) would suffice, picking up your tool number from the DRO and moving the turret to a suitable position.

Jim
Title: Re: ATC using stepper motor on A axis
Post by: N4NV on January 30, 2008, 11:50:31 PM
Once you have got to this, a simple Vis Basic program (which writes GCode anyway) would suffice, picking up your tool number from the DRO and moving the turret to a suitable position.

Jim

Once I get the servo/stepper installed, can I plan on your help with the simple Vis Basic program?

Thanks

Vince
Title: Re: ATC using stepper motor on A axis
Post by: jimpinder on January 31, 2008, 09:39:08 AM
Yes - no problem - (you don't need a guarantee it will work, do you ???)

I will open my big mouth.

Seriously - I think it is a quite simple program - I don't know how many tool positions there are, but what I had in mind was one that responded to the tool number, and rotated in the quickest direction to get there. I think the only caveat on that would be that the tools would have to be 1 to 6 or whatever - and these would have to be left blank in the tool table.
Title: Re: ATC using stepper motor on A axis
Post by: Graham Waterworth on January 31, 2008, 11:49:44 AM
Here is one I did for Chris (guynamedbathgate) it is a lock to pawl type changer but the code will work with a few mods.

Graham.
Title: Re: ATC using stepper motor on A axis
Post by: N4NV on January 31, 2008, 06:27:32 PM
Seriously - I think it is a quite simple program -

What I know about Vis Basic could fit on the head of a pin, so I couldn't even modify an existing program.  I guess there is always another semester at the local college for me, that's how I leaned Gcode programing.

Vince
Title: Re: ATC using stepper motor on A axis
Post by: Chaoticone on January 31, 2008, 08:57:53 PM
Vince, you can do it. Don't be afraid to ask questions here. Give it a go, dig in and post your results. I know very little about VB to say the least but there are some here that are very good. It is a learning curve, but you can do it if you decide to.

Brett
Title: VB
Post by: N4NV on January 31, 2008, 11:23:14 PM
It will be a couple of months at least until I am that far.  By then I may be signed up for school.

Vince
Title: Re: ATC using stepper motor on A axis
Post by: Dan Mauch on February 01, 2008, 01:21:08 PM
I am new to VB and using scripts but I figured out  a lot about it. I have  a lathe with a tool changer that I am retrofitting . It has a 6 position too changer with a pawl lock set up.
I d/led the Toolchanger Pawl lock macro and copied it to my macro folder in mach3 turn.
I opened it using the VB editor and entered the values for the variables and saved it
I then edited the lathethread.tap file editing the M6 to read M6 T5
When I run thetool path the file runs to the M6 line then requests that I press cycle start. When I do that the file ends and rewinds to the first line of the script
Can I email you my saved copy so you can see it? If so what is your email address.
Title: Re: ATC using stepper motor on A axis
Post by: N4NV on February 01, 2008, 10:30:22 PM
Can I email you my saved copy so you can see it? If so what is your email address.
Sure.  My email address is vince@flyingcritters.com

Vince
Title: Re: ATC using stepper motor on A axis
Post by: N4NV on February 11, 2008, 10:52:51 PM
I figured out how to cram a stepper motor in my CHNC in place of the air motor -Ryan

Ryan, I found the worm gear with the planetary gearbox attached.  I now need the gear that drives the planetary gears.  It's pretty small, about .175" in diameter.  If I can get that gear, I can drive the worm gear with a servo motor.

Vince