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

📄 drivers.lyx

📁 CNC 的开放码,EMC2 V2.2.8版
💻 LYX
📖 第 1 页 / 共 5 页
字号:
loadFpga\family default \series default  is 1 (the default) the driver will load the FPGA configuration on startup. If it is 0, the driver assumes the configuration is already loaded. \family typewriter \series bold dacRate\family default \series default  sets the carrier frequency for the PWM outputs, in Hz. The default is 32000, for 32KHz PWM. Valid values are from 1 to 32226. The driver prints some useful debugging message to the kernel log, which can be viewed with \family typewriter \series bold dmesg\family default \series default .\layout StandardUp to 4 boards may be used in one system.\layout SubsectionPins\layout StandardIn the following pins, parameters, and functions, <board> is the board ID. According to the naming conventions the first board should always have an ID of zero, however this driver uses the PCI board ID, so it may be non-zero even if there is only one board.\layout Itemize\family typewriter \noun on (s32\noun default ) m5i20.<board>.enc-<channel>-count \family default -- Encoder position, in counts.\layout Itemize\family typewriter (\noun on float\noun default ) m5i20.<board>.enc-<channel>-position \family default -- Encoder position, in user units.\layout Itemize\family typewriter \noun on (bit) \noun default m5i20.<board>.enc-<channel>-index\family default  -- Current status of index pulse input?\layout Itemize\family typewriter \noun on (bit)\noun default  m5i20.<board>.enc-<channel>-index-enable \family default -- when \noun on true\noun default , and an index pulse appears on the encoder input, reset counter to zero and clear \family typewriter index-enable\family default .\layout Itemize\family typewriter \noun on (bit) \noun default m5i20.<board>.enc-<channel>-reset\family default  -- When true, counter is forced to zero.\layout Itemize\family typewriter \noun on (bit) \noun default m5i20.<board>.dac-<channel>-enable\family default  -- Enables DAC if true. DAC outputs zero volts if false?\layout Itemize\family typewriter \noun on (float) \noun default m5i20.<board>.dac-<channel>-value\family default  -- Analog output value for PWM \begin_inset Quotes eld\end_inset DAC\begin_inset Quotes erd\end_inset  (in user units, see \family typewriter -scale\family default  and \family typewriter -offset\family default )\layout Itemize\family typewriter \noun on (bit) \noun default m5i20.<board>.in-<channel>\family default  -- State of digital input pin, see canonical digital input.\layout Itemize\family typewriter \noun on (bit) \noun default m5i20.<board>.in-<channel>-not\family default  -- Inverted state of digital input pin, see canonical digital input.\layout Itemize\family typewriter \noun on (bit) \noun default m5i20.<board>.out-<channel>\family default  -- Value to be written to digital output, see canonical digital output.\layout Itemize\family typewriter \noun on (bit) \noun default m5i20.<board>.estop-in\family default  -- Dedicated estop input, more details needed.\layout Itemize\family typewriter \noun on (bit) \noun default m5i20.<board>.estop-in-not\family default  -- Inverted state of dedicated estop input.\layout Itemize\family typewriter \noun on (bit) \noun default m5i20.<board>.watchdog-reset\family default  -- Bidirectional, - Set TRUE to reset watchdog once, is automatically cleared. If bit value 16 is set in \family typewriter watchdog-control\family default  then this value is not used, and the hardware watchdog is cleared every time the \family typewriter dac-write\family default  function is executed.\layout SubsectionParameters\layout Itemize\family typewriter \noun on (float) \noun default m5i20.<board>.enc-<channel>-scale\family default  -- The number of counts / user unit (to convert from counts to units).\layout Itemize\family typewriter (\noun on float\noun default ) m5i20.<board>.dac-<channel>-offset \family default -- Sets the DAC offset.\layout Itemize\family typewriter (\noun on float\noun default ) m5i20.<board>.dac-<channel>-gain \family default -- Sets the DAC gain (scaling).\layout Itemize\family typewriter (\noun on bit\noun default ) m5i20.<board>.dac-<channel>-interlaced \family default -- Sets the DAC to interlaced mode. Use this mode if you are filtering the PWM to generate an anaolg voltage.\begin_inset Footcollapsed true\layout StandardWith normal 10 bit PWM, 50% duty cycle would be 512 cycles on and 512 cycles off = ca 30 kHz with 33 MHz reference counter. With fully interleaved PWM this would be 1 cycle on, 1 cycle off for 1024 cycles (16.66 MHz if the PWM reference counter runs at 33 MHz) = much easier to filter. The 5I20 configuration interlace is somewhat between non and fully interlaced (to make it easy to filter but not have as many transistions as fully interleaved).\end_inset \layout Itemize\family typewriter (\noun on bit\noun default ) m5i20.<board>.out-<channel>-invert \family default -- Inverts a digital output, see canonical digital output.\layout Itemize\family typewriter (\noun on u32\noun default ) m5i20.<board>.watchdog-control\family default  -- Configures the watchdog. The value may be a bitwise OR of the following values:\newline \begin_inset  Tabular<lyxtabular version="3" rows="3" columns="3"><features><column alignment="center" valignment="top" leftline="true" width="0"><column alignment="center" valignment="top" leftline="true" width="0"><column alignment="center" valignment="top" leftline="true" rightline="true" width="0"><row topline="true" bottomline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardBit #\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout StandardValue\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout StandardMeaning\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard0\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard1\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout StandardWatchdog is enabled\end_inset </cell></row><row topline="true" bottomline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard1\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard2\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout StandardWatchdog is automatically reset by DAC writes (the HAL \family typewriter dac-write\family default  function)\end_inset </cell></row></lyxtabular>\end_inset  Typically, the useful values are 0 (watchdog disabled) or 3 (watchdog enabled, cleared by \family typewriter dac-write\family default ).\layout Itemize\family typewriter (\noun on u32\noun default ) m5i20.<board>.led-view\family default  -- Maps some of the I/O to onboard LEDs. See table below.\layout SubsectionFunctions\layout Itemize\family typewriter \noun on (funct) \noun default m5i20.<board>.encoder-read\family default  -- Reads all encoder counters.\layout Itemize\family typewriter \noun on (funct)\noun default  m5i20.<board>.digital-in-read \family default -- Reads digital inputs.\layout Itemize\family typewriter \noun on (funct) \noun default m5i20.<board>.dac-write \family default -- Writes the voltages (PWM duty cycles) to the \begin_inset Quotes eld\end_inset DACs\begin_inset Quotes erd\end_inset .\layout Itemize\family typewriter \noun on (funct)\noun default  m5i20.<board>.digital-out-write \family default -- Writes digital outputs.\layout Itemize\family typewriter \noun on (funct) \noun default m5i20.<board>.misc-update\family default  -- Writes watchdog timer configuration to hardware. Resets watchdog timer. Updates E-stop pin (more info needed). Updates onboard LEDs. \layout SubsectionConnector pinout\layout StandardThe Hostmot-4 FPGA configuration has the following pinout. There are three 50-pin ribbon cable connectors on the card: P2, P3, and P4. There are also 8 status LEDs.\layout SubsubsectionConnector P2\layout Standard\begin_inset  Tabular<lyxtabular version="3" rows="27" columns="2"><features><column alignment="center" valignment="top" leftline="true" width="0"><column alignment="center" valignment="top" leftline="true" rightline="true" width="0"><row topline="true" bottomline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standardm5i20 card connector P2\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout StandardFunction/HAL-pin\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard1\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standardenc-01 A input\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard3\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standardenc-01 B input\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard5\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standardenc-00 A input\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard7\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standardenc-00 B input\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard9\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standardenc-01 index input\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard11\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standardenc-00 index input\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard13\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standarddac-01 output\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard15\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standarddac-00 output\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard17\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standard

⌨️ 快捷键说明

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