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

📄 halui_examples.lyx

📁 CNC 的开放码,EMC2 V2.2.8版
💻 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 ChapterHalui Examples\layout StandardFor any Halui examples to work you need to add the following line to the [HAL] section of the ini file.\layout QuoteHALUI = halui\layout SectionPaused & Resume\layout StandardThis example developed from the need of EMC2 to move a rotary axis when told to do so by another machine. To coordinate between two control systems using Halui we take advantage of two components of Halui.\layout Itemizehalui.program.is-paused\layout Itemizehalui.program.resume\layout StandardIn your custom.hal file we can add a couple of lines that when connected to your I/O can tell the other control system that the program is paused and to resume the program when the other control system wants EMC2 to resume.\layout Quotenet ispaused halui.program.is-paused => "your out pin"\layout Quotenet resume halui.program.resume <= "your in pin"\layout StandardYour "in" and "out\begin_inset Quotes erd\end_inset  pin is what is connected to the other controller. It could be a parallel port pin or any other pin you have access to. \layout StandardHow this works is when a M0 is encountered in your g code halui.program.is-paused goes true. This turns on your "out" pin so the other controller knows EMC2 is finished. \layout StandardTo resume the g code the other controller makes your "in" pin go true. This will then run the EMC2 g code up to the next M0.\layout StandardTiming requirements\layout ItemizeResume must not be true longer that it takes to run the g code\layout ItemizeIs Paused must not be on when next resume arrives\layout StandardTiming issues that could foul up a good plan is when the other controller sends a resume out and sees the is paused bit on and thinks that EMC2 was very fast at completing the requested command. The second issue is the other controller sending out a resume that is longer than it takes to execute the program. \layout StandardThis could be over come using ClassicLadder to turn on the is paused bit for a limited amount of time then turning it back off. Also the resume could be on a one shot or a very short timer.\layout Standard\begin_inset Notecollapsed false\layout Standardadd ClassicLadder example\end_inset \the_end

⌨️ 快捷键说明

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