Diagnostic procedure for coordinated motion (threading)

More
24 Nov 2017 19:31 #102310 by sliptonic
I've been converting a little Spectralight lathe for our hackerspace and have it mostly working now.

I'm running 2.7.11 uspace with gmoccapy and the Lathe Macros.
Most everything seems to be working perfectly except the threading macro. It works but the resulting threads are terrible. It's almost like multi-start threads. If I set the pitch to 1.5mm, I get multiple threads in that space.

My first guess is that I have something wrong with the index signal but I'm not sure how to diagnose or isolate the problem. I believe the encoder has 200 lines so it should have plenty of resolution.

I roughly tested for backlash by jogging the Z axis and measuring with a digital caliper. It's not great but not bad enough to account for the problem.

My config is here . The current commit is still my Machinekit version. I've converted it to LinuxCNC but haven't pushed yet. relevant hal and .ini file sections are unchanged though.

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

More
24 Nov 2017 20:57 #102318 by PCW
Is your encoder 200 or 2000 lines? ( the ini file suggests 2000 )

To test coordinated moves i would manually set index enable and make sure that its
1. Cleared at only one location of the spindle
2. That the spindle position advances by 1.000 for each forward turn of the chuck

You can set index enable without changing the hal file by "setsing" the signal that conveys index enable:

halcmd sets spindle-index-enable true

and watch it with halmeter

halmeter signal spindle-index-enable

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

More
24 Nov 2017 23:47 #102321 by sliptonic
Hmm. Well, it's certainly not a 2000 line encoder, but this is a clue.

The encoder isn't directly on the spindle, it's on a belt driven pulley. I think a 1:4 ratio. So the index clears 4 times per spindle revolution. With the scale at 8000, I get one spindle revolution counted per physical revolution.

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

More
25 Nov 2017 00:17 #102323 by PCW
OK so the scale is correct but the index is not

LinuxCNC expects only one index event per spindle rotation so
if you try to thread you will get random 90 degree offsets (1/4 thread pitch) in the start of the thread

It might be that the simplest fix is to ignore the encoder index and add a proximity switch on the spindle
for a 1 per turn index
The following user(s) said Thank You: sliptonic

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

Time to create page: 0.098 seconds
Powered by Kunena Forum