Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added speed getters and setters and halt #12

Merged
merged 2 commits into from
Sep 29, 2022

Conversation

Poofjunior
Copy link
Collaborator

@Poofjunior Poofjunior commented Sep 28, 2022

Tested. This can be merged.

Added:

  • speed setter and getter
  • halt function

The syntax is:

box = TigerController(PORT_NAME)
new_speeds = {'x': 0.5, 'y': 0.25, 'z': 0.75}
box.set_speed(**new_speeds)
# OR
box.set_speed(x=0.5, y=0.25, z=0.75)

You can read out speeds one axis at a time with get_speed(axis) like this:

for ax in ['x', 'y', 'z']:
    speed = box.get_speed(ax)
    print(f"{ax} axis speed is {speed}[mm/sec]")

to halt, you just:

box.halt()

I tested:

  • reading the old speeds on xyz, changing the speeds, writing the new speeds, reading the new speeds, and confirming the change had taken place.
  • sending a long move command, a halt command, and reading the position before and after to confirm that the machine had stopped partway through the move.

@Poofjunior Poofjunior changed the title added speed getters and setters; needs testing added speed getters and setters Sep 29, 2022
@Poofjunior Poofjunior changed the title added speed getters and setters added speed getters and setters and halt Sep 29, 2022
@Poofjunior
Copy link
Collaborator Author

ok, @adamkglaser if this works for you, I say we should :shipit:

This was referenced Sep 29, 2022
@adamkglaser adamkglaser merged commit 65ca486 into main Sep 29, 2022
@adamkglaser
Copy link
Collaborator

Awesome! Will integrate these into dispim tomorrow in addition to flushing out CPX stuff with Nathan.

@Poofjunior Poofjunior deleted the dev/speed_setting_and_halt branch October 3, 2022 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants