Hello Guest it is March 28, 2024, 06:30:36 AM

Author Topic: Macros And Buttons - Strangeness Abounds....  (Read 16082 times)

0 Members and 1 Guest are viewing this topic.

Macros And Buttons - Strangeness Abounds....
« on: August 11, 2011, 09:29:12 AM »
For, well, forever, I've had problems with my machine doing weird and unpredictable things from time to time.  Lately, for whatever reason, it's been much worse, and has really been driving me crazy.  Here's the kind of stuff I'd see:

1) At random, one axis would stop jogging. Jogging any other axis would get the "dead" one to come back to life
2) MDI would sometimes stop working
3) Occasionally, the machine would make un-commanded moves, or turn the spindle on, or off, by itself.
4) It would sometimes simply stop in the middle of a program run, as though someone had hit FeedHold
5) More often, the machine would refuse to make a move, by jogging, MDI or a macro, then spontaneously do it at a later time!
6) Jogging in continuous jog mode would sometimes give VERY jerky motion
7) A few times, I would command a probe in one axis, but the machine would actually probe in a different axis, or even multiple axes!
8) It would sometimes ignore SingleBlock, and run the program normally WHILE SingleBlock was still lit
9) Yesterday was the weirdest one of all - I tried to edit a button script, and within the VB editor window, if I selected some text, instead of the text being selected, the Z axis would go through a 1-2 second sequence of moves.  This was absolutely repeatable!
And more...

I've suspected for several days the problem was somehow related to macros not running correctly, and somehow getting buffered up within Mach3.  When I saw that last one, it became crystal clear that there was something really wrong within Mach3 itself, so I contacted Brian, with the result that he quickly found a serious problem in Mach3, related to the button code.  In his words: "the base Button code was never meant to be able to handle Macros".  He found some thread un-safe code in there, but he's now corrected the problem, and sent me a test build to try out, which I will be doing today.  This could explain a LOT of the problems I've had over the years.

I'll report back after testing.  This could be a major step forward in making macros more stable and predictable.

Regards,
Ray L.
Regards,
Ray L.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Macros And Buttons - Strangeness Abounds....
« Reply #1 on: August 11, 2011, 10:15:02 AM »
Never had a prob myself Ray but my macros are simple affairs ;D hope Brain has found the issue for you and likely it will also help others.

Hood

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Macros And Buttons - Strangeness Abounds....
« Reply #2 on: August 11, 2011, 10:17:53 AM »
Lost Mach syndrome been there done that one.

(;-) TP
Re: Macros And Buttons - Strangeness Abounds....
« Reply #3 on: August 11, 2011, 12:53:29 PM »
Brian has found, and fixed, several problems already this AM.  I'm about to test what I think will be the final test build (at least until I find the next bug....   :D).  In addition to the threading issue, we also found that if you do Edit->SelectAll, followed by Edit->Delete in the button script editor, rather than deleting the selected code, it actually executes the macro!  In addition, Edit->Undo has, apparently, NEVER worked!  Both of those problems are now fixed as well.

I have to give Brian kudos - He has never failed to jump immediately on any problem I've found (and there have been many), and he's almost always come up with a fix in short order.  I"m cautiously optimistic fixing these issues will make a very significant difference in the reliability and stability of my machine.  It seems (so far....) to have fixed the many issues I've been having with jogging lately.

Regards,
Ray L.
Regards,
Ray L.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Macros And Buttons - Strangeness Abounds....
« Reply #4 on: August 11, 2011, 02:51:45 PM »
I have to give Brian kudos - He has never failed to jump immediately on any problem I've found (and there have been many), and he's almost always come up with a fix in short order.

Have to agree with you Ray, if you can find a sure fire way for Brian to see the problem there then he can usually get it fixed and quickly. He has been busy the last day or so , fixed a couple of issues I found in Rev4 and sorted yours as well, he must be  having fun ;D

Hood
Re: Macros And Buttons - Strangeness Abounds....
« Reply #5 on: August 11, 2011, 07:49:38 PM »
Well....  One step forward, one step backwards.  The worst of the problems are solved, but the fix seems to have uncovered, or created, a new problems, and I've run into a SmoothStepper problem as well.  Jogging now seems to be working well, except for step mode - whenever I change axes in step mode, the very first step will step both the selected axis, AND my A axis!  After that first step, all is well, until I change axes again.  Brian will take a look at that tomorrow.

The SmoothStepper is now randomly throwing errors, causing Mach3 to shut down.  It seems to be receiving an unexpected command.  We've tossed that one to Greg, to hopefully explain what the error code means.  I was forced to update both the USB driver and Plug-in for the SS to be able to run the new Mach3 executable, so there's no going back now.  Unfortunately, having the SS throw up is worse than having the flaky jog-related problems, so I got no work done today.  Hopefully Brian will have an "Aha!" moment in the AM, when he looks into this new issue.

Still, great progress today, and having buttons work more reliably through VB will definitely be of great benefit to many of us.

Regards,
Ray L.
Regards,
Ray L.
Re: Macros And Buttons - Strangeness Abounds....
« Reply #6 on: August 12, 2011, 09:16:06 PM »
Another day of incremental progress....  Brian has made a few more changes in the button code, but the odd A axis behavior has, unfortunately, gotten worse.  The A axis now takes a step on the first move following an active axis change through my pendant, and it now also takes a step at the start of every move in any probe (G31) operation.  On my machine, the A axis is the knee, and I using probing on the quill (Z axis) to set tool length.  Each time I do this, the knee ends up moving by about 0.005".  Not good....  In addition, doing an axis select on the pendant sometimes causes jogging on the pendant to simply stop working.  Changing jog mode in-screen gets it going again.  My jerky continuous jog also reared it's ugly head again today, clearly caused by some VB process that lost its mind, as hitting ESC (which kills all active VB processes) got the jog working smoothly again.  Brian is still working hard on this, but unfortunately it doesn't happen on his machine!  Very odd....

Regards,
Ray L.
Regards,
Ray L.

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Macros And Buttons - Strangeness Abounds....
« Reply #7 on: August 13, 2011, 04:35:11 AM »
Ray, Which V are you using? I've never had any of these issues - I've stuck with R3.042.020 as I've found this to be darn near completely stable and I've used plenty of complex macros. A few issues with the Brain editor but that's about it.

as hitting ESC (which kills all active VB processes)...

Personally I believe it SHOULD, but it doesn't - neither does hitting RESET - well not in the above V anyway.

Ian

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Macros And Buttons - Strangeness Abounds....
« Reply #8 on: August 13, 2011, 05:35:45 AM »
When I was doing the lathe and because I am crap at VB I often had things hanging and Esc sometimes worked, sometimes didnt. In the end I put a button on screen with DoOemButton(322) in it and that seemed to work fine. Dont have it now as all is working with the turrets etc but it was handy at the time ;D
Hood

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Macros And Buttons - Strangeness Abounds....
« Reply #9 on: August 13, 2011, 07:13:25 AM »
I'm with Stirling - using the same version, and no trouble with macros at all.
I'm very leery of the 3.043 versions, after I found that my M6 macro doesn't work in the current lockdown (although Brian fixed it for the development versions).
If it aint broke, don't fix it - seems to apply doubly to Mach3. Don't upgrade unless you absolutely need to. :)

As for killing macros... If I need to stop a macro in progress, I like to shut down Mach3 and reboot the PC, as I do get some strange results if I don't.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html