简体   繁体   English

G代码G1移动指令与MM114获取电机position指令不一致

[英]G-code G1 move command is not consistent with MM114 get motor position command

I am using the G1 move command to rotate aa stepper motor with a Duet3D stepper controller board.我正在使用 G1 移动命令来旋转带有 Duet3D 步进电机 controller 板的步进电机。 I just realised by using the M114 command, which returns the actual motor position, that there is an error margin between the 2 commands, but I don't understand why as I directly ask a distance to move, which should be added to the relative motor position saved on the board.我刚刚通过使用返回实际电机 position 的 M114 命令意识到这两个命令之间存在误差范围,但我不明白为什么我直接询问移动距离,应该添加到相对电机 position 保存在板上。

  1. sending get position command: M114发送 get position 命令: M114
    returns: X:0.000返回:X:0.000

  2. sending move command: M120 G91 G1 S1 X-28.897 F600 M121发送移动指令: M120 G91 G1 S1 X-28.897 F600 M121

  3. sending get position command after move is done: M114移动完成后发送 get position 命令: M114

    returns: -28.934返回:-28.934

Why is M114 returning a slightly higher value than what I asked the motor to move?为什么 M114 返回的值比我要求电机移动的值略高?

Thank you!谢谢!

I think the minor correction of 0.5mm is because of auto calibration or homing.我认为 0.5mm 的小修正是因为自动校准或归位。 When the device is homed there is a minor correction applied for all the axis with respect to the end stops.当设备归位时,对所有轴相对于终端挡块进行较小的校正。

Another point I would check would be the step calculation for the motor.我要检查的另一点是电机的步进计算。 sometimes the mm/steps of motor calculation may not be perfect and has to be manually fine tuned.有时电机计算的毫米/步数可能并不完美,必须手动微调。 You can find the steps defined in the config.g file in the command M92 .您可以在命令M92中找到config.g文件中定义的步骤。 You can vary in steps of 0.005 for each axis and verify the movement.您可以为每个轴以 0.005 的步长变化并验证运动。

The steps/mm latency is not visible in small machines but this latency increases with the size of machine.步数/毫米延迟在小型机器中不可见,但这种延迟随着机器大小的增加而增加。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM