Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: hughes674 on October 12, 2018, 06:26:50 AM

Title: Spindle/ C Axis using CSMIO/IP-A
Post by: hughes674 on October 12, 2018, 06:26:50 AM
Hi All

Recently started a conversion using the CSMIO/IP-A on a Denford Senior lathe. With the help of people on this forum made huge progress and now have the X an Z-axis working perfectly using Lexium 28 servos and drives.

The original spindle motor is connected to the CSMIO and also works well as it should.

I would like to have a combined spindle/ C axis in order to facilitate some live tooling in the future. My plan is to fit a new Lexium servo motor and drive to power the spindle. (Appropriate size not yet decided)

I have successfully wired the X and Z axis using the analog +/- 10v and also have the VFD working using the 0 to 10v speed command on the spindle.     

Can anyone advise on how this would be configured and connected to the CSMIO so I can switch between Spindle and C axis? 

Mick
 
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: Hood on October 12, 2018, 03:39:56 PM
I presume you are planning to do away with the VFD driven spindle and solely use the servo.
On the parallel port the swap between spindle and C Axis could be achieved by using the SwapAxis() command, as mentioned previously I don't think that feature is supported in the CSMIO.
I also mentioned that the  easiest solution would be to have 2 Mach profiles, one with a spindle and one with a C Axis, obviously that would only be of use if you were to be only using one or the other on a part.
If you intend to use both spindle and C on the same part then I am not sure the best route, probably a relay to swap analogue outputs working via a macro. The encoder inputs to the CSMIO would likely have to be treated in a similar manner.
That then brings up the issue of the CSMIO faulting due to the disabled (via the relays) axis not getting the correct encoder feedback.

So to summarise if wanting to use one or the other per part then it will be easy, if wanting to use both per part then I think you have a headache.

Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: hughes674 on October 13, 2018, 07:15:59 AM
Hood

Thanks for the reply. Yes, we did touch on this in my other topic. Using two Mach profiles was not really what I wanted but for the small amount of inconvenience of shutting one profile down and opening another sounds like it outweighs the headache of trying to get this set up as a combined Spindle/C axis.

What are your thoughts on keeping the original Spindle motor for turning, threading etc and having a smaller C axis motor that is engaged when the C axis profile is enabled?

I had this motor in mind. https://uk.rs-online.com/web/p/servo-motors/1110826/?sra=pmpn

The stall torque is only 7nm but as I would only be using it as a rotary C axis, I could mechanically gear it down to achieve a lot higher torque.


This is a response I had from CS LABS regarding Spindle/ C axis       


Hello,

 
In Mach3 you can't use a servo drive as a spindle and a fully functional rotary axis at the same time.

However, you can use a servo drive as a spindle and an indexed rotary axis (spindle positioning from VB macros with an accuracy of 0.1 degrees).

Using a servo drive as a spindle and a rotary axis at the same time was supposed to be provided by Mach4. It surely will be possible with simCNC.

As for a servo drive connection, you have to connect it the same way as the other servo drivers and then run "Spindle Axis" function in plugin.

 
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: Hood on October 13, 2018, 10:48:16 AM
I am struggling a bit with their second line in the reply, they seem to be saying you can use a spindle as an indexed axis via VB yet the line before says you can't?

Anyway using the VFD/Induction motor as spindle and a clutched servo for C Axis may be the way to go/ How easy that would be to achieve would all depend on how easy it would be to implement some kind of clutch but it is probably the route I would go in your situation.

Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: hughes674 on October 13, 2018, 11:56:33 AM
I think something like this may work and be easy and cheap enough to make. Not sure how much tension would be needed on the auxiliary wheels once the C axis was engaged.
Try not to laugh too much. Lol ;D

 
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: docltf on October 13, 2018, 02:03:22 PM
I have a lathe head stock tail stock setup for my milling machine when needed -
Use a stepper on the head stock for both spindle and A: axis rotary -
using mach3 ports and pins settings -
use same ports and pins for both spindle and axis -
A: axis 9 - 8 dir low
spindle 9 - 8 dir low
then do motor tuning on both for what you need -
works like a champ. don't see why it would't work on a servo -
program m3 m5 does spindle - G01 A: works index
don't mix the code, keep it clean , when one is on the other is off -


bill
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: Hood on October 13, 2018, 02:14:47 PM
I think something like this may work and be easy and cheap enough to make. Not sure how much tension would be needed on the auxiliary wheels once the C axis was engaged.
Try not to laugh too much. Lol ;D

 

