G67, machine hangs before cutting

More
29 Mar 2019 19:27 - 29 Mar 2019 20:05 #129921 by Vitran
I am branching into thread cutting and getting the GMOCCAPY cycles to work, however I found a hang up on the thread cutting. Running the thread cutting tutorial, the machine halts at the start of the threads and does not continue.

I looked at Spindle-At-Speed which shows True all the time. I do watch net spindle-cmd => near.0.in1 and net spindle-velocity => near.0.in2, and watching near.0.in2 it is very close to near.0.in1, so I do believe that is working correctly. I did make the spindle slightly over-damped.

I did read this thread, which lead to some searching:
forum.linuxcnc.org/20-g-code/35363-g76-troubleshooting-needed

Looking at the encoder.00.count, the number is negative and is increasingly negative. I did try inverting the encoder signal which made the count negative and increasingly negative and also the spindle rpm increased exponentially. I put the encoder back to the original state.

The encoder has a scale of -4096.

The encoder has A and B channels, not Z. I do not know if this is the cause. I noticed on the documentation talking about the phase-z line which I do not have.


EDIT: This is my current code drive.google.com/open?id=1K3BCIz4ytaCl5yYt8FMn-uTRp2myhKxj

If someone needs, these are some things I included in my code. This may help others who are making something similar.
mux-gen for a 5-bit feed and rapid dial
Dual encoders, one for X and one for Z/W
Driven Tailstock
Air-driven 8-pocket turret and tailstock
Turret encoder
Collet control with lights
Coolant control via button
Indexing turret using MDI controls
Last edit: 29 Mar 2019 20:05 by Vitran.
The following user(s) said Thank You: akb1212

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

More
29 Mar 2019 20:48 #129925 by Clive S
I am no expert but I think you HAVE to have the z index signal to have threading working with G76. you might be able to do it with a hall sensor on the spindle shaft to give you one pulse every rev.

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

More
29 Mar 2019 21:18 #129927 by Vitran
If I have an encoder with A and B, why do I need Z? How can I trick it? Can I make a counter to send a Z pulse every 4096 pulses?

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

More
29 Mar 2019 21:24 - 30 Mar 2019 08:36 #129928 by Clive S

If I have an encoder with A and B, why do I need Z? How can I trick it? Can I make a counter to send a Z pulse every 4096 pulses?


For threading you only need A and Z. Sorry can't help with the pseudo-Z For ridged tapping you need A+B+Z
Last edit: 30 Mar 2019 08:36 by Clive S. Reason: added text

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

More
30 Mar 2019 00:22 #129939 by andypugh
Without a real index subsequent passes will not align.

You can experiment with a pseudo-index but I am not sure it will work properly.

Here is how:
Note that 4096 is a convenient binary number. If you pass encoder.N.rawcounts in to a bitslice HAL component
linuxcnc.org/docs/devel/html/man/man9/bitslice.9.html
Then bit 12 will toggle every 4096 counts, or every rev.
I think that bit 11 might be better, as that should do a low to high transition once ever rev. (check with halmeter to choose the best). That can be used as an unreliable index.
Note that rawcounts is signed, so bitslice would need the counts passed through a conv_s23_u32 converter component.

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

More
30 Mar 2019 00:23 #129940 by andypugh
Oh, and you will still need to reverse the encoder counts to get threading to work... The runaway suggests that you have a closed-loop spindle? That also needs something reversing, I suspect. Possibly the drive itself.

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

Time to create page: 0.152 seconds
Powered by Kunena Forum