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

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, two quick questions.

I am getting an invalid parameter error on this line: M101/5006 ;Look for input 6 to close
So is M101/5006 not proper to use in this situation? It was shown as an example. Then I looked further down and found M101/6 which seems to work. Edit, read that example was from a previous version of the software and CNC11 or above should use M101/6. Solved that.

Still have solved this one.
But my output never turns on. Thought I maybe it couldn't be already mapped to another button, so removed it from being mapped to the mist via wizard. Still just sits there and times for 5 secs and ends, since the output 1 never turns on. What am I doing wrong here?

M94/1 ;Turn on output 1 (this never closes the relay?) It worked when I had it tied to the mist button. But removed that to try this.

Thanks.


The entire file that I was mapping to Aux 11 with explanations of what I am trying 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 - Mfunc78.mac
;set parameter 197 to 7711

IF #50010 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching
N100 ;Insert your code between N100 and N1000

M94/1 ;Turn on output 1 (this never closes the relay?)
M103/5 ;Wait 5 seconds for input 6 to close, if not cancel program
M101/5006 ;Look for input 6 to close
M101/6 ; changed to this and it seems to be looking for the input now
M95/1 ;Turn off output 1
M104 ;Cancel timer if input 6 closed before 5 seconds
M99 ;Return from macro


N1000 ;End of Macro
Last edited by Threedj16 on Sun Aug 05, 2018 5:20 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 »

The reason it's not working is that it appears that you ran the wizard after copying the files I sent which overwrote the PLC program so that it doesn't have any logic associated with the turret I/O. Please copy the files into the c:\cnct directory. As that PLC program stands, the following I/O is used.

IN1 is the SecondAxisHomeLimitOk
IN2 is the FirstAxisHomeLimitOk
IN3 is the FirstAxisMinusLimitOk
IN5 is the ToolBit1
IN6 is the ToolBit2
IN7 is the ToolBit3
IN8 is the EStopOk

OUT1 is the NoFaultOut
OUT2 is the TurretMotor
OUT3 is the SpindleBrakeRelease
OUT4 is the SpinFWD
OUT5 is the SpinREV
OUT6 is the DriveResetOut
OUT7 is the Mist
OUT8 is the TurnClampOn

Based on the report that you posted, I see that you don't have anything defined for your outputs so the outputs defined in the PLC program will work for you. I see that you have DriveOk defined as input 7 which in the PLC program I sent, input 7 is used for the ToolBit3 input. If your system requires the DriveOk signal then you can wire it to input 4, modify the .src file I sent, and recompile it using the attached tech bulletin.
Attachments
173 Compiling PLC Program.pdf
(4.48 KiB) Downloaded 145 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..


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 »

Also the reason why M101/5006 didn't work is because you are missing a 0. It should be M101/50006.
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: Wed Apr 11, 2018 2:30 pm The reason it's not working is that it appears that you ran the wizard after copying the files I sent which overwrote the PLC program so that it doesn't have any logic associated with the turret I/O. Please copy the files into the c:\cnct directory. As that PLC program stands, the following I/O is used.

IN1 is the SecondAxisHomeLimitOk
IN2 is the FirstAxisHomeLimitOk
IN3 is the FirstAxisMinusLimitOk
IN5 is the ToolBit1
IN6 is the ToolBit2
IN7 is the ToolBit3
IN8 is the EStopOk

OUT1 is the NoFaultOut
OUT2 is the TurretMotor
OUT3 is the SpindleBrakeRelease
OUT4 is the SpinFWD
OUT5 is the SpinREV
OUT6 is the DriveResetOut
OUT7 is the Mist
OUT8 is the TurnClampOn

Based on the report that you posted, I see that you don't have anything defined for your outputs so the outputs defined in the PLC program will work for you. I see that you have DriveOk defined as input 7 which in the PLC program I sent, input 7 is used for the ToolBit3 input. If your system requires the DriveOk signal then you can wire it to input 4, modify the .src file I sent, and recompile it using the attached tech bulletin.
Thank you for reply. I actually haven't had a chance to experiment with the code you sent, only look it over. So it's not copied to my directory at all right now. I was simply trying to tie Aux10 to jog my turret forward one tool. So M94/M95 and a 1 will not turn on a relay whether assigned or not? Just assumed it was like my input 3 and 4 (which are unassigned as you saw in the report), yet my .hom file watches for them to close for the zero pulse for dual homing.

Your turret file is way more complex that what I need, so I will have to do a lot of modifying. All I need it to turn on output 1 and read input 6 (and have a counter for input 6 for tool 1-6). Then in my .hom file I will use input 5 to home to tool one whenever you doing axis homing.

Guess I'm still a little confused on the example given in the operator manual using M94/M95. So will probably just revert back to using the flood button and manually turn it on and off for my jog until I get get a better understanding.