Personally I think I would be looking at an electromagnetic clutch especially as you really want  to have a toothed belt for the indexing.

I have a lathe head stock tail stock setup for my milling machine when needed -
Use a stepper on the head stock for both spindle and A: axis rotary -
using mach3 ports and pins settings -
use same ports and pins for both spindle and axis -
A: axis 9 - 8 dir low
spindle 9 - 8 dir low
then do motor tuning on both for what you need -
works like a champ. don't see why it would't work on a servo -
program m3 m5 does spindle - G01 A: works index
don't mix the code, keep it clean , when one is on the other is off -


bill

The difference is the CSMIO/IP-A is closed loop analogue control. It is constantly monitoring the encoder positions. That would mean as soon as you moved your spindle the C Axis would fault and vice versa.

Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: Hood on October 13, 2018, 02:17:00 PM
I have read the reply from CS Labs a few times and I am wondering if the second line is hinting at it being possible to do something like SwapAxis() feature in Mach except via VB scripts. It might be worth asking them to clarify.
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: docltf on October 13, 2018, 03:13:29 PM
I thought he was thinking of of using a servo only for both -

if he did go with a magnetic clutch wouldn't all power to the spindle have to be off during indexing -


bill
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: Hood on October 13, 2018, 05:08:42 PM
I thought he was thinking of of using a servo only for both -

Yes and that would be the problem, the CSMIO controller would command the spindle  but as the encoder is shared with the C (same motor, same encoder) then it would try and stop the C axis moving so it would put out an analogue voltage out the same channel as the spindle, that would not be a healthy situation. It would be similar to you commanding a spindle speed and an axis speed at the same time and worse still they would be opposites.  Even if that problem was got around by using different channels and relays  and you did likewise with the encoder signals then as soon as you swapped the channels via relays the encoder signals would vanish  and either the spindle or C axis would fault due to loss of feedback, in fact the whole control would E-Stop I would think.

Quote

if he did go with a magnetic clutch wouldn't all power to the spindle have to be off during indexing -


bill


Yes that would likely have to happen so probably two clutches would be needed. It may be possible to just disable the VFD, if the Indexing is relatively slow then I don't think there would be any regen issues but I am no expert on such things so the two clutches would be my preferred option.
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: hughes674 on October 13, 2018, 05:10:43 PM
Hood

I have read the reply from CS Labs a few times and I am wondering if the second line is hinting at it being possible to do something like SwapAxis() feature in Mach except via VB scripts. It might be worth asking them to clarify.

I will ask for further clarification on Monday. Can you please clarify exactly what is meant by indexing? I thought this referred to set index points EG (1 degree, 10 degrees, 20 degrees etc) which is not a fully functioning rotary axis. With an accuracy of 0.1 degrees as stated by CS Labs, would this not be useless for any kind of semi-precision work?

 If you were machining a part with a 150mm diameter that would give you an accuracy of 0.13mm (150x3.142/360x0.1)  

I like the magnetic clutch idea will do some research on those. Don't think Mazak will steal my idea in a rush. lol :-[

Bill

Thanks for your comment.

Looking at the moment to keep the original spindle and VFD and using a small Servo motor geared down for C axis machining.  
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: Hood on October 13, 2018, 05:22:02 PM
Are you planning on using it as a rotary axis? I was thinking it was just indexing you were wanting, if not then that is a different.
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: joeaverage on October 13, 2018, 05:50:43 PM
Hi Mick,
if I understand you are using the original VDF/spindle motor currently? How does it perform?
Induction motors and VFDs are a poor choice for indexing/C axis work but for normal turning operations
are more than adequate.

As you know I have a servo for a slow speed/high torque spindle. My initial use of it was in velocity mode and I would present
the servo drive with a +10/-10 V signal.....easy.

More recently I have been experimenting with the same servo but in Step/Direction mode and using it as a continuous
running spindle. Mach4 has a quite extensive suite of APIs that make this possible.

My most recent experiments have revolved around having the 'normal' spindle defined (Step/Dir) AND an Out-of-Band axis.
In Mach4 you can have up to six Out-of-Band axes which can be jogged. Thus I have two Step/Dir input pairs available for my
servo spindle. I select one pair as required for the machining operation at hand.

The trick is that when the spindle is in free running mode that it will lose reference. Thus when I finishing the free running operation and wish to
index my spindle I have to home it and then I am able to jog to a given angular position. What I am working on is having Mach keep track
of the encoder during free running mode so that it does not lose reference.

My most recent experiments have gone a step further. I have the same normal free running spindle, I have an indexable (via jogging) Out-of-Band spindle
and have a genuine C Axis which has coordinated motion with the other axes for things like rigid tapping. Thus I have three separate modes of operation
programmatically selectable.

All in all it has absorbed a great deal of time and programming effort. Given that 99% of my milling requires just a free running spindle the question must
be asked 'does all the complication of an indexable and/or C axis make sense?'. Probably not... however it has kept me off the streets and I have learnt
a lot about Mach4 and programming it. If what is learnt in pursuit of your hobby is considered valuable, then this has been worthwhile.

Craig
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: hughes674 on October 14, 2018, 09:08:31 AM
Hood

The plan is to use it as a rotary axis at some point. 

Craig

 Induction motors and VFDs are a poor choice for indexing


The Jaguar 550 VFD works fine with the original motor and it was never my intention to use it for any kind of indexing or rotary axis. Only for turning and threading. Hence why we are talking about fitting a 1.5kw servo motor alongside the original spindle motor. 

Given that 99% of my milling requires just a free running spindle the question must
be asked 'does all the complication of an indexable and/or C axis make sense?'. Probably not...

This is something I would like to do and I don't believe it would be that difficult setting this up as a separate axis. 

Mick

 
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: Hood on October 15, 2018, 03:27:26 AM
Thinking about it, with two clutches, spindle and C set up on their own channels then it should actually be possible to use one profile and both for the same part.
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: hughes674 on October 15, 2018, 07:58:53 AM
Hi Hood

I think I may be missing something here but if I use the existing VFD and Spindle motor why would we need to use separate profiles? The spindle is using the 0 to 10v analog output from pin 7 or 8 on the I/O connector and the encoder will be connected to the csmio/enc. The C axis will be treated as its own axis not a spindle the same as X and Z and use one of the encoder channels on the I/O. The analog voltage to the C axis will come from pins 1-6.   
Does this sound right? Are we talking about the same thing? 

These clutches look great. Not going to be a standard fitment though and I think expensive. Do you have any supplier contacts?
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: Hood on October 15, 2018, 05:22:13 PM
Ah, yes that would probably be correct, kind of muddled up here as you started off with one servo for both spindle and C but have now moved on to two separate motors/controllers (VFD/Induction and Servo/Servo drive)

You would still need to disengage the  Servo as any motion on it would be detected by the CSMIO and it would try to correct and would throw a fault although probably not when disabled but not sure how easy that would be to do, if at all, from within Mach/CSMIO. Even if a way can be found then I don't think driving a servo motor would be the best idea for a drive even with it disabled.

Don't really have a source although I do get them every now and then, in fact just threw one out a few weeks ago, it was on a Jabso pump that came from a boat I did a refit on, it kicked about my workshop for months  and was getting in my way. Nobody wanted it due to it being 12v and most boats are 24v so in the skip it went.
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: hughes674 on October 16, 2018, 04:49:59 AM
Hi Hood

You would still need to disengage the  Servo as any motion on it would be detected by the CSMIO and it would try to correct and would throw a fault although probably not when disabled but not sure how easy that would be to do, if at all, from within Mach/CSMIO. Even if a way can be found then I don't think driving a servo motor would be the best idea for a drive even with it disabled

Totally agree some kind of clutch is needed to disengage the servo.

