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

Axis Id attribute of top-level NC.xti Axis may differ from per-axis .XTI Axis Id attribute [LCLSECSD-730] #277

Open
klauer opened this issue Feb 17, 2022 · 1 comment

Comments

@klauer
Copy link
Contributor

klauer commented Feb 17, 2022

When saved in a separate file, the Axis Id attribute of top-level NC.xti Axis may differ from per-axis .XTI Axis Id attribute.

We currently use the axis one and not the NC-defined one.

pytmc/pytmc/parser.py

Lines 1759 to 1762 in 411820b

self.axis_by_id = {
int(axis.attributes['Id']): axis
for axis in self.axes
}

TODO: Warn (or error) if the two differ to avoid confusion in the future.

e.g.,
https://github.com/Mbosum/lcls-plc-lamp-lv17-motion/blob/bfba8bc10cd8ad05ffd1c757fd00a421e3cebfe5/lcls-plc-lamp-lv17-motion/_Config/NC/NC.xti#L22
vs
https://github.com/Mbosum/lcls-plc-lamp-lv17-motion/blob/bfba8bc10cd8ad05ffd1c757fd00a421e3cebfe5/lcls-plc-lamp-lv17-motion/_Config/NC/Axes/SamplePaddleX.xti#L1350

@slactjohnson
Copy link

Related to JIRA ticket here: https://jira.slac.stanford.edu/browse/LCLSECSD-730

@klauer klauer changed the title Axis Id attribute of top-level NC.xti Axis may differ from per-axis .XTI Axis Id attribute Axis Id attribute of top-level NC.xti Axis may differ from per-axis .XTI Axis Id attribute [LCLSECSD-730] Mar 1, 2022
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