Hello Guest it is March 28, 2024, 09:26:17 AM

Author Topic: reproducable fault makes no sense to me  (Read 3590 times)

0 Members and 1 Guest are viewing this topic.

reproducable fault makes no sense to me
« on: November 29, 2016, 07:06:11 PM »
For many months I have been trying to debug Mach3 freezing while I manually control the X, Y, Z, or A axes. Never a problem using the keyboard arrow keys and never a problem when executing gcode. I replaced Mach3, the .dll related to xbox controller, and directX software. Still got random failures. Cleaned the xbox controller of swarf I found inside but still got random failures. Bought a new xbox controller and still got random failures.

Today I discovered that if I pulsed the X axis with the xbox controller I could get Mach3 to freeze in about 3 quick pulses (around 1/2 sec pulse). Power cycled, and repeated the test. Did this a total of 3 times. In all 3 test cycles, I got Mach3 to freeze in about 3 pulses.

They I tried something out of desperation: disconnected my ps2 keyboard and usb mouse. I pulsed the X axis about 30 times and no failures. Power cycled and plugged the keyboard back in. Got failure after 3 pulses.

Although not a 100% reliable test, it does imply that the keyboard causes the Xbox controller to lock up Mach3.

Has anyone else had this experience? Does anyone have a theory on how this could happen?

I took the keyboard apart and did not find any swarf inside. I'm in the process of soaking the plastic parts in soapy water right now just to be safe. I will rinse and dry before reassembling. I know these keyboards are low cost but want to learn as much as possible about the root cause and not just swap parts.

A side issue is that I found if I pulsed the x axis and pulsed the XZero button, I would eventually not be able to zero any axis. Easy to avoid this case but did see it as odd and possibly related to the main problem. However, I get this fault even with the keyboard removed.

All insights and wild speculation welcome.

Thanks,

Rick
Re: reproducable fault makes no sense to me
« Reply #1 on: November 29, 2016, 08:16:44 PM »
Correction: the keyboard is USB and not ps2.

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: reproducable fault makes no sense to me
« Reply #2 on: November 30, 2016, 02:19:16 AM »
Quote
Today I discovered that if I pulsed the X axis with the xbox controller I could get Mach3 to freeze in about 3 quick pulses (around 1/2 sec pulse). Power cycled, and repeated the test. Did this a total of 3 times. In all 3 test cycles, I got Mach3 to freeze in about 3 pulses.

Hi Rick,

There is little future in looking for Mach3 problems just for problems sake and I think the only real answer is  "if doing that causes a problem then don't do that".
Because Mach3 'is what it is' and is unlikely ever to be revised or updated in the future the way forward may be to move on to Mach4.

Sorry to be blunt but there are so many little peculiarities with Mach3 that we probably all have our own set of workarounds and we just learn to live with the animal.

Tweakie.
PEACE
Re: reproducable fault makes no sense to me
« Reply #3 on: November 30, 2016, 08:49:14 AM »
I sadly agree that there is no future in Mach3 but that does not mean that I want to toss it either. My controller with Mach3 worked for a long time and then stopped working. That is not the sign of a software bug but rather of broken hardware or a corrupted file someplace. Your quote from Churchill actually fits my situation nicely.

I believe the problem I found is not a Mach3 problem and would probably exist with Mach4 too. It appears to be an interaction between a USB keyboard and the USB X Box Controller. With what I know now, my money is on a broken keyboard.

Rick
Re: reproducable fault makes no sense to me
« Reply #4 on: December 01, 2016, 06:21:50 AM »
Rick,
When I start getting weird behavior from Mach3 I load a backup and it all goes away. On my BTC-1 it usually manifests itself as the spacebar feed hold function failing to work. If I continue to run the machine it gets more and more weird as in the F5 spindle toggle function drops out and so on. I load a backup from the XML backup folder IIRC and I am good to go. No need to reload Mach from scratch.

We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.
Re: reproducable fault makes no sense to me
« Reply #5 on: December 01, 2016, 12:19:25 PM »
TOTALLYRC,

I can't prove a negative, but Mach3 was often freezing up after 3 pulses of the X axis and almost always froze up by 30 pulses. I installed my backup .XML and have not seen a problem after over 100 pulses. Will continue testing later.

Thanks!

Rick
Re: reproducable fault makes no sense to me
« Reply #6 on: December 01, 2016, 05:09:11 PM »
After many cycles of no failures with the fresh copy of the .XML file, I switched back to the copy I was using when I got Mach3 to freeze after less than 30 pulse. Sure enough, it doesn't freeze anymore! So until I can get failures again, I can't be sure I fixed anything. The next time Mach3 freezes, I will restart with my backup .XML file and see what happens.

IMHO, there is no problem harder to shoot than one that is so intermittent.

Rick
Re: reproducable fault makes no sense to me
« Reply #7 on: December 01, 2016, 05:24:59 PM »
Intermittent problems should be called male pattern baldness. LOL

Hopefully it works for you long term.


Mike
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.
Re: reproducable fault makes no sense to me
« Reply #8 on: December 03, 2016, 08:45:55 PM »
I swapped out the RAM. Made no difference. The search continues...
Re: reproducable fault makes no sense to me
« Reply #9 on: December 08, 2016, 06:01:48 PM »
New findings:

I can cause Mach3 to freeze by pulsing the X, Y, Z, or A axes. I can also get it to freeze by just pulsing the XZERO button. So far I have been unable to get it to freeze by pulsing the X, Y, or Z axes via the keyboard.

I was seeing Mach3 freeze this morning when the shop was at 68 degrees F and it acts the same now that it is 78 degrees F.

The fact that I can get Mach3 to freeze by pushing the XZERO button proves the problem is not related to the steppers moving. Less certain but still likely that the freezing does not occur when using the keyboard. It is also likely that the problem is not temperature dependent.

A theory: It is likely that asynchronous key presses on the keyboard are turned into synchronous events seen by the keyboard hardware so there is never a set up time problem that could lead to a logic 1/2. Otherwise, occasionally the PC hardware would miss the pressing of a key and the software would not respond. I have never seen this happen. Maybe the  asynchronous events from the Xbox controller are not turned into synchronous events seen by the PC. This means that occasionally, minimum set up time would not be satisfied. Maybe that causes the hardware in the PC to see a logic 1/2 and freeze up. The built in Xbox controller diagnostic seems to not freeze up (can't prove it) so maybe they protect against logic 1/2 in the software while the Mach3's software isn't that sophisticated. I'm not positive that software can handle this case but a search of the web did not turn up any games running on XP that use the Xbox controller that freeze up once other problems have been corrected.

I sure would like to hear from others that use the Xbox controller. If you repeatedly push the XZERO button quickly about 50 times, does Mach3 freeze for you? Periodically move the cursor to test for the frozen condition.