My main concern at the moment is the accuracy of the C axis. The manual for the Lexium 28 drives states an accuracy of 0.044 of a degree. The resolution of the encoder is factory set at 2048. So I think this is 2048 x 4 =8192PPR. So 360 degrees/8192= 0.044 degrees. If I take a 150mm max turning diameter this would give me an accuracy of 150 x 3.142 = 471mm. So 471/360= 1.31mm per degree. 1.31x0.044=0.057mm. (Think that's right) :-\
Ideally, I would like to have an accuracy of around  0.01mm.

I would need to either gear the servo motor 5/1 or change the encoder resolution to achieve this. I do need to gear the servo motor at least 2/1 for torque purposes and hoping I can adjust the encoder resolution to do the rest?

This encoder resolution can be adjusted via P1-46 up to a value of 40,000. I have tried adjusting this on the X and Z axes but got some strange results.

I'm trying to figure out why Schneider would state an accuracy of 0.044 when the parameter allows you to set a lot finer resolution possibly which would give you more accuracy. 
Have you adjusted the encoder resolution on any of your drives?

Attached a couple of manual screenshots.

Mick
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: hughes674 on October 16, 2018, 11:41:13 AM
Looking at the electromagnetic clutches and this type of thing is available off ebay.

 https://www.ebay.co.uk/itm/Genuine-John-Deere-Electromagnetic-PTO-Clutch-AM119536/183059126213?epid=1516104299&hash=item2a9f2c97c5:g:9M0AAOSwyphaedn8:rk:7:pf:0

Can't get any holding torque data but spoke to a few suppliers and they are fitted to lawnmowers with an engine size of 12hp plus. Would have to make a reducing coupler from 46mm down to 1" and change the pulley to HTD type. Any thoughts whether something like this would suitable?

Also thinking would this have to be fitted on the spindle side due to possible magnetic interference to the servo motor encoder?

Mick
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: joeaverage on October 16, 2018, 02:17:41 PM
Hi Mick,
the encoder resolution of 2048 lines/rev is the simulated encoder.

The servo encoder and the servo drive have much finer resolution that that. I think the servo encoder is 17 absolute and therefor has a potential
resolution of 170,000 counts per rev.

You could theoretically increase the simulated encoder resolution up to the same 17 bit. Given that the CSMIO closes the loop then the simulated encoder
resolution is the limiting figure. The downside is that the CSMIO has limited signaling speed, and in any event signaling over 500kHz between controller
and servo drive is DIFFICULT at best there is therefore a practical limit to the resolution beyond which the signaling speed limits the rotational speed.

The second issue is the 'zero error window' My servo has a programmable window, 4 encoder counts (out of 8000) by default where the servo drive
determines that the actual position is close enough to the commanded position that it will not try to close the error any further.  You can reduce the
zero error window however the servo will 'hunt' when its close to its commanded position, sometimes you will hear it as a buzz. I use the servo drive
to close the loop and therefore use the servo drives manufacturers programming facility to do this. In your case you will have to use the 'zero error
window' feature or its equivalent, if it has it, in the CSMIO.

My experience is that for practical purposes that a resolution of 0.18 degrees or 10.8 arc minutes is realistic even if greater resolutions are theoretically
possible. Thereafter gear reduction is the only feasible way forward. Consider a harmonic drive.

Craig
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: hughes674 on October 16, 2018, 04:04:17 PM
Hi Craig

Thanks for your response.

The encoder is 20 bit I believe. (See screenshot)

 The downside is that the CSMIO has limited signaling speed, and in any event signaling over 500kHz between controller
and servo drive is DIFFICULT at best there is therefore a practical limit to the resolution beyond which the signaling speed limits the rotational speed.

If my calculations are correct the kernel speed should not be an issue at whatever resolution considering the rpm of the C axis will not need to exceed anything over 100rpm. 

If P1-46 does adjust the encoder resolution which has a max value of 40,000.  Using this ridiculously high resolution. 40000 x 4 x 100/60 = Kernel speed of 266khz. To get the resolution I require would only need 10,240 lines/rev. So 10,240 x 4 x 100/60 = Kernel speed 68khz.
Please correct me if I'm wrong.

I don't follow you on the zero error window.

Mick

Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: hughes674 on October 30, 2018, 02:18:37 PM
Can anyone assist on this please.

Both X and Z axis all working great. Power up the following day and Z-axis servo drive faults out as before. Five dashes on the HDI and the drive locked out. Exactly the same fault codes as the previous drive. This is the second drive that I have had to replace. Luckily I haven't had to pay and have just been exchanged.

Checked my input voltage from the mains which is around 252v most of the time. The specs in the manual states a maximum voltage of 230v +-10%. I am a little concerned that my mains voltage is on the limits of what is recommended for the drive. Could this be causing the issue? Should I use a step-down transformer to reduce the input voltage to 230v?

Mick
Title: Re: Spindle/ C Axis using CSMIO/IP-A
Post by: hughes674 on November 11, 2018, 09:07:23 AM
Hi All

Long time no speak. Lol
 
Can you give me your thoughts on the schematic from the Lexium manual with regards to protecting the digital outputs Do1-Do5 against damage from inductive loads. I want to wire Do5 output to disable the drive in the event of a servo fault. I am using logic type 2 with an external power supply. My idea was to break the 24v supply that enables the drive with output Do5. The manual mentions protecting the outputs from inductive loads. Would this apply to this situation? Or can I simply wire Do5 directly with 24v?

Appreciate your thoughts on this.       

Thanks
Mick