Page 1 of 1

**Resolved** Spindle connection circuit

Posted: Fri May 11, 2012 7:07 pm
by babinda01
Hi Guys
I have a small problem........I am trying to interface a GPIO4 board to a spindle drive that can only accept a +-10v signal - it can't be configured to use 0-10v and cw or ccw signals.
Does anyone know how I can get this drive to work?

Regards
Andrew

Re: Spindle connection circuit

Posted: Mon May 14, 2012 3:23 pm
by cncsnw
The simplest option is to install an external DPDT relay to flip the polarity of the standard 12-bit analog signal between the GPIO4D and your spindle drive.

A more complex, but slightly cleaner option, if your machine only uses three (or fewer) axes, is to use the spare axis analog output as the spindle speed control. This requires custom PLC programming.

In rough outline:

Code: Select all

;-- Definitions:
Axis_4_Enable  IS OUT20
Axis4AnalogOut  IS OUT289
;...
FifteenBitSpeed_W  IS W8
AnalogOut_W  IS W9

;-- added code at the end of the spindle analog section (which calculates TwelveBitSpeed_W)

; Also generate a bipolar 16-bit output and send it to the axis 4 analog out
IF True THEN FifteenBitSpeed_W = TwelveBitSpeed_W * 8
IF !SpindleDirection_M THEN AnalogOut_W = 32768 + FifteenBitSpeed_W
IF SpindleDirection_M THEN AnalogOut_W = 32768 - FifteenBitSpeed_W
IF SpindleEnableOut THEN (Axis_4_Enable)
SpindleDirection_M is a memory bit which takes the place of SpindleDirectionOut, since there is no need to assign an output relay for direction select.

Re: Spindle connection circuit

Posted: Tue May 15, 2012 4:06 am
by babinda01
Hi
Thanks for your help.
I ended up feeding the spindle analog signal into the spindle direction relay common connection, and then I took the output NO and NC into an opamp which gave me a +-10V signal - worked a treat.
Thanks again.
Andrew