Page 1 of 6

Rack ATC Macro Help

Posted: Fri Jan 03, 2020 5:50 am
by hebs
—- I deleted my original post and setup as a new thread - didn’t want to hijack another thread—

This video explains it all: https://share.icloud.com/photos/0qiGY1X ... 7cQyQ#Home

This forum is great place to learn and a huge thanks to people for sharing their knowledge and to CNCKeith in particular for his help. I need to ask again for guidance. I have just finished building a rack tool holder and I am struggling with the operation of it.

The Problem: When I select tool No 8 (allocated in my tool library to bin 5) the macro operates using the tool number and not bin number. It goes to bin 8 and not bin 5. I have parameter 160 set to 1 (non random) so that shouldn't happen should it?

In my ATC Macro (mfunc6.mac) variable #4120 appears to be referring to the tool bin number and not the requested tool number as I understood it to be from the various posts and guides, including the new tool rack ATC macros posted recently for 4.20. I have attached my main src file, macro file and log.

I didn’t want to upgrade to 4.20 because I have 4.18 working how I like it (less the ATC) but I may have to. I’m sure it will be better in the long run anyway.

Happy New Year!

Re: Rack ATC Macro Help

Posted: Fri Jan 03, 2020 7:42 am
by Chaz
Interesting post, would like to get something like this working on my larger mill if I do convert it to Acorn. Will be good to see this solved.

Re: Rack ATC Macro Help

Posted: Fri Jan 03, 2020 1:45 pm
by hebs
---Update---

I upgraded to 4.20 without a hitch. It was much easier than I expected and I did not lose any of my custom PLC but still no luck with the rack ATC.

Ch11 of the Centroid Mill operator manual lists all of the system variables and I believe that #150 and #4120 will only ever show the tool number and not bin numbers. I could easily write the macro to achieve what I want but I need to access system variables #17000-17200 (tool bin numbers) & #18000-18200 (putback locations). Sadly it appears that my macros cannot read those system variables. I can read plenty of other variables but not those.

Does anyone know if there is a way to read them or are they limited on the Acorn in the same way that #4203 only work with Oak & Allin1?

If not, I will be constantly changing my tool numbers (on CNC12 and in my CAD/CAM) which will increase the risk of running the wrong tool or offset.

edit--- I have just thought of a way to hack it - I could use tool diameters to hold the tool bin values because my macros can read those variables (#13000-13200) but it would mean that I could not easily use intercon or tool wear compensation (which I don't really use anyway).

Re: Rack ATC Macro Help

Posted: Fri Jan 03, 2020 7:01 pm
by cnckeith
i've asked Chris our in house macro programmer to help you out, he will be back on monday. in mean time post a fresh report.zip please.

Re: Rack ATC Macro Help

Posted: Fri Jan 03, 2020 7:02 pm
by hebs
Ok. I have made it work using the 13001-13200 variables. Not ideal loosing tool diameters but the ATC works perfectly - I’ll post a video tomorrow.

-edit. Thanks Keith will upload in the morning.

Re: Rack ATC Macro Help

Posted: Sat Jan 04, 2020 3:15 pm
by hebs
All working but in a very 'hacky' way. I set parameter 160 to 0 (non-enhanced ATC) and wrote some very long and code inefficient macros (couldn't figure out how to use a system variable to make up the name of another system variable). I am using the tool diameter variables (#13001-13200) rather than the bin variables (#17001-17200). If there is a way for macros to use those variables then everything would be perfect. In the mean-time this works for me but I won't be able to use intercon or tool wear.

I have attached the latest report, mfunc6.mac, plcmacro3.mac (manual tool change) and links to a few videos.

Video explaining the solution:
https://www.dropbox.com/s/2gbyt805tv286 ... n.MOV?dl=0

Video showing tool library checking:
https://www.dropbox.com/s/ifyg1x6yv5zoz ... y.MOV?dl=0

Video showing the ATC in operation including catching my mistakes:
https://www.dropbox.com/s/hx2j3hwxd14bd ... n.MOV?dl=0

Re: Rack ATC Macro Help

Posted: Sat Jan 04, 2020 11:29 pm
by cbb1962
hebs wrote: Sat Jan 04, 2020 3:15 pm All working but in a very 'hacky' way. I set parameter 160 to 0 (non-enhanced ATC) and wrote some very long and code inefficient macros (couldn't figure out how to use a system variable to make up the name of another system variable). I am using the tool diameter variables (#13001-13200) rather than the bin variables (#17001-17200). If there is a way for macros to use those variables then everything would be perfect. In the mean-time this works for me but I won't be able to use intercon or tool wear.
I've just started to look at the "more tools than tool locations" problem. I really like your solution and that you can place any tool in any location and CNC12 will automagically keep up with it all, very nice. It will be interesting if Chris can come up with a more elegant solution and use the actual bin locations.

Great Job!

Re: Rack ATC Macro Help

Posted: Mon Jan 13, 2020 9:26 am
by cbb1962
Have you had any feedback on using the bin location variables?
Tool Bin variables.png
Both show that you should have Read/Write access. The only difference is that the 17000 variables are floating-point. (Is this a mistake in the documentation?)

From re-reading the manual it appears that Parameter 160 needs to be set to 1 in order to access the bin fields.
*Note: If enhanced ATC features are not on, the cursor cannot be moved into the bin column and the message "Bin Felds are locked." will appear where the tool in spindle display is located. In addition, the F1 - Clear Bin and F2 - Clear All keys only appear if enhanced ATC features are on

Re: Rack ATC Macro Help

Posted: Mon Jan 13, 2020 12:32 pm
by Gary Campbell
Since you are using a rack, (I assume straight rack?) why are you using BIN locations? They do not seem to be needed.

Re: Rack ATC Macro Help

Posted: Mon Jan 13, 2020 12:36 pm
by cbb1962
hebs wrote: Sat Jan 04, 2020 3:15 pm Video explaining the solution:
https://www.dropbox.com/s/2gbyt805tv286 ... n.MOV?dl=0
Explaining the problem: https://www.icloud.com/photos/#0qiGY1XQ ... uJoZr7cQyQ

Gary is there a better way?