Machsupport Forum

Third party software and hardware support forums. => CS-Lab => Topic started by: gallenat0r on February 19, 2014, 03:45:09 PM

Title: Servo drive as main spindle
Post by: gallenat0r on February 19, 2014, 03:45:09 PM
Hello,

I'm trying to get a servo motor to be the main spindle on my denford triac retrofit.
The driver accepts step/dir as input so I've assigned it to port 5 on my CSMIO/IP-S under spindle -> special functions -> spindle axis. (attachment spindle-setup-csmio.jpg)

Input pins on the driver are:
PV (I guess enable?) connected to output5/pin 18
PP+ (pulse) connected to step5+/pin 12
PP- (pulse) connected to step5-/pin 25
PD+ (direction) connected to dir5+/pin 11
PD- (direction) connected to dir5-/pin 24

Where do I set so that output 5 goes high when the spindle is started (M3/M4)?

Regards,
Jens
Title: Re: Servo drive as main spindle
Post by: Hood on February 19, 2014, 04:43:51 PM
You dont set anything other than you need to connect the step/dir to the channel you are using. Dont have the manual handy so not sure if  the pins you mentioned above are for channel 5 but if they are it will work.
You will also however need to enable the spindle in Ports and Pins and also in the above screenshot you will need to set the pulses per rev (steps per rev). Your accel is set above to 10, that will mean it talkes 10s to get to max RPM
You will also probably need to set the Max RPM in Config menu Spindle Pulleys.

If that doesnt get you working shout back and I will dig up the manual.

Hood
Title: Re: Servo drive as main spindle
Post by: gallenat0r on February 20, 2014, 01:39:30 PM
The settings have been changed but it still won't start.  ???

Attached is also the controller manual in chinese/engrish if that makes any sense to you.

I can though get the motor to spin using the PN045 (rpm) and PN046 (accel) along with FN002 jog commands, so something is working :)

Anyway thanks for taking the time!

Regards,
Jens
Title: Re: Servo drive as main spindle
Post by: Hood on February 21, 2014, 03:00:13 AM
You dont need Port and Pin numbers set for the spindle in Motor tuning, so I would set them to Zero. Dont think that will be the problem but definitely best to have them that way.
The Jog you mention would seem to be internal in the drive, if that is what you are meaning then it will jog with that method no matter how you have Mach set up, so its not really a good test. Check you have the parameters set correctly for position mode, just had a quick look and PN-00 seems to need set to 2 and PN-01 to 0

I will try and remember to look at the wee lathes setup to double check there is not something needed in Mach.
Hood
Title: Re: Servo drive as main spindle
Post by: Hood on February 21, 2014, 04:32:47 AM
Only other thing I can think of is you do need to have spindle enabled on the Spindle Setup page of Ports and Pns.

See screenshot.

Hood
Title: Re: Servo drive as main spindle
Post by: gallenat0r on February 21, 2014, 06:31:28 AM
I got it working!! (sort of)

The motor is "enabled" by the SigIn 1 pin. Its enabled by just connecting it to either gnd or 5v though.
Another thing is when in M3 and i stop it with M5 it stops the motor and then reverses for 3-4 revelations before stopping totally.
That doesn't happen with M4 but it takes a bit longer for it to stop though.

Regards,
Jens
Title: Re: Servo drive as main spindle
Post by: Hood on February 21, 2014, 06:55:17 AM
It should not reverse at all, sounds like it may be a tuning issue in your drive.
Only other thing it could possibly be is that you have it set to stop at a set position (In CSMIO plugin) but even if you he that it should not rotate more than a revolution.

Hood
Title: Re: Servo drive as main spindle
Post by: gallenat0r on February 21, 2014, 08:37:36 AM
After I enabled the Align at Stop and then disabled it again it now stops correctly with M5.
It doesn't seem that mach3 motor tuning affects this at all. Even disabling the spindle in motor outputs has no effect (still works).

Thanks for the help Hood!

Regards,
Jens
Title: Re: Servo drive as main spindle
Post by: Hood on February 21, 2014, 10:28:08 AM
No motor tuning in Mach has no effect on the spindle, I was actually meaning the tuning in the servo drive.
Good you got it working :)
Hood
Title: Re: Servo drive as main spindle
Post by: KMX on March 23, 2014, 03:28:38 PM
Hello!

