computePPU_LeadScrew()

描述

在使用 config_PPU 設定 PPU(Pulse per Unit) 時,可使用協助計算函數來求得設定參數。
PPU(Pulse per Unit) 關係如下圖:
zero_size
86Duino 發送 pulse 到步進馬達驅動板,驅動板便會發送 step 使步進馬達旋轉。
micro_stepping:
- 步進馬達驅動板上的參數,若要打出一個 step,需從 86Duino 接收到的 pulse 數。
steps_per_revolution:
- 步進馬達上的參數,若要轉動一圈需從步進馬達驅動板接收到的step數。
pulses_per_revolution 之計算公式為 steps_per_revolution * micro_stepping。

參數需要測量導螺桿牙距與齒輪箱齒輪比,如下圖:
zero_size

語法


machine.computePPU_LeadScrew(pulses_per_revolution, leadscrew_pitch, gear_ratio);

參數

machine:為 Machine物件。

pulses_per_revolution:讓步進馬達轉一圈,86Duino需要打的pulse數。

leadscrew_pitch:導螺桿牙距。

gear_ratio:齒輪箱的齒輪比,gear_ratio 之值為輸出齒輪齒數 / 輸入齒輪齒數,即gear_ratio = Toutput / Tinput。

回傳

double: 回傳計算完成後的 PPU(Pulse per Unit)。

See also


函式庫參考主頁面

The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.