Hello Guest it is May 25, 2025, 11:32:27 AM

Author Topic: G76 Threading problem.  (Read 22504 times)

0 Members and 2 Guests are viewing this topic.

Offline Rimmel

*
  •  284 284
G76 Threading problem.
« on: July 19, 2024, 08:40:59 AM »
Mach 4 4809 - ESS 285

I have a machine "Upgraded" from Mach3 to Mach4: Got a Rotary encoder setup ABZ. Working fine.

If I run this threading GCode (below) it will sometime run but others (random) it just sits on the G76 line and will not move any further.

Anyone have any idea why? Seems like it's not recognising the Index sometimes.

To be clear this code runs and cuts a great thread quite often, but then will just refuse. I can reset it and it will still not run and then all of a sudden it will run again.

How can I debug/investigate the error (Mach4 doesn't throw up and error)
Code: [Select]
G40 G54 G80 G98 G18 G21

G99 (Feed per Revolution)
G97 S450 (Constant Speed)
M03 (Spindle Forward)
M08 (Flood)
G00 X10.0
G00 Z5.0 (Rapid move to Clearance Height)
G4 P2.0

G76 P030060 Q0.001 R0.015 K3
G76 X9.02 Z-19.0 R0.0 P0.44 Q0.015 F0.75
G80 %
M5
M9
G98

M09
M05
M30 %

Offline Graham Waterworth

*
  • *
  •  2,783 2,783
  • Yorkshire Dales, England
Re: G76 Threading problem.
« Reply #1 on: July 20, 2024, 09:29:53 AM »
It could be its waiting for the index signal.
Without engineers the world stops

Offline Rimmel

*
  •  284 284
Re: G76 Threading problem.
« Reply #2 on: July 20, 2024, 09:55:22 AM »
It could be its waiting for the index signal.


I agree, but it sometimes finds it, sometimes it doesn't. Theres no rhyme nor reason for it. I can't find out how to debug/fault find it.

I have asked on the Warp9TD forum, because apprently the ESS module controls the index, however support for ESS has basically ceased. With the main programmer not having posted for some 18 months.

I also asked if the ESS project was end of life and didn't really get a definite answer and must admit I did get a fix for a different problem.

I also contacted the very helpful Weerasak at CNCroom (who make the MB3 board) who suggested...

Quote
Your case, if you are using high ppr encoder such as 1024 ppr. The index might be small tiny pulse so, the system can't catch this pulse.

Have you tried to connect index signal to port3 of MB3. X310-X315. These inputs faster than others port.

My recommendation is make index signals big enough by choosing encoder low resolution 100-200 ppr and connect it to port3

However I am already using a very low 60ppr encoder on the super-fast Port3 (X310, X311, X312).

But even worse than this it happens also when using the Index (1ppr) signal only.

Very perplaexing as all the other stuff is working, but I cannot reliably thread anything.

One thing, when the threading does work, it works great!!! Real nice threads!!

But as you say it's like it's not picking up the index sometimes, but instead of retrying, it tries once, gives up and the program just sits there on the G76 line forever.

I can also reliably recreate the problem:

1) Call the threading Gcode 5 times, it runs fine.
2) Edit the G76 line e.g. change the thread depth or cut depth parameter
3) Run the Gcode again and it will hang on the G76 line 99% of the time

It's like it expects the index to at a certain point, but it's not... so it fails. Obviously I could be wrong, but with Warp9TD not prioviding any support now then I just cannot find out anything.

Surely other people have lathes running with threading? I was hoping they could have let me know the Encoder and settings they use.

thanks for the replies by the way - really appreciated.

Offline Graham Waterworth

*
  • *
  •  2,783 2,783
  • Yorkshire Dales, England
Re: G76 Threading problem.
« Reply #3 on: July 20, 2024, 10:13:48 AM »
Do you have any de-bounce set on any of the index inputs? if so turn it off as that can be a problem.

Is the encoder cable running with the spindle power cable? If yes move it away.

A 60ppr encoder has 240 pulses if using A & B channel, is this set correctly in the ESS?

I am at a loss after this so I cant help any more.
Without engineers the world stops

Offline Rimmel

*
  •  284 284
Re: G76 Threading problem.
« Reply #4 on: July 20, 2024, 10:31:24 AM »
Do you have any de-bounce set on any of the index inputs? if so turn it off as that can be a problem.

Is the encoder cable running with the spindle power cable? If yes move it away.

A 60ppr encoder has 240 pulses if using A & B channel, is this set correctly in the ESS?

I am at a loss after this so I cant help any more.

The spindles Motor and VFD don't run anywhere near the encoder cable. (they are shielded and earthed as well)

Regarding the pulses, like I say I can use Index only and it's all over the place.

When using the A channel channel I set it for Prescaler 1Effective PPR 60 = Total Encoder Pulses 60

Where would I insert 240 pulses - also why is it 240 pulses? (I really don't know)

All values are setup in Mach4 correctly on ports and pins etc.

No debounce settings are used.

thanks again
« Last Edit: July 20, 2024, 10:33:04 AM by Rimmel »

Offline Graham Waterworth

*
  • *
  •  2,783 2,783
  • Yorkshire Dales, England
Re: G76 Threading problem.
« Reply #5 on: July 20, 2024, 06:47:55 PM »
Most encoders are quadrature output so its 2 pulses on 2 channels A&B 90 degree apart so you have a high and a low for each pulse on both channels.  Plus some have Z for the single index pulse.  So a 256 PPR is 1024 actual pulses.
Without engineers the world stops

Offline Rimmel

*
  •  284 284
Re: G76 Threading problem.
« Reply #6 on: July 21, 2024, 07:22:17 AM »
Most encoders are quadrature output so its 2 pulses on 2 channels A&B 90 degree apart so you have a high and a low for each pulse on both channels.  Plus some have Z for the single index pulse.  So a 256 PPR is 1024 actual pulses.

I don't think they take that into account in mach4 - there nowhere to enter such settings. If I enter any more than the rated PPR then the RPM is massively over or under what it should be.

Offline Graham Waterworth

*
  • *
  •  2,783 2,783
  • Yorkshire Dales, England
Re: G76 Threading problem.
« Reply #7 on: July 22, 2024, 05:03:50 PM »
Okay my bad, I don't use ESS I use CS-LABS and it has to have the quadrature value.

Without engineers the world stops

Offline Rimmel

*
  •  284 284
Re: G76 Threading problem.
« Reply #8 on: July 23, 2024, 06:35:29 AM »
Okay my bad, I don't use ESS I use CS-LABS and it has to have the quadrature value.



Have you got any info for CSlabs you use... I may have to switch over to soething else as it looks like Warp9TD ESS is end of life for Hobby version

thanks again

Offline Rimmel

*
  •  284 284
Re: G76 Threading problem.
« Reply #9 on: August 08, 2024, 11:32:22 AM »
Okay my bad, I don't use ESS I use CS-LABS and it has to have the quadrature value.



FIXED it!!! woohoo!