Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: geoffby on February 26, 2014, 02:15:39 PM

Title: mach appears to send odd signals
Post by: geoffby on February 26, 2014, 02:15:39 PM
Hi,
I'm hoping someone can help me here with a, what appears to be, spurious signals for the software. I've been running Mach3 mill for a few years and getting good results. However, I'm starting to have problems.
The milling machine runs fine, then out of the blue, the x-axis stepper occassionally momentarily stalls and looses approx 5mm in travel on a fast jog mid program - it is like the machine has recieved a spurious signal that has put the stepper into stall.
I have changed steppers and drivers and checked everything out on the machine and all is OK. Today, when doing a test aircut I noticed that, part the way into the programme, the spindle was suddenly running at 4400rpm yet checking the G-code line it was set at 4000rpm. I stopped the machine and reset - re ran the programme and it ran the spindle at the correct speed. However, part way through the programme the X-axis did it's momentary stall again loosing approx 5mm.
I shut everything down to and came back to machine later - doing a test aircut from the same programme as previously run and found that the spindle was screaming it's head off (the readout on the actual mill was giving 5300! - this is more than the max that the motor can handle - usually max out at 4500) - checked the DRO and forund that Mach had set the spindle at 8400! I noticed that the spindle factor(?) - appeared alongside the spindle speed - was at 2.2. The G-code line was 4000rpm. I have checked the G-code and everything is as it should be. What is happening? Is this wrong signal for the spindle also what is happening with the X-axis too? Can anyone help?
Title: Re: mach appears to send odd signals
Post by: Hood on February 26, 2014, 03:49:12 PM
Can you attach your xml, also what version of Mach are you using?
What is the Time in Int and the the Frequency on Diagnostcs page?

Hood
Title: Re: mach appears to send odd signals
Post by: geoffby on February 27, 2014, 06:14:12 AM
Hi Hood,
The version is Mach3-043-022.
Time in Int - varies between +3.2 to +6.5.
Pulse frequency is what you are requiring? Varies from 58629 - 42
Attached is the xml file.
GeoffB
Title: Re: mach appears to send odd signals
Post by: Hood on February 27, 2014, 07:58:48 AM
If the Frequency is varying that much then you have issues with the pulsng of the driver, the frequency needs to be steady and very close to the kernel you have set.
I am not sure if you are meaning 42Hz or 42KHz but in any case varing even between 42KHz and 58KHz is not good.


Hood
Title: Re: mach appears to send odd signals
Post by: Hood on February 27, 2014, 08:02:59 AM
I just looked at your kernel in your XML and you have it set to 60KHz yet the most you need for your motor tuning is just over 10KHz. I suggest you set the kernel to 25KHz and restart Mach and see if that helps, it needs a stable computer to be happy at over 45KHz and there is normally no point in having the kernel higher than you require. 25KHz would still be more than double your requirements but it is the lowest so set to that.
Hood
Title: Re: mach appears to send odd signals
Post by: geoffby on February 27, 2014, 03:07:01 PM
Hi Hood,

Thanks for the info - to be honest, I'm not that clued up on the settings side, just what the guy who set it up and advice from Mach themselves (Scot I think it was - it's a couple or more years since I emailed him) so I've really no idea what anything should be. Does it make any difference what size steppers I'm using? They are 4.2amp 300Ncm and the drivers are M442 - X&Y / DM542 on the Z with voltage of 37VDC.
Where do I find the kernel to alter? And what does this do/mean?

Regards,

GeoffB
Title: Re: mach appears to send odd signals
Post by: Hood on February 27, 2014, 03:48:13 PM
The kernel is the max frequency of the pulse per axis that Mach will output, the higher you set the kernel the more chance you have of the pulse being of poor quality and thus it is usually best to set to the minimum that you require. Your steps per unit for the highest set axis (Z) are 640 and the Velocity is 1000.2 so that means that the pulse at max velocity required by your system is 640 pulses per unit x 1000.2 units per min = 640128 pulses per minute, divide that by 60 = 10668.8 pulses per second or Hz so 10.6688KHz. That means the lowest setting for the kernel in Mach, 25KHz would be more than twice what you require.

To set the kernel go to config menu then Ports and Pins and set to 25KHz, you will need to restart Mach after you do that. First thing once you have restarted is look at the pulse frequency on the Diagnostics page and see if it is steady and close to 25,000.

Hood
Title: Re: mach appears to send odd signals
Post by: geoffby on February 28, 2014, 06:47:44 AM
Hood,

