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

Post by Chaz »

Let's talk about the logic.

Image

The turret rotates clockwise, facing the numbers as per the image. So to get from tool 8 to 7, the following logic applies:-

IF #5023 > #4120 THEN #101 = #4120

G53 A[#101]

Which in this case = G53 A7. correct?

Agreed?

So lets use an example. I have tool 8 set, Centroid confirms T0808. To move to tool 7, I rotate clockwise, 45 degrees (marked as 1 however based on your ratio of needing to satisfy this condition.

; Notes: Turns/rev must be configured 1 = 1 turret position change

In other words, you are calling turret position 1, to be A1, 2, at A2 and so forth. Correct?

So if I wanted to from 8 to 4, I simply move 4 clockwise, using the same code.

IF #5023 > #4120 THEN #101 = #4120

G53 A[#101]

Which in this case = G53 A4. correct?

Assuming that's all correct, the logic to go the other way is more difficult due to the one way system of the ratchet.

Ive just found a flaw in my calcs, as I was trying to do the movement calculation. I now understand why your numbers were so high, as you have to go past the max turret number .... makes sense now.

However, to me, this doesnt seem to work as I have a number system that decreases. The only logic I can see is the following.

If I want to go from 1 to 8, I simply need to issue a command G53 A0, correct? This takes me from A1 to A0 which also happens to be 8 as there are 8 turret positions.

Another example, I want to go from 5 to 7, I use G53 A-1, correct?

This means that the logic looks to be:-

IF #4120 > #5023 THEN #101 = #4120 - #100, correct?

Ill try this tomorrow, I'm certain this should work unless ive misunderstood this.

Thanks
Threedj16
Posts: 224
Joined: Thu Feb 22, 2018 1:21 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: C8FD19F23AFF-0213180659
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Augusta, Ga

Re: ATC Macro / PLC Help please

Post by Threedj16 »

Very interested in your setup and macros. I have an Emco PC Turn 55 on the way which will need a total electronics overhaul. Will be using the Acorn and Turn Pro for this retrofit. I don't really have any issues swapping electronics, steppers, spindle motor or adding an encoder, but this 6 position turret has me baffled as to where to begin. I'll have the original turret motor and relay board. Curious if you used this and/or what other components are needed to make this work. Using a stepper in place off original motor? Will a PLC be required or just inputs on Acorn for counting zero position and each position move (as from what I understand, the turret only uses two switches). I also have been researching and see the original motor drives in reverse at a lower voltage constantly until a tool change command is given, which then drives it forward until it counts past home the number of positions requested, when switches back to reverse.

Sorry, just new with this and looking for a starting point. You seem to be close to a point of resolution and was hoping for some input as to where I should begin and what equipment would be needed.

Thanks for any info.
diycncscott

Re: ATC Macro / PLC Help please

Post by diycncscott »

No need for stepper motor if your turret already has sensors. Control interaction and PLC for an incremental type turret would look something like the following:

Program asks for T0101

Control calls cnctch.mac to do tool change

Tool number sent down from cnctch.mac with M107 command

PLC determines if it is already at correct location. If not, rotate turret

;Rotate turret
IF M6 && (RequestedTurretPosition_W != CurrentTurretPosition_W) THEN SET RotateToolTurret

;Update turret position every time the ToolCounterInput fires
;Use 1 shot so tool counter only increments once when input is turned on
IF ToolCounterInput THEN ToolCounter(PD)
IF RotateToolTurret && ToolCounter(PD) THEN CurrentTurretPosition_W = CurrentTurretPosition_W+1

;Handle rollover - set parameter 161 to max # tool positions in turret. If 6 positions, then set to 1 after passing 6
IF CurrentTurretPosition_W > SV_MACHINE_PARAMETER_161 THEN CurrentTurretPosition_W = 1

;Report position to software
IF True THEN SV_PLC_CAROUSEL_POSITION = CurrentTurretPosition_W

;Note control stores the last known location of tool turret on shutdown so you can use SV_ATC_CAROUSEL_POSITION to initialize the turret
;position on power up. No need for home switch if the turret doesn't move while powered off


Turret positioning and live position reporting handled with 1 output and 1 input...
You may need a second output to reverse turret to lock depending on your turret.
Threedj16
Posts: 224
Joined: Thu Feb 22, 2018 1:21 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: C8FD19F23AFF-0213180659
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Augusta, Ga

Re: ATC Macro / PLC Help please

Post by Threedj16 »

Thanks for the info. Is there a suggested PLC as this doesn't seem like a lot for a PLC to handle. Would a simple arduino work for this?

Thanks
diycncscott

Re: ATC Macro / PLC Help please

Post by diycncscott »

The Acorn already has a PLC that can handle this far better than an Arduino. The code I posted if for an Acorn PLC.

Does your turret reverse to lock?

Does your turret rotate in only one direction?

When rotating, does the turret count up ie.. 1 to 2 to 3 etc.. or down 3 to 2 to 1..?
Threedj16
Posts: 224
Joined: Thu Feb 22, 2018 1:21 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: C8FD19F23AFF-0213180659
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Augusta, Ga

Re: ATC Macro / PLC Help please

Post by Threedj16 »

Sorry, very new to Acorn, but is this part of the existing board or seperate purchased board?

Yes, it turns one direction and reverse locks it just like Chaz was describing on his larger version.

Since I'm waiting for it, I don't know the count direction. But being and Emco like the other person's, most likely the same count direction.

Thanks
diycncscott

Re: ATC Macro / PLC Help please

Post by diycncscott »

It's included in the standard Acorn with Pro software.
Threedj16
Posts: 224
Joined: Thu Feb 22, 2018 1:21 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: C8FD19F23AFF-0213180659
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Augusta, Ga

Re: ATC Macro / PLC Help please

Post by Threedj16 »

Very nice!

Thanks again for all the info.
Threedj16
Posts: 224
Joined: Thu Feb 22, 2018 1:21 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: C8FD19F23AFF-0213180659
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Augusta, Ga

Re: ATC Macro / PLC Help please

Post by Threedj16 »

diycncscott wrote: Thu Feb 22, 2018 10:15 am
Turret positioning and live position reporting handled with 1 output and 1 input...
You may need a second output to reverse turret to lock depending on your turret.
Would you not need a second input to determine position 1 from the start? While it may track last position tool after shutdown, at some point it would need a master tool or position one from which to reference from then on or am I over thinking this?

And thinking a single output on a double pole double throw relay since what I've read, it's always at a lower voltage while on to hold. Then a reverse relay triggers to move forward X number of positions. Then back to reverse to hold.
Last edited by Threedj16 on Tue Nov 12, 2019 4:55 pm, edited 1 time in total.
diycncscott

Re: ATC Macro / PLC Help please

Post by diycncscott »

No. As you surmised, there is an initialize feature in Acorn that allows the user to jog to the turret position #1 and then initialize the tool changer. From that point on, the control knows where it is at. If it ever lost position due to a fault in the middle of a tool change, it can always be re-initialized but it's pretty rare. Most umbrella style tool changers on VMC's run in the same manner.

Yes, I've done a couple of Emco's on Acorn that used the NO/NC contacts on one of our relay outputs for rotation/locking. That configuration requires only 1 output that handles both rotation and locking.
Post Reply