Hello Guest it is December 16, 2019, 02:14:45 AM

Author Topic: Spindle DC Servo Indexing  (Read 1638 times)

0 Members and 1 Guest are viewing this topic.

Spindle DC Servo Indexing
« on: April 20, 2016, 04:07:38 PM »
I'm considering changing over the spindle on my BP 412 over to a fairly large DC servo.  If I set the spindle to run via step and direction, is it possible to write a toolchange macro to index the spindle orientation for the toolchanger?  In other words, is the spindle acccessible like any other axis from a macro?  The DC servo I'm thinking about using has an index output as well as the normal incremental outputs.  But since the spindle has a serpentine-type belt drive there is always the possibility of slipping so I assume an index proximity sensor is required on the spindle itself, then count X steps past the index to orient the spindle for a toolchange.

Thanks,
Bob
Re: Spindle DC Servo Indexing
« Reply #1 on: April 21, 2016, 09:57:06 PM »
I dont believable servo motors work like that (with steps), in general.
A stepper motor is part of an Open Loop system, you tell the stepper motor to "move" x-amount of steps and then it will stop.
A servo motor is part of a Closed Loop system, you tell the servo to move (and continues to spin) and an encoder reads its movement and sends that info to "something" to work with the info.

More then likely it would work simulare to your last sentence.
When the M6 command (toolchange) is read, the spindle will stop (where ever it wants to stop), then it will slowly spin in-till an encoder (or proxy switch) reads/finds correct point/orientation, then stop again and do a tool change.

Googling Mach3 ATC might help ya out (ATC = Automatic Tool Changer).

_
~ What was once an Opinion, became a Fact, to be later proven Wrong ~

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: Spindle DC Servo Indexing
« Reply #2 on: April 22, 2016, 01:40:07 AM »
If you are using the parallel port then you could use SwapAxis() to temporarily change the Spindle to an A Axis for the tool change. You would then Home the A Axis to the sensor then command a move of the amount required to get into position. Once complete you would swap the A Axis back to a spindle.

If using an external controller then SwapAxis()  may not be available as only a few support it.

Hood
Re: Spindle DC Servo Indexing
« Reply #3 on: April 22, 2016, 10:35:47 AM »
Thanks Hood, that is exactly what I was looking for.  I am using the parallel port so this should work.  In my toolchange script I will add the call to SwapAxis() and when finished ResetSwapAxis().

The machine has a 7.5hp Fanuc AC spindle motor.  I've had my share of fun with VFD's on other machines dealing with RFI/EMI issues so on this one I am going to now convert it over to a 4.35hp DC servo I am going to build out of a treadmill motor with an added encoder.  Losing a bit of horsepower but 4.35 hp is way more than I typically need.

I converted my lathe over to a DC treadmill motor and have been very pleased. 

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: Spindle DC Servo Indexing
« Reply #4 on: April 22, 2016, 10:40:54 AM »
I think it may be

ResetAxisSwap()

Certainly is on the SmoothStepper.

Hood
Re: Spindle DC Servo Indexing
« Reply #5 on: April 22, 2016, 02:34:40 PM »
Correct, just a little dyslexic on method names.

Thinking over this a bit I assume I'll have to add a spindle index board (which I already have leftover from a previous project.)  Not sure how the Fanuc spindle drive determines the index because there's a v-belt driven encoder (which obviously could slip) and no proximity switch that I'm aware of.  So the general idea is call SwapAxis, which will be followed by a G28, then move the spindle X steps to get oriented, cycle the toolchanger, yada yada yada, then once toolchange is finished call ResetAxisSwap.

Once the axis is swapped back I don't *think* there will be a problem with the faux axis constantly hitting its home switch as the spindle is running...?

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: Spindle DC Servo Indexing
« Reply #6 on: April 22, 2016, 02:56:55 PM »
Yes, would be along the lines of SwapAxis(3,6) which would swap A axis and Spindle then home, it would be g28.1 (reference axis) I would think rather than G28 (move home position) but personally, as it will be in a macro,  I would go for DoOemButton(1025) which would home the A Axis.

Not sure what Index board you are talking about but with the parallel port the pulse has to be fairly wide so if it is similar to the Index on an encoder then it will be too short. A simple opto switch and a slotted disc would work or  a prox switch would also work.
Regarding the switch you just set it as a Home switch for the A Axis and Mach will not care whether it  is constantly triggered or not, it will only look for it whilst homing.

Hood
Re: Spindle DC Servo Indexing
« Reply #7 on: April 22, 2016, 03:11:59 PM »
Gotcha.  Thanks Hood!