Page 1 of 1

With the Atc option, Can we run without the ATC

Posted: Sat Apr 20, 2024 2:40 pm
by rjtechserv
While we work on the PLC program can we run the machine without the tool changer and hand load the tools? The guys would like to use the machine while I work on atc problems as we go?

I'd think that would be simple to do but, not as obvious as it seems it should be?

Re: With the Atc option, Can we run without the ATC

Posted: Sat Apr 20, 2024 6:25 pm
by cncsnw
Yes.

A good starting point is to set P6 = 0 and P160 = 0.

Beyond that, it mostly depends on your M6 macro and your PLC program.

If your M6 macro does not recognize P6==0 and fall back on manual tool changes, then you will need to temporarily delete or rename it so that CNC12 just uses the default manual M6.

If your PLC program does not allow the operator to unclamp the tool while a program cycle is running, then that logic will need to be changed or removed.

Re: With the Atc option, Can we run without the ATC

Posted: Mon Apr 22, 2024 8:18 am
by rjtechserv
Thanks Mark and all that read and follow,

That will be very helpful As I try to plan this ATC program that now will read the 5th encoder channel instead of a tool counter.

Anyone have a PLC I can compare ideas with that uses a real Quad encoder for ATC positioning?

Thanks,

RobJ

Re: With the Atc option, Can we run without the ATC

Posted: Mon Apr 22, 2024 1:09 pm
by cncsnw
What causes your carousel to rotate?

Does it rotate in both directions?

What locks it in position when it arrives at the target?

Here is one example of reading an encoder (from the Oak encoder input #5) and translating it into the nearest carousel position:

Code: Select all

; Monitor the carousel position
;   There are 1638.4 counts per tool position.
;   Multiply by 10 so that calculations can be done with integer words.
;   With x10 multiple, there are 327680 counts per 20-tool revolution.
;   The encoder count was zero at the startup bin position, whatever that
;   may have been.  Once we have the number of positions represented by
;   the current encoder count, add that onto the startup bin to get the
;   current bin number.
IF True THEN BinPosition_W = (SV_MPU11_ABS_POS_4 * 10 + 8192) % 327680
IF BinPosition_W < 0 THEN BinPosition_W = BinPosition_W + 327680
IF True THEN BinPosition_W = (MagStartupPos_W + BinPosition_W / 16384) % MaxBins_W
IF BinPosition_W == 0 THEN BinPosition_W = MaxBins_W
IF BinPosition_W != PrevPosition_W THEN (NewBinPositionPD)
IF True THEN PrevPosition_W = BinPosition_W

; Report current carousel position to CNC11
IF True THEN SV_PLC_CAROUSEL_POSITION = BinPosition_W
For a discussion of modulo arithmetic and signed numbers, see:
http://cncsnw.com/PLCApplicationMPU11Modulo.htm

Re: With the Atc option, Can we run without the ATC

Posted: Tue Apr 23, 2024 11:04 am
by rjtechserv
The carousel is an air motor. solenoid forward and solenoid reverse. An additional solenoid for high speed rotation on long travel changes.

I've got the index pulse near Tool1. I'm wondering if I should be resetting the pulse count on a rollover. I was planning to use the pulses needed from tool to tool to act as the tool counter.

The locking device is an air-cylinder chamfered pin with up and down monitoring switches.

Thanks Mark I'll give this a look.

Re: With the Atc option, Can we run without the ATC

Posted: Tue Apr 23, 2024 8:38 pm
by rjtechserv
A 24 tool changer seems to give me repeating decimals. may have to rehome every so often 2500 count quad encoder (10,000) 24 seems to be a bad number for repeating decimals!

Re: With the Atc option, Can we run without the ATC

Posted: Tue Apr 23, 2024 9:33 pm
by cncsnw
If there are a whole number of encoder counts in a full revolution of the carousel, then it should not matter if the number of encoder counts per tool position varies.

If you use logic similar to what I posted above, then you are always reading absolute (cumulative from power-on) encoder counts, and using them to find the nearest tool position to that encoder count. It should never be more than one count away from the theoretical ideal.

The encoder count will not roll over until you have gone 2^31 counts away from the powerup position. Then, if your encoder counts per carousel turn is not a power of two, it would lose position. But, if you are using a 10000-count encoder turning 1:1 with the carousel, that will not happen until you have turned the carousel 214748 full revolutions since power-up. So no, resetting or rehoming should not be necessary. If you want to be extra safe in case the machine runs for years without ever being powered down, just use a 2048-line or 4096-line encoder, so that it does not lose position when it rolls over from +2147483647 to -2147483648.