- Posts: 75
- Thank you received: 31
Lathe turret tool changer with absolute encoder
3 years 2 weeks ago - 3 years 2 weeks ago #283029
by Trav328
Replied by Trav328 on topic Lathe turret tool changer with absolute encoder
Thanks for the file , I'm going to look over your tool change loop as that's what I need to do next.
I'm taking a little break form the encoder and just attached my index switch for now , i do want to have the encoder working but its kicking my butt. I can switch between encoder and index setups in about 10 minutes.
Another thing I noticed is it seems to count backwards , if your at t2 and call t3 you wind up at t1 but the bits say t3 , maybe the old controller flipped it in software.
I'm taking a little break form the encoder and just attached my index switch for now , i do want to have the encoder working but its kicking my butt. I can switch between encoder and index setups in about 10 minutes.
Another thing I noticed is it seems to count backwards , if your at t2 and call t3 you wind up at t1 but the bits say t3 , maybe the old controller flipped it in software.
Last edit: 3 years 2 weeks ago by Trav328.
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
3 years 2 weeks ago #283066
by tommylight
Do some tests and write down what pin state denotes what tool, then change in hal accordingly. Much easier that dealing with wires.
Replied by tommylight on topic Lathe turret tool changer with absolute encoder
Seems like miss wiring, be it physical wires or in hal.Another thing I noticed is it seems to count backwards , if your at t2 and call t3 you wind up at t1 but the bits say t3 , maybe the old controller flipped it in software.
Do some tests and write down what pin state denotes what tool, then change in hal accordingly. Much easier that dealing with wires.
Please Log in or Create an account to join the conversation.
3 years 2 weeks ago #283071
by andypugh
The same fix is probably applicable in binary mode, if you want to modify carousel.comp.
Or you can fix it in HAL. a 3-way "NOR" function on the other three pins can be used to drive the 4th input pin of carousel.
Replied by andypugh on topic Lathe turret tool changer with absolute encoder
I did the fix you sent me to but that was for the gray code section and the binary section has some different code.
The same fix is probably applicable in binary mode, if you want to modify carousel.comp.
So when it looks for tool 8 all it sees is 0-7 , and just spins until you close linuxcnc
Or you can fix it in HAL. a 3-way "NOR" function on the other three pins can be used to drive the 4th input pin of carousel.
Code:
loadrt logic personality=0x1003
addf logic.0 servo thread
net bit1 {bit 1 input here} carousel.0.sense-0 logic.0.in-00
net bit2 {bit 2 input here} carousel.0.sense-1 logic.0.in-01
net bit3 {bit 3 input here} carousel.0.sense-2 logic.0.in-02
net bit4 logic.0.nor => carousel.0.sense-4
The following user(s) said Thank You: Trav328
Please Log in or Create an account to join the conversation.
3 years 2 weeks ago #283115
by Trav328
Replied by Trav328 on topic Lathe turret tool changer with absolute encoder
Thanks Andy , I'm back on shift for a bit but I will dig back into this the next free weekend in the garage , I just left it in index mode for the time being so I can work on the rest.
I checked the wiring a few times and performed a encoder calibration from the factory manual, I did the modification in carousel.comp and reinstalled.
I will give the hal fix a go next.
The next thing to work on is the m6 remap you mentioned in your first reply so it gives the g43 with m6 , I seen mention of an example in the fanucy Sim.
The other thing is sometimes if i call say m6t8 it just switches to t8 in gmoccapy but the tool changer doesent move , sometimes it does , could this be related to having carousel in the prepare loop rather than the change loop ?
If I manually jog the tool changer it always accurately reports the tool number in carousel.0.current-position.
I checked the wiring a few times and performed a encoder calibration from the factory manual, I did the modification in carousel.comp and reinstalled.
I will give the hal fix a go next.
The next thing to work on is the m6 remap you mentioned in your first reply so it gives the g43 with m6 , I seen mention of an example in the fanucy Sim.
The other thing is sometimes if i call say m6t8 it just switches to t8 in gmoccapy but the tool changer doesent move , sometimes it does , could this be related to having carousel in the prepare loop rather than the change loop ?
If I manually jog the tool changer it always accurately reports the tool number in carousel.0.current-position.
Please Log in or Create an account to join the conversation.
3 years 2 weeks ago #283116
by andypugh
That should be fairly simple, the most basic version just needs to map Tnn to M6 Tnn G43.
It gets a lttle more xomplicated uf you want to add wear limits.
Replied by andypugh on topic Lathe turret tool changer with absolute encoder
The next thing to work on is the m6 remap you mentioned in your first reply so it gives the g43 with m6 , I seen mention of an example in the fanucy Sim.
That should be fairly simple, the most basic version just needs to map Tnn to M6 Tnn G43.
It gets a lttle more xomplicated uf you want to add wear limits.
Including position 8?If I manually jog the tool changer it always accurately reports the tool number in carousel.0.current-position.
Please Log in or Create an account to join the conversation.
3 years 2 weeks ago - 3 years 2 weeks ago #283117
by Trav328
Replied by Trav328 on topic Lathe turret tool changer with absolute encoder
Using index mode with my extra prox sensor it reports tool 1-8
Using the encoder it still reports tool 0-7
Using the encoder it still reports tool 0-7
Last edit: 3 years 2 weeks ago by Trav328.
Please Log in or Create an account to join the conversation.
Time to create page: 0.057 seconds