C-Axis for lathe (construction in progress)

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

suntravel
Posts: 1967
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

C-Axis for lathe (construction in progress)

Post by suntravel »

I started to build a C-axis for my lathe.
Since my lathe is with gearbox and some lash in the gears, I decided to go with an extra drive belted directly on the spindle an be engaged with a clutch.

Setting up C axis in the Wizard is the easy part, but then you can jog the C-Axis while the spindle is running, or turn on the spindle while the clutch is engaged. Would make some funny smoke :mrgreen:

So till now the way I build some safety for this is quite simple ( I am not the best PLC programmer :D )

If P#93=1 C Axis will be displayed on the DRO as rotary axis
If P#93=512 C Axis will not be displayed on the DRO

If P#218 is set to 3 you can only jog X and Z with the WMPG
If P#218 is set to 7 you can jog C, X and Z with the WMPG (C as 4th axis)

I use OUTPUT8 to switch the clutch with M68 / M88

M52 will turn C-axis ON

Code: Select all

;------------------------------------------------------------------------------
; Filename: mfunc52.mac - Turn C-Axis on
; M52 macro
; Description: User Customizable Macro
; Notes: C-axis must be configured in the Wizard 

; Requires: custom PLC StandardSpindleStage
; ;Inhibit Spindle when P#93=1 C-axis On - UWE
; IF !SpindleEnableOut_M || SV_MACHINE_PARAMETER_93 == 1 THEN (DoSpindleStop)

;------------------------------------------------------------------------------

IF #50010                        ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching

M5
G4 P1

#103=1
#104=7
G10 P1093 R[#103]
G10 P1218 R[#104]
; Output8 for Clutch ON
M68

N100                             
M53 will turn C axis OFF

Code: Select all

;------------------------------------------------------------------------------
; Filename: mfunc52.mac - Turn C-Axis off
; M53 macro
; Description: User Customizable Macro
; Notes: C-axis must be configured in the Wizard
; Requires: 
;------------------------------------------------------------------------------

IF #50010                        ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching

#101=512
#102=2
G10 P1093 R[#101]
G10 P1218 R[#102]
; Output8 for Clutch OFF
M88


N100 
On the VCP is use M55 to switch ON and OFF

Code: Select all

;------------------------------------------------------------------------------
; Filename: mfunc55.mac - To run from VCP AUX 10 key, set p197 = 5511
; M55 macro
; Description: Turns C-Axis ON/OFF
; Notes:
; Requires: Machine home must be set prior to use.

;------------------------------------------------------------------------------

IF #50010                        ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching

N100                             ;Insert your code between N100 and N1000  

#105=#9093
IF #105==512 THEN M52 ELSE M53


N1000 
And some edit in the PLC to inhibit spindle ON if C-axis is on

Code: Select all

;==============================================================================
                                StandardSpindleStage
;==============================================================================
IF (SpindleEnableOut_M || SpinStart_M ) && !SpinStop_M && ChuckOpenCloseComplete_M
  THEN SET SpindleEnableOut_M
; inhibit spindle with C-axis ON - UWE  
IF !((SpindleEnableOut_M || SpinStart_M ) && !SpinStop_M) THEN RST SpindleEnableOut_M
IF SpindleEnableOut_M && !M37 && SV_MACHINE_PARAMETER_93 == 512 && !(OUTPUT8) THEN (VFDEnable_O)
IF  SpindleEnableOut_M && !M37 && !SpindleDirectionOut_M && SpindleBrakeTimer THEN (SpinFWD)
IF  SpindleEnableOut_M && !M37 && SpindleDirectionOut_M && SpindleBrakeTimer THEN (SpinREV), (VFDDirection_O)
IF !SpindleEnableOut_M || SV_MACHINE_PARAMETER_93 == 1 THEN (DoSpindleStop)
Not the most elegant solution, but it works :mrgreen:

Now I must find a clutch that will do the job and figure out if I can use the spindle encoder for setting C Home....

Uwe
Attachments
C02.jpg
C01.jpg
Last edited by suntravel on Tue Jul 05, 2022 8:25 am, edited 1 time in total.
suntravel
Posts: 1967
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: C-Axis for lathe

Post by suntravel »

I ordered a build to my specs clutch from Mayr, but must wait 5 weeks now.

Was not really cheap also, nearly 400bucks :mrgreen:

Uwe
suntravel
Posts: 1967
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: C-Axis for lathe

Post by suntravel »

Wiring for the C-Axis clutch...

Uwe
Attachments
CAxisClutch.jpg
cnckeith
Posts: 7164
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: C-Axis for lathe

Post by cnckeith »

nice thanks for sharing
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
suntravel
Posts: 1967
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: C-Axis for lathe

Post by suntravel »

Wiring done and did some testing to fine tune the M52 macro for a fast and save switch to C-Axis mode...

Uwe
Attachments
20220701_194950.jpg
20220701_194940.jpg
20220701_194759.jpg
20220701_194751.jpg
suntravel
Posts: 1967
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: C-Axis for lathe

Post by suntravel »

Now I get a message why the spindle can not start when C-Axis is turned on.

My first DIY PLC message :mrgreen:

Uwe
Attachments
No Spindle Start MSG.jpg
suntravel
Posts: 1967
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: C-Axis for lathe

Post by suntravel »

Slowly I am getting a clue of how this PLC works ;)

Had a glitch when a program runs and commands M3 after C-Axis is active, it shows the message, but PLC thought it can go on :D

Now it stops the running program with the error message.

Kind of tricky to build save running functions....

Uwe
suntravel
Posts: 1967
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: C-Axis for lathe

Post by suntravel »

Now I figured out how to set C home to the zero index pulse from spindle encoder.
G91 is not part of CNC12 lathe, so I used the current position for incremental moves.

Would be better to have the C axis continuous moving to the zero index, but could not figure out how to do this.

Maybe I must find a way to trigger an input with the encoder zero index?
Than I could use M105 /C P#
Any ideas how to do this?

But for now it works to home C allways to the same position.

Code: Select all

;------------------------------------------------------------------------------
; Filename: mfunc57.mac 
; M57 macro
; Description: Set C-Axis Home to Zero Index from Spindle Encoder
; Notes: C-Axis must be turned on
; M200 only for testing, remove later
; #5043 current position C 
; #23405 index pulse from spindle encoder
;------------------------------------------------------------------------------

IF #50010                        ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching

G98
N100
#104=#5043+0.1
G0 C[#104] 
N200
IF #23405==1 THEN GOTO 300 ELSE GOTO 100
N300
#105=#23405
M200"Spindle Pos=%f"#105
#102=#5043
M26 /C
#101=#5043
M200"C set from%f to 0 CPos=%f"#102#101


Uwe
suntravel
Posts: 1967
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: C-Axis for lathe

Post by suntravel »

I got the 5:1 gearbox today, and made also a quick drawing, how the pieces are coming together and could be mounted on the spindle stock.

Easy Acorn C-Axis bolt on :mrgreen:

Uwe
Attachments
20220704_202230.jpg
20220704_201944.jpg
20220704_201937.jpg
20220704_201906.jpg
20220704_201846.jpg
20220704_201842.jpg
20220704_201838.jpg
20220704_201833.jpg
Spartan117
Posts: 101
Joined: Mon Apr 11, 2022 3:37 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: C-Axis for lathe

Post by Spartan117 »

If you are not careful, the lathe will tip over from all the attachments :D

I wish i could give you some tips for your PLC-problems... But hey, even the centroid-pros here seem to be stumped for that kind of problems, so how should i be able to help you :D It's a pity, that PLC-thing could be such a powerful tool with a little bit of support for certain questions.
Post Reply