Hello Guest it is October 15, 2019, 05:50:07 PM

Author Topic: M3 and M4 compiler issues...again  (Read 5074 times)

0 Members and 1 Guest are viewing this topic.

Offline derek

*
  •  201 201
    • View Profile
M3 and M4 compiler issues...again
« on: November 07, 2014, 05:25:16 PM »
Hi
Having some issues with M3 and M4. Mach is blowing right past them. This is happening on two different machines with the same mach version. .056 The other machine is kind of basic with no ATC and I haven't done any spindle direction changes. I will miss a M3 occasionally.

The real problem is my main machine with the ATC.

The error I get is "Scripter compile error in M4.M1s."


Here is some pertinent error stuff:
Fri - 12:16:37 ---Scripter Compile Error. In:M4.m1s
Fri - 12:16:47 ---Scripter Compile Error. In:M4.m1s
Fri - 12:16:58 ---Scripter Compile Error. In:M4.m1s
Fri - 12:17:09 ---Scripter Compile Error. In:M4.m1s
Fri - 12:17:12 ---tap 5/16-18 rotate 90
Fri - 12:17:35 ---Scripter Compile Error. In:M4.m1s
Fri - 12:17:46 ---Scripter Compile Error. In:M4.m1s
Fri - 12:17:57 ---Scripter Compile Error. In:M4.m1s
Fri - 12:18:07 ---Scripter Compile Error. In:M4.m1s
Fri - 12:18:18 ---Scripter Compile Error. In:M4.m1s
Fri - 12:18:29 ---Scripter Compile Error. In:M4.m1s
Fri - 12:18:54 ---Mag pocket rotate 90
Fri - 12:19:08 --- Spindle Stopped
Fri - 12:19:26 ---Tool Change Complete.
Fri - 12:34:06 ---Too Fast for Pulley..Using Max.
Fri - 12:47:06 ---Mag pocket rotate 270
Fri - 13:00:28 ---Offset #38
Fri - 13:00:49 --- Spindle Stopped
Fri - 13:01:07 ---Tool Change Complete.
Fri - 13:03:37 ---Offset #38
Fri - 13:06:18 ---Offset #30
Fri - 13:06:29 --- Spindle Stopped
Fri - 13:06:51 ---Tool Change Complete.
Fri - 13:06:52 ---Too Fast for Pulley..Using Max.
Fri - 13:08:42 ---Offset #30
Fri - 13:10:45 ---tap 12/24 rotate 270
Fri - 13:10:58 --- Spindle Stopped
Fri - 13:11:20 ---Tool Change Complete.
Fri - 13:12:23 ---Scripter Compile Error. In:M4.m1s

The first error was in the middle of a tapping cycle. Fortunately when the spindle didn't reverse the tap pulled out of the collet. I wasn't watching the machine so I didn't realize it happened. The second set tap 12/24 I happened to be standing there when the spindle didn't reverse. It seems to be a random thing. The second set of 5/16 has 8 cycles. it only errored on 6. On the 12/24 it completed 3 before it kacked.

I've been having this issue for a while with various versions. I had a hard drive take a dump and I had to start from scratch and afterward it seems to be happening more frequently. Counting the tap and the scrapped part it's in the $30.00 range every time it happens so it's starting to get costly. This time it was twice in one run two different parts.

I really wish mach would estop on compiler errors.

Thanks
Derek

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: M3 and M4 compiler issues...again
« Reply #1 on: November 07, 2014, 05:47:24 PM »
How are you using the M3/4s basically all from Gcode or are they in a macro ??

You may want to try a direct call to the spindle instead of the dospinCW() etc.

Try ActivateSignal() instead.

(;-) TP

Offline derek

*
  •  201 201
    • View Profile
Re: M3 and M4 compiler issues...again
« Reply #2 on: November 07, 2014, 06:04:16 PM »
Those were all happening during a G84 tapping cycle so I'm not sure how that calls up the spindle.

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: M3 and M4 compiler issues...again
« Reply #3 on: November 07, 2014, 07:16:41 PM »
The G84 tap cycle CAN be and mostly is very quirky.  I would suggest writing it out in longhand Gcode and see if the problem still exists.

I found the MOST reliable way is to use SUBs to write the process for the tap cycle. THIS keeps the control in  straight gcode all the time nand you can call any thread pitch as you need it.

At least rewrite and compile the original M4 macro. That HAS at times corrected the problem here. If rewriting it solves the problem then Compile the macro so hopefully it will not get corrupted again ( I did M3 and M4)

(;-) TP
« Last Edit: November 07, 2014, 07:21:12 PM by BR549 »

Offline derek

*
  •  201 201
    • View Profile
Re: M3 and M4 compiler issues...again
« Reply #4 on: November 07, 2014, 07:56:26 PM »
It's really weird how some times it likes the macro and sometimes not so much. All in the same run. I'm going to execute G84 40 times in a row but 41 through 48 you're SOL.

Thanks
Derek
Re: M3 and M4 compiler issues...again
« Reply #5 on: November 08, 2014, 07:17:52 PM »
This is a "for what it's worth" comment that may be worth no more than you paid for it but:
I have been having trouble with the M3 compile issue for the past year -- but only intermittently.
Intermittently was that I could go for months without the issue and then it seemed to happen several jobs in a row.
The fix I found that had worked was to delete the Macro/My Profile directory and let Mach3 remake it when restarted.
After breaking a tool when I wasn't quick enough to notice the skipped M3 after a tool change, I decided to take a little more scientific approach to see if I could find the cause and eliminate it.

First a hint on where the problem comes from -- at least so far in my experience.

I had started keeping some records (mostly just copies of the defective Macro/profile directory but also the jobs that ran OK and those that then preceeded a failure).
I looked at this information to see if I could find a correlation with some action to identify the cause.
The first thing I noticed was that it seemed to happen only when I had used a cam program to create the G-Code so I studied the difference in the GCode from there and the jobs that didn't cause a problem.
The only difference I found was that the cam program was issuing an M3 S#### command on the same line. As my spindle speed is not controlled by Mach, I never do that.
Over the past few days I have run a dozen jobs with the cam program but edited the M3 lines to eliminate the S####. I placed the S#### above the M3 on its own line and so far the problem has not re-occurred.

Now to an improved fix.
I ran one of the unmodified files with the M3 S#### on the same line and immediately created the message and lost my M3 functionality
I have become tired of deleting the Macro/Profile directory because Mach3 needed stopping and restarting plus I had to remember to restore my original tools and offsets files. While I have read that some have found extraneous characters in the M3.mls file, I have never seen this, but re-creating the Macro/Profile file was always 100% effective at "fixing" the problem.
This time I looked carefully at the differences between one of my "bad" Macro/profile directory copies and the new directory created by Mach3. Other than the tools and fixtures files, the only differences were that the dates of the curve?.dat files had been modified. It appears that some of these are modified each time Mach3 runs.
I deleted all of them and lo and behold, my M3 problem was "fixed".

I have my doubts whether this will address all the causes  but it has made my life much easier.

To summarize:
  • Avoid using the S command on the same line as the M3 M4 commands. Note that I have read elsewhere that you must have at least one S command in the file for some versions of Mach3 or you will have other problems so I always add S1100 at the beginning of the file.
  • If you encounter the problem, try deleting the curve?.dat files (and possibly the linearity.dat) from the Mach3/Macro/yourprofile directory.

I hope this helps someone... It sure drove me nuts for a long time.

Graham
Mach3 R3.043.066
« Last Edit: November 08, 2014, 07:21:55 PM by GBowes »
--------------------
Graham
Re: M3 and M4 compiler issues...again
« Reply #6 on: November 10, 2014, 01:06:13 PM »
Thanks for the write-up Graham... it may help with the issues I am having.

Sully

Offline derek

*
  •  201 201
    • View Profile
Re: M3 and M4 compiler issues...again
« Reply #7 on: November 10, 2014, 07:39:38 PM »
Hi Grahm
Thanks for taking the time to write that up.
Here is what I did for half a day Saturday and all day today. I started up Mach then shut it down. Then I started it again and ran my job. So far using this method I have not had a single problem. I have about 4 or 5 days on this job which has 3600 tapping calls. I'm going to keep doing this until I either get through the job or it screws up again.

On thing I changed when I rebuilt my computer was I auto started Mach. I'm wondering if that is causing the problem. Something along the lines of if you start mach before windows fully loads then it causes problems.

What sucks is I could go 6 months with it working like this and then have it start up again.

Derek
Re: M3 and M4 compiler issues...again
« Reply #8 on: November 10, 2014, 08:35:26 PM »
I wouldn't think autostarting Mach3 is the problem since the M3/M4 issue seems to be in the core of Mach.
But if you are using the parallel port driver, I would not do autostart. The PP driver breaks a lot of WIndows rules and operates somewhat under the radar so it could be possible that it might get hit if windows hasn't finished initializing everything when Mach starts it.

Please post of you learn any more. While my problem is in remission, I doubt it is gone completely.

Graham
--------------------
Graham

Offline derek

*
  •  201 201
    • View Profile
Re: M3 and M4 compiler issues...again
« Reply #9 on: November 11, 2014, 06:40:07 AM »
Hi Graham
No PP driver. UC-300 motion controllers.
Since hopefully this will become a repository of what people are trying let me add some more. I'm using the Calypso Ventures MSM screen set. It uses custom M3 and M4 scripts. I don't think that's the problem though as I have the same issues with other machines running the OEM screen set.
One thing I did that I forgot to mention was I opened the M4 macro in the mach script editor. The one listed under operator. I ran the script and when I closed it I was asked if I wanted to save it. I said yes.
So I've made a fundamental mistake on trying to nail down a problem. Change two things at once. I remembered this last night.
My other machine that is running MSM screen set is unmolested. It was missing the M3 command on a regular basis. I'll be trying the restart on it.

You know I could live with this if mach would estop on compiler issues. I understand Brian not wanting to mess with Mach 3 but this is absolutely influencing my decision to move to Mach 4. I have a huge investment in time and money in mach 3 compatible hardware, screen sets, and custom macros. I try not to monetarily reward this type of service.

And yes I'm pissed. Been using Mach since it was master 5 so I feel entitled to be pissed.

Derek