Skip to content

Repeated small move #64

@jimtesson

Description

@jimtesson

I'm trying to run repeated small move to approach the tool very closely to an object. The exact position of the object is not known before doing this operation. Thus while i'm pressing a button, small move commands (G0X0.005F300) are sended every 10ms. In previous versions of machine-control, this action worked well and allowed to get an accurate positioning of the tool.

Since the "new" planner has been released (2 years ago), this operation is not working anymore, moving only occurred when I stop sending commands. It seems to come from the planner. In the method Planner::Impl::issue_motor_move_if_possible, while the planning_buffer_ size is < to the planning_buffer_capacity, the planner wait to enqueue segments in motor_ops_.

 if (num_segments == 0 &&
      (planning_buffer_.size() == planning_buffer_.capacity()))
    ++num_segments;

In my use case, the move commands are thus treated when I stop sending commands, or when the planning_buffer get full.
In the past version, the segments were enqueue when at least 3 segments were requested.

Is there any idea to fix this ?

I tried another approach that is to send a large move G0X300, and send M0 to stop the move when I want. But it appears that the M0 is treated after G0X300. Maybe I missed something ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions