G76, Troubleshooting needed!

More
14 Oct 2018 13:29 #118771 by Victor
Hi!

I'm having trouble to get the G76 threading to work.

When trying to run a program with G76 the lathe starts the spindle and moves to start point, after that nothing else happens it just sits there with spindle running.

My first thought was that the index signal didn't come through but i get signal on both input-A and input-B using the watch function in HAL configuration.
So i guess something is not configured correctly but i cant figure it out.

The lathe is a Emco Turn 120P converted with Mesa 7176E, i kept the original encoder that has one 1ppr signal and one 360ppr signal.

I've attached the NC-program, .ini and .hal files and also some screen shots of HAL configuration/Watch

Any ideas?

Best regards Victor

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

More
14 Oct 2018 14:22 - 14 Oct 2018 14:22 #118772 by PCW
Replied by PCW on topic G76, Troubleshooting needed!
Assumimg index is working, I think there are two possibilities here:

1. motion.spindle.at-speed false
(check state when spindle running and then check hal connections)

2. Spindle encoder not counting or counting backwards
( verify that this counts UP by 1.00 for each FORWARD turn of the spindle )
Last edit: 14 Oct 2018 14:22 by PCW.
The following user(s) said Thank You: Victor

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

More
14 Oct 2018 14:45 - 14 Oct 2018 14:51 #118773 by Victor
Replied by Victor on topic G76, Troubleshooting needed!
Hi!

Thanks for your response PCW!

So when checking "motion.spindle-at-speed" using HAL meter it shows TRUE, it doesn't mater if the spindle is off, at 3000rpm or during acceleration / de-acceleration it always shows TRUE, so it does not seam to work?

When checking hm2_7i76e.0.encoder.00.count using watch function in HAL Configuration it started at -108235 or something and continued to increase so after a bit of running it is now -377404 and it doesn't mater if i run cw or ccw it still increases but i guess that has to do with the fact i don't have a quadruple encoder.

Edit: i also check how many pulses that was counted after approximately a full turn on the spindle. and i got about 150 pulses, is that odd due to the fact i got a 360PPR encoder?
The spindle speed in axis is about the same as what my rpm meter says the chuck is spinning IRL.

Br Victor
Last edit: 14 Oct 2018 14:51 by Victor.

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

More
14 Oct 2018 16:50 - 14 Oct 2018 16:51 #118780 by andypugh

When checking hm2_7i76e.0.encoder.00.count using watch function in HAL Configuration it started at -108235 or something and continued to increase so after a bit of running it is now -377404 and it doesn't mater if i run cw or ccw it still increases


That is decreasing.

It is counting backwards. Change the sign of the spindle encoder scale (probably in the INI) and it should work.
Last edit: 14 Oct 2018 16:51 by andypugh.
The following user(s) said Thank You: Victor

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

More
14 Oct 2018 18:36 #118789 by Victor
Replied by Victor on topic G76, Troubleshooting needed!
Hi Andy!

That did the trick!
I changed ENCODER_SCALE from 150 to -150 and G76 started working!

Thanks to both of you!

However the Z motion/feed sounds uneven, like it's vibrating/stuttering.
Is that normal? or do i need to adjust something?

This is what i have under spindle in .ini file

#********************
# Spindle
#********************
[SPINDLE_9]
P = 1.0
I = 1.0
D = 0.5
FF0 = 1.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 4576.0
ENCODER_SCALE = -150.0
OUTPUT_SCALE = 4576
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 4576

Br Victor

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

More
16 Oct 2018 19:04 #118895 by Victor
Replied by Victor on topic G76, Troubleshooting needed!
Ok, did some more testing.

With a pitch of 1mm it runs fine on 300rpm, 600rpm,
But on 400rpm, 1200rpm it stutters on the Z feed.

And threading works during M3 command but not when using M4..
If i change back encoder scale from -150 to 150 i can use M4 but of course not M3.
How can i solve this?

Br Victor

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

More
18 Oct 2018 22:04 #119026 by andypugh
Stuttering could be a mechanical or PID resonance. Is this a servo or stepper machine?

(My first stepper lathe stuttered awfully, but LinuxCNC was rapidly improved to avoid that)

Do you want to make left-handed threads in M4 mode?

I can't say I have tried it. You might just have to experiment with air cuts. What does a negative pitch give you?

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

More
28 Oct 2018 19:51 - 28 Oct 2018 19:52 #119563 by Victor
Replied by Victor on topic G76, Troubleshooting needed!
Hi Andy.

Agreed it could be resonance but i'm pretty sure it's not the case this time, i've never heard anything like it in my lathe until i started running the G76.

To exclude the chance of resonance i tested a code like this:

G0 X20 Z80 M4 S1200
G33 Z40 K1
G0 Z80
G95
G1 Z40 F1

this makes the lathe to first run the spindle synchronized motion with 1200rpm and a feed of 1 rev/turn
after it does the exact same move again without the spindle synchronized motion but still with 1200rpm and feed of 1 rev/turn

And the difference is clear with G33/ G76 it's stutters very bad and without it it's super smooth.
If i drop the rpm to 400 the feed is smooth with G33 and if i increase the rpm to 1400 it's also smooth but at certain rpm's it's bad!
How do i solve this? is there any filter for the encoder input that could be applied? or are there other ways?

You can check this link to my onedrive with a movie clip of it:
G33 Test video

And regarding M4/M3 threading, will i do left hand threads everyday, no absolutely not but i'm sure i will make them from time to time.
So both M3 and M4 threading would be nice have.
How would i solve that?

Br Victor
Last edit: 28 Oct 2018 19:52 by Victor.

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

More
28 Oct 2018 20:03 #119564 by PCW
Replied by PCW on topic G76, Troubleshooting needed!
What type of encoder do you have?

Have you tried plotting the encoder position?

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

More
28 Oct 2018 20:32 #119567 by Victor
Replied by Victor on topic G76, Troubleshooting needed!
Hi,

I don't really know what brand of encoder it is, i'm still using the one that was mounted originally on the Emco lathe at the factory.

It's not a quadruple but i have one 150ppr signal and one 1ppr signal.

there are some info here:
emcocncretrofits.wikia.com/wiki/Spindle_encoder
The encoder on the link does however have 360ppr but i suppose there might have been variations from year to year during manufacturing.

Could you elaborate what plotting the encoder position is? :)

Br Victor

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

Time to create page: 0.090 seconds
Powered by Kunena Forum