ATC Macro / PLC Help please <success!>

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Chaz
Posts: 392
Joined: Thu Feb 08, 2018 7:57 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

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

Post by Chaz »

Centroid_Tech wrote: Mon Jun 11, 2018 10:11 am Please post a current report from your system. You should not need to "unwind" a turret axis. Performing a tool change in MDI should be exactly the same as when running it from a program. Please also provide a copy of the program that you are running.
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 = [8 + #4120] ELSE #101 = #4120

G53 A[#101 + 0.5]
G53 A[#101 - 0.5]

M26 /A L[#4120*#20603]

N1000 ;Macro finished
Centroid_Tech
Posts: 286
Joined: Thu Mar 18, 2010 2:24 pm

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

Post by Centroid_Tech »

Our software department is looking into this. In the meantime, it appears that you have found a workaround by adding an M0.
When requesting support, please ALWAYS post a current report. Find out how to take a report from your Acorn, CNC11 or CNC10 system here: https://www.youtube.com/watch?v=Ecvg0VJp1oQ.

If your question is PLC, Macro or program related, please also post a copy of the program or macro as well.

Without the above information we may not be able to help and/or reply until the required information is posted..
Chaz
Posts: 392
Joined: Thu Feb 08, 2018 7:57 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

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

Post by Chaz »

Centroid_Tech wrote: Wed Jun 13, 2018 12:34 pm Our software department is looking into this. In the meantime, it appears that you have found a workaround by adding an M0.
Thanks, indeed although it would be good to get it working properly. Is there any code or similar that we can use to emulate it thinking its in MDI mode or something where we can do 2 logic streams? One in MDI mode and 1 not?

For example,

IF IN MDI DO X, ELSE DO Y?

Thanks
Centroid_Tech
Posts: 286
Joined: Thu Mar 18, 2010 2:24 pm

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

Post by Centroid_Tech »

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.
When requesting support, please ALWAYS post a current report. Find out how to take a report from your Acorn, CNC11 or CNC10 system here: https://www.youtube.com/watch?v=Ecvg0VJp1oQ.

If your question is PLC, Macro or program related, please also post a copy of the program or macro as well.

Without the above information we may not be able to help and/or reply until the required information is posted..
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 »

Chaz & QMC Graham,
How are your latest tool change macros getting along?
I am starting to venture into this territory with an EMCOTURN 140 lathe I am working on.
Ultimately, I am hoping I can make do with the 8 inputs that ACORN has in order to utilize the gray code logic to ensure that the turret has rotated and seated in proper turret pocket.

The language used in the Macro is new to me. I've not had to do this before and am trying to learn and need to learn, but need to understand how it works before I can do anything with it.

It is beneficial for me to start a new thread so others can follow along, because there are many others in similar situations, and hopefully we can all learn. First controlling the turret as an axis. and then adding the logic to the PLC for the "gray logic".

Your basic turret control with driving it as an axis is a good basic starting point.
Currently I have the turret on axis 4.

Here is a brief video of the turret turning as a rotary axis, only to prove that I have the "gearing" correct and the pawl is seating in its pocket

https://youtu.be/1iafff9AVFA
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
QMC Graham
Posts: 15
Joined: Tue Jan 30, 2018 3:08 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38D269531FCE-0118180555
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: London uk

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

Post by QMC Graham »

Hi Marty,
Looking forward to the turret series.
As far as myself and chaz are in relation to the macro, we are all working apart from the resetting of the "distance to go".
Which is only an issue when running a program.
No issue in "mdi"

I'm making programs and running them fine, I've just put the "M0" command in the macro that chaz has published above after the "M26" command.
It just means after every tool change I have to press "cycle start"
Small price to pay at the moment.
But does allow me to actually run programs using more than 2 tools.
(I'm sure you have read this thread which explains why only 2 tools where able to be used)

The thing with my turret and chaz's turret is we have no logic and no switches or switch of any kind.
So we are just using the macro with calculated moves forward and reverse.

When I brought my machine all the gray scale logic components had been removed, so I've got a purely mechanical / macro driven turret.
It works.

Just posted a video of the Emco lathes first Rigid tap, using three tools. Programmed with Intercon,

https://youtu.be/kj5_By6IwIM
Chaz
Posts: 392
Joined: Thu Feb 08, 2018 7:57 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

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

Post by Chaz »

Centroid_Tech wrote: Wed Jun 13, 2018 12:34 pm Our software department is looking into this. In the meantime, it appears that you have found a workaround by adding an M0.
Hi, any update on this from your software team please?

Thanks
osrix25
Posts: 15
Joined: Sun Sep 30, 2018 3:40 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

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

Post by osrix25 »

Hey Chaz and Graham, finally ive made it to this stage! its been a long journey lol :)
I think im using a similar atc to you guys, boxford 125 - no sensors just an axis and pawl to back up onto.
Is this macro complete? I dont understand most of the parameters yet.

Ive yet to learn where to put this yet, its my next job, I just wanted to ask first if this is working as is or if i need to add anything for when I do ?
Chaz
Posts: 392
Joined: Thu Feb 08, 2018 7:57 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

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

Post by Chaz »

osrix25 wrote: Mon Jan 28, 2019 9:13 pm Hey Chaz and Graham, finally ive made it to this stage! its been a long journey lol :)
I think im using a similar atc to you guys, boxford 125 - no sensors just an axis and pawl to back up onto.
Is this macro complete? I dont understand most of the parameters yet.

Ive yet to learn where to put this yet, its my next job, I just wanted to ask first if this is working as is or if i need to add anything for when I do ?
Hi, it does work, but its clunky and you need to be sure to switch your machine off when the turret is in position 8 etc so that the maths works when you need to restart it etc.
osrix25
Posts: 15
Joined: Sun Sep 30, 2018 3:40 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

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

Post by osrix25 »

Chaz wrote: Tue Jan 29, 2019 3:30 am
osrix25 wrote: Mon Jan 28, 2019 9:13 pm Hey Chaz and Graham, finally ive made it to this stage! its been a long journey lol :)
I think im using a similar atc to you guys, boxford 125 - no sensors just an axis and pawl to back up onto.
Is this macro complete? I dont understand most of the parameters yet.

Ive yet to learn where to put this yet, its my next job, I just wanted to ask first if this is working as is or if i need to add anything for when I do ?
Hi, it does work, but its clunky and you need to be sure to switch your machine off when the turret is in position 8 etc so that the maths works when you need to restart it etc.
Thanks Chaz and thanks for doing the hard work, clunky or not if it works it works! there is a note in the code that makes me think ive another step other than adding this into the plc, "Turns/rev must be configured 1 = 1 turret position change" . I assume I need another code section to add the 3rd axis too? Maybe i'll read back through the thread and ask questions after eh!
Post Reply