PLC Program For Emco PC Turn 55 (using original turret board and motor) <Success>

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
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

PLC Program For Emco PC Turn 55 (using original turret board and motor) <Success>

Post by Threedj16 »

Wanted to start a new post for this as I figured it might get buried in my original thread. This is the thing that is stumping me big time. I've been reading through the other posts, downloading all the turret files I can, but just not following it very well.

Ok, I am completely new to turret operation, but I'll describe to the best of my abilities the operation of the Emco PC Turn 55 turret with pics.

First, it's a 6 position turret (3 forward tool and 3 side facing tools). It uses a 12v motor which when 24v power is applied to the turret board, the motor is always on in reverse, holding the turret position up against a pawl. The turret board reduces the voltage from 24v to 12v and in reverse, the current is limited by a resistor to ~60ma. When moving forward for a tool change, it runs at ~120ma. The turret board has an onboard relay, which when 24v signal is applied, turns the 12v motor forward for a tool change (output 1 on the acorn supplies the signal to this relay). When the 24v signal to the relay is removed, the motor is always in reverse, low current mode locking the turret against the pawl at it's current position. The turret has two optical switches and a metal plate attaches to the turret. The plate has a tab for each tool position and passes a 5v signal to turret board when it passes this tab (tied to input 6 on the acorn via 5v to 24v relay). The second optical switch (tied to output 5) is aligned to a single notch for zero position or tool 1 (higher up on the rotary plate), which keep the optical switch blocked until it passes the deeper notch and then sends 5v out to the turret board (and again passes a high to input 5 via the 5v to 24v relay).

When the turret reverses and locks into the pawl, it also moves off the each position tab thereby changing states back to low. So going forward to the next tool, it will switch the current tool high, then back low and then finally high again for the next too. So the logic has to incorporate a feature to account for this extra transition once per call of the turret rotate.

- So output 2 turns on - turret relay closes and drives turret forward for a tool change. Output 2 off, turret board relay off and turret motor in low current reverse mode which holds turret against the pawl at current tool position.

- Zero optical switch tied to input 5 turns on when zero notch is in position. Tool position optical switch, tied to input 6, turns on when tool position tab is at the location.

What I can surmise for how the operation should run:
1) Tool called by Gcode
2) Check which tool is in currently loaded (if unknown, run turret until zero position, tool 1 is reached).
3) If proper tool is loaded, continue with Gcode (from variable previously stored)
4) If proper tool isn't loaded, output 1 turns on and a count is performed until correct tool number is achieved. Then output 2 turns off and the turret locks back into place with the correct tool loaded along with turn off spindle and coolant.
A) To achieve this, when output 2 turns on, the turret looks for input 5 to close (once for current position, then again for each tool position)
B) Once input 5 blips on, start a count for input 6.
C) When count number equals tool number, open output 1 (which opens turret relay, reverses motor and locks to pawl)
D) Tool number is stored in a buffer.
5) Turn on mister if called for by tool via turning on input 1 (haven't install this part yet) and spindle.
6) Continue Gcode operation

Also would need some method of keeping up with tool count if turret was manually jogged (a nice to have but not a requirement)

Ok, not sure what stuff I left out, but that is the basic outline as I can see it.

Pics:
28701186_963382507159627_8071784860744154586_o.jpg
28660800_963382603826284_7453842360443148086_n.jpg
28516300_963382560492955_1763014791543074951_o.jpg
27906710_1602877816433687_1500336834_o.jpg
Last edited by Threedj16 on Fri Apr 20, 2018 12:55 pm, edited 2 times in total.
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: PLC Program For Emco PC Turn 55 (using original turret board and motor)

Post by Threedj16 »

What are folks using for manually jogging the turret from the control panel? I see several Aux buttons on the panel, but no way to set them in the wizard? Would seem that if an output could be tied to an Aux button, shouldn't it be in the Wizard on the pull down for it? I'm having to jog the turret via the flood button, since I'll never use flood. But would be cool to actually have a button stating tool change and it be selectable from the wizard.

I'm also looking at the 8-position-gray-code.src and cnctch.mac files. I can follow a little bit of it, but barely treading water here. Trying to read through the manual to understand all the syntax of this, but man it's overwhelming. If there is anyone that could point me to where to change the 8 position to 6 position?

