📄 ini_config.lyx
字号:
in quasi-SI units to raw actuator values, e.g., volts for an amplifier DAC. This scaling looks like: \begin_inset Formula \[raw=\frac{{output-offset}}{scale}\]\end_inset The value for scale can be obtained analytically by doing a unit analysis, i.e., units are [output SI units]/[actuator units]. For example, on a machine with a velocity mode amplifier such that 1 volt results in 250 mm/sec velocity, \begin_inset Formula \[amplifier[volts]=(output[\frac{mm}{sec}]-offset[\frac{mm}{sec}])/250\frac{mm}{sec\, volt}\]\end_inset Note that the units of the offset are in machine units, e.g., mm/sec, and they are pre-subtracted from the sensor readings. The value for this offset is obtained by finding the value of your output which yields 0.0 for the actuator output. If the DAC is linearized, this offset is normally 0.0. \newline The scale and offset can be used to linearize the DAC as well, resulting in values that reflect the combined effects of amplifier gain, DAC non-linearity, DAC units, etc. To do this, follow this procedure: \begin_deeper \layout Enumerate\color blackBuild a calibration table for the output, driving the DAC with a desired voltage and measuring the result. See table\SpecialChar ~\begin_inset LatexCommand \ref{cap:Output-Voltage-Measurements}\end_inset for an example of voltage measurements.\layout Enumerate\color blackDo a least-squares linear fit to get coefficients a, b such that\begin_inset Formula \[meas=a*raw+b\]\end_inset \layout Enumerate\color blackNote that we want raw output such that our measured result is identical to the commanded output. This means \begin_deeper \layout Enumerate\begin_inset Formula \[cmd=a*raw+b\]\end_inset \layout Enumerate\begin_inset Formula \[raw=(cmd-b)/a\]\end_inset \end_deeper \layout Enumerate\color blackAs a result, the a and b coefficients from the linear fit can be used as the scale and offset for the controller directly. \end_deeper \layout Description\color blackMAX_OUTPUT\SpecialChar ~\series bold =\SpecialChar ~10 \noun on \color default(hal)\series default \noun default \color blackThe maximum value for the output of the PID compensation that is written to the motor amplifier, in volts. The computed output value is clamped to this limit. The limit is applied before scaling to raw output units. The value is applied symmetrically to both the plus and the minus side.\layout Standard\begin_inset Float tablewide falsecollapsed false\layout Standard\begin_inset LatexCommand \label{cap:Output-Voltage-Measurements}\end_inset Output Voltage Measurements\layout Standard\align center \begin_inset Tabular<lyxtabular version="3" rows="7" 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 Standard\family roman \series medium \shape up \size normal \emph off \bar no \noun off \color noneRaw\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standard\family roman \series medium \shape up \size normal \emph off \bar no \noun off \color noneMeasured\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard\family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none-10\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standard\family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none-9.93\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard\family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none-9\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standard\family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none-8.83\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard\family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none0\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standard\family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none-0.03\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard\family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none1\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standard\family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none0.96\end_inset </cell></row><row topline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard\family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none9\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standard\family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none9.87\end_inset </cell></row><row topline="true" bottomline="true"><cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">\begin_inset Text\layout Standard\family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none10\end_inset </cell><cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">\begin_inset Text\layout Standard\family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none10.87\end_inset </cell></row></lyxtabular>\end_inset \end_inset \layout Description\color blackINPUT_SCALE\begin_inset LatexCommand \index{INPUT SCALE}\end_inset \SpecialChar ~=\SpecialChar ~20000\color default \series bold \noun on (hal)\series default \noun default Specifies the number of pulses that corresponds to a move of one machine unit. A second number, if specified, is ignored.\color black\newline For example, on a 2000 counts per rev encoder\begin_inset LatexCommand \index{encoder}\end_inset , and 10 revs/inch gearing, and desired units of mm, we have\begin_inset Formula \begin{eqnarray*}input\_ scale & = & 2000\frac{counts}{rev}*10\frac{rev}{inch}\\ & = & 20000\frac{counts}{inch}\end{eqnarray*}\end_inset \layout SubsubsectionStepper-related items\begin_inset LatexCommand \label{sub:Stepper-related-items}\end_inset \layout Description\color blackSCALE\begin_inset LatexCommand \index{INPUT SCALE}\end_inset \SpecialChar ~=\SpecialChar ~4000\color default \series bold \noun on (hal)\series default \noun default Specifies the number of pulses that corresponds to a move of one machine unit. For stepper systems, this is the number of step pulses issued per machine unit. For servo systems, this is the number of feedback pulses per machine unit. A second number, if specified, is ignored.\color black\newline For example, on a 1.8 degree stepper motor with half-stepping, and 10 revs/inch gearing, and desired units of mm, we have\begin_inset Formula \begin{eqnarray*}input\_ scale & = & \frac{{2\, steps}}{1.8\, degree}*360\frac{{degree}}{rev}*10\frac{rev}{inch}\\ & = & 4000\frac{steps}{inch}\end{eqnarray*}\end_inset Older stepper configuration .ini and .hal used INPUT_SCALE for this value.\layout DescriptionSTEPGEN_MAXACCEL\SpecialChar ~\series bold =\SpecialChar ~21.0\series default \series bold \noun on (hal)\series default \noun default Acceleration limit for the step generator. This should be 1% to 10% larger than the axis MAX_ACCELERATION. This value improves the tuning of stepgen's \begin_inset Quotes eld\end_inset position loop\begin_inset Quotes erd\end_inset .\layout DescriptionSTEPGEN_MAXVEL\SpecialChar ~\series bold =\series default \SpecialChar ~\series bold 1.4\series default \series bold \noun on (hal)\series default \noun default Older configuration files have a velocity limit for the step generator as well.\series bold \series default If specified, it should also be 1% to 10% larger than the axis MAX_VELOCITY. Subsequent testing has shown that use of STEPGEN_MAXVEL does not improve the tuning of stepgen's position loop. \layout Subsection[EMCIO] Section \begin_inset LatexCommand \label{sub:[EMCIO]-Section}\end_inset \begin_inset LatexCommand \index{ini [EMCIO] Section}\end_inset \layout DescriptionCYCLE_TIME\SpecialChar ~\series bold =\series default \SpecialChar ~\series bold 0.100\series default The period, in seconds, at which EMCIO will run. Making it 0.0 or a negative number will tell EMCIO not to sleep at all. There is usually no need to change this number.\layout DescriptionTOOL_TABLE\SpecialChar ~\series bold =\series default \SpecialChar ~\series bold tool.tbl\series default The file which contains tool information. For more information see the G Code Manual.\layout DescriptionTOOL_CHANGE_POSITION\SpecialChar ~\series bold =\SpecialChar ~0\SpecialChar ~0\SpecialChar ~2\series default Specifies the XYZ location to move to when performing a tool change.\the_end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -