Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: zoxx2446 on October 09, 2014, 01:02:42 PM

Title: 1 drive 3 axes and mach 3
Post by: zoxx2446 on October 09, 2014, 01:02:42 PM
Hi,

I have an old milling machine with mobile mast. It has 3 axes but only one servo motor. Switching between axes is achieved with electromagnetic clutches. It cannot move more than one axis at the time. Is it possible to configure Mach3 so it can drive the machine?

It is not actually this machine on the picture but it is the same.
(http://www.macchinari-usati.it/images/2011/11/02/856/fresatrice-cnc-a-banco-fisso-con-montante-mobile-mecof-cs8_1.jpg)

thanks
Title: Re: 1 drive 3 axes and mach 3
Post by: Hood on October 09, 2014, 02:39:46 PM
I would imagine the drive would be analogue command rather than Step/Dir. If that is the case then you would need one of the controllers capable of sending out +/-10v analogue signal.
You should be able to do what you want by swapping outputs from the control by means of relay or electronics or possibly by usng the SwapAxis function of Mach. However I am not sure if the external controllers that can output analogue commands are capable of utelising SwapAxis as it has to be a function of their plugin. You would need to check with the manufacturers if that is the route you wish to take.

Hood
Title: Re: 1 drive 3 axes and mach 3
Post by: zoxx2446 on October 10, 2014, 12:59:17 AM
Yes, it is +/-10v analogue drive. That is not a problem, I will buy whatever I need to make this working.
Is it possible to configure mach3 so it works like this:
when selecting, let’s say, X axis, it sends a command of speed and direction to the drive and simultaneously activates the electromagnetic clutch of X axis, if I select Y axis it sends a command of speed and direction to the same drive and only switches from X axis em clutch to Y axis em clutch?
Is it possible that mach3 always sends speed and direction commands to the same drive regardless of which axis is selected either through jog  or g-code and only thing what is changed is digital outputs to the em clutches?
Title: Re: 1 drive 3 axes and mach 3
Post by: Hood on October 10, 2014, 03:30:41 AM
Mach itself could not send the signal to one drive when commanding different axes but it is likely you could trick it into doing so. It would not be straight forward as you would need to have a Mcode before each move of a different axis. That MCode would operate relays  that would swap the outputs from your controller so that tey feed the axis drive, it would also be used to energise the magnetic clutch.

It is not an elegant solution but it should work.
Hood
Title: Re: 1 drive 3 axes and mach 3
Post by: stirling on October 10, 2014, 04:44:46 AM
Mach itself could not send the signal to one drive when commanding different axes but it is likely you could trick it into doing so.

Why not just setup each axis step/dir pair to be the same two pins? As long as you never command a 2 or 3 axis move (particularly of different directions) you should be ok. So as you say - just have an M call prior to each axis move to select the appropriate clutch - then whether you command XY or Z it will activate the same two pins?
Title: Re: 1 drive 3 axes and mach 3
Post by: Hood on October 10, 2014, 04:47:00 AM
Its +/- 10v Ian.

Hood
Title: Re: 1 drive 3 axes and mach 3
Post by: stirling on October 10, 2014, 04:49:49 AM
OK - I'm out of my zone then - but just for my edification - how does Mach send out +/- 10V?
Title: Re: 1 drive 3 axes and mach 3
Post by: Hood on October 10, 2014, 04:52:20 AM
Mach itself won't, you need to use an external controller such as CSMIO/IP-A or DSPMC or Kflop with Kanalog.

Hood
Title: Re: 1 drive 3 axes and mach 3
Post by: stirling on October 10, 2014, 04:57:01 AM
Like I say - I'm out of my zone so bear with me if I'm being dumb here - but whatever type of drive you use - don't you set up "pins" somewhere?
Title: Re: 1 drive 3 axes and mach 3
Post by: Hood on October 10, 2014, 05:00:01 AM
Well depends on the device, probably most dont need pins set as such but rather channels in the plugin assigned. Basically does the same thing as setting pins in Mach I suppose.
Hood
Title: Re: 1 drive 3 axes and mach 3
Post by: stirling on October 10, 2014, 05:10:51 AM
OK - but whatever systems you're using, "somewhere" you must configure Mach with axis step and dir info so my thinking is you make them all the same. Maybe not. I'll get back in my box  ;D
Title: Re: 1 drive 3 axes and mach 3
Post by: Hood on October 10, 2014, 05:15:12 AM
Not really, the plugin for the CSMIO at least, will only allow you to configure a channel  once.
For example if Axis 1 was on Channel 0 and Axis2 was on channel 1 and you switched axis 1 to channel 1 then Axis 2 channel would be disabled until you configured it as something other than channel1.

Hood
Title: Re: 1 drive 3 axes and mach 3
Post by: stirling on October 10, 2014, 05:31:19 AM
Ah - understood. Thanks.

Just tried it here for the hell of it with the PP and unlike your CSMIO - Mach doesn't give a monkey's - all three axis pumping steps out of the same pin.

Ian
Title: Re: 1 drive 3 axes and mach 3
Post by: Hood on October 10, 2014, 05:50:22 AM
Yes, think even the ESS and SS are like that now, Dan got Greg to allow that in it as at the time SwapAxis() was not enabled.

Even if it was possible I think you may run into  issues with the analogue as each encoder is monitored and the control is constantly sending out small voltages to keep it where it is meant to be, have all 3 sending to the same pins and I think it would be chaos.

Hood
Title: Re: 1 drive 3 axes and mach 3
Post by: stirling on October 10, 2014, 06:17:41 AM
There you go then... replace the motor with a big FO stepper and use the PP port - (is joke).

I'll leave you to it - but if you need any help don't be too shy to shout up  ;D.
Title: Re: 1 drive 3 axes and mach 3
Post by: Hood on October 10, 2014, 06:36:32 AM
I am never shy about shouting, I was one of the 45% ;)

Hood
Title: Re: 1 drive 3 axes and mach 3
Post by: stirling on October 10, 2014, 07:25:49 AM
 :-X
Title: Re: 1 drive 3 axes and mach 3
Post by: zoxx2446 on October 10, 2014, 02:00:05 PM
Thanks for the tips.

So, there is no way I could solve this elegantly in mach itself. It would be cool if someone with knowledge could write a plugin for CSMIO/IP-A or Kflop with Kanalog with that functions. Another, more expensive way is to buy three servo drives and motors...
Title: Re: 1 drive 3 axes and mach 3
Post by: Hood on October 11, 2014, 05:24:55 AM
Best way would be 3 servo drives, would make it a much more useful machine.

Regarding someone doing a plugin, dont think there is much chance of that unless you do it yourself as it is highly specialised and not likely many would use. You may be better talking to the guy that makes the Kflop, he may be able to suggest how you could use it with just a bit of coding.

Hood