Think I figured out how to change the inputs and outputs to correspond.

; INPUT DEFINITIONS
; Closed = 1 (green) Open = 0 (red)
;------------------------------------------------------------------------------
FirstAxisMinusLimitOk IS INP1 ;&*;
SecondAxisHomeLimitOk IS INP2 ;&*;
;Spare IS INP3 ;&*;
;Spare IS INP4 ;&*;
ToolBit1 IS INP5 ;&*;
ToolBit2 IS INP6 ;&*;
DriveOk IS INP7 ;&*;
EStopOk IS INP8 ;&*;


;------------------------------------------------------------------------------
; Output Definitions
; Logic 1 = OUTPUT ON (Green), 0 = OUTPUT OFF (Red)
;------------------------------------------------------------------------------
;NoFaultOut IS OUT1 ;&*;
TurretMotor IS OUT1 ;&*;
;SpindleBrakeRelease IS OUT3 ;&*;
;SpinFWD IS OUT4 ;&*;
;SpinREV IS OUT5 ;&*;
;DriveResetOut IS OUT6 ;&*;
Mist IS OUT2 ;&*;
;TurnClampOn IS OUT8 ;&*;


But I don't see how to change the count variables for input 5 being zero tool and input 6 being each tool (and limiting it to 6 tools) or how to tie output 1 to AUX along. I'm trying hard here. Will spend the a lot more time reading the manual and looking over this code. But a little point in the right direction would be so very appreciated.
martyscncgarage
Posts: 9915
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

Re: PLC Program For Emco PC Turn 55 (using original turret board and motor)

Post by martyscncgarage »

See TB300 for Aux. Utton programming:
http://www.centroidcnc.com/cnc_techbulletin.html

There is some info on the Acorn main page about ATC programming see the sticky post.
Marty
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
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: PLC Program For Emco PC Turn 55 (using original turret board and motor)

Post by Threedj16 »

martyscncgarage wrote: Mon Apr 09, 2018 8:42 am See TB300 for Aux. Utton programming:
http://www.centroidcnc.com/cnc_techbulletin.html

There is some info on the Acorn main page about ATC programming see the sticky post.
Marty
Thank you. I saw a reference in one of the macros referencing a TB308 (or something like that), but didn't understand it meant tech bulletin. I'm slow but getting there. Sometime the information can be spread out for a newbie like myself and it's hard to pull together where everything is located in order to learn. So thank you for that link.

I spend a lot of time reading today and think I understand now how to program an Aux button and attache a macro to it in order to use it to jog forward one tool by closing relay one, setup a 5 sec timer to ensure something doesn't go wrong, watching for input 6 to close, then exit macro when it sees input 6 close. Now to put that into a macro code and tie to the Aux 1 button. At least I think my understanding of this is getting a little better. Just to figure out all the different codes and the proper syntax used with them.

Wish me luck! LOL.

Thanks
Last edited by Threedj16 on Tue Nov 12, 2019 4:50 pm, edited 1 time in total.
DICKEYBIRD
Posts: 536
Joined: Sat Jul 08, 2017 7:38 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: n/a yet
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Collierville, TN USA

Re: PLC Program For Emco PC Turn 55 (using original turret board and motor)

Post by DICKEYBIRD »

Threedj16 wrote: Mon Apr 09, 2018 5:48 pmWish me luck! LOL.
Good Luck Jasen! :)
Milton in Collierville, TN

"Accuracy is the sum total of your compensating mistakes."
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: PLC Program For Emco PC Turn 55 (using original turret board and motor)

Post by Threedj16 »

DICKEYBIRD wrote: Mon Apr 09, 2018 6:07 pm
Threedj16 wrote: Mon Apr 09, 2018 5:48 pmWish me luck! LOL.
Good Luck! :)
Thanks, guess it will be tomorrow now. Swapping out a bad spindle motor....argh.
Last edited by Threedj16 on Tue Nov 12, 2019 4:49 pm, edited 1 time in total.
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: PLC Program For Emco PC Turn 55 (using original turret board and motor)

Post by Threedj16 »

Ok, can't try this out until tonight. Just wanted to check and see if it looks like I am heading the correct direction for my first macro? Comments state what I am try to accomplish.

;Map Aux 1 to output 1 for turret to move one tool position via input 6 closing
:Output 1 turns on my turret in the forward direction, input 6 is the each tool optical in, closes when each tool position is reached

;File Name - Mfunc68.mac
;set parameter 188 to 6811

M94/1 ;Turn on output 1
M103/5 ;Wait 5 seconds for input 6 to close, if not cancel program
m101/5006 ;Look for input 6 to close
M95/1 ;Turn off output 1
m104 ;Cancel timer if input 6 closed before 5 seconds
M99 ;Return from macro
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: PLC Program For Emco PC Turn 55 (using original turret board and motor)

Post by Threedj16 »

I can't seem to find where variable like these are located in order to understand how to use them:

IF ToolCounterInput THEN ToolCounter(PD)
IF RotateToolTurret && ToolCounter(PD) THEN CurrentTurretPosition_W = CurrentTurretPosition_W+1

I'd love the manual jog to update my tool count and now I am starting to understand a little about how this turret example works. But I am unsure were to define (I know the parameters page, for example, parameter 161 set to 6), but setting up the toolcounterinput and such? I have searched through the manual and don't see these. Is there another manual I can look up all the definitions and/or where to define them? Or are these located in the source file and I have to define them (or update for my inputs/outputs) and recompile?

Thanks
diycncscott wrote: Thu Feb 22, 2018 10:15 am 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.
Last edited by Threedj16 on Tue Nov 12, 2019 4:49 pm, edited 1 time in total.
Centroid_Tech
Posts: 286
Joined: Thu Mar 18, 2010 2:24 pm

Re: PLC Program For Emco PC Turn 55 (using original turret board and motor)

Post by Centroid_Tech »

Those are in the PLC source file, which has a .src file extension. All of the I/O definitions and all of the logic are in the PLC source file. We are working on getting the wizard setup in such a way that the user just has to set a few parameters that tells the control what I/O their turret/tool changer has and the PLC program will contain the appropriate logic for that type of turret/tool change. I have attached some files that you can extract into your c:\cnct directory to test to see if it will work with your particular turret. The logic uses a 3-bit pattern to determine the location of the tool. I would recommend looking at the Main Stage of the attached .src to see the logic. If you need to modify the logic in the PLC program for your particular tool changer, you can do that as well as use the existing logic as a guide.
Attachments
acorn-lathe-turret.zip
(92.45 KiB) Downloaded 150 times
When requesting support, please ALWAYS post a current report. Find out how to take a report from your Acorn, CNC11 or CNC10 system here: https://www.youtube.com/watch?v=Ecvg0VJp1oQ.

If your question is PLC, Macro or program related, please also post a copy of the program or macro as well.

Without the above information we may not be able to help and/or reply until the required information is posted..
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: PLC Program For Emco PC Turn 55 (using original turret board and motor)

Post by Threedj16 »

Centroid_Tech wrote: Tue Apr 10, 2018 5:55 pm Those are in the PLC source file, which has a .src file extension. All of the I/O definitions and all of the logic are in the PLC source file. We are working on getting the wizard setup in such a way that the user just has to set a few parameters that tells the control what I/O their turret/tool changer has and the PLC program will contain the appropriate logic for that type of turret/tool change. I have attached some files that you can extract into your c:\cnct directory to test to see if it will work with your particular turret. The logic uses a 3-bit pattern to determine the location of the tool. I would recommend looking at the Main Stage of the attached .src to see the logic. If you need to modify the logic in the PLC program for your particular tool changer, you can do that as well as use the existing logic as a guide.
Thank you! I greatly appreciate it. I'll be happy when the wizard is finished, but right now, I'm at a point where I'd really like to understand how to do my own programming too. That way, if I ever need something more advanced, I will have the ability to do so. So I will definitely study the source code and the code you provided. I have been able to isolate some areas that are recognizable to me. Maybe with some time, I will get a better understanding.

Just running through the logic of how my turret works (tool 1 and each tool inputs, 1 output for tool forward (output off reverses and locks), seems like it should be fairly simple once I understand the code workings. I think it's the updating tool number portion that is stumping me for the moment. Hopefully seeing it in the source will clear that up.

Thanks
Last edited by Threedj16 on Tue Nov 12, 2019 4:48 pm, edited 1 time in total.
Post Reply