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

📄 spindle.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 indent\defskip medskip\quotes_language english\quotes_times 2\papercolumns 1\papersides 1\paperpagestyle default\layout ChapterSpindle Speed Control\layout Section0-10v Spindle Speed\layout StandardIf your spindle is controlled by a VFD with a 0 to 10 volt signal and your using a DAC card like the m5i20 to output the control signal. \layout StandardFirst you need to figure the scale of spindle speed to control signal. For this example the spindle top speed of 5000 RPM is equal to 10 volts. \begin_inset Formula $10/5000=0.002$\end_inset  so our scale factor is 0.002\layout StandardWe have to add a scale componet to the hal file to scale the motion.spindle-speed-out to the 0 to 10 needed by the VFD if your DAC card does not do scaling.\layout Standardloadrt scale count=1\layout Standardaddf scale.0 servo-thread\layout Standardsetp scale.0.gain 0.002\layout Standardnet spindle-speed-scale motion.spindle-speed-out => scale.0.in\layout Standardnet spindle-speed-DAC scale.0.out => <your DAC pin name>\layout SectionPWM Spindle Speed\layout StandardIf your spindle can be controlled by a PWM signal, use the pwmgen component to create the signal:\layout Standardloadrt pwmgen output_type=0 \layout Standardaddf pwmgen.update servo-thread\layout Standardaddf pwmgen.make-pulses base-thread\layout Standardnet spindle-speed-cmd motion.spindle-speed-out => pwmgen.0.value\layout Standardnet spindle-on motion.spindle-on => pwmgen.0.enable\layout Standardnet spindle-pwm pwmgen.0.pwm => parport.0.pin-09-out\layout Standardsetp pwmgen.0.scale 1800 # Change to your spindle's top speed in RPM \layout StandardThis assumes that the spindle controller's response to PWM is simple: 0% PWM gives 0RPM, 10% PWM gives 180 RPM, etc. If there is a minimum PWM required to get the spindle to turn, follow the example in the nist-lathe sample configuration to use a scale component.\layout SectionSpindle Feedback\layout StandardAdd this section\layout SectionSpindle Enable\layout StandardIf you need a spindle enable signal link your output pin to motion.spindle-on. To link these pins to a parallel port pin put something like the following in your .hal file making sure you pick the pin that is connected to your control device.\layout Standardnet spindle-enable motion.spindle-on => parport.0.pin-14-out\layout SectionSpindle Direction\layout StandardIf you have direction control of your spindle the hal pins motion.spindle-forward and motion.spindle-reverse are controlled by M3 and M4. S must be set to a positive non zero value for M3/4 to turn on spindle motion. \layout StandardTo link these pins to a parallel port pin put something like the following in your .hal file making sure you pick the pin that is connected to your control device.\layout Standardnet spindle-fwd motion.spindle-forward -> parport.0.pin-16-out\layout Standardnet spindle-rev motion.spindle-reverse => parport.0.pin-17-out\the_end

⌨️ 快捷键说明

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