Page 1 of 2
ATC general help required
Posted:
Thu Jul 28, 2022 2:32 pm
by dimmaz88
Hello, I have an 8x4 machine that I converted from Chinese control system to UCCNC a couple of years ago.
I have the UB1 + UC300ETH combo. I've just got myself an ATC spindle and I'm struggling a bit with how to set it up.
If I give a brief description on what I want to achieve, could someone possibly give me a few pointers on where to start..?
I'm hoping I'll have enough space for a stationary tool rack to simplify matters, but if not I'll need to implement a sliding rack.
I will also need to activate pistons on the dust shoe to retract it.
I would also like to probe after each tool change to set tool length.
I know I'll have to write a macro, can any programming language be used?
Any help is appreciated.
Scott
Re: ATC general help required
Posted:
Thu Jul 28, 2022 3:16 pm
by ger21
You can start with the default M6 macro, and add what you need to that.
Just ask for whatever you need to do, but don't know how.
Re: ATC general help required
Posted:
Fri Jul 29, 2022 8:20 am
by dimmaz88
Thanks Gerry, why didn't I think of looking at the stock M6!?
Although I'm no coder I get the gist of what's going on, I'll have a proper read through it and come back with any questions (probably 100s).
Re: ATC general help required
Posted:
Sun Jul 31, 2022 9:22 am
by dimmaz88
Hi all, I've been going through the M6 macro and the UCCNC macro PDF. I don't understand what the IsMoving function does.
Am I right in thinking the Setoutpin is just used to turn on a switch and hold it on, so it activates an air switch for exmple? And [b]Clroutpin[b] will turn it off, clear it?
So if the above is true, could I set my own parameters and use the same commands to activate a piston to open the dust shoe or move the tool rack?
e.g.
int DustShoePort = 1;
int DustShoePin = 16;
TIA
Scott
Re: ATC general help required
Posted:
Mon Aug 01, 2022 9:17 pm
by dimmaz88
Anyone?
Re: ATC general help required
Posted:
Tue Aug 02, 2022 4:38 am
by Daywalker
Hi Dimmaz,
At the Macro Section you will finde some examples for a ATC-Macro.
To your Question. Yeah, you can define own Parameters at the Beginning like "int DustShoePin = 1;" or something and use it in the Macro.
Example:
exec.Setoutpin(DustShoePin, DustShoePort);
As mentioned, there are some examples here in the Macro Section.
What also helps a lot is the PDF instructions for writing macros:
https://drive.google.com/drive/folders/0B9eqGqWQVBbWNVhsZkdfQWRaYTg?usp=sharing
Re: ATC general help required
Posted:
Tue Aug 02, 2022 7:52 am
by dimmaz88
Thank you.
I've read the macro PDF for UCCNC I just can't get my head round what the isMoving command is used for.
I'll have a read through the macro guide you link to.
Re: ATC general help required
Posted:
Tue Aug 02, 2022 11:06 am
by ger21
I just can't get my head round what the isMoving command is used for.
The IsMoving waits until the previous movement is complete before the macro continues. Without it, the macro would start doing things before it was supposed to.
Re: ATC general help required
Posted:
Thu Aug 11, 2022 1:39 pm
by dimmaz88
Thank you so far.
I have the default M6 edited now, and it works well to a certain extent.
The only thing I'm drawing a blank with is;
a. When I close down my machine and restart, it doesn't remember the previous sessions tool number. Is there a way of having UCCNC remember tool in the spindle? Or manually telling it which tool is in?
b. How do I make it so the macro references tool slot positions, rather than tool numbers?
I've searched a lot but haven't found what I'm looking for.
EDIT- Tried adding my M6 but kept getting an error.
Re: ATC general help required
Posted:
Thu Aug 11, 2022 3:16 pm
by ger21
b) What I would do is add an ATC screen, with fields for slots, so you can enter the tool number in the slot. Then modify the M6 macro to utilize the slot numbers.
a) Use the M999999 macro to save the current tool to your profile, when UCCNC closes, and use the M99998 macro to set it back to the current tool when UCCNC starts.