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

Fix trajectories velocity calculation from Velocity mode #124

Merged
merged 11 commits into from
Nov 13, 2024

Conversation

LeandroMartinsdS
Copy link
Contributor

This PR fixes the trajectories calculation from velocity mode.

  • It considers the buffer rollover for the velocity mode needs information (position or time) from the previous or next buffer.
  • Applies fixes in indexing for ppmac startAxisPointsCmd.
  • Fixes typo M-variable definition in powerpmac motion program.
  • Change the definition of the velocities to Q-variables in motion program.
  • Fixes BufferAdr_B in ppmac motion

Copy link

@JamesOHeaDLS JamesOHeaDLS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meant to place in-line comment

pmacApp/pmc/trajectory_scan_code_ppmac.pmc Show resolved Hide resolved
pmacApp/src/pmacController.cpp Show resolved Hide resolved
pmacApp/src/pmacTrajectory.cpp Outdated Show resolved Hide resolved
pmacApp/src/pmacTrajectory.cpp Outdated Show resolved Hide resolved
pmacApp/src/pmacController.cpp Outdated Show resolved Hide resolved
pmacApp/src/pmacController.cpp Outdated Show resolved Hide resolved
pmacApp/src/pmacController.cpp Outdated Show resolved Hide resolved
pmacApp/src/pmacController.cpp Outdated Show resolved Hide resolved
pmacApp/pmc/trajectory_scan_definitions_ppmac.pmh Outdated Show resolved Hide resolved
pmacApp/pmc/trajectory_scan_code.pmc Outdated Show resolved Hide resolved
@LeandroMartinsdS LeandroMartinsdS force-pushed the fixTrajectories branch 2 times, most recently from e3d012f to 09e18f9 Compare September 12, 2024 15:43
Copy link

@JamesOHeaDLS JamesOHeaDLS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isAxisValid and isIndexValid need to be write into unique variables, or via another mean so one doesn't mask the error of the other

pmacApp/src/pmacTrajectory.cpp Outdated Show resolved Hide resolved
pmacApp/src/pmacTrajectory.cpp Outdated Show resolved Hide resolved
@LeandroMartinsdS LeandroMartinsdS force-pushed the fixTrajectories branch 3 times, most recently from 64f2d55 to 7a7c925 Compare November 1, 2024 16:59
Remove call for removed subroutine (N112)
Remove assignment of removed variable (VelMode)

Rename clashing variables for ppmac trajectory

Global variable Time clashes with Sys.Time element
User defined variable Status breaks the Status screen IDE
Make the necessary changes to tpmac startAxisPointCmd to keep the same
functioning
Move velocities to Q variables
Fix Z_Axis definition for trajectory scan
Handle buffer rollover in trajectory velocity calculation from VelMode

Rollback getVelocityMode
A_Vel_Adr was being calculated from the previous Z_Adr, which represents the Z position at the previous iteration.
As the addresses are cascaded, all the velocities were shifted.

Tidy up trajectory_scan_code for turbo PMAC

Move the buffers addresses update to the end of subroutine
making it more readable
Add comments for tScanPrevBufferPositions

Add tScanGetPreviousPoint function

Refactored to make obtaining the previous point for tScan velocity calculation more modular
@LeandroMartinsdS LeandroMartinsdS merged commit ce4b4b4 into dls-master Nov 13, 2024
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