motor group state property fails
(observed by @claustre on ID32)
When getting a motor group state value, the following exception can happen if one of the axes has a non-standard state (like SCSTOP
on Icepap controller)
def set(self, state_name):
"""
Activates the given state on this AxisState
Args:
state_name (str): name of the state to activate
Raises:
ValueError: if state_name is invalid
"""
if state_name in self._state_desc:
if state_name not in self._current_states:
self._current_states.append(state_name)
# Mutual exclusion of READY and MOVING
if state_name == "READY":
if self.MOVING:
self._current_states.remove("MOVING")
if state_name == "MOVING":
if self.READY:
self._current_states.remove("READY")
else:
> raise ValueError("state %s does not exist" % state_name)
E ValueError: state SCSTOP does not exist