lost with encoder setup.

More
28 Jul 2022 04:15 #248505 by Justin1387
Hello,  This is my first time coming to a forum for help, Usually able to figure things out for myself/ with reading others posts.  
Im having trouble getting my Cnc lathe to work with an encoder. I am using a mesa 7i76e and linux to control a 2 axis lathe, I recently was able to set up a new spindle encoder on the machine and was able to get a bit of help from the mesa team to get the encoder working.  It seems to be working properly according to the hal show where I have rotation and rpm listed and seems to be correct.  When I load a program from fusion 360, such as a threaded part the cnc lathe will stop at the line of code with the k command for the advancement of the z axis.  Im not sure if my problem is coming from the lathe and linux setup or if it is a post processor setup issue.  note: this machine was and is working with code from fusion 360 just have not been able to get spindle synchronization to work.   Thanks for any and all help in advance

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

More
28 Jul 2022 15:04 #248547 by Todd Zuercher
I'm guessing probably missing some configuration items.

Post copies of your hal and ini files as attachments, (You might need to rename the file extension on your hal file for it to upload.)
The following user(s) said Thank You: Justin1387

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

More
28 Jul 2022 17:33 #248563 by Justin1387
Replied by Justin1387 on topic lost with encoder setup.
attached are copies of my hal and ini files.  thank you
Attachments:

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

More
28 Jul 2022 17:47 #248566 by Henk
Replied by Henk on topic lost with encoder setup.
Can you do a test by issuing some mdi commands?

In mdi do the following. Make sure that you are far enough away from the chuck. Run this in "thin air"

G97 s300
G91
G33.1 z-20 k1
G90
M5

This is just a simple rigid tapping operation and will confirm if your config is correct.
The following user(s) said Thank You: Justin1387

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

More
28 Jul 2022 18:18 #248568 by Justin1387
Replied by Justin1387 on topic lost with encoder setup.
hello, with this code it throws an error "spindle not turning in g33.1 even if I have the spindle turning prior. the command g97 s300 doesnt kick on my spindle for whatever reason.   the code I'm getting out of fusion 360 is using g33 not g33.1.    g33 from fusion throws no error, g33.1 is showing spindle not turning in g33.1

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

More
28 Jul 2022 18:27 #248569 by Henk
Replied by Henk on topic lost with encoder setup.
Sorry. Add a m3 in line 1.
G97 s300 m3
The following user(s) said Thank You: Justin1387

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

More
28 Jul 2022 18:33 #248570 by Justin1387
Replied by Justin1387 on topic lost with encoder setup.
update.  I didn't have the x and z axis zeroed before running this the first time.  After setting zero the code didn't throw any error codes but didn't run the code either. The machine just sits there just like with the fusion 360 g33 code. I did add an M3 to your code to start the spindle.   Im thinking the spindle at speed and the encoder z- or something need to be connected from reading other forums but I dont know how to check if this is the case nor do I know how to connect them, as im new to linux and struggled getting this machine to work in the first place.  I've built several cnc machines on windows systems but first experience with linux.

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

More
28 Jul 2022 18:41 #248571 by Henk
Replied by Henk on topic lost with encoder setup.
This confirms that your encoder index is not connected or configured right. The sign of your encoder scale can also cause this.
The following user(s) said Thank You: Justin1387

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

More
28 Jul 2022 18:43 #248572 by Justin1387
Replied by Justin1387 on topic lost with encoder setup.
it is negative.  should I change the encoder scale from 400 to -400  to change the value output in the halshow to a positive?  

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

More
28 Jul 2022 18:53 #248574 by Justin1387
Replied by Justin1387 on topic lost with encoder setup.
changing the encoder scale to a negative worked man!  its now running the code.  thank you guys so much for the help!  

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

Time to create page: 0.080 seconds
Powered by Kunena Forum