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

Problematic setPosition behavior for absolute encoders #23

Open
kmpeters opened this issue Sep 1, 2022 · 3 comments
Open

Problematic setPosition behavior for absolute encoders #23

kmpeters opened this issue Sep 1, 2022 · 3 comments
Assignees

Comments

@kmpeters
Copy link
Contributor

kmpeters commented Sep 1, 2022

Currently the setPosition behavior changes the position offset:

if (Automation1_Command_PositionOffsetSet(pC_->controller_, 1, &axisNo_, 1, &adjustedPosition, 1))

For axes with absolute encoders, it makes more sense to keep the position offset fixed. In this case, the setPosition function would do nothing (and may need to return a status other than success to avoid the target position getting out-of-sync with the readback position).

A database for axes with absolute encoders should be created that would do the following:

  1. Set RSTM to 0 (Never) for the motor records
  2. Add a record to allow the absolute encoder offset to be set manually from EPICS
@kmpeters kmpeters self-assigned this Sep 1, 2022
@kmpeters
Copy link
Contributor Author

kmpeters commented Sep 1, 2022

@GarrettSullivan-Aerotech, how should the driver detect when an axis is using an absolute encoder?

@kmpeters
Copy link
Contributor Author

kmpeters commented Sep 1, 2022

It looks like the driver just needs to check the AbsoluteEncoderOption (391) for the AxisStatusItem for each axis.

@rakaerotech
Copy link
Collaborator

AxisStatusItem.AbsoluteEncoderOption will return what an axis is capable of, not what is is currently configured for.

I think the best way for this is to check the PrimaryFeedbackType axis parameter and use the PrimaryFeedbackType enum to see if the feedback is configured for one of the various absolute encoder types (EnDat, BiSS, etc.).

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

No branches or pull requests

2 participants