ATC Macro / PLC Help please <success!>

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

hebs
Posts: 64
Joined: Wed Sep 18, 2019 4:46 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: A81087B53034-0710192235
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: ATC Macro / PLC Help please <success!>

Post by hebs »

Post deleted and new thread started (didn’t want to hijack this thread).
luchito1973
Posts: 14
Joined: Tue Feb 12, 2019 2:37 pm
Acorn CNC Controller: Yes
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: ATC Macro / PLC Help please <success!>

Post by luchito1973 »

Centroid_Tech wrote: Wed Jun 13, 2018 2:51 pm Unfortunately, there isn't. The only way around this issue that I can think of is the way that you have already determined using the M0.
hello, how i can resolve this problem.
I need controlling the turret without stops.
you have some idea?
Thanks in advanced.
luis Vega.
martyscncgarage
Posts: 9914
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

Re: ATC Macro / PLC Help please <success!>

Post by martyscncgarage »

luchito1973 wrote: Tue Mar 03, 2020 10:52 am
Centroid_Tech wrote: Wed Jun 13, 2018 2:51 pm Unfortunately, there isn't. The only way around this issue that I can think of is the way that you have already determined using the M0.
hello, how i can resolve this problem.
I need controlling the turret without stops.
you have some idea?
Thanks in advanced.
luis Vega.
Luis, without providing more information about your machine, your turret, how it operates, we won't be able to give you much advice.
Post pictures, of the turret, is it something you made or something that was made by the manufacturer of the lathe, how does it work etc
Start a NEW thread for yourself. From the main Acorn page, click on NEW TOPIC

Marty
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
luchito1973
Posts: 14
Joined: Tue Feb 12, 2019 2:37 pm
Acorn CNC Controller: Yes
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: ATC Macro / PLC Help please <success!>

Post by luchito1973 »

And here is the code we are using. Running this via MDI always 'resets' the distance to go to 0 for the A Axis. Running it in a program, does not, so the calcs do not remain consistent. M0 in the code, or in the macro, solves the issue but the machine will wait for cycle start on tool change.


;------------------------------------------------------------------------------
; Filename: cnctch.mac
; Description: Axis driven tool change macro for lathe
; Notes: Turns/rev must be configured 1 = 1 turret position change
; Turret is on 3rd axis, positions are in machine position.
; Requires: Machine home must be set prior to use.
;
;#100 = 8 ;Number turret positions
;#101 = ;Calculated position to move to when requested position < current position.
;#4120 = requested tool
;#20601-#20604 = Counts per unit for axes1-4
;#5021-#5024 is the current machine position for axes 1(#5021) through 4(#5024)
;------------------------------------------------------------------------------

;follow with a block that skips if graphing or searching
IF #50001 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching

;If not searching or graphing, check to make sure the turret is not already
;at the requested position. If it is, skip the macro
IF [ABS[#4120-#5023] < .002] THEN GOTO 1000

; Notes: Turns/rev must be configured 1 = 1 turret position change
; Turret is on 3rd axis, positions are in machine position.
; Requires: Machine home must be set prior to use.
;
;#101 = ;Calculated position to move to when requested position < current position
;#20601-#20604 = Counts per unit for axes1-4
;#5021-#5024 is the current machine position for axes 1(#5021) through 4(#5024)
;#4120 = requested turret position from g code

IF #5023 > #4120 THEN #101 = [6 + #4120] ELSE #101 = #4120

G53 A[#101 + 0.5]
G53 A[#101 - 0.5]
M0
M26 /A L[#4120*#20603]

N1000 ;Macro finished
luchito1973
Posts: 14
Joined: Tue Feb 12, 2019 2:37 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

atc turret axis driven fail

Post by luchito1973 »

report_3403DE6E9763-0724192320_2020-03-07_09-19-14.zip
(281.76 KiB) Downloaded 144 times
Hi
Can anyone tell me if a solution to the "distance to go" issue as described in this thread and above has been found, other than to add an M0 in the code ?
I'm trying to get a home built ATC working with this macro and found this thread after hitting the exact same problem , everything works fine with tool commands from the MDI but when i run intercon generated code with multiple tools it falls over.
This is the code.
Thank you very much if anyone can help me.
;------------------------------------------------------------------------------
; Filename: cnctch.mac
; Description: Axis driven tool change macro for Lathe
; Notes: Turns/rev must be configured 1 = 1 turret position change
; Turret is on 4th axis, positions are in machine position.
; Requires: Machine home must be set prior to use.

;#100 = 6 Number turret positions
;#101 = Calculated position to move to when requested position < current position.
;#4120 = requested tool
;#20601-#20604 = Counts per unit for axes1-4
;#5021-#5024 is the current machine position for axes 1(#5021) through 4(#5024)
;------------------------------------------------------------------------------
;follow with a block that skips if graphing or searching
IF #50001 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching

;If not searching or graphing, check to make sure the turret is not already
;at the requested position. If it is, skip the macro
IF [ABS[#4120-#5024] < .002] THEN GOTO 1000

; Notes: Turns/rev must be configured 1 = 1 turret position change
; Turret is on 4th axis, positions are in machine position.
; Requires: Machine home must be set prior to use.

;#101 = ;Calculated position to move to when requested position < current position
;#20601-#20604 = Counts per unit for axes1-4
;#5021-#5024 is the current machine position for axes 1(#5021) through 4(#5024)
;#4120 = requested turret position from g code

IF #5024 > #4120 THEN #101 = [6 + #4120] ELSE #101 = #4120


G53 A[#101 + 0.2]
G53 A[#101 - 0.0]

M26 /A L[#4120*#20604]


M0 ; if I remove M0 it only works in MIDI.

N1000 ;Macro finished
martyscncgarage
Posts: 9914
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

Re: ATC Macro / PLC Help please <success!>

Post by martyscncgarage »

Appears this issue has been resolved. See this POST from Allin1Chris: viewtopic.php?f=60&t=4133&p=33178#p33275
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
Post Reply