getPPU()

描述

取得機器在指定軸的 PPU 值。
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。

PPU: 即機器軸欲移動每單位距離,需要輸出多少個 pulses。比如說 80 pulses/mm。

語法


machine.getPPU(axis);

參數

machine:為 Machine物件。

axis:為欲取得 PPU 之運動軸,可為 AXIS_X, AXIS_Y or AXIS_Z。

回傳

double:回傳該運動軸的 PPU 值。

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.