f2scan: improve the error message when 2 motors are using the same channel id
Feedback from ID15 during help desk.
The f2scan
with 2 motors was not working.
This 2 motors was part of the same icepap switch, connected to the same musst channel.
As result, the scan was not able to do anything, but the error message was criptic.
self.musst = self.musst_list.find_musst_for_motors(pars.motor, pars.slave_motor)
File "/users/blissadm/local/fscan.git/fscan/mussttools.py", line 36, in find_musst_for_motors
f"Cannot find all motors {motor_names} on one musst {self.musst_names} !!"
ValueError: Cannot find all motors ['hrx', 'mcrz'] on one musst ['musst_eh3'] !!
It would be nice to provide a more explicit message in this case.
Maybe something like "motor1
and motor2
can't be part of the same scan cause their encoders are connected to the same Musst channel id".
Edited by Valentin Valls