diff --git a/malcolm/modules/pmac/blocks/pmac_trajectory_block.yaml b/malcolm/modules/pmac/blocks/pmac_trajectory_block.yaml index 3bf41ba3b..3e1e2092b 100644 --- a/malcolm/modules/pmac/blocks/pmac_trajectory_block.yaml +++ b/malcolm/modules/pmac/blocks/pmac_trajectory_block.yaml @@ -218,3 +218,9 @@ description: the version number of the pmac's trajectory program rbv: $(pv_prefix):ProgramVersion_RBV config: False + +- ca.parts.CAChoicePart: + name: calculateVelocities + description: Does the brick need to calculate the velocity profile + pv: $(pv_prefix):ProfileCalcVel + config: False diff --git a/malcolm/modules/pmac/parts/pmactrajectorypart.py b/malcolm/modules/pmac/parts/pmactrajectorypart.py index acf5581f8..a01605931 100644 --- a/malcolm/modules/pmac/parts/pmactrajectorypart.py +++ b/malcolm/modules/pmac/parts/pmactrajectorypart.py @@ -110,9 +110,9 @@ def write_profile( z: ADemandTrajectory = None, ) -> None: child = context.block_view(self.mri) - + child.calculateVelocities.put_value("YES") # make sure a matching trajectory program is installed on the pmac - if child.trajectoryProgVersion.value != TRAJECTORY_PROGRAM_NUM: + if child.trajectoryProgVersion.value < TRAJECTORY_PROGRAM_NUM: if child.trajectoryProgVersion.value >= FALLBACK_TRAJ_PROGRAM_NUM: self.log.warning( f"pmac trajectory program is version {FALLBACK_TRAJ_PROGRAM_NUM}"