Hello Guest it is March 18, 2024, 10:38:41 PM

Author Topic: Mach 3 not executing code as written  (Read 6077 times)

0 Members and 1 Guest are viewing this topic.

Mach 3 not executing code as written
« on: October 12, 2009, 06:40:49 PM »
I've been having erratic results with my cnc router lately and couldn't quite pinpoint the problem but today I ran a simple program which illustrates the machine's behavior.  I've attached an image of the Mach 3 screen with the program loaded and the toolpath shown in the display window.  Another image shows an engraved logo on two pieces of wood.  The one at left is what the machine is supposed to cut and what it's done before.  The one at right is what it's cutting now.  I've also attached the file with the G-code.  I've checked to see if the machine is losing position, step motors losing steps etc., but whenever I go to the home switches, I'm always within a few 10 thousanths of where I'm supposed to be.  It seems I've eliminated everything but how Mach 3 is interpreting the program.  What could be causing this?

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Mach 3 not executing code as written
« Reply #1 on: October 12, 2009, 06:54:43 PM »
when you say
, but whenever I go to the home switches, I'm always within a few 10 thousanths of where I'm supposed to be.
how are you doing that?

Hood
Re: Mach 3 not executing code as written
« Reply #2 on: October 12, 2009, 10:02:14 PM »
By jogging within an inch or so of the switches and then clicking home x and home y.  What I meant to say in my first post is that the absolute coordinates that I set before running the program have not changed any when I check them later.  If they had changed, I would suspect that I was losing steps and that that might account for the inaccurate machining.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Mach 3 not executing code as written
« Reply #3 on: October 13, 2009, 02:46:35 AM »
Try using the Verify button.
Hood
Re: Mach 3 not executing code as written
« Reply #4 on: October 13, 2009, 03:45:42 PM »
OK. I used the Verify button and got the same results; i.e, the machine is maintaining positional accuracy.  Interestingly enough, I ran the logo program again today.  The program was written to cut the pattern twice to ensure a clean cut in wood.  When I ran it this morning, the first path cut correctly and the second path--exactly the same code--cut incorrectly, truncating the horizontal lines in the C and E letters, like in the image I attached in my first post. I guess what I want to know is where to troubleshoot.  Is the problem likely to be in my installation of Mach 3, in my controller, in my motor drivers or where?  I can't understand why one axis (in this case the x) should cut too short given the code directions and yet still home correctly.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Mach 3 not executing code as written
« Reply #5 on: October 13, 2009, 03:58:56 PM »
Sounds to me like the X axis is stalling on occasion.
Do the drive test and see what that looks like.
Set the pulse width and Dir prechange to 5 and see if that helps.
Make sure there is no binding or tightness in the X axis.

Hood
Re: Mach 3 not executing code as written
« Reply #6 on: October 13, 2009, 07:18:05 PM »
The axis isn't binding and if it were, the stepper motor would lose steps and not home to the same position as it does now.  It's almost as if Mach 3 is misreading the code, telling the machine to go a distance which is short of what the code directs.  Since Mach 3 thinks is giving the correct directions to the motor no steps are lost and the general positional accuracy is retained.  If the x axis was stalling on a particular line of code, the next line of code involving the y axis would offset it by the amount the x had stalled.  This isn't happening.  The code for y movements seems to be executed as directed.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Mach 3 not executing code as written
« Reply #7 on: October 14, 2009, 02:22:53 AM »
Do the DROs show the short X moves?

Hood
Re: Mach 3 not executing code as written
« Reply #8 on: October 14, 2009, 02:46:34 AM »
That's a good question.  It would be easy to check on this short of a program.  I tried this evening but, just like when you take your car to the mechanic, the problem wasn't occurring.  I'll try again in the morning and see if it will act up and what the DRO's show.  Thanks for the suggestion.
Re: Mach 3 not executing code as written
« Reply #9 on: October 14, 2009, 03:39:08 PM »
This is embarrassing but I think I found the smoking gun.  On the end of my drive screw for the x axis there are two jam nuts one of which tightens the angular contact bearings and the other locks the first.  The locking nut had loosened and stopped against the drive pulley--about the same distance that the x axis would lose in its move.  The other nut would loosen or tighten depending on the rotation of the screw but again was restricted to moving only about an eighth of an inch.  The reason the axis would still home accurately is that the rotation in that direction to the homing switch would tighten the nut up against the bearings.  The learning curve never flattens!  My apologies to Mach 3 for suspecting the software.

CE