Page 9 of 9

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

Posted: Thu Jan 02, 2020 8:08 am
by hebs
Post deleted and new thread started (didn’t want to hijack this thread).

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

Posted: Tue Mar 03, 2020 10:52 am
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.

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

Posted: Tue Mar 03, 2020 11:03 am
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

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

Posted: Wed Mar 04, 2020 8:10 am
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

atc turret axis driven fail

Posted: Sun Mar 08, 2020 8:43 am
by luchito1973
report_3403DE6E9763-0724192320_2020-03-07_09-19-14.zip
(281.76 KiB) Downloaded 147 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

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

Posted: Fri Mar 13, 2020 5:12 pm
by martyscncgarage
Appears this issue has been resolved. See this POST from Allin1Chris: viewtopic.php?f=60&t=4133&p=33178#p33275