Skip to content

Commit

Permalink
Zero trajectory scan outputs at end of scan and load 2000 points not …
Browse files Browse the repository at this point in the history
…1000
  • Loading branch information
coretl committed Nov 2, 2016
1 parent a094230 commit 1f10b07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions malcolm/parts/pmac/pmactrajectorypart.py
Expand Up @@ -24,7 +24,7 @@
TRIG_ZERO = 8 # Capture 0, Frame 0, Detector 0

# How many generator points to load each time
POINTS_PER_BUILD = 1000
POINTS_PER_BUILD = 2000

# All possible PMAC CS axis assignment
cs_axis_names = list("ABCUVWXYZ")
Expand Down Expand Up @@ -206,7 +206,7 @@ def move_to_start(self, task, start_index):
time_array = [acceleration_time, move_time - 2 * acceleration_time,
acceleration_time]
velocity_mode = [CURRENT_TO_NEXT, PREV_TO_CURRENT, ZERO_VELOCITY]
user_programs = [NO_PROGRAM, NO_PROGRAM, NO_PROGRAM]
user_programs = [NO_PROGRAM, NO_PROGRAM, TRIG_ZERO]
for axis_name, positions in trajectory.items():
motor_info = self.axis_mapping[axis_name]
start_pos = positions[0]
Expand All @@ -217,7 +217,7 @@ def move_to_start(self, task, start_index):
else:
time_array = [move_time]
velocity_mode = [ZERO_VELOCITY]
user_programs = [NO_PROGRAM]
user_programs = [TRIG_ZERO]

self.write_profile_points(task, time_array, velocity_mode, trajectory,
user_programs)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_parts/test_pmac/test_pmactrajectorypart.py
Expand Up @@ -92,7 +92,7 @@ def test_configure(self):
self.assertEqual(task.put_many.call_args_list[1][0][1], dict(
timeArray=[100000, 437500, 100000],
velocityMode=[2, 1, 3],
userPrograms=[0, 0, 0],
userPrograms=[0, 0, 8],
pointsToBuild=3,
positionsA=[0.45, -0.087500000000000008, -0.1375],
positionsB=[0.0, 0.0, 0.0]))
Expand Down Expand Up @@ -189,7 +189,7 @@ def test_long_move(self):
velocityMode=[
2, 1, 1, 1, 3],
userPrograms=[
0, 0, 0, 0, 0],
0, 0, 0, 0, 8],
pointsToBuild=5,
positionsA=[
-10.087499999999999, -6.7875, -3.4875, -0.1875, -0.1375],
Expand Down

0 comments on commit 1f10b07

Please sign in to comment.