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

📄 sim_encoder.9

📁 CNC 的开放码,EMC2 V2.2.8版
💻 9
字号:
.TH SIM_ENCODER "9" "2007-01-16" "EMC Documentation" "HAL Component".de TQ.br.ns.TP \\$1...SH NAMEsim_encoder \- simulated quadrature encoder.SH SYNOPSIS\fBloadrt sim_encoder num_chan=\fInum\fR.SH DESCRIPTION\fBsim_encoder\fR can generate quadrature signals as if from an encoder.It also generates an index pulse once per revolution.  It is mostly usedfor testing and simulation, to replace hardware that may not be available.It has a limited maximum frequency, as do all software based pulsegenerators..P\fBsim_encoder\fR supports a maximum of eight channels.  The number ofchannels actually loaded is set by the \fBnum_chan\fR argument whenthe module is loaded.  If \fBnumchan\fR is not specified, the defaultvalue is one..SH FUNCTIONS.TP \fBsim-encoder.make-pulses\fR (no floating-point)Generates the actual quadrature and index pulses.  Must be called asfrequently as possible, to maximize the count rate and minimize jitter.Operates on all channels at once..TP \fBsim-encoder.update-speed\fR (uses floating-point)Reads the \fBspeed\fR command and other parameters and converts thedata into a form that can be used by \fBmake-pulses\fR.  Changes takeeffect only when \fBupdate-speed\fR runs.  Can (and should) be calledless frequently than \fBmake-pulses\fR.  Operates on all channels atonce..SH PINS.TP\fBsim-encoder.\fIN\fB.phase-A\fR bit outOne of the quadrature outputs..TP\fBsim-encoder.\fIN\fB.phase-B\fR bit outThe other quadrature output..TP\fBsim-encoder.\fIN\fB.phase-Z\fR bit outThe index pulse..TP\fBsim-encoder.\fIN\fB.speed\fR float inThe desired speed of the encoder, in user units per per second.  Thisis divided by \fBscale\fR, and the result is used as the encoder speedin revolutions per second..SH PARAMETERS.TP\fBsim-encoder.\fIN\fB.ppr\fR u32 rwThe pulses per revolution of the simulated encoder.  Note that thisis pulses, not counts, per revolution.  Each pulse or cycle from theencoder results in four counts, because every edge is counted.Default value is 100 ppr, or 400 counts per revolution..TP\fBsim-encoder.\fIN\fB.scale\fR float rwScale factor for the \fBspeed\fR input.  The \fBspeed\fR value is dividedby \fBscale\fR to get the actual encoder speed in revolutions per second.For example, if \fBscale\fR is set to 60, then \fBspeed\fR is in revolutionsper minute (RPM) instead of revolutions per second.  The default valueis 1.00.

⌨️ 快捷键说明

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