Atc spins endlessly after reboot. <resolved>

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
Greg
Posts: 24
Joined: Wed Feb 03, 2021 11:12 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 spins endlessly after reboot. <resolved>

Post by Greg »

I just built a 10 tool carousel atc for my small milling machine. I am just starting to get this setup and I ran into a hiccup I don't know how to solve. Everything seems to function as expected until I restart the machine and the carousel just spins endlessly. I have to error out and go to (ATC Init) every time I restart cnc12. I previously had swissis probe app running a tilting rack atc and I am not sure if that made some changes to something. I have made 1 change to the PLC to spin a gecko G216 for indexing.
ATC_ENABLE under definitions and
IF ATC_CarouselForward THEN SET ATC_ENABLE
IF ATC_CarouselReverse THEN SET ATC_ENABLE
IF !ATC_CarouselReverse && !ATC_CarouselForward THEN RST ATC_ENABLE


Any help is appreciated.


Attachments
report_0CB2B7D56BE0-1117204005_2023-12-03_13-24-07.zip
(1.17 MiB) Downloaded 15 times
Gary Campbell
Posts: 2190
Joined: Sat Nov 18, 2017 2:32 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: Yes
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: Acorn 238
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Bergland, MI, USA
Contact:

Re: Atc spins endlessly after reboot.

Post by Gary Campbell »

Does your carousel have a homing switch defined? It sounds like it is "driving by" the sensor
GCnC Control
CNC Control & Retrofits
https://www.youtube.com/user/Islaww1/videos
Greg
Posts: 24
Joined: Wed Feb 03, 2021 11:12 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 spins endlessly after reboot.

Post by Greg »

Gary Campbell wrote: Sun Dec 03, 2023 4:40 pm Does your carousel have a homing switch defined? It sounds like it is "driving by" the sensor
I was under the impression cnc12 remembered the location of the atc. Do I need a homing switch for the atc? I read through all the documentation carefully (I thought) and many threads, never seen anything about a homing switch.
Gary Campbell
Posts: 2190
Joined: Sat Nov 18, 2017 2:32 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: Yes
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: Acorn 238
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Bergland, MI, USA
Contact:

Re: Atc spins endlessly after reboot.

Post by Gary Campbell »

If you have an axis designated to rotate the carousel, then CNC12 will attempt to home it via the wizard generated homing routine. With no sensor installed, the axis will rotate until the sensor triggers. If no sensor..........

If the position of the carousel is important, I recommend adding a homing sensor
GCnC Control
CNC Control & Retrofits
https://www.youtube.com/user/Islaww1/videos
Greg
Posts: 24
Joined: Wed Feb 03, 2021 11:12 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 spins endlessly after reboot.

Post by Greg »

Thanks Gary, I have a 4th axis so thats why I am using the g216 driver its a "indexing stepper driver" controlled by a couple relays. Keith has recommended it a couple times in the facebook group and Marty did a video on it, thats why I designed around this driver. I failed to mention the atc works by turning a geneva mechanism and the arm hits the sensor every index locking it into position.

The only homing information I found was for lathe turrets using the M18 macro, but I see the turretsyncbit in my list of inputs so today I am going to see if that works with a sensor. Otherwise I have not figured out how to define and use a home sensor yet.

ImageATC Complete v192[/img]
Allin1Chris
Posts: 135
Joined: Wed Jul 31, 2019 12:53 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes

Re: Atc spins endlessly after reboot.

Post by Allin1Chris »

Greg wrote: Mon Dec 04, 2023 10:04 am Thanks Gary, I have a 4th axis so thats why I am using the g216 driver its a "indexing stepper driver" controlled by a couple relays. Keith has recommended it a couple times in the facebook group and Marty did a video on it, thats why I designed around this driver. I failed to mention the atc works by turning a geneva mechanism and the arm hits the sensor every index locking it into position.

The only homing information I found was for lathe turrets using the M18 macro, but I see the turretsyncbit in my list of inputs so today I am going to see if that works with a sensor. Otherwise I have not figured out how to define and use a home sensor yet.

ImageATC Complete v192[/img]
For a Carousel Driven by outputs which seems typical for geneva mechanism carousels, Assuming that you had followed the instructions and properly initialized the ATC, should remember bin location between power cycles without the need of a home input.

On startup when your carousel starts to move, Press Alt-I and see if any of the carousel outputs are turned on for the carousel. Ideally none of them should be Green (On) until a tool change is called.
When requesting support READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043

Please ALWAYS post a FRESH report. To make a report: https://www.youtube.com/watch?v=Ecvg0VJp1oQ.

(We pride ourselves on providing timely solid technical support but, without good information we may not be able to help and/or reply until such information is posted.)

Centroid PLC Tutorial Videos
Greg
Posts: 24
Joined: Wed Feb 03, 2021 11:12 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 spins endlessly after reboot.

Post by Greg »

No issues with the inputs or outputs as far as I can tell. I noticed a possible issue or symptom the bin number switches after acorn reboot.

CNC12 manual page 352 says:
"The current ATC carousel position is constantly monitored. When there is a change, the ATC bin field in the cncm.job
file is updated and the file is saved. The ATC carousel position is read from the PLC system variable
SV_ATC_CAROUSEL_POSITION"


My job.xml file~
<?xml version="1.0" encoding="UTF-8"?>
<job_critical_data>
<FileVersion>1.0000000000000000</FileVersion>
<modal_tool_number>5</modal_tool_number>
<atc_bin_number>8</atc_bin_number> This number is updated correctly until reboot and switches to 10 every time
<atc_error_code>1</atc_error_code>
<saved_user_variable index="0">3.0000000000000000</saved_user_variable>
<saved_user_variable index="1">0.0000000000000000</saved_user_variable>
<saved_user_variable index="2">0.0000000000000000</saved_user_variable>
<saved_user_variable index="3">0.0000000000000000</saved_user_variable>
<saved_user_variable index="4">0.0000000000000000</saved_user_variable>
<saved_user_variable index="5">0.0000000000000000</saved_user_variable>
<saved_user_variable index="6">0.0000000000000000</saved_user_variable>
<saved_user_variable index="7">0.0000000000000000</saved_user_variable>
<saved_user_variable index="8">0.0000000000000000</saved_user_variable>
<saved_user_variable index="9">0.0000000000000000</saved_user_variable>
</job_critical_data>
cncsnw
Posts: 3854
Joined: Wed Mar 24, 2010 5:48 pm

Re: Atc spins endlessly after reboot.

Post by cncsnw »

That is the key.

The issue is a bug in the Acorn Mill PLC program. In InitialStage (around line 2577) you have this block of code:

Code: Select all

IF (ATCType_W == 1) THEN CurrentCarouselPosition_W = SV_ATC_CAROUSEL_POSITION,
						 RequestedCarouselPosition_W = CurrentCarouselPosition_W,
						 PutBackPosition_W = SV_ATC_TOOL_IN_SPINDLE
... which is intended to load the previously-saved carousel position, and the position in which to put back the tool in the spindle, for umbrella-type tool changers (ATCType_W = P830 = 1).

Unfortunately, InitialStage only runs once, at startup; and at that point in that first scan, ATCType_W has not yet been set. So CurrentCarouselPosition_W remains 0 (to be patched up to P161 -- 10, in your case -- by later carousel rotation code); and PutBackPosition_W also remains 0. I would guess that your endless rotation comes from trying to rotate the carousel until it arrives at position 0, so it can put away the tool in the spindle. Position 0, of course, never come, because the count wraps around from 10 to 1 and from 1 to 10.

I think Chris has fixed this. You could try installing the latest beta software; or you could wait for v5.08; or you could fix it yourself by making the code in question unconditional, or making it test SV_MACHINE_PARAMETER_830 instead of ATCType_W.
Greg
Posts: 24
Joined: Wed Feb 03, 2021 11:12 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 spins endlessly after reboot.

Post by Greg »

That was the problem :D First I did a fresh install of v5.07 rev15 beta and that did not fix the problem. I just made a simple change to

Code: Select all

IF 1==1 THEN CurrentCarouselPosition_W = SV_ATC_CAROUSEL_POSITION,
						 RequestedCarouselPosition_W = CurrentCarouselPosition_W,
						 PutBackPosition_W = SV_ATC_TOOL_IN_SPINDLE
Now everything works perfectly. I spent 2 days scratching my head. Thanks much for your help, Its much appreciated.
Post Reply