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

📄 tweaking_steppers.lyx

📁 CNC 的开放码,EMC2 V2.2.8版
💻 LYX
📖 第 1 页 / 共 2 页
字号:
#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 ChapterStepper Tuning\layout SectionGetting the most out of Software Stepping\layout StandardGenerating step pulses in software has one very big advantage - it's free. Just about every PC has a parallel port that is capable of outputting step pulses that are generated by the software. However, software step pulses also have some disadvantages:\layout Itemizelimited maximum step rate\layout Itemizejitter in the generated pulses\layout Itemizeloads the CPU \layout StandardThis chapter has some steps that can help you get the best results from software generated steps.\layout SubsectionRun a Latency Test\layout StandardThe new easy way to do a latency test is described in the Getting Started Guide.\layout StandardLatency is how long it takes the PC to stop what it is doing and respond to an external request. In our case, the request is the periodic "heartbeat" that serves as a timing reference for the step pulses. The lower the latency, the faster you can run the heartbeat, and the faster and smoother the step pulses will be.\layout StandardLatency is far more important than CPU speed. A lowly Pentium II that responds to interrupts within 10 microseconds each and every time can give better results than the latest and fastest P4 Hyperthreading beast.\layout StandardThe CPU isn't the only factor in determining latency. Motherboards, video cards, USB ports, and a number of other things can hurt the latency. The best way to find out what you are dealing with is to run the RTAI latency test.\layout QuoteDO NOT TRY TO RUN EMC2 WHILE THE TEST IS RUNNING\layout StandardOn Ubuntu Dapper, you can run the test by opening a shell and doing:\layout LyX-Codesudo mkdir /dev/rtf; \layout LyX-Codesudo mknod /dev/rtf/3 c 150 3; \layout LyX-Codesudo mknod /dev/rtf3 c 150 3; \layout LyX-Codecd /usr/realtime*/testsuite/kern/latency; ./run\layout Standardand then you should see something like this:\layout LyX-Codeubuntu:/usr/realtime-2.6.12-magma/testsuite/kern/latency$ ./run \layout LyX-Code* \layout LyX-Code* \layout LyX-Code* Type ^C to stop this application. \layout LyX-Code* \layout LyX-Code*\layout LyX-Code\layout LyX-Code## RTAI latency calibration tool ## \layout LyX-Code# period = 100000 (ns) \layout LyX-Code# avrgtime = 1 (s) \layout LyX-Code# do not use the FPU \layout LyX-Code# start the timer \layout LyX-Code# timer_mode is oneshot\layout LyX-Code\layout LyX-CodeRTAI Testsuite - KERNEL latency (all data in nanoseconds) \layout LyX-CodeRTH| lat min| ovl min| lat avg| lat max| ovl max| overruns \layout LyX-CodeRTD|   -1571|   -1571|    1622|    8446|    8446|      0 \layout LyX-CodeRTD|   -1558|   -1571|    1607|    7704|    8446|      0 \layout LyX-CodeRTD|   -1568|   -1571|    1640|    7359|    8446|      0 \layout LyX-CodeRTD|   -1568|   -1571|    1653|    7594|    8446|      0 \layout LyX-CodeRTD|   -1568|   -1571|    1640|   10636|   10636|      0 \layout LyX-CodeRTD|   -1568|   -1571|    1640|   10636|   10636|      0\layout StandardWhile the test is running, you should "abuse" the computer. Move windows around on the screen. Surf the web. Copy some large files around on the disk. Play some music. Run an OpenGL program such as glxgears. The idea is to put the PC through its paces while the latency test checks to see what the worst case numbers are.\layout StandardThe last number in the column labeled "ovl max" is the most important. Write it down - you will need it later. It contains the worst latency measurement during the entire run of the test. In the example above, that is 10636 nano-seconds, or 10.6 micro-seconds, which is excellent. However the example only ran for a few seconds (it prints one line every second). You should run the test for at least several minutes; sometimes the worst case latency doesn't happen very often, or only happens when you do some particular action. I had one Intel motherboard that worked pretty well most of the time, but every 64 seconds it had a very bad 300uS latency. Fortunately that is fixable, see FixingDapperSMIIssues in the wiki found at wiki.linuxcnc.org.\layout StandardSo, what do the results mean? If your "ovl max" number is less than about 15-20 microseconds (15000-20000 nanoseconds), the computer should give very nice results with software stepping. If the max latency is more like 30-50 microseconds, you can still get good results, but your maximum step rate might be a little dissapointing, especially if you use microstepping or have very fine pitch leadscrews. If the numbers are 100uS or more (100,000 nanoseconds), then the PC is not a good candidate for software stepping. Numbers over 1 millisecond (1,000,000 nanoseconds) mean the PC is not a good candidate for EMC, regardless of whether you use software stepping or not.\layout StandardNote that if you get high numbers, there may be ways to improve them. For example, one PC had very bad latency (several milliseconds) when using the onboard video. But a $5 used Matrox video card solved the problem - EMC does not require bleeding edge hardware. \layout SubsectionFigure out what your drives expect\layout StandardDifferent brands of stepper drives have different timing requirements on their step and direction inputs. So you need to dig out (or Google for) the data sheet that has your drive's specs.\layout QuotationFor example, the Gecko G202 manual says this:\layout QuotationStep Frequency: 0 to 200 kHz \layout QuotationStep Pulse \begin_inset Quotes eld\end_inset 0\begin_inset Quotes erd\end_inset  Time: 0.5 uS min (Step on falling edge) \layout QuotationStep Pulse \begin_inset Quotes eld\end_inset 1\begin_inset Quotes erd\end_inset  Time: 4.5 uS min \layout Quotation

⌨️ 快捷键说明

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