setMpgRatio()
描述
設置在 MPG 模式下,Encoder 變化量與距離之倍率。
语法
machine.setMpgRatio(rate);
参数
machine
:为 Machine
物件。
rate
:Encoder 变化量与距离之倍率,该值应大于 0。
回传
无回传值。
范例
设定机器的基本参数,并启用 MPG 模式,Encoder 值变动时会连动 X 轴。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
See also
beginMpg()
endMpg()
setMpgSpeed()
setMpgAxis()
getJogPos()
86Duino 参考资料的文本遵循知识共享署名-Creative Commons Attribution-ShareAlike 3.0 License。参考资料中的代码示例已发布到公共领域。