⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.lyx

📁 CNC 的开放码,EMC2 V2.2.8版
💻 LYX
📖 第 1 页 / 共 5 页
字号:
 the same line if both of them use axis words. If an axis word-using G-code from group 1 is implicitly in effect on a line (by having been activated on an earlier line), and a group 0 G-code that uses axis words appears on the line, the activity of the group 1 G-code is suspended for that line. The axis word-using G-codes from group 0 are G10, G28, G30, and G92. \layout StandardIt is an error to include any unrelated words on a line with \family typewriter O-\family default  flow control.\layout ChapterOrder of Execution\begin_inset LatexCommand \index{G Code Order of Execution}\end_inset \begin_inset LatexCommand \label{sec:Order-of-Execution}\end_inset \layout StandardThe order of execution of items on a line is critical to safe and effective machine operation. Items are executed in the order shown below if they occur on the same line.\layout EnumerateComment (including message)\layout Enumerateset feed rate mode (G93, G94). \layout Enumerateset feed rate (F). \layout Enumerateset spindle speed (S). \layout Enumerateselect tool (T). \layout Enumeratechange tool (M6).\layout Enumeratespindle on or off (M3, M4, M5).\layout Enumeratecoolant on or off (M7, M8, M9).\layout Enumerateenable or disable overrides (M48, M49). \layout Enumeratedwell (G4). \layout Enumerateset active plane (G17, G18, G19). \layout Enumerateset length units (G20, G21).\layout Enumeratecutter radius compensation on or off (G40, G41, G42) \layout Enumeratecutter length compensation on or off (G43, G49) \layout Enumeratecoordinate system selection (G54, G55, G56, G57, G58, G59, G59.1, G59.2, G59.3). \layout Enumerateset path control mode (G61, G61.1, G64)\layout Enumerateset distance mode (G90, G91). \layout Enumerateset retract mode (G98, G99).\layout Enumeratehome (G28, G30) or change coordinate system data (G10) or set axis offsets (G92, G92.1, G92.2, G94). \layout Enumerateperform motion (G0 to G3, G33, G80 to G89), as modified (possibly) by G53. \layout Enumeratestop (M0, M1, M2, M30, M60).\layout ChapterG Code Best Practices\begin_inset LatexCommand \index{G Code Best Practices}\end_inset \layout SectionUse an appropriate decimal precision\layout StandardUse at least 3 digits after the decimal when milling in millimeters, and at least 4 digits after the decimal when milling in inches. In particular, arc tolerance checks are made to .001 and .0001 depending on the active units.\layout SectionUse consistent white space\layout StandardG-code is most legible when at least one space appears before words. While it is permitted to insert whitespace in the middle of numbers, there is no reason to do so.\layout SectionPrefer \begin_inset Quotes eld\end_inset Center-format\begin_inset Quotes erd\end_inset  arcs\layout StandardCenter-format arcs (which use \family typewriter I- J- K-\family default  instead of \family typewriter R-\family default ) behave more consistently than R-format arcs, particularly for included angles near 180 or 360 degrees.\layout SectionPut important modal settings at the top of the file\layout StandardWhen correct execution of your program depends on modal settings, be sure to set them at the beginning of the part program. Modes can carry over from previous programs and from the MDI commands.\layout StandardAs a good preventative measure, put a line similar to the following at the top of all your programs:\layout LyX-CodeG17 G20 G40 G49 G54 G80 G90 G94 \layout Standard(XY plane, inch mode, cancel diameter compensation, cancel length offset, coordinate system 1, cancel motion, non-incremental motion, feed/minute mode)\layout StandardPerhaps the most critical modal setting is the distance units--If you do not include G20 or G21, then different machines will mill the program at different scales. Other settings, such as the return mode in canned cycles may also be important.\layout SectionDon't put too many things on one line\layout StandardIgnore everything in Section \begin_inset LatexCommand \ref{sec:Order-of-Execution}\end_inset , and instead write no line of code that is the slightest bit ambiguous. Similarly, don't use and set a parameter on the same line, even though the semantics are well defined. (Exception: Updating a variable to a new value, such as \family typewriter #1=[#1+#2\family default ])\layout SectionDon't use line numbers\layout StandardLine numbers offer no benefits. When line numbers are reported in error messages, the numbers refer to the line number in the file, not the N-word value.\layout SectionWhen moving more than one coordinate system, consider inverse time feed mode\layout StandardBecause the meaning of an F-word in feed-per-minute mode varies depending on which axes are commanded to move, and because the amount of material removed does not depend only on the feed rate, it may be easier to use G93 inverse time feed mode to achieve the desired material removal rate.\layout ChapterG Codes\begin_inset LatexCommand \index{G Codes}\end_inset \layout StandardG codes of the RS274/NGC language are shown in Table 5 and described following that.\layout StandardIn the command prototypes, the hypen (\family typewriter -\family default ) stands for a real value. As described earlier, a real value may be (1) an explicit number, \family typewriter 4\family default , for example, (2) an expression, \family typewriter [2+2]\family default , for example, (3) a parameter value, \family typewriter #88\family default , for example, or (4) a unary function value, \family typewriter acos[0]\family default , for example.\layout StandardIn most cases, if axis words (any or all of \family typewriter X-\family default , \family typewriter Y-\family default , \family typewriter Z-\family default , \family typewriter A-\family default , \family typewriter B-\family default , \family typewriter C-\family default , \family typewriter U-\family default , \family typewriter V-\family default , \family typewriter W-\family default ) are given, they specify a destination point. Axis numbers are in the currently active coordinate system, unless explicitly described as being in the absolute coordinate system. Where axis words are optional, any omitted axes will have their current value. Any items in the command prototypes not explicitly described as optional are required. It is an error if a required item is omitted. In prototypes, this will be written as \family typewriter \emph on axes\family default .\layout StandardIn the prototypes, the values following letters are often given as explicit numbers. Unless stated otherwise, the explicit numbers can be real values. For example, \family typewriter G10 L2\family default  could equally well be written \family typewriter G[2*5] L[1+1]\family default . If the value of parameter 100 were 2, \family typewriter G10 L#100\family default  would also mean the same. Using real values which are not explicit numbers as just shown in the examples is rarely useful.\layout StandardIf \family typewriter L-\family default  is written in a prototype the \begin_inset Quotes eld\end_inset \family typewriter -\family default \begin_inset Quotes erd\end_inset  will often be referred to as the \begin_inset Quotes eld\end_inset L number\begin_inset Quotes erd\end_inset . Similarly the \begin_inset Quotes eld\end_inset \family typewriter -\family default \begin_inset Quotes erd\end_inset  in \family typewriter H-\family default  may be called the \begin_inset Quotes eld\end_inset H number\begin_inset Quotes erd\end_inset , and so on for any other letter. \layout SectionQuick Reference Table\begin_inset LatexCommand \index{G Code Table}\end_inset \layout Standard\begin_inset  Tabular<lyxtabular version="3" rows="45" columns="4"><features><column alignment="center" valignment="top" leftline="true" width="0"><column alignment="center" valignment="top" leftline="true" width="0"><column alignment="center" valignment="top" leftline="true" width="0"><column alignment="center" valignment="top" leftline="true" rightline="true" width="0"><row topline="true" bottomline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardCode\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardDescription\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardParameters\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout StandardSection\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardG0\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardCoordinated Straight Motion Rapid\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standardn/a\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standard\begin_inset LatexCommand \ref{sec:G0:-Rapid-Linear}\end_inset \end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardG1\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardCoordinated Straight Motion Feed Rate\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standardn/a\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standard\begin_inset LatexCommand \ref{sec:G1:-Linear-Motion}\end_inset \end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardG2, G3\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardCoordinated Helical Motion Feed Rate\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardI J K or R\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standard\begin_inset LatexCommand \ref{sub:G2,-G3:-Arc}\end_inset \end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardG10\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardCoordinate System Origin Setting\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardP X Y Z A B C\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standard\begin_inset LatexCommand \ref{sub:G10:-Set-Coordinate}\end_inset \end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardG17, G18, G19\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardPlane Select\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standardn/a\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standard\begin_inset LatexCommand \ref{sub:G17,-G18,-G19:}\end_inset \end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardG20, G21\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout S

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -