📄 coordinates.lyx
字号:
\SpecialChar ~\SpecialChar ~\SpecialChar ~use preset work coordinate system 5\layout Quote\begin_inset LatexCommand \index{G59}\end_inset G59\SpecialChar ~\SpecialChar ~\SpecialChar ~\SpecialChar ~\SpecialChar ~use preset work coordinate system 6\layout QuoteG59.1\begin_inset LatexCommand \index{G59.1}\end_inset \SpecialChar ~\SpecialChar ~\SpecialChar ~use preset work coordinate system 7\layout QuoteG59.2\begin_inset LatexCommand \index{G59.2}\end_inset \SpecialChar ~\SpecialChar ~\SpecialChar ~use preset work coordinate system 8\layout QuoteG59.3\begin_inset LatexCommand \index{G59.3}\end_inset \SpecialChar ~\SpecialChar ~\SpecialChar ~use preset work coordinate system 9\layout SubsectionDefault coordinate system\layout StandardOne other variable in the VAR file becomes important when we think about offset systems. This variable is named 5220. In the default files its value is set to 1.00000. This means that when the EMC starts up it should use the first coordinate system as its default. If you set this to 9.00000 it would use the nineth offset system as its default for startup and reset. Any value other than an interger (decimal really) between 1 and 9 will cause the EMC to fault on startup. \layout SubsectionSetting coordinate system values within G-code.\layout StandardIn the general programming chapter we listed a G10 command word. This command can be used to change the values of the offsets in a coordinate system. (add here)\layout SectionG92\begin_inset LatexCommand \index{G92}\end_inset Offsets\begin_inset LatexCommand \label{sec:G92-Offsets}\end_inset \layout StandardThe way that it works has changed just a bit from the early days to the current releases. It should be thought of as a temporary offset that is applied to all other offsets. \layout SubsectionThe G92 commands\layout StandardThis set of commands include;\layout DescriptionG92 This command, when used with axis names, sets values to offset variables.\layout DescriptionG92.1\begin_inset LatexCommand \index{G92.1}\end_inset This command sets zero values to the g92 variables.\layout DescriptionG92.2\begin_inset LatexCommand \index{G92.2}\end_inset This command suspends but does not zero out the g92 variables.\layout DescriptionG92.3\begin_inset LatexCommand \index{G92.3}\end_inset This command applies offset values that have been suspended.\layout StandardWhen the commands are used as described above, they will work pretty much as you would expect.\layout QuoteA user must understand the correct ways that the g92 values work. They are set based upon the location of each axis when the g92 command is invoked. The NIST document is clear that, \begin_inset Quotes eld\end_inset To make the\noun on \noun default current point have the coordinates\begin_inset Quotes erd\end_inset x0, y0, and z0 you would use g92 x0 y0 z0. G92 \emph on does not work from absolute machine coordinates\emph default . It works from \emph on current location\emph default . \layout QuoteG92 also works from current location as modified by any other offsets that are in effect when the g92 command is invoked. While testing for differences between work offsets and actual offsets it was found that a g54 offset could cancel out a g92 and thus give the appearance that no offsets were in effect. However, the g92 was still in effect for all coordinates and did produce expected work offsets for the other coordinate systems. \layout QuoteIt is likely that the absence of home switches and proper home procedures will result in very large errors in the application of g92 values if they exist in the var file. Many EMC users do not have home switches in place on their machines. For them home should be found by moving each axis to a location and issuing the home command. When each axis is in a known location, the home command will recalculate how the g92 values are applied and will produce consistent results. Without a home sequence, the values are applied to the position of the machine when the EMC begins to run.\layout SubsectionSetting G92 values\layout StandardThere are at least two ways to set G92 values.\layout Itemizeright mouse click on position displays of tkemc will popup a window into which you can type a value. \layout Itemizethe g92 command\layout StandardBoth of these work from the current location of the axis to which the offset is to be applied. \layout QuoteIssuing g92 x y z a b c does in fact set values to the g92 variables such that each axis takes on the value associated with its name. These values are assigned to the current position of the machine axis. These results satisfy paragraphs one and two of the NIST document.\layout QuoteG92 commands work from current axis location and add and subtract correctly to give the current axis position the value assigned by the g92 command. The effects work even though previous offsets are in.\layout StandardSo if the X axis is currently showing 2.0000 as its position a G92 x0 will set an offset of -2.0000 so that the current location of X becomes zero. A G92 X2 will set an offset of 0.0000 and the displayed position will not change. A G92 X5.0000 will set an offset of 3.0000 so that the current displayed position becomes 5.0000. \layout SubsectionG92 Cautions\layout StandardSometimes the values of a G92 offset will remain in the VAR file. This can happen when a file is aborted during processing that has G92 offsets in effect. When this happens reset or a startup will cause them to become active again. The variables are named \layout Quote5211\SpecialChar ~\SpecialChar ~\SpecialChar ~ 0.000000\layout Quote5212\SpecialChar ~\SpecialChar ~\SpecialChar ~ 0.000000\layout Quote5213\SpecialChar ~\SpecialChar ~\SpecialChar ~ 0.000000\layout Quote5214\SpecialChar ~\SpecialChar ~\SpecialChar ~ 0.000000\layout Quote5215\SpecialChar ~\SpecialChar ~\SpecialChar ~ 0.000000\layout Quote5216\SpecialChar ~\SpecialChar ~\SpecialChar ~ 0.000000\layout Standardwhere 5211 is the X axis offset and so on. If you are seeing unexpected positions as the result of a commanded move, or unexpected numbers in the position displays when you start up, issue a G92.1 in the MDI widow the problems should go away.\layout QuoteWith these tests we can see that reset returns g92 to the condition that it had when the interpreter started up. The reader should note that we have established ... that no write of these values occurs during a normal run so if no g92 was set at the startup, none will be read in during a reset.\layout QuoteIt may be that this is the heart of the problem that some have experienced with differences between the old and the new interpreter. It may well be, but I leave it to others to test, that the old interpreter and task programs immediately wrote values to the var file and then found those values during a reset. \layout StandardOn the other hand, if G92 values existed in the VAR file when the EMC started up\layout Quote... starting the EMC with g92 values in the var file is that it will apply the values to current location of each axis. If this is home position and home position is set as machine zero everything will be correct. Once home has been established using real machine switches or moving each axis to a known home position and issuing an axis home command, g92 commands and values work as advertised.\layout QuoteThese tests did not study the effect of re-reading the var file while they contain numbers. This could cause problems if g92 offsets had been removed with g92.1 but the var file still contained the previous numbers. \layout StandardIt is this complexity that causes us to say that G92 values must be treated as temporary. They should be used to set global short term offsets. The G54-59.3 coordinate systems should be used whenever long lasting and predictable offsets are needed.\layout SectionSample Program Using Offsets\layout StandardThis sample engraving project mills a set of four .1 radius circles in roughly a star shape around a center circle. We can setup the individual circle pattern like this.\layout Quote\noindent G10 L2 P1 x0 y0 z0 (ensure that g54 is set to machine zero) \layout Quote\noindent g0 x-.1 y0 z0\layout Quote\noindent g1 f1 z-.25\layout Quote\noindent g3 x-.1 y0 i.1 j0\layout Quote\noindent g0 z0\layout Quotem2\layout StandardWe can issue a set of commands to create offsets for the four other circles like this.\layout QuoteG10 L2 P2 x0.5 (offsets g55 x value by 0.5 inch) \layout QuoteG10 L2 P3 x-0.5 (offsets g56 x value by -0.5 inch) \layout QuoteG10 L2 P4 y0.5 (offsets g57 y value by 0.5 inch) \layout QuoteG10 L2 P5 y-0.5 (offsets g58 y value by -0.5 inch) \layout StandardWe put these together in the following program.\layout Quote(a program for milling five small circles in a diamond shape)\layout QuoteG10 L2 P1 x0 y0 z0 (ensure that g54 is machine zero)\layout QuoteG10 L2 P2 x0.5 (offsets g55 x value by 0.5 inch) \layout QuoteG10 L2 P3 x-0.5 (offsets g56 x value by -0.5 inch) \layout QuoteG10 L2 P4 y0.5 (offsets g57 y value by 0.5 inch) \layout QuoteG10 L2 P5 y-0.5 (offsets g58 y value by -0.5 inch)\layout Quoteg54 g0 x-.1 y0 z0 (center circle)\layout Quoteg1 f1 z-.25\layout Quoteg3 x-.1 y0 i.1 j0\layout Quoteg0 z0\layout Quoteg55 g0 x-.1 y0 z0 (first offset circle)\layout Quoteg1 f1 z-.25\layout Quoteg3 x-.1 y0 i.1 j0\layout Quoteg0 z0\layout Quoteg56 g0 x-.1 y0 z0 (second offset circle)\layout Quoteg1 f1 z-.25\layout Quoteg3 x-.1 y0 i.1 j0\layout Quoteg0 z0\layout Quoteg57 g0 x-.1 y0 z0 (third offset circle)\layout Quoteg1 f1 z-.25\layout Quoteg3 x-.1 y0 i.1 j0\layout Quoteg0 z0\layout Quoteg58 g0 x-.1 y0 z0 (fourth offset circle)\layout Quoteg1 f1 z-.25\layout Quoteg3 x-.1 y0 i.1 j0\layout Quoteg54 g0 x0 y0 z0\layout Quotem2\layout StandardNow comes the time when we might apply a set of G92 offsets to this program. You'll see that it is running in each case at z0. If the mill were at the zero position, a g92 z1.0000 issued at the head of the program would shift everything down an inch. You might also shift the whole pattern around in the XY plane by adding some x and y offsets with g92. If you do this you should add a G92.1 command just before the m2 that ends the program. If you do not, other programs that you might run after this one will also use that g92 offset. Furthermore it would save the g92 values when you shut down the EMC and they will be recalled when you start up again.\the_end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -