Help needed on the best way to control a 8 position lathe turret

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

jumps4
Posts: 143
Joined: Wed Oct 10, 2018 8:37 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38d2697ca033-0611180974 mpu12
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: New Port Richey, Fl. USA
Contact:

Re: Help needed on the best way to control a 8 position lathe turret

Post by jumps4 »

briuz wrote: Sun Sep 08, 2019 10:29 am Programmed right, you can make that work. But you really only need one signal to find the home position. The other positions can be located by just rotating 45 degrees for each position.
do you think the gray logic would be more accurate or just home all axis and go with your way?
I think maybe gray logic is more for just a dc motor not a stepper
I am probably over thinking this but I want it to be easy to use with no work a rounds.
just plug and play if possible

thanks for reply
Steve
No Brains, No Headaches...


briuz
Posts: 127
Joined: Wed Jul 10, 2019 9:24 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Help needed on the best way to control a 8 position lathe turret

Post by briuz »

I'd just use a way to home the turret and go from there. Once you know the position of home you can fix anything else in the macro code. See my M40 code, for example. When I drilled the hole for the magnet in the back of the turret, I just concerned myself with it lining up with the hall sensor. Then I found out the number of degrees to offset for the first tool and put it into variable #158 to "fix" the problem with software.

I plan to post more on my lathe from scratch build once I get my electric collet closer grease seals fixed.


martyscncgarage
Community Expert
Posts: 9949
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: Help needed on the best way to control a 8 position lathe turret

Post by martyscncgarage »

IF the disk is accurately machined, gray logic works.
Keith sent you the PLC for a 4 bit logic turret. Many turrets use this. Though they use a motor to rotate the worm.
You could use an axis to drive the turret and it would take some work to modify the PLC but doable. I have an Emcoturn 140 that I plan to do this on.
Use Centroid's truth table. (I assume its in with the example) use the inputs described.

By using the gray logic, the PLC is assured the tool change has completed, if it times out, then there will be a fault. Which is better than a crash.

I have several turrets to test with Centroid. We've been waiting for the new Ether1616 IO board and new software. I also have to juggle it between customer work.....I will always report back and try and do a video. Centroid, as time permits will fine tune the PLC/schematic and publish as an example.

Marty
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ


briuz
Posts: 127
Joined: Wed Jul 10, 2019 9:24 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Help needed on the best way to control a 8 position lathe turret

Post by briuz »

Looking at Marty's post, I like what he said about having a fault if there is no tool change. In testing my turret, I was contemplating how to tell if there was a fault. Grey logic solves this problem.

In my case, I could probably figure something out with another hall sensor and 16 more magnets....


jumps4
Posts: 143
Joined: Wed Oct 10, 2018 8:37 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38d2697ca033-0611180974 mpu12
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: New Port Richey, Fl. USA
Contact:

Re: Help needed on the best way to control a 8 position lathe turret

Post by jumps4 »

OK it looks like gray logic is the beginning
my lathe is perfect for beta testing because I don't need it I just wanted it.
when new I/O boards come out I'll probably buy one, but I will try this for now
this lathe has made 5 parts since construction. (all came out exactly the same)
I have a bad habit of using things saying I'll redo it later and it never happens. (they all worked but could be better)
This project is going to sit until I feel I have reached it's complete potential.
thanks guys, parts will be here next week and I'll post my progress.
Steve

note: I also purchased this board that uses the same chip as the Emcoturn 140 turret
I'll use my slotted sensors
4 channel ir board.PNG
Last edited by jumps4 on Sun Sep 08, 2019 2:55 pm, edited 3 times in total.
No Brains, No Headaches...


Richards
Posts: 706
Joined: Sun Sep 16, 2018 9:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: South Jordan, UT

Re: Help needed on the best way to control a 8 position lathe turret

Post by Richards »

I've used the interrupter type sensors displayed in one of your photos. They work great but are subject to dust and water. It that is a factor in your lathe you might consider using a proximity sensor that is designed to withstand dust, dirt and water.

Using two inputs would solve the problem of turret rotation and one output. One sensor would sense the home position. The other sensor would simply count up for each tool's position. In other words, the turret would be homed and then if tool 5 were needed, the tool sensor would signal each time a tool was sensed - count to 5. If the logic is hard to do with G-code, an Arduino Uno, PLC or something similar could be used to do the logic.

By offsetting the positions of the sensors so that they would never both be on when sensing a valid position, the external Arduino, PLC or other logic, could turn both sensors on to acknowledge receipt of a "change tool" output command. Then the external logic device would move the turret to the right position and issue a "done" command".
-Mike Richards


jumps4
Posts: 143
Joined: Wed Oct 10, 2018 8:37 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38d2697ca033-0611180974 mpu12
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: New Port Richey, Fl. USA
Contact:

Re: Help needed on the best way to control a 8 position lathe turret

Post by jumps4 »

Thanks Richards
all good ideas
my brain is scrambled now and I'd love to learn Arduino but another code to try to learn now might send me over the edge.
Steve
No Brains, No Headaches...


Richards
Posts: 706
Joined: Sun Sep 16, 2018 9:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: South Jordan, UT

Re: Help needed on the best way to control a 8 position lathe turret

Post by Richards »

I left one detail out in my previous post. Somehow the external logic needs to know which tool position is desired. Unfortunately, that uses I/O. Two bits can define up to four positions. Three bits can define up to eight positions

Tool Positions using three output signals
000 = 0 No Tool
001 = 1 Tool 1
010 = 2 Tool 2
011 = 3 Tool 3
100 = 4 Tool 4
101 = 5 Tool 5
110 = 6 Tool 6
111 = 7 Tool 7

Tool change required output
0 = No change required
1 = Change tool

Tool change state input
0 = Tool change completed
1 = Tool change in progress

So, you would set the tool desired by changing the three outputs that define which tool to use. Then you would turn on the change tool output. When the outside logic saw the tool change command, it would set the tool change state output to 1. That would signal the Acorn to turn off the tool change command and to wait until the input bit was turned off before continuing. The outside logic would move the turret until the desired tool was in position and then it would turn off its tool change output to signal to the Acorn that the positioning was complete.

To recap: Six positions on the turret would require 4 output signals from the Acorn, 1 to command a tool change and three to define which tool to use. One input on the Acorn would monitor the status of the tool change operation.

If four outputs are not available, then you could "bit bang" an outside logic device by using two outputs. One output would serve as a data line and one output would serve as a clock line. The data line would be set high (on) and the clock line would be toggled On then Off three times to signal that a tool change command was coming. The Acorn would use the table above so that bit 0 is the least significant bit in the table above and bit 2 is the most significant bit in the table. The Acorn would set the data line to the value of bit 0 and toggle the clock line On then Off. The Acorn would set the data line to the value of bit 1 and toggle the clock line On then Off. The Acorn would set the data line to the value of bit 2 and toggle the clock line On then Off.

Bit banging is more complicated, but it would allow you to use more tools without using up all of the output lines.
-Mike Richards


martyscncgarage
Community Expert
Posts: 9949
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: Help needed on the best way to control a 8 position lathe turret

Post by martyscncgarage »

See attached Schematic.
Tool changers helped drive Ether1616. Ether1616 is a fairly complex bit of electronics.

Marty
Attachments
S14987-ACORN_rev4_4_BIT_GRAY_CODE_TURRET_LATHE_STANDARD_CONNECTIONS.pdf
(170.88 KiB) Downloaded 134 times
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ


jumps4
Posts: 143
Joined: Wed Oct 10, 2018 8:37 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38d2697ca033-0611180974 mpu12
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: New Port Richey, Fl. USA
Contact:

Re: Help needed on the best way to control a 8 position lathe turret

Post by jumps4 »

I have now recieved the 4 pin sensor boards and they have made everything easier.
Their connections are
5v +
ground
digital out
analog out
The analog out will power the 5v optocouplers on the 4 connection input breakout board I ordered.
the breakout board will switch the 4 acorn inputs.
DSCF2603.JPG
I ordered a board to run the stepper motor like a dc motor by relays.
that board sets timeout if there is a fault and sets speed / direction by relay inputs.
DSCF2604.JPG
Thanks for helping
Steve
Attachments
DSCF2595.JPG
DSCF2593.JPG
No Brains, No Headaches...


Post Reply