Re: Linux vs. DOS
Posted by
Matt Shaver
on 1999-06-05 23:42:39 UTC
> I finally have made my first item using EMC!!!I like it! I'm also happy to see that you were able to use your CAM output
>
> If you want to check it out you can see it on my website at
> http://www.ktmarketing.com/emcproject1.html
with the EMC.
> In getting this g-code to run I have discovered another thing I wish EMCwindow
> would do. When it runs into an error in your g-code EMC pops up an alert
> window telling you what the error is in terms that give you a hint at the
> problem, but it resets your program at that point and gives you no
> indication of the line that caused the error. The code for cutting this
> little EMC sign I made was 572 lines long. So it was a little bit of a pain
> to watch the program code as it flys by in Xemc and hope I was paying close
> enough attention to catch the line number just before I hit an error. If
> Fred could add the ability to display the line of g-code in the alert
> along with the error message debugging a g-code program would be 1000 timesAt the beginning of the error message there is a number. Although it doesn't
> faster.
say so, this is the line number of the error. Not the "N" number (if you use
them), but the number of lines into the program from the top. This should be
easy to find with emacs or any editor that counts the lines for you. I'll
agree that the error messages could be more explanatory in their verbiage.
> Here is a question for Matt or Jon or anyone else running EMC:just
> Is there a way to run the g-code through EMC's code interpreted without
> loading it in Xemc and running it?Yes, open the file for editing, scroll down all the way to the last line that
says M2 and put your cursor there. Press the "Set Run Mark" button at the
bottom of the editor window, and confirm that you want to start running at
this line when the little window pops up to ask you. Make sure you are clear
of any obstructions since the machine may try to move to the position that it
would be in at the end of your program (probably the tool change position).
Originally, the interpreter could be run in standalone mode (without the
motion control system) and do its inputs and outputs to and from disk files.
More interpreter information is in the file:
ftp://ftp.isd.cme.nist.gov/pub/emc/emcsoft/RS274NGC_22.doc
I am about halfway through turning this document into html which will improve
its accessibility. The raw .doc file doesn't have the table of contents,
illustrations, tables, etc.
> I found that if I tried running the codeSince you have no feedback in your control system (like encoders), I don't
> with the my stepper controller turned off so I could crank up the feed rate
> to just check the code more quickly I would get an error that would abort
> the code referring to a "follow error" on an axis. If I ran the code with
> the controller turned on I had no errors in this section of code, but it
> took MUCH longer as I had to use realistic feed rates.
think you should get following errors. I'm puzzled by this, so I'll forward
it to Fred.
> Now for some observations that may help others over the EMC learning curvea
> little faster:I didn't know this, but it may be fixable. I'll send it to Fred as well.
> The enter key by your number pad and the enter key by your letter keys are
> not equivalent in EMC. If you use your mouse to click on either the feed
> rate or the feed override it pops up a window to enter a rate into, but to
> get it to accept the rate and use it you have to use the enter key by your
> letter keys. The one on the number pad will close the box, but your entry
> disappears.
> EMC seems to want it's circular moves (G2, G3) to be entered in the formatActually, I had the same problem, but the other way around. I couldn't always
> using R and not I and J.
use R format, but IJ worked fine. I'd like to know what the error message
was. I drew these in AutoCad and assuming the starting point to be X-2.196
Y-5.946 I got the following results:
> EMC seems to likes: N331 G03 X-2.309 Y-6.059 R.094The center of this arc is X-2.2175 Y-6.0375.
> EMC seems to not like: N331 G03 X-2.309 Y-6.059 I-2.253 J-6.003The radius of this arc is .0806 .
Truthfully, I got some bad R format output from my CAM system that the EMC
couldn't digest. Here are some excerpts from the e-mail of that era:
-----
From: Matt Shaver
When the EMC tried to execute the block:
N285G3X22.4352Y-1.8132R0.0025
it produced the error:
"arc_data_r: error 2: Arc Radius is too small to reach end point".
The starting point for the arc was X22.4388 Y-1.8168.
I thought it might be the result of a rounding error so I changed the post
processor in the CAM software we're using to output the coordinates with 100%
precision. This made the code look like:
N285G3X22.4352322Y-1.8132322R-0.0025
but it still failed.
I drew the geometry (as two points connected by an arc) in AutoCAD to check
whether this was a valid arc and it seems OK. The entity list was:
POINT Layer: 0
Space: Model space
at point, X= 22.4352 Y= -1.8132 Z= 0.0000
POINT Layer: 0
Space: Model space
at point, X= 22.4388 Y= -1.8168 Z= 0.0000
ARC Layer: 0
Space: Model space
center point, X= 22.4370 Y= -1.8150 Z= 0.0000
radius 0.0025
start angle 315
end angle 135
-----
Tom Kramer, the author of the G code interpreter replied:
-----
> The start and end point are 0.0050919293 apart. This is 0.00009 more-----
> than twice the desired radius of 0.00250 (a relative error of 9/250).
> The interpreter allows a relative error of only 0.000000000001
> (#define'd as TINY in rs274ngc.hh). The check is made in the arc_data_r
> function. TINY is not used for anything else and could be changed easily,
> but I do not think we want to make it as large as 9/250.
>
> The block of code is trying to make a semi-circle using the r-format
> for an arc. This is inherently numerically unstable (which we discussed
> in one or more of the NISTIR's on interpreters) and should not be done.
> A change of 0.0001 in the position of the end of an r-format semicircle
> may move the center of the semicircle as much as 0.01, which is likely
> to result in an out-of tolerance part.
>
> To deal with this, the arc may be split into to quarter circles (then
> numerical stability is not a problem), or some other format arc should
> be used.
Since switching to IJ format there haven't been any problems since for any
two points (start and end) and a specified center point, an arc of some
radius exists!
Discussion Thread
Andrew Werby
1999-05-29 04:16:11 UTC
Linux vs. DOS
john@x...
1999-05-29 15:07:09 UTC
Re: Linux vs. DOS
Jon Elson
1999-05-29 21:21:47 UTC
Re: Linux vs. DOS
Matt Shaver
1999-05-29 21:29:06 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-05-29 22:27:47 UTC
Re: Linux vs. DOS
Matt Shaver
1999-05-30 00:12:13 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-05-30 15:39:08 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-05-30 20:37:55 UTC
Re: Linux vs. DOS
Matt Shaver
1999-05-30 20:35:33 UTC
Re: Linux vs. DOS
Matt Shaver
1999-05-30 20:48:44 UTC
Re: Linux vs. DOS
Jon Elson
1999-05-30 23:19:07 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-05-31 11:54:03 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-05-31 11:54:07 UTC
Re: Linux vs. DOS
Matt Shaver
1999-05-31 12:12:57 UTC
Re: Linux vs. DOS
Matt Shaver
1999-05-31 12:17:39 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-05-31 13:30:23 UTC
Re: Linux vs. DOS
Matt Shaver
1999-05-31 14:13:26 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-05-31 16:00:38 UTC
Re: Linux vs. DOS
Matt Shaver
1999-05-31 16:00:51 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-05-31 17:32:03 UTC
Re: Linux vs. DOS
Matt Shaver
1999-05-31 17:33:17 UTC
Re: Linux vs. DOS
Matt Shaver
1999-05-31 17:43:39 UTC
Re: Linux vs. DOS
Dan Falck
1999-05-31 19:55:12 UTC
Re: Linux vs. DOS
Matt Shaver
1999-05-31 22:48:46 UTC
Re: Linux vs. DOS
Jon Elson
1999-05-31 22:58:57 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-05-31 23:32:27 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-05-31 23:32:29 UTC
Re: Linux vs. DOS
Matt Shaver
1999-05-31 23:32:50 UTC
Re: Linux vs. DOS
Matt Shaver
1999-06-01 00:38:11 UTC
Re: Linux vs. DOS
Dan Mauch
1999-06-01 06:32:41 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-06-01 09:45:52 UTC
Re: Linux vs. DOS
Jon Elson
1999-06-01 12:16:50 UTC
Re: Linux vs. DOS
Ian W. Wright
1999-06-01 12:37:43 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-06-01 17:03:26 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-06-01 22:05:54 UTC
Re: Linux vs. DOS
Dan Mauch
1999-06-02 06:30:25 UTC
Re: Linux vs. DOS
Dan Mauch
1999-06-02 06:42:14 UTC
Re: Linux vs. DOS
Buchanan, James (Jim)
1999-06-02 13:01:09 UTC
Re: Linux vs. DOS
Jon Elson
1999-06-02 13:33:07 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-06-02 14:26:20 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-06-02 14:45:01 UTC
Re: Linux vs. DOS
Matt Shaver
1999-06-02 15:01:17 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-06-02 23:19:44 UTC
Re: Linux vs. DOS
Matt Shaver
1999-06-03 00:26:35 UTC
Re: Linux vs. DOS
Ian W. Wright
1999-06-04 13:47:19 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-06-05 16:54:15 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-06-05 17:34:22 UTC
Re: Linux vs. DOS
Jon Elson
1999-06-05 23:39:08 UTC
Re: Linux vs. DOS
Jon Elson
1999-06-05 23:41:51 UTC
Re: Linux vs. DOS
Matt Shaver
1999-06-05 23:42:39 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-06-06 00:03:27 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-06-06 00:30:52 UTC
Re: Linux vs. DOS
Matt Shaver
1999-06-06 01:00:46 UTC
Re: Linux vs. DOS
Matt Shaver
1999-06-06 01:37:57 UTC
Re: Linux vs. DOS
Dan Falck
1999-06-06 05:51:38 UTC
Re: Linux vs. DOS
Jon Elson
1999-06-06 17:16:33 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-06-06 21:05:20 UTC
Re: Linux vs. DOS
Matt Shaver
1999-06-06 22:06:24 UTC
Re: Linux vs. DOS
Matt Shaver
1999-06-06 22:30:17 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-06-06 22:57:18 UTC
Re: Linux vs. DOS
Matt Shaver
1999-06-06 23:16:03 UTC
Re: Linux vs. DOS
Jon Elson
1999-06-06 23:29:41 UTC
Re: Linux vs. DOS
Jon Elson
1999-06-06 23:46:32 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-06-07 21:59:53 UTC
Re: Linux vs. DOS
Tim Goldstein
1999-06-08 22:07:54 UTC
Re: Linux vs. DOS
Dan Mauch
1999-06-09 06:18:23 UTC
Re: Linux vs. DOS