📄 gcode.lyx
字号:
#LyX 1.3 created this file. For more info see http://www.lyx.org/\lyxformat 221\textclass book\language english\inputencoding auto\fontscheme default\graphics default\paperfontsize default\spacing single \papersize Default\paperpackage a4\use_geometry 0\use_amsmath 0\use_natbib 0\use_numerical_citations 0\paperorientation portrait\secnumdepth 3\tocdepth 3\paragraph_separation skip\defskip smallskip\quotes_language english\quotes_times 2\papercolumns 1\papersides 1\paperpagestyle default\layout ChapterG-Code Examples\layout StandardAfter you install EMC2 several sample files are placed in the /nc_files folder. Make sure the sample file is appropriate for your machine before running. \layout SectionProbing\layout SubsectionGrid Probe\layout StandardFile Name: gridprobe.ngc\layout StandardDescription: Rectangular Probing\layout StandardThis program repeatedly probes in a regular XY grid and writes the probed location to the file 'probe-results.txt' in the same directory as the .ini file.\layout SubsectionSmart Probe\layout StandardFile Name: smartprobe.ngc\layout StandardDescription: Rectangular Probing \layout StandardThis program repeatedly probes in a regular XY grid and writes the probed location to the file 'probe-results.txt' in the same directory as the .ini file. This is improved from the grid probe file.\layout SubsectionTool Length Probe\layout StandardFile Name: tool-lenght-probe.ngc\layout StandardDescription: Tool Length Probing\layout StandardThis program demonstrates how to measure tool lengths automatically using a switch hooked to the probe input. This is useful for machines without tool holders, where the length of a tool is different every time it is inserted.\layout Subsection\pagebreak_top Hole Probe\layout StandardFile Name: probe-hole.ngc\layout StandardDescription: Finding the Center and Diameter of a hole.\layout StandardThe program demonstrates how to find the center of a hole, measure the hole diameter and record the results. The example does not include a tool change to put a probe in the spindle. Add the tool change code at the beginning, if needed.\layout StandardNote that this code will not function until you replace <description of number> with a number. \layout LyX-CodeG0 Z <Z-value of retracted position> F <feed rate> \layout LyX-Code#1001=<nominal X-value of hole center> \layout LyX-Code#1002=<nominal Y-value of hole center> \layout LyX-Code#1003=<some Z-value inside the hole> \layout LyX-Code#1004=<probe tip radius> \layout LyX-Code#1005=[<nominal hole diameter>/2.0 - #1004] \layout LyX-CodeG0 X#1001 Y#1002 (move above nominal hole center) \layout LyX-CodeG0 Z#1003 (move into hole - to be cautious, substitute G1 for G0 here) \layout LyX-CodeG38.2 X[#1001 + #1005] (probe +X side of hole) \layout LyX-Code#1011=#5061 (save results) G0 X#1001 Y#1002 (back to center of hole) \layout LyX-CodeG38.2 X[#1001 - #1005] (probe -X side of hole) \layout LyX-Code#1021=[[#1011 + #5061] / 2.0] (find pretty good X-value of hole center) \layout LyX-CodeG0 X#1021 Y#1002 (back to center of hole) \layout LyX-CodeG38.2 Y[#1002 + #1005] (probe +Y side of hole) \layout LyX-Code#1012=#5062 (save results) \layout LyX-CodeG0 X#1021 Y#1002 (back to center of hole) \layout LyX-CodeG38.2 Y[#1002 - #1005] (probe -Y side of hole) \layout LyX-Code#1022=[[#1012 + #5062] / 2.0] (find very good Y-value of hole center) \layout LyX-Code#1014=[#1012 - #5062 + [2 * #1004]] (find hole diameter in Y-direction) \layout LyX-CodeG0 X#1021 Y#1022 (back to center of hole) \layout LyX-CodeG38.2 X[#1021 + #1005] (probe +X side of hole) \layout LyX-Code#1031=#5061 (save results) \layout LyX-CodeG0 X#1021 Y#1022 (back to center of hole) \layout LyX-CodeG38.2 X[#1021 - #1005] (probe -X side of hole) \layout LyX-Code#1041=[[#1031 + #5061] / 2.0] (find very good X-value of hole center) \layout LyX-Code#1024=[#1031 - #5061 + [2 * #1004]] (find hole diameter in X-direction) \layout LyX-Code#1034=[[#1014 + #1024] / 2.0] (find average hole diameter) \layout LyX-Code#1035=[#1024 - #1014] (find difference in hole diameters) \layout LyX-CodeG0 X#1041 Y#1022 (back to center of hole) \layout LyX-CodeM2 (end of program) \layout SectionCutter Compensation\layout SubsectionG1 Lead In Move\layout StandardFile Name: comp-g1.ngc\layout StandardDescription: Cutter compensation with straight lead in and out.\layout StandardThis file demonstrates how to do a cutter compensation move using a G1 straight line lead in and lead out move. It is an error to have a G1 lead in move form a concave angle.\the_end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -