📄 pmsm_8h.html
字号:
<a class="anchor" name="a36"></a><!-- doxytag: member="PMSM.h::REVERSE_ROTATION_SIGNAL_ENABLE" ref="a36" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define REVERSE_ROTATION_SIGNAL_ENABLE TRUE </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Enables/disables the reverse rotation signal output. TRUE = enabled, FALSE = disabled.<p><dl compact><dt><b><a class="el" href="todo.html#_todo000008">Todo:</a></b></dt><dd>Select whether the 'Reverse rotation' signal should be enabled. </dd></dl><p>Definition at line <a class="el" href="PMSM_8h-source.html#l00177">177</a> of file <a class="el" href="PMSM_8h-source.html">PMSM.h</a>. </td> </tr></table><a class="anchor" name="a3"></a><!-- doxytag: member="PMSM.h::SINE_TABLE_LENGTH" ref="a3" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define SINE_TABLE_LENGTH 192U </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>The number of elements in the sine modulation table per phase. <p><p>Definition at line <a class="el" href="PMSM_8h-source.html#l00045">45</a> of file <a class="el" href="PMSM_8h-source.html">PMSM.h</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00713">AdjustSineTableIndex()</a>, and <a class="el" href="main_8c-source.html#l00695">SineTableIncrementCalculate()</a>. </td> </tr></table><a class="anchor" name="a43"></a><!-- doxytag: member="PMSM.h::SPEED_CONTROL_CLOSED_LOOP" ref="a43" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define SPEED_CONTROL_CLOSED_LOOP 1 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Speed control selection for closed loop control. <p><p>Definition at line <a class="el" href="PMSM_8h-source.html#l00205">205</a> of file <a class="el" href="PMSM_8h-source.html">PMSM.h</a>. </td> </tr></table><a class="anchor" name="a44"></a><!-- doxytag: member="PMSM.h::SPEED_CONTROL_METHOD" ref="a44" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define SPEED_CONTROL_METHOD SPEED_CONTROL_OPEN_LOOP </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Type of speed control. select either SPEED_CONTROL_OPEN_LOOP or SPEED_CONTROL_CLOSED_LOOP. <dl compact><dt><b><a class="el" href="todo.html#_todo000010">Todo:</a></b></dt><dd>Select speed control method. </dd></dl><p>Definition at line <a class="el" href="PMSM_8h-source.html#l00211">211</a> of file <a class="el" href="PMSM_8h-source.html">PMSM.h</a>. </td> </tr></table><a class="anchor" name="a42"></a><!-- doxytag: member="PMSM.h::SPEED_CONTROL_OPEN_LOOP" ref="a42" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define SPEED_CONTROL_OPEN_LOOP 0 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Speed control selection for open loop control. <p><p>Definition at line <a class="el" href="PMSM_8h-source.html#l00202">202</a> of file <a class="el" href="PMSM_8h-source.html">PMSM.h</a>. </td> </tr></table><a class="anchor" name="a49"></a><!-- doxytag: member="PMSM.h::SPEED_CONTROLLER_MAX_INCREMENT" ref="a49" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define SPEED_CONTROLLER_MAX_INCREMENT 550 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>The maximum increment (maximum speed) to use as setpoint when the maximum speed reference value is input.<p><dl compact><dt><b><a class="el" href="todo.html#_todo000015">Todo:</a></b></dt><dd>Adjust maximum increment. (Maximum speed, used by speed controller) </dd></dl><p>Definition at line <a class="el" href="PMSM_8h-source.html#l00238">238</a> of file <a class="el" href="PMSM_8h-source.html">PMSM.h</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00305">SpeedController()</a>. </td> </tr></table><a class="anchor" name="a50"></a><!-- doxytag: member="PMSM.h::SPEED_CONTROLLER_MAX_INPUT" ref="a50" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define SPEED_CONTROLLER_MAX_INPUT 256 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Max speed reference input. (Rounded up to closest power of 2 in this case, which is recommended to speed up division.<p><dl compact><dt><b><a class="el" href="todo.html#_todo000016">Todo:</a></b></dt><dd>Adjust Maximum speed reference input value. </dd></dl><p>Definition at line <a class="el" href="PMSM_8h-source.html#l00245">245</a> of file <a class="el" href="PMSM_8h-source.html">PMSM.h</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00305">SpeedController()</a>. </td> </tr></table><a class="anchor" name="a45"></a><!-- doxytag: member="PMSM.h::SPEED_CONTROLLER_TIME_BASE" ref="a45" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define SPEED_CONTROLLER_TIME_BASE 150 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>The number of ticks between each iteration of the speed loop. <dl compact><dt><b><a class="el" href="todo.html#_todo000011">Todo:</a></b></dt><dd>Adjust speed control loop time base. </dd></dl><p>Definition at line <a class="el" href="PMSM_8h-source.html#l00216">216</a> of file <a class="el" href="PMSM_8h-source.html">PMSM.h</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l01030">Timer1CaptureISR()</a>. </td> </tr></table><a class="anchor" name="a41"></a><!-- doxytag: member="PMSM.h::SYNCHRONIZATION_COUNT" ref="a41" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define SYNCHRONIZATION_COUNT 2 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>This constant specifies the number of subsequent detections of correct direction of rotation needed before the firmware is considered synchronized with the motor. (SYNCHRONIZATION_COUNT + 1) hall sensor changes in the same direction are needed.<p>Definition at line <a class="el" href="PMSM_8h-source.html#l00199">199</a> of file <a class="el" href="PMSM_8h-source.html">PMSM.h</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00847">MotorSynchronizedUpdate()</a>. </td> </tr></table><a class="anchor" name="a4"></a><!-- doxytag: member="PMSM.h::TABLE_ELEMENTS_PER_COMMUTATION_SECTOR" ref="a4" args="" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define TABLE_ELEMENTS_PER_COMMUTATION_SECTOR (SINE_TABLE_LENGTH / 6) </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>The number of elements in the sine modulation table for each phase per commutation sector. <p><p>Definition at line <a class="el" href="PMSM_8h-source.html#l00052">52</a> of file <a class="el" href="PMSM_8h-source.html">PMSM.h</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00930">HallChangeISR()</a>. </td> </tr></table><a class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -