Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: jobanob on August 17, 2009, 07:06:31 PM

Title: Lathe with 2 Z-axis - Help!
Post by: jobanob on August 17, 2009, 07:06:31 PM
Hi,
I want to retrofit my old lathe to work under Mach3, so I have some questions
The lathe is driven by hydraulic cylinders, two of them is controlled by stepper motors, but the last one has only two switches, to change directions of cylinder, - can I control them by adding an optical encoder, and haw to set them in Mach3?
- The lathe has a second Z axe (which I want to use for drilling and tapping) ATC with 5 positions - Haw I can control them?(optical encoder?!)
- The lathe has a gear with 4 speed changing by relays (electromagnetic gears) - Haw can Mach3 change speed?
- I have additional LPT(2),
Thanks,
Title: Re: Lathe with 2 Z-axis - Help!
Post by: Hood on August 18, 2009, 03:40:13 AM
Hi,
I want to retrofit my old lathe to work under Mach3, so I have some questions
The lathe is driven by hydraulic cylinders, two of them is controlled by stepper motors, but the last one has only two switches, to change directions of cylinder, - can I control them by adding an optical encoder, and haw to set them in Mach3?

Afraid not, Mach is open loop.


- The lathe has a second Z axe (which I want to use for drilling and tapping) ATC with 5 positions - Haw I can control them?(optical encoder?!)

Depends how it works.

- The lathe has a gear with 4 speed changing by relays (electromagnetic gears) - Haw can Mach3 change speed?
- I have additional LPT(2),
Thanks,


This bit can be done, you can write a M6 macro to do the gear change. My lathe had this setup before I fitted the servo to the spindle. I used a PLC to connect to the gears and I modified the M6Start macro to do the I/O I wanted. Reason I used a PLC was it is simpler and could also provide interlocks in the ladder so no two gears could be engaged at the same time causing a lock up.

Hood
Title: Re: Lathe with 2 Z-axis - Help!
Post by: jobanob on August 18, 2009, 05:30:33 AM
Thanks Hood!
The lathe in the past was controlled by some electronic two stepper motors and electric valves, it was automatic lathe for serial production. The first Z axe has travel 100 mm, manual speed control, two 24V valves for changing direction. The second Z axe has rotation ATC (I planing to use them for drilling and tapping) with 5 position, and controlled movement by stepper motor. The question is haw to control first Z ax, to give their position to X ax? I have two LPT, with 18 solid state relays, 10 inputs - Is that enough for ATC? I will post some pictures next days, because my digital photo device drop from the lathe!  
The ATC is horizontal turret, driven by hydraulic pump.
Title: Re: Lathe with 2 Z-axis - Help!
Post by: poppabear on August 18, 2009, 09:19:10 AM
"
Quote
  Hi,
I want to retrofit my old lathe to work under Mach3, so I have some questions
The lathe is driven by hydraulic cylinders, two of them is controlled by stepper motors, but the last one has only two switches, to change directions of cylinder, - can I control them by adding an optical encoder, and haw to set them in Mach3?

Perhaps I am not understanding you, but you say your X and Z (turret moving axis), is Hydraulic, BUT the Hydraulic is run by Steppers? if so, you can control X and Z via PP step/Dir.

Optical Encoders: Yes you can use them, you can bring them in to the "Encoder" inputs (there are 4), and use some VB in the macro pump to watch what they do to effect your operation, if for some reason you need a position feedback, it wont be as accurate as the PP. The will not funciton as "true closed loop", but you can use them for following error.

Quote
- The lathe has a second Z axe (which I want to use for drilling and tapping) ATC with 5 positions - Haw I can control them?(optical encoder?!)

Use your "C" Axis in mach3 to run and index your ATC turret, from within your M6

Quote
- The lathe has a gear with 4 speed changing by relays (electromagnetic gears) - Haw can Mach3 change speed?
- I have additional LPT(2),
Thanks,

Your gear changes will be tied to your Pulley Speed ranges. You can Set the Pulley range by getting the S parameter from your G code, and have the macropump watching it, further you can set that up in your M6 as well, and you can add custom buttons to your screen that would set up a User DRO that the number would equate to a Binary pattern that would equate to your gear position IO of your valves.  It depends on just how much work you want to do. 

You can also do a lions share of the above with a PLC as hood said as well. The opitons are many depending on your budget, how much you want to dig at it, and the VB.

scott
Title: Re: Lathe with 2 Z-axis - Help!
Post by: Hood on August 18, 2009, 06:22:59 PM
The axis driven by steppers are no problem, how accurate I cant say because the stepper seems to control hydraulics. On the axis with the hydraulics and only two direction valves then I cant think of a way to get that to work with Mach.
Hood
Title: Re: Lathe with 2 Z-axis - Help!
Post by: poppabear on August 20, 2009, 02:10:43 AM
if his axis has only two direction valves, On or OFF type, or would they be analog controlled direction valves? If analog controlled he could push them via a anlog modbus device, (PLC, Modbus board, Mod IO). But if his axis is just straigt on off valves then I guess it wouldnt really be an axis just a positioning slide.   I am confused I suspect by what he means, perhaps he can clairify........

I think I have never seen a hydraulic piston controlled via a stepper motor.