Many thanks for the explanation - that makes things a lot clearer. As I said, as a mechanical engineer, if I can see it working then I understand, but where electronics are concerned I'm a complete neanderthal!  :) I wonder why it was set so high? I'll haved a look at this - perhaps be a few days as I'm away a bit and have other jobs that need doing - so I'll get back to you soon as I've tried it and let you know what the answer is - Fingers crossed you've hit on the answer!! :) I was thinking that there was something that had corrupted a file in the PC and was about to re-format and re-install everything. I'll give this a go before I do anything so drastic!
Many thanks,

GeoffB
Title: Re: mach appears to send odd signals
Post by: Hood on February 28, 2014, 01:23:16 PM
I wonder why it was set so high?


Human nature, more  always looks like its better :)

Hood
Title: Re: mach appears to send odd signals
Post by: geoffby on March 07, 2014, 01:39:04 PM
Hi Hood,

I've reset the kernel as you suggested and the frequency is now steady at 24994 - occassionally reads 92 or 95 but mainly steady - the spindle problem hasn't reoccured. However, I still have a problem on the X axis - and every time at one point in the programme. I've checked out the line code and can find nothing wrong here - just has a G0 for the X & Y positioning at this particular line - all the rest of the programe runs fine. Ideas? I've attached the .nc programme for you to look at if you will. the line of code is at - pocket 8 - G0 X20.7665 Y2.0

GeoffB
Title: Re: mach appears to send odd signals
Post by: Hood on March 08, 2014, 02:50:03 AM
If your kernel is jumping to 92-95 you still have serious problems, you need to get that sorted.

Hood
Title: Re: mach appears to send odd signals
Post by: geoffby on March 09, 2014, 07:09:58 AM
Hi Hood,
It is fairly steady on 94 but occassionally drops to 93 or 93 and then goes steady on 94 again for quite q while and perhaps goes up to 95 for a second then goes back to 94 again for quite a while. Any idea what will be causing this fluctuation? And what the possible cure might be?
GeoffB
Title: Re: mach appears to send odd signals
Post by: Hood on March 09, 2014, 07:44:22 AM
Ok let me ask, are you meaning 92-95 or are you meaning 24,992 -24,995?
If the latter then that is of no concern, if the former then your pulserate is screwed up.
Hood
Title: Re: mach appears to send odd signals
Post by: geoffby on March 09, 2014, 12:29:03 PM
Hi Hood,

Sorry that's me  shortening the figures - yes steady at 24994 with the odd 24992 or 24993, and then the odd 24995 - all those over and below 24994 are for a fleeting second or so whilst mainly steady at 24994. Regarding the odd stall on the particular .nc programme would a Smooth Stepper cure this? Willing to do anything that cures this problem - head against the wall time (now getting pretty hard!!). It is not just this prog that has the problem but happens in some others (not all) too - and sorting all mechanical and stpper motors, etc hasn't cured it. I can jog the X & Y axis all day long with the arrow keys and it runs perfectly - just when running in a programme that has the problem.

GB
Title: Re: mach appears to send odd signals
Post by: Hood on March 09, 2014, 04:07:56 PM
Does the driver test have any spikes on it?

Have you tried reducing the accel and Velocity to see if that helps?

Smoothstepper may help but only if your computer is not capable of a clean pulse or your computer is struggling to keep up with Mach.

Hood
Title: Re: mach appears to send odd signals
Post by: geoffby on March 11, 2014, 12:10:17 PM
Hi Hood,

The driver test looks steady at 25020 with the occassional change to 25018-21 for a brief 1 sec or so - the graph looks straight lined with the odd small spikes (very small) appearing every so often.

I have already tried reducing the motor speed by 10% and reducing the acceleration by around 20% but just the same. The stall only appears to happen at the one point in the programme - on a G0 line. I have done a work around with swapping over the two pockets (ie pockets 7 - 8 to 8 - 7) which has seemed to cure the problem and it runs through the programme so far - a few aircuts without a hiccup. But, the G0 is used all over on the programme so why just this one line? There must be something that makes this happen - it has done it in a few programmes which made me start searching for the answer. The computer is a Dell dimension 3Ghz processor, etc so should be fast enough.

GeoffB
Title: Re: mach appears to send odd signals
Post by: Hood on March 11, 2014, 04:40:49 PM
Can you try using Sherline mode to see if that helps, could just be your drivers are requiring a wider pulse.
Hood
Title: Re: mach appears to send odd signals
Post by: geoffby on March 12, 2014, 06:14:02 AM
Ah! You got me again - what is Sherline mode? And where can I find it? And what does it do?

GB
Title: Re: mach appears to send odd signals
Post by: Hood on March 12, 2014, 07:51:25 AM
Config menu then Ports and Pins, right side of page.
It widens the pulse to 1/2 width, ie 40uS.

