It differed from the ones on X and Y.
In the meantime I have bought a Celtic 14 lathe. so I need to re-organize the garage a bit so it has a place to part

Moderator: cnckeith
I have absolute encoders. So now it is just based on that but i guess you can also just go to the closes index on the scale from absolute encoder home and use that as your zero. I guess that would be more accurate. Somthing I'll look into when I mount my Z and Y scales. Those are a bit of a pain to mount
Thanks man, so far I only did a little bit of cnc on the old fanuc controller. But the cnc'ing that i did was hardmilling a steel vice ( it was too longLeo Voisine wrote: ↑Mon Dec 30, 2024 10:07 am WOW so cool.
I remember that Mycenter from my days working at Winchester in the early 90's I saw it at the Chicago tool show and I wanted to buy it, but we ended up with a used Matsuura Tiger instead. The tiger had the Fanuc 0M controller. I was just learning Macro B at the time and the upgrade was $2000 in the early 90's
That Mycenter is a rock solid machine.
What a super cool project.
Code: Select all
#9500 = current caroussel tool position - this is custom made by spikee :)
; #9501 = total number of tool positions on the carouse (mine is 16)
Code: Select all
;==============================================================================
; Swingarm Tool Change Program Starts
;==============================================================================
N700
#101 = <SV_POSITIONING_MODE> ;Save Positioning Mode
M109 /1/2 ;Disable Overrides
M5 ;Disable Spindle
M9 ;Disable Coolant
;M107 ;Send PLC Tool Number --> no idea what this does so i commented it lol
;#4120 = requested T(ool) number in G-code; I.e. M6 T6 ; this value = 6
;#4203 = tool in spindle
IF #4120 = 4203 THEN GOTO 900; ; if requested tool is the same as the current tool... than terminate
IF #4120 != #9500 THEN GOTO N701 ELSE GOTO N702;if requested tool != carroussel position ; have to turn the caroussel
;==============================================================================
; Rotate caroussel to correct position
;==============================================================================
N701
;#4120 = requested T(ool) number in G-code; I.e. M6 T6 ; this value = 6
;#9500 = current caroussel tool position
#9501 = total number of tool positions on the carousel
#100 = [[#4120 - #9500] MOD #9501] (Calculate forward steps)
IF [#100 LT 0] THEN #100 = [#100 + #9501]
#101 = [#9501 - #100] (Calculate backward steps)
IF [#100 LE #101] THEN ;(Check if forward is closer or equal)
WHILE [#9500 NE #4120] DO 1 ;while current caroussel tool pos != requested tool
M50 ;Carousel Index +
END 1
ELSE ;(Backward is closer)
WHILE [#9500 NE #4120] DO 1 ;while current caroussel tool pos != requested tool
M50 ;Carousel Index -
END 1
ENDIF
GOTO 701