Skip to content

feat: verify pre-start move end state in contscan

Zbigniew Reszela requested to merge fix_contscan_start_move_state into develop

Move to pre-start position may end with Alarm e.g. hitting a hardware end travel switch, or Fault e.g. hardware failure. Check the state and either log a warning or raise an exception.

Example output in case of Alarm - scan was executed:

Door_zreszela_1 [1]: ascanct mot01 0 10 10 0.1
Scan #19 started at Thu Sep 15 12:47:57 2022. It will take at least 0:00:00
Motor positions and relative timestamp (dt) columns contains theoretical values
Moving to start position ended with Alarm state on position(s): mot01=-5.0

Example output in case of Fault - scan was interrupted by the exception:

Door_zreszela_1 [1]: ascanct mot01 0 10 10 0.1
ScanDir is not defined. This operation will not be stored persistently. Use "expconf" or "newfile" to configure data storage (or eventually "senv ScanDir <abs directory>")
Scan #20 started at Thu Sep 15 12:49:48 2022. It will take at least 0:00:00
Motor positions and relative timestamp (dt) columns contains theoretical values
Overshoot was not corrected
Scan #20 ended at Thu Sep 15 12:49:49 2022, taking 0:00:00.729331. Dead time 91.8% (setup time 8.2%, motion dead time 0.0%)
An error occurred while running ascanct:
ScanException: Moving to start position ended with Fault state on position(s): mot01=-5.0
Hint: in Spock execute `www`to get more details

@sardana-org this is ready for review and eventual intergration. Thanks!

Merge request reports