From e53e20c4d97d324d7b8b6c4664982b7749258657 Mon Sep 17 00:00:00 2001 From: Te-Wei Tsai Date: Tue, 3 Oct 2023 12:57:17 -0300 Subject: [PATCH 1/3] Update the rotator for the simplified state machine. --- .../MTRotator/MTRotator_Events.xml | 16 ++++++++++-- .../MTRotator/MTRotator_Telemetry.xml | 11 ++++++-- python/lsst/ts/xml/enums/MTRotator.py | 26 ++++++++++++++++--- 3 files changed, 45 insertions(+), 8 deletions(-) diff --git a/python/lsst/ts/xml/data/sal_interfaces/MTRotator/MTRotator_Events.xml b/python/lsst/ts/xml/data/sal_interfaces/MTRotator/MTRotator_Events.xml index 5541eac75..00a4a1a01 100644 --- a/python/lsst/ts/xml/data/sal_interfaces/MTRotator/MTRotator_Events.xml +++ b/python/lsst/ts/xml/data/sal_interfaces/MTRotator/MTRotator_Events.xml @@ -20,6 +20,11 @@ EnabledSubstate_Initializing=4, EnabledSubstate_Relative=5, EnabledSubstate_ConstantVelocity=6 + + + FaultSubstate_EmergencyStopping=0, + FaultSubstate_WaitClearError=1, + FaultSubstate_NoError=2 ApplicationStatus_EUI_CONNECTED = 0x4, @@ -47,8 +52,8 @@ 1 - offlineSubstate - Substate in OFFLINE mode. An OfflineSubstate enumeration value. + faultSubstate + Substate in FAULT mode. A FaultSubstate enumeration value. long unitless 1 @@ -244,6 +249,13 @@ deg/s 1 + + drivesEnabled + Drives are enabled or not. + boolean + unitless + 1 + MTRotator diff --git a/python/lsst/ts/xml/data/sal_interfaces/MTRotator/MTRotator_Telemetry.xml b/python/lsst/ts/xml/data/sal_interfaces/MTRotator/MTRotator_Telemetry.xml index 3415b3901..413ae85c4 100644 --- a/python/lsst/ts/xml/data/sal_interfaces/MTRotator/MTRotator_Telemetry.xml +++ b/python/lsst/ts/xml/data/sal_interfaces/MTRotator/MTRotator_Telemetry.xml @@ -101,18 +101,25 @@ MTRotator_electrical copleyStatusWordDrive - Copley drive status word. + Copley drive status word (0x6041). unsigned short unitless 2 copleyLatchingFaultStatus - Copley latching fault status register. + Copley latching fault status register (0x2183). unsigned short unitless 2 + + copleyFaultStatus + Copley sticky amplifier event status register (0x2180). + unsigned int + unitless + 2 + MTRotator diff --git a/python/lsst/ts/xml/enums/MTRotator.py b/python/lsst/ts/xml/enums/MTRotator.py index 505952594..2cb973398 100644 --- a/python/lsst/ts/xml/enums/MTRotator.py +++ b/python/lsst/ts/xml/enums/MTRotator.py @@ -22,6 +22,7 @@ "ControllerState", "OfflineSubstate", "EnabledSubstate", + "FaultSubstate", "ApplicationStatus", "ErrorCode", ] @@ -41,9 +42,9 @@ class ControllerState(enum.IntEnum): """ STANDBY = 0 - DISABLED = enum.auto() + DISABLED = enum.auto() # Deprecated in rotator ENABLED = enum.auto() - OFFLINE = enum.auto() + OFFLINE = enum.auto() # Deprecated in rotator FAULT = enum.auto() @@ -53,6 +54,10 @@ class OfflineSubstate(enum.IntEnum): Value reported in ``telemetry.offline_substate``. This is enum ``OfflineSubStates`` in Moog code. + + Deprecated in the rotator. + + TODO: Remove this after simplifying the state machine in hexapod, DM-39787. """ PUBLISH_ONLY = 0 @@ -71,11 +76,24 @@ class EnabledSubstate(enum.IntEnum): MOVING_POINT_TO_POINT = enum.auto() SLEWING_OR_TRACKING = enum.auto() CONTROLLED_STOPPING = enum.auto() - INITIALIZING = enum.auto() - RELATIVE = enum.auto() + INITIALIZING = enum.auto() # Deprecated in rotator + RELATIVE = enum.auto() # Deprecated in rotator CONSTANT_VELOCITY = enum.auto() +class FaultSubstate(enum.IntEnum): + """Controller substate for the FAULT state. + + Value reported in ``telemetry.fault_substate``. + + This is enum ``FaultSubStates`` in Simulink model. + """ + + EMERGENCY_STOPPING = 0 + WAIT_CLEAR_ERROR = enum.auto() + NO_ERROR = enum.auto() + + class ApplicationStatus(enum.IntFlag): """Bit masks for the value reported in ``telemetry.application_status``. From 86b5be9de925a9f06074abc8665b10d430c03f4f Mon Sep 17 00:00:00 2001 From: Te-Wei Tsai Date: Tue, 3 Oct 2023 14:39:12 -0300 Subject: [PATCH 2/3] Update the history. --- doc/version-history.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/version-history.rst b/doc/version-history.rst index 282a8329c..66fb88c2b 100644 --- a/doc/version-history.rst +++ b/doc/version-history.rst @@ -8,6 +8,14 @@ v20.1.0 ------- * Updated the contents of the README. +* Interface updates: + + * MTRotator + + * Add FaultSubstate enumeration. + * Add the new item ``copleyFaultStatus`` in ``MTRotator_electrical`` topic. + * Rename the item ``offlineSubstate`` to ``faultSubstate`` in ``MTRotator_logevent_controllerState`` topic. + * Add the new item ``drivesEnabled`` to ``MTRotator_logevent_configuration`` topic. v20.0.0 ------- From 381026c78942a1c809e7efa2c2be6e4ad4d33291 Mon Sep 17 00:00:00 2001 From: Te-Wei Tsai Date: Tue, 10 Oct 2023 09:56:03 -0300 Subject: [PATCH 3/3] Update the telemetry of MTHexapod. --- doc/version-history.rst | 5 +++++ .../MTHexapod/MTHexapod_Telemetry.xml | 21 ++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/doc/version-history.rst b/doc/version-history.rst index 66fb88c2b..8794c4630 100644 --- a/doc/version-history.rst +++ b/doc/version-history.rst @@ -17,6 +17,11 @@ v20.1.0 * Rename the item ``offlineSubstate`` to ``faultSubstate`` in ``MTRotator_logevent_controllerState`` topic. * Add the new item ``drivesEnabled`` to ``MTRotator_logevent_configuration`` topic. + * MTHexapod + + * Fix and improve the description in ``MTHexapod_actuators`` topic. + * Add the new item ``copleyFaultStatus`` and improve the description in ``MTHexapod_electrical`` topic. + v20.0.0 ------- diff --git a/python/lsst/ts/xml/data/sal_interfaces/MTHexapod/MTHexapod_Telemetry.xml b/python/lsst/ts/xml/data/sal_interfaces/MTHexapod/MTHexapod_Telemetry.xml index 045bb9111..07d7009b1 100644 --- a/python/lsst/ts/xml/data/sal_interfaces/MTHexapod/MTHexapod_Telemetry.xml +++ b/python/lsst/ts/xml/data/sal_interfaces/MTHexapod/MTHexapod_Telemetry.xml @@ -6,21 +6,21 @@ MTHexapod_actuators calibrated - Linear encoder readings from each MTHexapod actuator (x1,x2,x3,x4,x5,x6) in microns + Estimated strut length from each MTHexapod actuator (x1,x2,x3,x4,x5,x6) in microns double um 6 raw - Linear encoder readings from each MTHexapod actuator (x1,x2,x3,x4,x5,x6) in counts + Linear encoder readings from each MTHexapod actuator (x1,x2,x3,x4,x5,x6) in counts/nanometer (raw linear load encoder, 0x6064) double unitless 6 positionError - Position error of each MTHexapod actuator (x1,x2,x3,x4,x5,x6) in microns + Position error of each MTHexapod actuator (x1,x2,x3,x4,x5,x6) in microns (following error actual value, 0x60F4) double micron 6 @@ -63,28 +63,35 @@ MTHexapod_electrical copleyStatusWordDrive - Bus undervoltage fault, bus overvoltage fault, and overcurrent fault are all being monitored for each drive channel + Bus undervoltage fault, bus overvoltage fault, and overcurrent fault are all being monitored for each drive channel (drive status word, 0x6041). unsigned short unitless 6 copleyLatchingFaultStatus - Copley latching fault status + Copley latching fault status (0x2183). unsigned short unitless 6 + + copleyFaultStatus + Copley sticky amplifier event status register (0x2180). + unsigned int + unitless + 6 + motorCurrent - Actual current for each strut motor + Actual current for each strut motor. double A 6 busVoltage - Actual bus voltage for each pair of strut motors + Actual bus voltage for each pair of strut motors. double V 3