And d'oh, all those zeros together get me. I deal in numbers everyday and hate seeing any string of the same number....always messes me up.

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


martyscncgarage
Community Expert
Posts: 9944
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 »

Looking forward to hearing how you get on with the example Jasen.

Good luck!
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: Wed Apr 11, 2018 5:30 pm Looking forward to hearing how you get on with the example.

Good luck!
Marty
You and me both....LOL. Thank Marty.

Thanks
Last edited by Threedj16 on Tue Nov 12, 2019 4:51 pm, edited 2 times in total.


cnckeith
Site Admin
Posts: 8884
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

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

Post by cnckeith »

just in case you'all missed Graham's related posts.

viewtopic.php?f=60&t=1544

viewtopic.php?f=57&t=1641
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html


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 »

cnckeith wrote: Wed Apr 11, 2018 9:37 pm just in case you'all missed Graham's related posts.

http://centroidcncforum.com/viewtopic.php?f=60&t=1544

http://centroidcncforum.com/viewtopic.php?f=57&t=1641
Unfortunately neither of them used the original turret motor and two optical switches on the Emco turret. So my turret control will look a lot different, since they used timing of a stepper motor. In a lot of ways, this should be more simple, but again, just starting to learn, so will take me a while to figure out.

So first thing I've been trying to do is write a simple macro in order to jog the turret forward 1 tool by pushing Aux10. For some reason I cannot get M94/M95 to turn on and off output 1. So decided to go the dummies route to macro cheating and just assigned input one to flood and call M08 / M09 to turn output one on and off. My plan was simply to look for input 6 to close, call M09 and it would be at the next location. But what I didn't realize was when the turret locks back into the pawl, it goes back beyond the optical switch. So as soon as it moves forward, input 6 trips and it output 1 goes right back off. So thought maybe looking for input 6 to come on, go off, then come on again would work, but no such luck. Guess the logic just doesn't work that way. I was unable to find a function to delay the lookup of an input (only one the waits for the input to come on M101). So not sure what the next step is to work around the fact that it must jog forward, through input 6 closing (going off the pawl), opening back up, the waiting for the second close in order to trip off relay one for a complete jog forward by one tool.

I thought maybe learning a macro or two would help be get a better understanding before I jumped into the entire turret setup. I want to understand the code I am working with (even though the wizard will be great). But now this has got me stumped and I'm not one to let go of that until I gain some knowledge on how to get past this.

And trust me, I've looked at every turret post on the forum, tech bulletins, read the lathe operator manual several times and looked over the examples posted. I get the fact this comes easy to some of you due to working it for a living or at least since this project began. Coming in as newbie, it's pretty rough since there isn't one place to look for everything. The front Acorn page doesn't link to everything and neither does the turret post. But I'm trying to get there!!

Thanks
Last edited by Threedj16 on Tue Nov 12, 2019 4:48 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: Thu Apr 12, 2018 7:19 amBut now this has got me stumped and I'm not one to let go of that until I gain some knowledge on how to get past this.
Do you have a spare QCTP & some toolholders? Perhaps it's time to back off on the ATC for a while & focus on using the lathe to make some chips via manual tool changes with a QCTP. ATC's are cool but from reading the plethora of posts from guys without experience with them it seems to me they are a black hole that keeps one away from the main goal. Could it be mounted nearby temporarily & a QCTP installed so one could get on with learning the other parts of the lathe & software until the ATC wizard comes out & is proven successful? Just a thought. :)
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: Thu Apr 12, 2018 9:13 am
Threedj16 wrote: Thu Apr 12, 2018 7:19 amBut now this has got me stumped and I'm not one to let go of that until I gain some knowledge on how to get past this.
Do you have a spare QCTP & some toolholders? Perhaps it's time to back off on the ATC for a while & focus on using the lathe to make some chips via manual tool changes with a QCTP. ATC's are cool but from reading the plethora of posts from guys without experience with them it seems to me they are a black hole that keeps one away from the main goal. Could it be mounted nearby temporarily & a QCTP installed so one could get on with learning the other parts of the lathe & software until the ATC wizard comes out & is proven successful? Just a thought. :)
Actually I can manually jog the turret into place now just turning on the flood button. The whole point of these small exercises in learning macros is to build up the knowledge to learn how to automate the turret. This first macro was simply to try and automate the jog to one tool position and stop. Then my thoughts were to build on that by updating tool numbers with that jog. Then lastly add in operator interface asking for tool number and it moving to that tool. Was hoping by that point to have enough knowledge to implement the turret via software.

Already have another lathe with a QCT setup on it. Making chips isn't a problem...LOL. This one's first op will be with the turret, and I'm not stopping till I git R dun! LOL.

Guess it's worth considering just doing the team viewer tech support deal and get this over with. Then I can look back on what they did and try to learn from it. At least then, I will have this lathe working and code I can learn from.


Post Reply