Do I need a threading module if I use servo motor for spindle that in driven with STEP/DIR pulses from CSMIO-IP/S controller?

Regards, Denis
Title: Re: Servo drive as main spindle
Post by: gallenat0r on March 23, 2014, 03:33:12 PM
I guess not unless you want to have (need) the feed back in mach.
The controller I have for my servo lets me feed the encoder output back to my pc.
For the pc to understand this signal I'd need the encoder module.

Regards,
Jens
Title: Re: Servo drive as main spindle
Post by: Hood on March 23, 2014, 04:00:01 PM
If it is a lathe and you want to do single point threading or a mill or lathe and you want Rigid Tapping then you would need the Enc module.
Hood
Title: Re: Servo drive as main spindle
Post by: KMX on April 01, 2014, 10:23:03 AM
Hello!

I would like to use spindle on my lathe also as positioning axis, so my plan is to use a four pole relay to switch from channel 4 to channel 5 (STEP/DIR signals). Channel 4 would work as spindle axis, channel 5 would work as positioning axis.

So, the question; Can I do any harm tu CSMIO/IP controller when switching from one channel to another?

Regards, Denis
Title: Re: Servo drive as main spindle
Post by: Hood on April 03, 2014, 07:26:05 AM
I am not sure if the CSMIO supports SwapAxis(), if it does then you can swap on the fly between a spindle and an axis.
Hood
Title: Re: Servo drive as main spindle
Post by: KMX on April 05, 2014, 01:36:50 PM
Hello!

Thanks Hood. Which number is assigned to spindle? I know that positioning axes have numbers from 0 to 5.

Regards, Denis
Title: Re: Servo drive as main spindle
Post by: Hood on April 05, 2014, 01:44:52 PM
6 is spindle in relation to SwapAxis(), so SwapAxis (6,5) would swap Spindle and C axis if it is supported.
Hood
Title: Re: SwapAxis
Post by: rcaffin on June 28, 2014, 09:40:45 PM
Hi Hood and Terry and all

I must be blind or stupid, or something. No worries.
I know I have read about 'swapaxis' - somewhere, but for the life of me I cannot find it any more in any of my manuals. Is there a good primary reference to this, or is it a miasma of allusions plus a small PCB?

I have to replace my spindle as the one I have is dying (has died), and I am wondering about putting a full servo drive in. Yes, the spindle motor does have a 512 line  encoder on it, even though all that has been used in the past was the Index pulse.

Mind you, I am happily single-point thread milling down to M2 and up to M24 with and ordinary spindle drive, but ... you know ...

Oh - yes. Mach3 and ESS.

Cheers
Roger
Title: Re: Servo drive as main spindle
Post by: Hood on July 01, 2014, 09:02:04 AM
Not really sure what you are wanting SwapAxis() for as threading does not even require spindle speed control from Mach.
If you are wanting to do rigid tapping then you will require it as the SmoothStepper does not natively support rigid tapping, unless it has done so recently.


Anyway regards SwapAxis()

The syntax is

 SwapAxis(3,6)   

That is assuming you are swapping A and Spindle (x= 0, y=1 etc to Spindle =6)


To reset you just call
ResetAxisSwap()

Hood
Title: Re: Servo drive as main spindle
Post by: rcaffin on July 01, 2014, 06:16:30 PM
Thanks Hood.

I do good single point threading on the lathe already, so that's under control.
I do a lot of thread milling on the mill, so that is under control as well.
But ...
I have to replace the spindle drive on my mill (the old one has died) and i was wondering about putting a DG4S16032 drive in and having full servo control of the spindle, and got to wondering - and searching. The number of options exceeds my budget ...

Cheers
Roger
Title: Re: Servo drive as main spindle
Post by: Hood on July 02, 2014, 12:58:16 PM
Having a servo on the spindle does not require that you use SwapAxis()
The only time it would require that is if you wished to sync your spindle exactly to another axis such as for Rigid Tapping.
As said earlier even rigid tapping is possible with the CSMIO without using SwapAxis() but I think the ESS still requires that.
Hood