Hood
Title: Re: mach appears to send odd signals
Post by: geoffby on March 12, 2014, 02:44:09 PM
Thanks Hood - does it need anything else altering or do you just apply this mode. BTW, the stop gap of changing sequence on the programme for pockets 7 - 8 has worked on this one and the job is now finished - bated breath time though. But I still need to get to the bottom of why it;s happening. I'll give this mode a try.
GeoffB
Title: Re: mach appears to send odd signals
Post by: Hood on March 13, 2014, 04:05:37 AM
Just restart Mach after you change it.
Hood
Title: Re: mach appears to send odd signals
Post by: geoffby on March 13, 2014, 08:23:49 AM
Thanks Hood. Just checked and it is already set at that.
GB
Title: Re: mach appears to send odd signals
Post by: Hood on March 13, 2014, 03:29:02 PM
Did you try reducing your Vel and Accel a wee bit. If it is just on the top end of your motors capabilities  it may fail sometimes on certain moves.
Hood
Title: Re: mach appears to send odd signals
Post by: geoffby on March 14, 2014, 07:50:04 AM
Hi Hood,

Yep - I did that earlier - I reduced it by 10% and the accel by 20% - that was the question I was going to ask about the motor's capabilities at the top end. I know that steppers have good torque at low speed but really drop off at the top end. I ran the machine yesterday and had the same problems again on one certain move. Hair out time!! So, I'll go in the workshop now and turn the motors down by 25% and see if that cures the problem. I'll report back. Thanks for your continuing help!! :)

GB
Title: Re: mach appears to send odd signals
Post by: geoffby on March 14, 2014, 11:12:11 AM
Hi Again,
Just turned the motors down by 25% from original speed - were orig 2000mm/min - 5mm pitch screw - now at 1500mm/sec - Acceleration was 125mm/sec/sec now down to 105mm/sec/sec but still no different still stalls the motor momentarilly - looses almost 3mm on  and 8-9mm fast jog at one place only. Went through fine on one run then on second run the dreaded stall!!!! Is there a test I can do on the motors or some way of monitoring what is happening?
GB
Title: Re: mach appears to send odd signals
Post by: Hood on March 14, 2014, 03:00:12 PM
Is it always at the same point on the axis?
Is it just one axis?
Hood
Title: Re: mach appears to send odd signals
Post by: geoffby on March 14, 2014, 04:27:21 PM
Hi Hood,

Yes - it is on the one axis and not necessarily in the same place, although it is a similar move on different programmes - and not in the same direction. Have checked and double checked everything mechanically and changed everything that can be changed electrically.

Now your last comments about stepper speeds/acceleration started me thinking - I related back to my mechanical days in motor racing and looked at what made engines stall -worked fine and accelerated good but with wheel spin on a quick take off - fitted fatter tyres and the clutch slipped - fitted heavier clutch - and the engine stalled. Ease on the quick take up on the clutch and cure the problem.
Acceleration! That must be the answer.
So I turned down the motors even further to 1200mm/min and the problem became rarer - only every so often. So acceleration it must be - turned the acc down to 85mm/sec/sec and the problem has dissappeared - then if it's just acceleration then the jog speed is not so critical - turned the jog speed up in increments and am back to 2000mm/min but with longer acceleration time and - wow! I just completed 6 jobs in the last hour!!!

Well done Hood - you've (it seems - so far!??) hit the nail on the head. I have a load of work to get on with on monday so I'll see what transpires. I'll let you know. And all the other bits I fitted or software setting that have been altered have all been to the good, so that's fine.

Many thanks for sticking with me on this one.
Regards,
GeoffB
Title: Re: mach appears to send odd signals
Post by: Hood on March 15, 2014, 05:42:23 PM
Hopefully you got to the bottom of it :)
Hood
Title: Re: mach appears to send odd signals
Post by: geoffby on March 18, 2014, 01:00:50 PM
Hi Hood,

Wow, wow, wow and WOW!!!! ;D Just done 2 days of milling with some complicated programmes - some taking a couple of hours to go through - and many fast jogs and not a beat missed! Looks like this is (dare I say it?) the final answer. Been looking at why the motor stalled onn the X axis and not the Y and thinking (and measuring) the saddle and gib lengths and the X one is about 15% longer than the Y, so the drag on the X would be marginally greater, so the motor was probably right on the edge of the acceleration and that one got it! Whatever, looks like I now enjoy going in the machine shop to do jobs (that have been mounting up!) instead of not daring to look at the miller, never mind working on it, in case it played up!

Anyway, many, many thanks for all your help. :)

GeoffB