scott
Title: Re: Lathe with 2 Z-axis - Help!
Post by: jobanob on August 20, 2009, 06:38:00 PM
I just try to  upload some pictures...
Title: Re: Lathe with 2 Z-axis - Help!
Post by: Hood on August 20, 2009, 07:05:56 PM
Use the additional options at the lower left of the reply page and browse to the pics on your drive and attach them that way. You may need to rename them if the forum has already had pics of that name posted.
Hood
Title: Re: Lathe with 2 Z-axis - Help!
Post by: jobanob on August 20, 2009, 07:16:39 PM
Hi,
This is some pictures from the "lathe", it is east europian made, Bulgarian I think...
The first Z-ax have manual speed control, by valve which reduce a speed... and that two valves for direction...
their travel is 100 mm, and carry the X-ax, which is for profiling...
Title: Re: Lathe with 2 Z-axis - Help!
Post by: jobanob on August 25, 2009, 05:43:32 PM
Another question,
Haw I can set up auto bar loader to work with Mach3?
Title: Re: Lathe with 2 Z-axis - Help!
Post by: Hood on August 25, 2009, 05:49:02 PM
You would need to write a macro for that, how you connect the hardware will depend on whether you have enough I/O on the parallel port or not. You could use a PLC or PoKeys or ModIO etc to get any extra  I/O you need. PLC would be my choice as it will allow you to do most of the feed in the ladder itself which will make the macro a lot easier also the PLC can be connected direct to the 24v which is likely what the barfeed will be.
.
Hood
Title: Re: Lathe with 2 Z-axis - Help!
Post by: jobanob on August 25, 2009, 05:57:25 PM
I have two LPT with 16 outputs, with solid state relays, is it will be o.k.?

Title: Re: Lathe with 2 Z-axis - Help!
Post by: Hood on August 25, 2009, 06:08:55 PM
If that is enough I/O then yes but you will more than likely need powered breakout boards as the PP is unlikely to have enough to operate the relays.
Hood
Title: Re: Lathe with 2 Z-axis - Help!
Post by: jobanob on August 25, 2009, 06:39:29 PM
I make this 16 opto-isolated solidstate relays, they are activated by PP, an can carry up to 60 Volts DC 10 A max, the valves on the machine is on 24 V, - But I am confused about activations and de-activations of valves - about writing a macros....
Title: Re: Lathe with 2 Z-axis - Help!
Post by: Hood on August 25, 2009, 06:48:06 PM
ActivateSignal(OutPut*) 
DeActivateSignal(OutPut*)

are what you will likely need, obviously the * is the output number you are using in Ports and Pins for that function.

As for writing the macro then best thing is just to look at some of the macros in the macro folder and also look at the VB Buttons in the wizards and it will help you out.

Ray is writing a manual at the moment so when thats done it will help a lot.

You could also probably do it via a Brain which might make things easier but they also have a learning curve.

Hood
Title: Re: Lathe with 2 Z-axis - Help!
Post by: jobanob on August 25, 2009, 07:03:53 PM
Thanks Hood,
Title: Re: Lathe with 2 Z-axis - Help!
Post by: poppabear on August 25, 2009, 07:54:53 PM
find the sequence it takes to run it, and they way it moves via hard stop, or encouder? then set up a custom Bar loader Macxro

scott
Title: Re: Lathe with 2 Z-axis - Help!
Post by: jobanob on August 26, 2009, 04:12:45 AM
-It moves via hard stop,
Title: Re: Lathe with 2 Z-axis - Help!
Post by: jobanob on September 09, 2009, 07:29:08 PM


I think I have never seen a hydraulic piston controlled via a stepper motor.

scott
[/quote]
That is same like servo wheel in the cars, steppers is like drivers hands, hydraulic do move directions...of front wheels..
Title: Re: Lathe with 2 Z-axis - Help!
Post by: jobanob on September 14, 2009, 05:19:13 AM
Hi,
Haw is the usual setting of automatic chuck on/off?
Title: Re: Lathe with 2 Z-axis - Help!
Post by: Hood on September 14, 2009, 06:30:39 AM
Not sure what you are meaning but if its as related to how Mach would normally operate it you would write a custom macro to activate and deactivate your outputs which in turn would operate the mechanism (relay, solenoid etc) that controls your hydraulics.
 You would then call the macro something like for opening m110.m1s and closing m111.m1s and save them in your profiles macro folder.
 Then each time you called M110 from code or MDI the chuck would open, M111 it would close.

Hood
Title: Re: Lathe with 2 Z-axis - Help!
Post by: jobanob on October 02, 2009, 08:17:34 PM
ActivateSignal(OutPut*) 
DeActivateSignal(OutPut*)

are what you will likely need, obviously the * is the output number you are using in Ports and Pins for that function.

As for writing the macro then best thing is just to look at some of the macros in the macro folder and also look at the VB Buttons in the wizards and it will help you out.

Ray is writing a manual at the moment so when thats done it will help a lot.

You could also probably do it via a Brain which might make things easier but they also have a learning curve.

Hood
"Ray is writing a manual at the moment so when thats done it will help a lot."
- What about Ray's manual?
Title: Re: Lathe with 2 Z-axis - Help!
Post by: Hood on October 03, 2009, 03:16:21 AM
http://www.machsupport.com/forum/index.php?topic=12730.0
Title: Re: Lathe with 2 Z-axis - Help!
Post by: jobanob on October 03, 2009, 08:04:09 PM
Thanks Hood for link, it is useful,
I remove the hydraulic cylinders from x&z-ax, now that axis is moved only by steppers and screws,
now I have: chuck - open/close, load bar, 4 speed spindle gear,stop spindle, profiling tool on x-ax and 5 position ATC on z-ax (for
drilling and tapping) - What is the best way to manage with ATC? (poppabear says to set them as C-axe!?)
Thanks!
Title: Re: Lathe with 2 Z-axis - Help!
Post by: Hood on October 03, 2009, 08:10:40 PM
You can use any axis you wish that you have spare but A B and C can be set as rotational axis so you can use the rollover feature and if I remember right it will automatically do a shortest move without you needing to code that.

Hood