Lathe turret tool changer with absolute encoder

More
14 Oct 2023 13:43 #282991 by Trav328
I believe that might be what is happening.

Would this be easier if I went to a pulse and index sensor ? I could use the existing clamp senspr for pulse and i have a spare prox i could add for the home/t1/index 

Please Log in or Create an account to join the conversation.

More
14 Oct 2023 15:06 - 14 Oct 2023 16:22 #282997 by Trav328
I just did a quick test with the prox switch idea in index mode and it works flawlessly   and since I'm using the clamp switch as my pocket it guarantees its locked every go around , I'm going to do up a little bracket for the index prox.

How can I incorporate this into my homing routine ? So I don't have to manually do m6t1 every startup

sometimes using m6t1/2/3/4/etc it will go to the wrong tool , i just called m6t8 from t2 but it just went back 1 click to t1
the carousel.0.current-position is always accurate with the tool count now tho , just almost like the info is not getting to linuxcnc
Last edit: 14 Oct 2023 16:22 by Trav328.

Please Log in or Create an account to join the conversation.

More
14 Oct 2023 19:22 #283010 by andypugh
The absolute encoder is by far the best solution. It doesn't need to home, and it can't get out of synch. I would strongly advocate retaining it.

Can you show the actual input values on the three sense lines for each tool position?

I did make an update to the carousel comp for absolute encoders which use 000 to mean 8 (like yours probably does)

See this discussion: forum.linuxcnc.org/26-turning/48487-maza...ool-changer?start=10 and
github.com/LinuxCNC/linuxcnc/commit/2d6b...8aec9f77e175ce269369

Which version of LinuxCNC are you using? I think it will help to update to the latest version of carousel (you don't need to update all of LinuxCNC, though I am hopeful that will be publicly available tomorrow) You can just grab the carousel.comp file and install with halcompile,

Please Log in or Create an account to join the conversation.

More
14 Oct 2023 20:31 #283015 by Trav328
My encoder table is attached , it does use 0,0,0 for 8 

I'm on linuxcnc 2.9 , installed about 1.5 months ago, I will update the carousel.comp this evening when I go back out to the garage , and I will do up a table of the sense inputs.

If I do retain the encoder I will have to add something to verify the turret clamping prox input , i noticed when using the encoder sometimes it would see the encoder position when it was not close to clamping position. 

Attachments:

Please Log in or Create an account to join the conversation.

More
14 Oct 2023 22:34 #283018 by andypugh

If I do retain the encoder I will have to add something to verify the turret clamping prox input , i noticed when using the encoder sometimes it would see the encoder position when it was not close to clamping position. 

Do you have the strobe connected? That is what that is for. 

Please Log in or Create an account to join the conversation.

More
15 Oct 2023 00:19 #283023 by Trav328
I do but the way this turret is setup is the motor needs to keep turning for .5 or so seconds until the Internal cam comes around and clamps , that's what the extra prox switch is for , it verifys clamping 

Basically the encoder can be in place but turret is loose.

Please Log in or Create an account to join the conversation.

More
15 Oct 2023 01:31 - 15 Oct 2023 01:32 #283027 by Trav328
Some more headway with the encoder , I replaced the strobe I put with the Input from my clamp prox , this seems to work.

I did the fix you sent me to but that was for the gray code section and the binary section has some different code.

So when it looks for tool 8 all it sees is 0-7 , and just spins until you close linuxcnc

 
Last edit: 15 Oct 2023 01:32 by Trav328.

Please Log in or Create an account to join the conversation.

More
15 Oct 2023 01:36 #283028 by tommylight
That should be easy by using timedelay or oneshot, cant recall exactly what i used on my Mazak, leme see...

Yup, both as it seems as i needed a bit more fiddly stuff.
Attached is the changer.hal file.
Attachments:
The following user(s) said Thank You: Trav328

Please Log in or Create an account to join the conversation.

More
15 Oct 2023 02:40 - 15 Oct 2023 02:41 #283029 by Trav328
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.
Last edit: 15 Oct 2023 02:41 by Trav328.

Please Log in or Create an account to join the conversation.

More
15 Oct 2023 12:32 #283066 by tommylight

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.

Seems like miss wiring, be it physical wires or in hal.
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.

Time to create page: 0.107 seconds
Powered by Kunena Forum