`test_scan_node` never ends with new `Axis` code: `SoftwarePositionTriggerMaster`
Problem when using new Axis
code (either from axis_refactoring or axis_patch branches)
test_scan_node
uses SoftwarePositionTriggerMaster
to do a continuous scan,
however the scan never finishes because all points are not taken.
Having added an extra delay for reading position and state in
mockup controller perturbates SoftwarePositionTriggerMaster
, which has probably
a bug : it can miss points if it is not called at the right moment with the
good positions while the motor is moving.
Of course, SoftwarePositionTriggerMaster
is not meant to be used on beamlines,
hardware triggering is much better. But it is very useful for quick tests. A solution
could be to trig points independently of the motor position we get while the motor
is moving, as we know motor is supposed to be at constant speed we can determine
in advance when to trig... ?
The output trace below shows the problem ; only 4 position updates are taken into
account by SoftwarePositionTriggerMaster
at 0.0839 (corresponds to scan point 0),
at 0.4497 (corresponds to 0.2 -- this is already quite late !), at 0.8085
(corresponds to 0.4), at 1.05 (end position, corresponds to 0.6). We are missing
the final scan point.
pos update 0.0
pos update -0.1301
pos update -0.4899
pos update -0.853
pos update -1.2167
pos update -1.5832
pos update -1.9497
pos update -2.05
pos update -2.05
pos update -1.9275
pos update -1.5582
pos update -1.1962
pos update -0.8277
pos update -0.4548
pos update -0.05
pos update -0.05
pos update -0.05
0 5
waiting for trigger
pos update 0.0839
0.0 True True False False
done
reading
1 5
waiting for trigger
pos update 0.4497
0.2 True True False False
done
reading
2 5
waiting for trigger
pos update 0.8085
0.4 True True False False
done
reading
3 5
waiting for trigger
pos update 1.05
0.6 True True False False
done
reading
pos update 1.05
MOVE DONE 1.05
4 5
waiting for trigger