diff --git a/tomcat_bec/devices/aerotech/AerotechAutomation1.py b/tomcat_bec/devices/aerotech/AerotechAutomation1.py index e9e053d..54ef57b 100644 --- a/tomcat_bec/devices/aerotech/AerotechAutomation1.py +++ b/tomcat_bec/devices/aerotech/AerotechAutomation1.py @@ -1,7 +1,4 @@ -import time -from collections import OrderedDict from time import sleep - import numpy as np from ophyd import Component, Device, EpicsMotor, EpicsSignal, EpicsSignalRO, Kind from ophyd.status import DeviceStatus, SubscriptionStatus @@ -10,7 +7,6 @@ from bec_lib import bec_logger logger = bec_logger.logger - class EpicsPassiveRO(EpicsSignalRO): """Small helper class to read PVs that need to be processed first.""" @@ -53,7 +49,6 @@ class aa1Controller(Device): self._set_ismc.set(3).wait() - class aa1GlobalVariables(Device): """Global variables @@ -207,7 +202,7 @@ class aa1GlobalVariables(Device): if address > self.num_string.get(): raise RuntimeError("Integer address {address} is out of range") if len(value) > 255: - raise RuntimeError(f"Strings must be shorter than 255 characters, tried {len(value)}") + raise RuntimeError(f"Max string length is 255 characters, tried {len(value)}") if isinstance(value, str): self.string_addr.set(address).wait() @@ -297,11 +292,11 @@ if __name__ == "__main__": AA1_IOC_NAME = "X02DA-ES1-SMP1" AA1_AXIS_NAME = "ROTY" # Drive data collection - task = aa1Tasks(AA1_IOC_NAME + ":TASK:", name="tsk") - task.wait_for_connection() - task.describe() - ddc = aa1AxisDriveDataCollection("X02DA-ES1-SMP1:ROTY:DDC:", name="ddc") - ddc.wait_for_connection() + # task = aa1Tasks(AA1_IOC_NAME + ":TASK:", name="tsk") + # task.wait_for_connection() + # task.describe() + # ddc = aa1AxisDriveDataCollection("X02DA-ES1-SMP1:ROTY:DDC:", name="ddc") + # ddc.wait_for_connection() globb = aa1GlobalVariableBindings(AA1_IOC_NAME + ":VAR:", name="globb") globb.wait_for_connection() globb.describe() diff --git a/tomcat_bec/devices/aerotech/AerotechAutomation1Enums.py b/tomcat_bec/devices/aerotech/AerotechAutomation1Enums.py index ce75eba..0b885ce 100644 --- a/tomcat_bec/devices/aerotech/AerotechAutomation1Enums.py +++ b/tomcat_bec/devices/aerotech/AerotechAutomation1Enums.py @@ -501,333 +501,333 @@ class XC4PsoOutputPin: """ # @brief Specifies the PSO distance input settings for each drive. class Automation1PsoDistanceInput: - Automation1PsoDistanceInput_GL4PrimaryFeedbackAxis1 = 100, - Automation1PsoDistanceInput_GL4PrimaryFeedbackAxis2 = 101, - Automation1PsoDistanceInput_GL4IfovFeedbackAxis1 = 102, - Automation1PsoDistanceInput_GL4IfovFeedbackAxis2 = 103, - Automation1PsoDistanceInput_GL4AuxiliaryFeedbackAxis1 = 104, - Automation1PsoDistanceInput_GL4AuxiliaryFeedbackAxis2 = 105, - Automation1PsoDistanceInput_GL4SyncPortA = 106, - Automation1PsoDistanceInput_GL4SyncPortB = 107, - Automation1PsoDistanceInput_GL4DrivePulseStreamAxis1 = 108, - Automation1PsoDistanceInput_GL4DrivePulseStreamAxis2 = 109, - Automation1PsoDistanceInput_XL4sPrimaryFeedback = 110, - Automation1PsoDistanceInput_XL4sAuxiliaryFeedback = 111, - Automation1PsoDistanceInput_XL4sSyncPortA = 112, - Automation1PsoDistanceInput_XL4sSyncPortB = 113, - Automation1PsoDistanceInput_XL4sDrivePulseStream = 114, - Automation1PsoDistanceInput_XR3PrimaryFeedbackAxis1 = 115, - Automation1PsoDistanceInput_XR3PrimaryFeedbackAxis2 = 116, - Automation1PsoDistanceInput_XR3PrimaryFeedbackAxis3 = 117, - Automation1PsoDistanceInput_XR3PrimaryFeedbackAxis4 = 118, - Automation1PsoDistanceInput_XR3PrimaryFeedbackAxis5 = 119, - Automation1PsoDistanceInput_XR3PrimaryFeedbackAxis6 = 120, - Automation1PsoDistanceInput_XR3AuxiliaryFeedbackAxis1 = 121, - Automation1PsoDistanceInput_XR3AuxiliaryFeedbackAxis2 = 122, - Automation1PsoDistanceInput_XR3AuxiliaryFeedbackAxis3 = 123, - Automation1PsoDistanceInput_XR3AuxiliaryFeedbackAxis4 = 124, - Automation1PsoDistanceInput_XR3AuxiliaryFeedbackAxis5 = 125, - Automation1PsoDistanceInput_XR3AuxiliaryFeedbackAxis6 = 126, - Automation1PsoDistanceInput_XR3SyncPortA = 127, - Automation1PsoDistanceInput_XR3SyncPortB = 128, - Automation1PsoDistanceInput_XR3DrivePulseStream = 129, - Automation1PsoDistanceInput_XC4PrimaryFeedback = 130, - Automation1PsoDistanceInput_XC4AuxiliaryFeedback = 131, - Automation1PsoDistanceInput_XC4SyncPortA = 132, - Automation1PsoDistanceInput_XC4SyncPortB = 133, - Automation1PsoDistanceInput_XC4DrivePulseStream = 134, - XC4ePrimaryFeedback = 135, - XC4eAuxiliaryFeedback = 136, - XC4eSyncPortA = 137, - XC4eSyncPortB = 138, - XC4eDrivePulseStream = 139, - Automation1PsoDistanceInput_XC6ePrimaryFeedback = 140, - Automation1PsoDistanceInput_XC6eAuxiliaryFeedback = 141, - Automation1PsoDistanceInput_XC6eSyncPortA = 142, - Automation1PsoDistanceInput_XC6eSyncPortB = 143, - Automation1PsoDistanceInput_XC6eDrivePulseStream = 144, - Automation1PsoDistanceInput_XL5ePrimaryFeedback = 145, - Automation1PsoDistanceInput_XL5eAuxiliaryFeedback = 146, - Automation1PsoDistanceInput_XL5eSyncPortA = 147, - Automation1PsoDistanceInput_XL5eSyncPortB = 148, - Automation1PsoDistanceInput_XL5eDrivePulseStream = 149, - Automation1PsoDistanceInput_XC2PrimaryFeedback = 150, - Automation1PsoDistanceInput_XC2AuxiliaryFeedback = 151, - Automation1PsoDistanceInput_XC2DrivePulseStream = 152, - Automation1PsoDistanceInput_XC2ePrimaryFeedback = 153, - Automation1PsoDistanceInput_XC2eAuxiliaryFeedback = 154, - Automation1PsoDistanceInput_XC2eDrivePulseStream = 155, - Automation1PsoDistanceInput_XL2ePrimaryFeedback = 156, - Automation1PsoDistanceInput_XL2eAuxiliaryFeedback = 157, - Automation1PsoDistanceInput_XL2eSyncPortA = 158, - Automation1PsoDistanceInput_XL2eSyncPortB = 159, - Automation1PsoDistanceInput_XL2eDrivePulseStream = 160, - Automation1PsoDistanceInput_XI4PrimaryFeedbackAxis1 = 161, - Automation1PsoDistanceInput_XI4PrimaryFeedbackAxis2 = 162, - Automation1PsoDistanceInput_XI4PrimaryFeedbackAxis3 = 163, - Automation1PsoDistanceInput_XI4PrimaryFeedbackAxis4 = 164, - Automation1PsoDistanceInput_XI4AuxiliaryFeedback1 = 165, - Automation1PsoDistanceInput_XI4AuxiliaryFeedback2 = 166, - Automation1PsoDistanceInput_XI4AuxiliaryFeedback3 = 167, - Automation1PsoDistanceInput_XI4AuxiliaryFeedback4 = 168, - Automation1PsoDistanceInput_XI4SyncPortA = 169, - Automation1PsoDistanceInput_XI4SyncPortB = 170, - Automation1PsoDistanceInput_XI4DrivePulseStreamAxis1 = 171, - Automation1PsoDistanceInput_XI4DrivePulseStreamAxis2 = 172, - Automation1PsoDistanceInput_XI4DrivePulseStreamAxis3 = 173, - Automation1PsoDistanceInput_XI4DrivePulseStreamAxis4 = 174, - Automation1PsoDistanceInput_iXC4PrimaryFeedback = 175, - Automation1PsoDistanceInput_iXC4AuxiliaryFeedback = 176, - Automation1PsoDistanceInput_iXC4SyncPortA = 177, - Automation1PsoDistanceInput_iXC4SyncPortB = 178, - Automation1PsoDistanceInput_iXC4DrivePulseStream = 179, - Automation1PsoDistanceInput_iXC4ePrimaryFeedback = 180, - Automation1PsoDistanceInput_iXC4eAuxiliaryFeedback = 181, - Automation1PsoDistanceInput_iXC4eSyncPortA = 182, - Automation1PsoDistanceInput_iXC4eSyncPortB = 183, - Automation1PsoDistanceInput_iXC4eDrivePulseStream = 184, - Automation1PsoDistanceInput_iXC6ePrimaryFeedback = 185, - Automation1PsoDistanceInput_iXC6eAuxiliaryFeedback = 186, - Automation1PsoDistanceInput_iXC6eSyncPortA = 187, - Automation1PsoDistanceInput_iXC6eSyncPortB = 188, - Automation1PsoDistanceInput_iXC6eDrivePulseStream = 189, - Automation1PsoDistanceInput_iXL5ePrimaryFeedback = 190, - Automation1PsoDistanceInput_iXL5eAuxiliaryFeedback = 191, - Automation1PsoDistanceInput_iXL5eSyncPortA = 192, - Automation1PsoDistanceInput_iXL5eSyncPortB = 193, - Automation1PsoDistanceInput_iXL5eDrivePulseStream = 194, - Automation1PsoDistanceInput_iXR3PrimaryFeedbackAxis1 = 195, - Automation1PsoDistanceInput_iXR3PrimaryFeedbackAxis2 = 196, - Automation1PsoDistanceInput_iXR3PrimaryFeedbackAxis3 = 197, - Automation1PsoDistanceInput_iXR3PrimaryFeedbackAxis4 = 198, - Automation1PsoDistanceInput_iXR3PrimaryFeedbackAxis5 = 199, - Automation1PsoDistanceInput_iXR3PrimaryFeedbackAxis6 = 200, - Automation1PsoDistanceInput_iXR3AuxiliaryFeedbackAxis1 = 201, - Automation1PsoDistanceInput_iXR3AuxiliaryFeedbackAxis2 = 202, - Automation1PsoDistanceInput_iXR3AuxiliaryFeedbackAxis3 = 203, - Automation1PsoDistanceInput_iXR3AuxiliaryFeedbackAxis4 = 204, - Automation1PsoDistanceInput_iXR3AuxiliaryFeedbackAxis5 = 205, - Automation1PsoDistanceInput_iXR3AuxiliaryFeedbackAxis6 = 206, - Automation1PsoDistanceInput_iXR3SyncPortA = 207, - Automation1PsoDistanceInput_iXR3SyncPortB = 208, - Automation1PsoDistanceInput_iXR3DrivePulseStream = 209, - Automation1PsoDistanceInput_GI4DrivePulseStreamAxis1 = 210, - Automation1PsoDistanceInput_GI4DrivePulseStreamAxis2 = 211, - Automation1PsoDistanceInput_GI4DrivePulseStreamAxis3 = 212, - Automation1PsoDistanceInput_iXC2PrimaryFeedback = 213, - Automation1PsoDistanceInput_iXC2AuxiliaryFeedback = 214, - Automation1PsoDistanceInput_iXC2DrivePulseStream = 215, - Automation1PsoDistanceInput_iXC2ePrimaryFeedback = 216, - Automation1PsoDistanceInput_iXC2eAuxiliaryFeedback = 217, - Automation1PsoDistanceInput_iXC2eDrivePulseStream = 218, - Automation1PsoDistanceInput_iXL2ePrimaryFeedback = 219, - Automation1PsoDistanceInput_iXL2eAuxiliaryFeedback = 220, - Automation1PsoDistanceInput_iXL2eSyncPortA = 221, - Automation1PsoDistanceInput_iXL2eSyncPortB = 222, - Automation1PsoDistanceInput_iXL2eDrivePulseStream = 223, - Automation1PsoDistanceInput_iXI4PrimaryFeedbackAxis1 = 224, - Automation1PsoDistanceInput_iXI4PrimaryFeedbackAxis2 = 225, - Automation1PsoDistanceInput_iXI4PrimaryFeedbackAxis3 = 226, - Automation1PsoDistanceInput_iXI4PrimaryFeedbackAxis4 = 227, - Automation1PsoDistanceInput_iXI4AuxiliaryFeedback1 = 228, - Automation1PsoDistanceInput_iXI4AuxiliaryFeedback2 = 229, - Automation1PsoDistanceInput_iXI4AuxiliaryFeedback3 = 230, - Automation1PsoDistanceInput_iXI4AuxiliaryFeedback4 = 231, - Automation1PsoDistanceInput_iXI4SyncPortA = 232, - Automation1PsoDistanceInput_iXI4SyncPortB = 233, - Automation1PsoDistanceInput_iXI4DrivePulseStreamAxis1 = 234, - Automation1PsoDistanceInput_iXI4DrivePulseStreamAxis2 = 235, - Automation1PsoDistanceInput_iXI4DrivePulseStreamAxis3 = 236, - Automation1PsoDistanceInput_iXI4DrivePulseStreamAxis4 = 237, + Automation1PsoDistanceInput_GL4PrimaryFeedbackAxis1 = 100, + Automation1PsoDistanceInput_GL4PrimaryFeedbackAxis2 = 101, + Automation1PsoDistanceInput_GL4IfovFeedbackAxis1 = 102, + Automation1PsoDistanceInput_GL4IfovFeedbackAxis2 = 103, + Automation1PsoDistanceInput_GL4AuxiliaryFeedbackAxis1 = 104, + Automation1PsoDistanceInput_GL4AuxiliaryFeedbackAxis2 = 105, + Automation1PsoDistanceInput_GL4SyncPortA = 106, + Automation1PsoDistanceInput_GL4SyncPortB = 107, + Automation1PsoDistanceInput_GL4DrivePulseStreamAxis1 = 108, + Automation1PsoDistanceInput_GL4DrivePulseStreamAxis2 = 109, + Automation1PsoDistanceInput_XL4sPrimaryFeedback = 110, + Automation1PsoDistanceInput_XL4sAuxiliaryFeedback = 111, + Automation1PsoDistanceInput_XL4sSyncPortA = 112, + Automation1PsoDistanceInput_XL4sSyncPortB = 113, + Automation1PsoDistanceInput_XL4sDrivePulseStream = 114, + Automation1PsoDistanceInput_XR3PrimaryFeedbackAxis1 = 115, + Automation1PsoDistanceInput_XR3PrimaryFeedbackAxis2 = 116, + Automation1PsoDistanceInput_XR3PrimaryFeedbackAxis3 = 117, + Automation1PsoDistanceInput_XR3PrimaryFeedbackAxis4 = 118, + Automation1PsoDistanceInput_XR3PrimaryFeedbackAxis5 = 119, + Automation1PsoDistanceInput_XR3PrimaryFeedbackAxis6 = 120, + Automation1PsoDistanceInput_XR3AuxiliaryFeedbackAxis1 = 121, + Automation1PsoDistanceInput_XR3AuxiliaryFeedbackAxis2 = 122, + Automation1PsoDistanceInput_XR3AuxiliaryFeedbackAxis3 = 123, + Automation1PsoDistanceInput_XR3AuxiliaryFeedbackAxis4 = 124, + Automation1PsoDistanceInput_XR3AuxiliaryFeedbackAxis5 = 125, + Automation1PsoDistanceInput_XR3AuxiliaryFeedbackAxis6 = 126, + Automation1PsoDistanceInput_XR3SyncPortA = 127, + Automation1PsoDistanceInput_XR3SyncPortB = 128, + Automation1PsoDistanceInput_XR3DrivePulseStream = 129, + Automation1PsoDistanceInput_XC4PrimaryFeedback = 130, + Automation1PsoDistanceInput_XC4AuxiliaryFeedback = 131, + Automation1PsoDistanceInput_XC4SyncPortA = 132, + Automation1PsoDistanceInput_XC4SyncPortB = 133, + Automation1PsoDistanceInput_XC4DrivePulseStream = 134, + XC4ePrimaryFeedback = 135, + XC4eAuxiliaryFeedback = 136, + XC4eSyncPortA = 137, + XC4eSyncPortB = 138, + XC4eDrivePulseStream = 139, + Automation1PsoDistanceInput_XC6ePrimaryFeedback = 140, + Automation1PsoDistanceInput_XC6eAuxiliaryFeedback = 141, + Automation1PsoDistanceInput_XC6eSyncPortA = 142, + Automation1PsoDistanceInput_XC6eSyncPortB = 143, + Automation1PsoDistanceInput_XC6eDrivePulseStream = 144, + Automation1PsoDistanceInput_XL5ePrimaryFeedback = 145, + Automation1PsoDistanceInput_XL5eAuxiliaryFeedback = 146, + Automation1PsoDistanceInput_XL5eSyncPortA = 147, + Automation1PsoDistanceInput_XL5eSyncPortB = 148, + Automation1PsoDistanceInput_XL5eDrivePulseStream = 149, + Automation1PsoDistanceInput_XC2PrimaryFeedback = 150, + Automation1PsoDistanceInput_XC2AuxiliaryFeedback = 151, + Automation1PsoDistanceInput_XC2DrivePulseStream = 152, + Automation1PsoDistanceInput_XC2ePrimaryFeedback = 153, + Automation1PsoDistanceInput_XC2eAuxiliaryFeedback = 154, + Automation1PsoDistanceInput_XC2eDrivePulseStream = 155, + Automation1PsoDistanceInput_XL2ePrimaryFeedback = 156, + Automation1PsoDistanceInput_XL2eAuxiliaryFeedback = 157, + Automation1PsoDistanceInput_XL2eSyncPortA = 158, + Automation1PsoDistanceInput_XL2eSyncPortB = 159, + Automation1PsoDistanceInput_XL2eDrivePulseStream = 160, + Automation1PsoDistanceInput_XI4PrimaryFeedbackAxis1 = 161, + Automation1PsoDistanceInput_XI4PrimaryFeedbackAxis2 = 162, + Automation1PsoDistanceInput_XI4PrimaryFeedbackAxis3 = 163, + Automation1PsoDistanceInput_XI4PrimaryFeedbackAxis4 = 164, + Automation1PsoDistanceInput_XI4AuxiliaryFeedback1 = 165, + Automation1PsoDistanceInput_XI4AuxiliaryFeedback2 = 166, + Automation1PsoDistanceInput_XI4AuxiliaryFeedback3 = 167, + Automation1PsoDistanceInput_XI4AuxiliaryFeedback4 = 168, + Automation1PsoDistanceInput_XI4SyncPortA = 169, + Automation1PsoDistanceInput_XI4SyncPortB = 170, + Automation1PsoDistanceInput_XI4DrivePulseStreamAxis1 = 171, + Automation1PsoDistanceInput_XI4DrivePulseStreamAxis2 = 172, + Automation1PsoDistanceInput_XI4DrivePulseStreamAxis3 = 173, + Automation1PsoDistanceInput_XI4DrivePulseStreamAxis4 = 174, + Automation1PsoDistanceInput_iXC4PrimaryFeedback = 175, + Automation1PsoDistanceInput_iXC4AuxiliaryFeedback = 176, + Automation1PsoDistanceInput_iXC4SyncPortA = 177, + Automation1PsoDistanceInput_iXC4SyncPortB = 178, + Automation1PsoDistanceInput_iXC4DrivePulseStream = 179, + Automation1PsoDistanceInput_iXC4ePrimaryFeedback = 180, + Automation1PsoDistanceInput_iXC4eAuxiliaryFeedback = 181, + Automation1PsoDistanceInput_iXC4eSyncPortA = 182, + Automation1PsoDistanceInput_iXC4eSyncPortB = 183, + Automation1PsoDistanceInput_iXC4eDrivePulseStream = 184, + Automation1PsoDistanceInput_iXC6ePrimaryFeedback = 185, + Automation1PsoDistanceInput_iXC6eAuxiliaryFeedback = 186, + Automation1PsoDistanceInput_iXC6eSyncPortA = 187, + Automation1PsoDistanceInput_iXC6eSyncPortB = 188, + Automation1PsoDistanceInput_iXC6eDrivePulseStream = 189, + Automation1PsoDistanceInput_iXL5ePrimaryFeedback = 190, + Automation1PsoDistanceInput_iXL5eAuxiliaryFeedback = 191, + Automation1PsoDistanceInput_iXL5eSyncPortA = 192, + Automation1PsoDistanceInput_iXL5eSyncPortB = 193, + Automation1PsoDistanceInput_iXL5eDrivePulseStream = 194, + Automation1PsoDistanceInput_iXR3PrimaryFeedbackAxis1 = 195, + Automation1PsoDistanceInput_iXR3PrimaryFeedbackAxis2 = 196, + Automation1PsoDistanceInput_iXR3PrimaryFeedbackAxis3 = 197, + Automation1PsoDistanceInput_iXR3PrimaryFeedbackAxis4 = 198, + Automation1PsoDistanceInput_iXR3PrimaryFeedbackAxis5 = 199, + Automation1PsoDistanceInput_iXR3PrimaryFeedbackAxis6 = 200, + Automation1PsoDistanceInput_iXR3AuxiliaryFeedbackAxis1 = 201, + Automation1PsoDistanceInput_iXR3AuxiliaryFeedbackAxis2 = 202, + Automation1PsoDistanceInput_iXR3AuxiliaryFeedbackAxis3 = 203, + Automation1PsoDistanceInput_iXR3AuxiliaryFeedbackAxis4 = 204, + Automation1PsoDistanceInput_iXR3AuxiliaryFeedbackAxis5 = 205, + Automation1PsoDistanceInput_iXR3AuxiliaryFeedbackAxis6 = 206, + Automation1PsoDistanceInput_iXR3SyncPortA = 207, + Automation1PsoDistanceInput_iXR3SyncPortB = 208, + Automation1PsoDistanceInput_iXR3DrivePulseStream = 209, + Automation1PsoDistanceInput_GI4DrivePulseStreamAxis1 = 210, + Automation1PsoDistanceInput_GI4DrivePulseStreamAxis2 = 211, + Automation1PsoDistanceInput_GI4DrivePulseStreamAxis3 = 212, + Automation1PsoDistanceInput_iXC2PrimaryFeedback = 213, + Automation1PsoDistanceInput_iXC2AuxiliaryFeedback = 214, + Automation1PsoDistanceInput_iXC2DrivePulseStream = 215, + Automation1PsoDistanceInput_iXC2ePrimaryFeedback = 216, + Automation1PsoDistanceInput_iXC2eAuxiliaryFeedback = 217, + Automation1PsoDistanceInput_iXC2eDrivePulseStream = 218, + Automation1PsoDistanceInput_iXL2ePrimaryFeedback = 219, + Automation1PsoDistanceInput_iXL2eAuxiliaryFeedback = 220, + Automation1PsoDistanceInput_iXL2eSyncPortA = 221, + Automation1PsoDistanceInput_iXL2eSyncPortB = 222, + Automation1PsoDistanceInput_iXL2eDrivePulseStream = 223, + Automation1PsoDistanceInput_iXI4PrimaryFeedbackAxis1 = 224, + Automation1PsoDistanceInput_iXI4PrimaryFeedbackAxis2 = 225, + Automation1PsoDistanceInput_iXI4PrimaryFeedbackAxis3 = 226, + Automation1PsoDistanceInput_iXI4PrimaryFeedbackAxis4 = 227, + Automation1PsoDistanceInput_iXI4AuxiliaryFeedback1 = 228, + Automation1PsoDistanceInput_iXI4AuxiliaryFeedback2 = 229, + Automation1PsoDistanceInput_iXI4AuxiliaryFeedback3 = 230, + Automation1PsoDistanceInput_iXI4AuxiliaryFeedback4 = 231, + Automation1PsoDistanceInput_iXI4SyncPortA = 232, + Automation1PsoDistanceInput_iXI4SyncPortB = 233, + Automation1PsoDistanceInput_iXI4DrivePulseStreamAxis1 = 234, + Automation1PsoDistanceInput_iXI4DrivePulseStreamAxis2 = 235, + Automation1PsoDistanceInput_iXI4DrivePulseStreamAxis3 = 236, + Automation1PsoDistanceInput_iXI4DrivePulseStreamAxis4 = 237, # @brief Specifies the PSO window input settings for each drive. class Automation1PsoWindowInput: - Automation1PsoWindowInput_GL4PrimaryFeedbackAxis1 = 100, - Automation1PsoWindowInput_GL4PrimaryFeedbackAxis2 = 101, - Automation1PsoWindowInput_GL4IfovFeedbackAxis1 = 102, - Automation1PsoWindowInput_GL4IfovFeedbackAxis2 = 103, - Automation1PsoWindowInput_GL4AuxiliaryFeedbackAxis1 = 104, - Automation1PsoWindowInput_GL4AuxiliaryFeedbackAxis2 = 105, - Automation1PsoWindowInput_GL4SyncPortA = 106, - Automation1PsoWindowInput_GL4SyncPortB = 107, - Automation1PsoWindowInput_GL4DrivePulseStreamAxis1 = 108, - Automation1PsoWindowInput_GL4DrivePulseStreamAxis2 = 109, - Automation1PsoWindowInput_XL4sPrimaryFeedback = 110, - Automation1PsoWindowInput_XL4sAuxiliaryFeedback = 111, - Automation1PsoWindowInput_XL4sSyncPortA = 112, - Automation1PsoWindowInput_XL4sSyncPortB = 113, - Automation1PsoWindowInput_XL4sDrivePulseStream = 114, - Automation1PsoWindowInput_XR3PrimaryFeedbackAxis1 = 115, - Automation1PsoWindowInput_XR3PrimaryFeedbackAxis2 = 116, - Automation1PsoWindowInput_XR3PrimaryFeedbackAxis3 = 117, - Automation1PsoWindowInput_XR3PrimaryFeedbackAxis4 = 118, - Automation1PsoWindowInput_XR3PrimaryFeedbackAxis5 = 119, - Automation1PsoWindowInput_XR3PrimaryFeedbackAxis6 = 120, - Automation1PsoWindowInput_XR3AuxiliaryFeedbackAxis1 = 121, - Automation1PsoWindowInput_XR3AuxiliaryFeedbackAxis2 = 122, - Automation1PsoWindowInput_XR3AuxiliaryFeedbackAxis3 = 123, - Automation1PsoWindowInput_XR3AuxiliaryFeedbackAxis4 = 124, - Automation1PsoWindowInput_XR3AuxiliaryFeedbackAxis5 = 125, - Automation1PsoWindowInput_XR3AuxiliaryFeedbackAxis6 = 126, - Automation1PsoWindowInput_XR3SyncPortA = 127, - Automation1PsoWindowInput_XR3SyncPortB = 128, - Automation1PsoWindowInput_XR3DrivePulseStream = 129, - Automation1PsoWindowInput_XC4PrimaryFeedback = 130, - Automation1PsoWindowInput_XC4AuxiliaryFeedback = 131, - Automation1PsoWindowInput_XC4SyncPortA = 132, - Automation1PsoWindowInput_XC4SyncPortB = 133, - Automation1PsoWindowInput_XC4DrivePulseStream = 134, - XC4ePrimaryFeedback = 135, - XC4eAuxiliaryFeedback = 136, - XC4eSyncPortA = 137, - XC4eSyncPortB = 138, - XC4eDrivePulseStream = 139, - Automation1PsoWindowInput_XC6ePrimaryFeedback = 140, - Automation1PsoWindowInput_XC6eAuxiliaryFeedback = 141, - Automation1PsoWindowInput_XC6eSyncPortA = 142, - Automation1PsoWindowInput_XC6eSyncPortB = 143, - Automation1PsoWindowInput_XC6eDrivePulseStream = 144, - Automation1PsoWindowInput_XL5ePrimaryFeedback = 145, - Automation1PsoWindowInput_XL5eAuxiliaryFeedback = 146, - Automation1PsoWindowInput_XL5eSyncPortA = 147, - Automation1PsoWindowInput_XL5eSyncPortB = 148, - Automation1PsoWindowInput_XL5eDrivePulseStream = 149, - Automation1PsoWindowInput_XC2PrimaryFeedback = 150, - Automation1PsoWindowInput_XC2AuxiliaryFeedback = 151, - Automation1PsoWindowInput_XC2DrivePulseStream = 152, - Automation1PsoWindowInput_XC2ePrimaryFeedback = 153, - Automation1PsoWindowInput_XC2eAuxiliaryFeedback = 154, - Automation1PsoWindowInput_XC2eDrivePulseStream = 155, - Automation1PsoWindowInput_XL2ePrimaryFeedback = 156, - Automation1PsoWindowInput_XL2eAuxiliaryFeedback = 157, - Automation1PsoWindowInput_XL2eSyncPortA = 158, - Automation1PsoWindowInput_XL2eSyncPortB = 159, - Automation1PsoWindowInput_XL2eDrivePulseStream = 160, - Automation1PsoWindowInput_XI4PrimaryFeedbackAxis1 = 161, - Automation1PsoWindowInput_XI4PrimaryFeedbackAxis2 = 162, - Automation1PsoWindowInput_XI4PrimaryFeedbackAxis3 = 163, - Automation1PsoWindowInput_XI4PrimaryFeedbackAxis4 = 164, - Automation1PsoWindowInput_XI4AuxiliaryFeedback1 = 165, - Automation1PsoWindowInput_XI4AuxiliaryFeedback2 = 166, - Automation1PsoWindowInput_XI4AuxiliaryFeedback3 = 167, - Automation1PsoWindowInput_XI4AuxiliaryFeedback4 = 168, - Automation1PsoWindowInput_XI4SyncPortA = 169, - Automation1PsoWindowInput_XI4SyncPortB = 170, - Automation1PsoWindowInput_XI4DrivePulseStreamAxis1 = 171, - Automation1PsoWindowInput_XI4DrivePulseStreamAxis2 = 172, - Automation1PsoWindowInput_XI4DrivePulseStreamAxis3 = 173, - Automation1PsoWindowInput_XI4DrivePulseStreamAxis4 = 174, - Automation1PsoWindowInput_iXC4PrimaryFeedback = 175, - Automation1PsoWindowInput_iXC4AuxiliaryFeedback = 176, - Automation1PsoWindowInput_iXC4SyncPortA = 177, - Automation1PsoWindowInput_iXC4SyncPortB = 178, - Automation1PsoWindowInput_iXC4DrivePulseStream = 179, - Automation1PsoWindowInput_iXC4ePrimaryFeedback = 180, - Automation1PsoWindowInput_iXC4eAuxiliaryFeedback = 181, - Automation1PsoWindowInput_iXC4eSyncPortA = 182, - Automation1PsoWindowInput_iXC4eSyncPortB = 183, - Automation1PsoWindowInput_iXC4eDrivePulseStream = 184, - Automation1PsoWindowInput_iXC6ePrimaryFeedback = 185, - Automation1PsoWindowInput_iXC6eAuxiliaryFeedback = 186, - Automation1PsoWindowInput_iXC6eSyncPortA = 187, - Automation1PsoWindowInput_iXC6eSyncPortB = 188, - Automation1PsoWindowInput_iXC6eDrivePulseStream = 189, - Automation1PsoWindowInput_iXL5ePrimaryFeedback = 190, - Automation1PsoWindowInput_iXL5eAuxiliaryFeedback = 191, - Automation1PsoWindowInput_iXL5eSyncPortA = 192, - Automation1PsoWindowInput_iXL5eSyncPortB = 193, - Automation1PsoWindowInput_iXL5eDrivePulseStream = 194, - Automation1PsoWindowInput_iXR3PrimaryFeedbackAxis1 = 195, - Automation1PsoWindowInput_iXR3PrimaryFeedbackAxis2 = 196, - Automation1PsoWindowInput_iXR3PrimaryFeedbackAxis3 = 197, - Automation1PsoWindowInput_iXR3PrimaryFeedbackAxis4 = 198, - Automation1PsoWindowInput_iXR3PrimaryFeedbackAxis5 = 199, - Automation1PsoWindowInput_iXR3PrimaryFeedbackAxis6 = 200, - Automation1PsoWindowInput_iXR3AuxiliaryFeedbackAxis1 = 201, - Automation1PsoWindowInput_iXR3AuxiliaryFeedbackAxis2 = 202, - Automation1PsoWindowInput_iXR3AuxiliaryFeedbackAxis3 = 203, - Automation1PsoWindowInput_iXR3AuxiliaryFeedbackAxis4 = 204, - Automation1PsoWindowInput_iXR3AuxiliaryFeedbackAxis5 = 205, - Automation1PsoWindowInput_iXR3AuxiliaryFeedbackAxis6 = 206, - Automation1PsoWindowInput_iXR3SyncPortA = 207, - Automation1PsoWindowInput_iXR3SyncPortB = 208, - Automation1PsoWindowInput_iXR3DrivePulseStream = 209, - Automation1PsoWindowInput_GI4DrivePulseStreamAxis1 = 210, - Automation1PsoWindowInput_GI4DrivePulseStreamAxis2 = 211, - Automation1PsoWindowInput_GI4DrivePulseStreamAxis3 = 212, - Automation1PsoWindowInput_iXC2PrimaryFeedback = 213, - Automation1PsoWindowInput_iXC2AuxiliaryFeedback = 214, - Automation1PsoWindowInput_iXC2DrivePulseStream = 215, - Automation1PsoWindowInput_iXC2ePrimaryFeedback = 216, - Automation1PsoWindowInput_iXC2eAuxiliaryFeedback = 217, - Automation1PsoWindowInput_iXC2eDrivePulseStream = 218, - Automation1PsoWindowInput_iXL2ePrimaryFeedback = 219, - Automation1PsoWindowInput_iXL2eAuxiliaryFeedback = 220, - Automation1PsoWindowInput_iXL2eSyncPortA = 221, - Automation1PsoWindowInput_iXL2eSyncPortB = 222, - Automation1PsoWindowInput_iXL2eDrivePulseStream = 223, - Automation1PsoWindowInput_iXI4PrimaryFeedbackAxis1 = 224, - Automation1PsoWindowInput_iXI4PrimaryFeedbackAxis2 = 225, - Automation1PsoWindowInput_iXI4PrimaryFeedbackAxis3 = 226, - Automation1PsoWindowInput_iXI4PrimaryFeedbackAxis4 = 227, - Automation1PsoWindowInput_iXI4AuxiliaryFeedback1 = 228, - Automation1PsoWindowInput_iXI4AuxiliaryFeedback2 = 229, - Automation1PsoWindowInput_iXI4AuxiliaryFeedback3 = 230, - Automation1PsoWindowInput_iXI4AuxiliaryFeedback4 = 231, - Automation1PsoWindowInput_iXI4SyncPortA = 232, - Automation1PsoWindowInput_iXI4SyncPortB = 233, - Automation1PsoWindowInput_iXI4DrivePulseStreamAxis1 = 234, - Automation1PsoWindowInput_iXI4DrivePulseStreamAxis2 = 235, - Automation1PsoWindowInput_iXI4DrivePulseStreamAxis3 = 236, - Automation1PsoWindowInput_iXI4DrivePulseStreamAxis4 = 237, + Automation1PsoWindowInput_GL4PrimaryFeedbackAxis1 = 100, + Automation1PsoWindowInput_GL4PrimaryFeedbackAxis2 = 101, + Automation1PsoWindowInput_GL4IfovFeedbackAxis1 = 102, + Automation1PsoWindowInput_GL4IfovFeedbackAxis2 = 103, + Automation1PsoWindowInput_GL4AuxiliaryFeedbackAxis1 = 104, + Automation1PsoWindowInput_GL4AuxiliaryFeedbackAxis2 = 105, + Automation1PsoWindowInput_GL4SyncPortA = 106, + Automation1PsoWindowInput_GL4SyncPortB = 107, + Automation1PsoWindowInput_GL4DrivePulseStreamAxis1 = 108, + Automation1PsoWindowInput_GL4DrivePulseStreamAxis2 = 109, + Automation1PsoWindowInput_XL4sPrimaryFeedback = 110, + Automation1PsoWindowInput_XL4sAuxiliaryFeedback = 111, + Automation1PsoWindowInput_XL4sSyncPortA = 112, + Automation1PsoWindowInput_XL4sSyncPortB = 113, + Automation1PsoWindowInput_XL4sDrivePulseStream = 114, + Automation1PsoWindowInput_XR3PrimaryFeedbackAxis1 = 115, + Automation1PsoWindowInput_XR3PrimaryFeedbackAxis2 = 116, + Automation1PsoWindowInput_XR3PrimaryFeedbackAxis3 = 117, + Automation1PsoWindowInput_XR3PrimaryFeedbackAxis4 = 118, + Automation1PsoWindowInput_XR3PrimaryFeedbackAxis5 = 119, + Automation1PsoWindowInput_XR3PrimaryFeedbackAxis6 = 120, + Automation1PsoWindowInput_XR3AuxiliaryFeedbackAxis1 = 121, + Automation1PsoWindowInput_XR3AuxiliaryFeedbackAxis2 = 122, + Automation1PsoWindowInput_XR3AuxiliaryFeedbackAxis3 = 123, + Automation1PsoWindowInput_XR3AuxiliaryFeedbackAxis4 = 124, + Automation1PsoWindowInput_XR3AuxiliaryFeedbackAxis5 = 125, + Automation1PsoWindowInput_XR3AuxiliaryFeedbackAxis6 = 126, + Automation1PsoWindowInput_XR3SyncPortA = 127, + Automation1PsoWindowInput_XR3SyncPortB = 128, + Automation1PsoWindowInput_XR3DrivePulseStream = 129, + Automation1PsoWindowInput_XC4PrimaryFeedback = 130, + Automation1PsoWindowInput_XC4AuxiliaryFeedback = 131, + Automation1PsoWindowInput_XC4SyncPortA = 132, + Automation1PsoWindowInput_XC4SyncPortB = 133, + Automation1PsoWindowInput_XC4DrivePulseStream = 134, + XC4ePrimaryFeedback = 135, + XC4eAuxiliaryFeedback = 136, + XC4eSyncPortA = 137, + XC4eSyncPortB = 138, + XC4eDrivePulseStream = 139, + Automation1PsoWindowInput_XC6ePrimaryFeedback = 140, + Automation1PsoWindowInput_XC6eAuxiliaryFeedback = 141, + Automation1PsoWindowInput_XC6eSyncPortA = 142, + Automation1PsoWindowInput_XC6eSyncPortB = 143, + Automation1PsoWindowInput_XC6eDrivePulseStream = 144, + Automation1PsoWindowInput_XL5ePrimaryFeedback = 145, + Automation1PsoWindowInput_XL5eAuxiliaryFeedback = 146, + Automation1PsoWindowInput_XL5eSyncPortA = 147, + Automation1PsoWindowInput_XL5eSyncPortB = 148, + Automation1PsoWindowInput_XL5eDrivePulseStream = 149, + Automation1PsoWindowInput_XC2PrimaryFeedback = 150, + Automation1PsoWindowInput_XC2AuxiliaryFeedback = 151, + Automation1PsoWindowInput_XC2DrivePulseStream = 152, + Automation1PsoWindowInput_XC2ePrimaryFeedback = 153, + Automation1PsoWindowInput_XC2eAuxiliaryFeedback = 154, + Automation1PsoWindowInput_XC2eDrivePulseStream = 155, + Automation1PsoWindowInput_XL2ePrimaryFeedback = 156, + Automation1PsoWindowInput_XL2eAuxiliaryFeedback = 157, + Automation1PsoWindowInput_XL2eSyncPortA = 158, + Automation1PsoWindowInput_XL2eSyncPortB = 159, + Automation1PsoWindowInput_XL2eDrivePulseStream = 160, + Automation1PsoWindowInput_XI4PrimaryFeedbackAxis1 = 161, + Automation1PsoWindowInput_XI4PrimaryFeedbackAxis2 = 162, + Automation1PsoWindowInput_XI4PrimaryFeedbackAxis3 = 163, + Automation1PsoWindowInput_XI4PrimaryFeedbackAxis4 = 164, + Automation1PsoWindowInput_XI4AuxiliaryFeedback1 = 165, + Automation1PsoWindowInput_XI4AuxiliaryFeedback2 = 166, + Automation1PsoWindowInput_XI4AuxiliaryFeedback3 = 167, + Automation1PsoWindowInput_XI4AuxiliaryFeedback4 = 168, + Automation1PsoWindowInput_XI4SyncPortA = 169, + Automation1PsoWindowInput_XI4SyncPortB = 170, + Automation1PsoWindowInput_XI4DrivePulseStreamAxis1 = 171, + Automation1PsoWindowInput_XI4DrivePulseStreamAxis2 = 172, + Automation1PsoWindowInput_XI4DrivePulseStreamAxis3 = 173, + Automation1PsoWindowInput_XI4DrivePulseStreamAxis4 = 174, + Automation1PsoWindowInput_iXC4PrimaryFeedback = 175, + Automation1PsoWindowInput_iXC4AuxiliaryFeedback = 176, + Automation1PsoWindowInput_iXC4SyncPortA = 177, + Automation1PsoWindowInput_iXC4SyncPortB = 178, + Automation1PsoWindowInput_iXC4DrivePulseStream = 179, + Automation1PsoWindowInput_iXC4ePrimaryFeedback = 180, + Automation1PsoWindowInput_iXC4eAuxiliaryFeedback = 181, + Automation1PsoWindowInput_iXC4eSyncPortA = 182, + Automation1PsoWindowInput_iXC4eSyncPortB = 183, + Automation1PsoWindowInput_iXC4eDrivePulseStream = 184, + Automation1PsoWindowInput_iXC6ePrimaryFeedback = 185, + Automation1PsoWindowInput_iXC6eAuxiliaryFeedback = 186, + Automation1PsoWindowInput_iXC6eSyncPortA = 187, + Automation1PsoWindowInput_iXC6eSyncPortB = 188, + Automation1PsoWindowInput_iXC6eDrivePulseStream = 189, + Automation1PsoWindowInput_iXL5ePrimaryFeedback = 190, + Automation1PsoWindowInput_iXL5eAuxiliaryFeedback = 191, + Automation1PsoWindowInput_iXL5eSyncPortA = 192, + Automation1PsoWindowInput_iXL5eSyncPortB = 193, + Automation1PsoWindowInput_iXL5eDrivePulseStream = 194, + Automation1PsoWindowInput_iXR3PrimaryFeedbackAxis1 = 195, + Automation1PsoWindowInput_iXR3PrimaryFeedbackAxis2 = 196, + Automation1PsoWindowInput_iXR3PrimaryFeedbackAxis3 = 197, + Automation1PsoWindowInput_iXR3PrimaryFeedbackAxis4 = 198, + Automation1PsoWindowInput_iXR3PrimaryFeedbackAxis5 = 199, + Automation1PsoWindowInput_iXR3PrimaryFeedbackAxis6 = 200, + Automation1PsoWindowInput_iXR3AuxiliaryFeedbackAxis1 = 201, + Automation1PsoWindowInput_iXR3AuxiliaryFeedbackAxis2 = 202, + Automation1PsoWindowInput_iXR3AuxiliaryFeedbackAxis3 = 203, + Automation1PsoWindowInput_iXR3AuxiliaryFeedbackAxis4 = 204, + Automation1PsoWindowInput_iXR3AuxiliaryFeedbackAxis5 = 205, + Automation1PsoWindowInput_iXR3AuxiliaryFeedbackAxis6 = 206, + Automation1PsoWindowInput_iXR3SyncPortA = 207, + Automation1PsoWindowInput_iXR3SyncPortB = 208, + Automation1PsoWindowInput_iXR3DrivePulseStream = 209, + Automation1PsoWindowInput_GI4DrivePulseStreamAxis1 = 210, + Automation1PsoWindowInput_GI4DrivePulseStreamAxis2 = 211, + Automation1PsoWindowInput_GI4DrivePulseStreamAxis3 = 212, + Automation1PsoWindowInput_iXC2PrimaryFeedback = 213, + Automation1PsoWindowInput_iXC2AuxiliaryFeedback = 214, + Automation1PsoWindowInput_iXC2DrivePulseStream = 215, + Automation1PsoWindowInput_iXC2ePrimaryFeedback = 216, + Automation1PsoWindowInput_iXC2eAuxiliaryFeedback = 217, + Automation1PsoWindowInput_iXC2eDrivePulseStream = 218, + Automation1PsoWindowInput_iXL2ePrimaryFeedback = 219, + Automation1PsoWindowInput_iXL2eAuxiliaryFeedback = 220, + Automation1PsoWindowInput_iXL2eSyncPortA = 221, + Automation1PsoWindowInput_iXL2eSyncPortB = 222, + Automation1PsoWindowInput_iXL2eDrivePulseStream = 223, + Automation1PsoWindowInput_iXI4PrimaryFeedbackAxis1 = 224, + Automation1PsoWindowInput_iXI4PrimaryFeedbackAxis2 = 225, + Automation1PsoWindowInput_iXI4PrimaryFeedbackAxis3 = 226, + Automation1PsoWindowInput_iXI4PrimaryFeedbackAxis4 = 227, + Automation1PsoWindowInput_iXI4AuxiliaryFeedback1 = 228, + Automation1PsoWindowInput_iXI4AuxiliaryFeedback2 = 229, + Automation1PsoWindowInput_iXI4AuxiliaryFeedback3 = 230, + Automation1PsoWindowInput_iXI4AuxiliaryFeedback4 = 231, + Automation1PsoWindowInput_iXI4SyncPortA = 232, + Automation1PsoWindowInput_iXI4SyncPortB = 233, + Automation1PsoWindowInput_iXI4DrivePulseStreamAxis1 = 234, + Automation1PsoWindowInput_iXI4DrivePulseStreamAxis2 = 235, + Automation1PsoWindowInput_iXI4DrivePulseStreamAxis3 = 236, + Automation1PsoWindowInput_iXI4DrivePulseStreamAxis4 = 237, # @brief Specifies the PSO output pin settings for each drive. class Automation1PsoOutputPin: - Automation1PsoOutputPin_GL4None = 100, - Automation1PsoOutputPin_GL4LaserOutput0 = 101, - Automation1PsoOutputPin_XL4sNone = 102, - Automation1PsoOutputPin_XL4sLaserOutput0 = 103, - Automation1PsoOutputPin_XR3None = 104, - Automation1PsoOutputPin_XR3PsoOutput1 = 105, - Automation1PsoOutputPin_XR3PsoOutput2 = 106, - Automation1PsoOutputPin_XR3PsoOutput3 = 107, - Automation1PsoOutputPin_XC4DedicatedOutput = 108, - Automation1PsoOutputPin_XC4AuxiliaryMarkerDifferential = 109, - Automation1PsoOutputPin_XC4AuxiliaryMarkerSingleEnded = 110, - XC4eDedicatedOutput = 111, - XC4eAuxiliaryMarkerDifferential = 112, - XC4eAuxiliaryMarkerSingleEnded = 113, - Automation1PsoOutputPin_XC6eDedicatedOutput = 114, - Automation1PsoOutputPin_XC6eAuxiliaryMarkerDifferential = 115, - Automation1PsoOutputPin_XC6eAuxiliaryMarkerSingleEnded = 116, - Automation1PsoOutputPin_XL5eDedicatedOutput = 117, - Automation1PsoOutputPin_XL5eAuxiliaryMarkerDifferential = 118, - Automation1PsoOutputPin_XL5eAuxiliaryMarkerSingleEnded = 119, - Automation1PsoOutputPin_XC2DedicatedOutput = 120, - Automation1PsoOutputPin_XC2eDedicatedOutput = 121, - Automation1PsoOutputPin_XL2eDedicatedOutput = 122, - Automation1PsoOutputPin_XI4DedicatedOutput = 123, - Automation1PsoOutputPin_iXC4DedicatedOutput = 124, - Automation1PsoOutputPin_iXC4AuxiliaryMarkerDifferential = 125, - Automation1PsoOutputPin_iXC4AuxiliaryMarkerSingleEnded = 126, - Automation1PsoOutputPin_iXC4eDedicatedOutput = 127, - Automation1PsoOutputPin_iXC4eAuxiliaryMarkerDifferential = 128, - Automation1PsoOutputPin_iXC4eAuxiliaryMarkerSingleEnded = 129, - Automation1PsoOutputPin_iXC6eDedicatedOutput = 130, - Automation1PsoOutputPin_iXC6eAuxiliaryMarkerDifferential = 131, - Automation1PsoOutputPin_iXC6eAuxiliaryMarkerSingleEnded = 132, - Automation1PsoOutputPin_iXL5eDedicatedOutput = 133, - Automation1PsoOutputPin_iXL5eAuxiliaryMarkerDifferential = 134, - Automation1PsoOutputPin_iXL5eAuxiliaryMarkerSingleEnded = 135, - Automation1PsoOutputPin_iXR3None = 136, - Automation1PsoOutputPin_iXR3PsoOutput1 = 137, - Automation1PsoOutputPin_iXR3PsoOutput2 = 138, - Automation1PsoOutputPin_iXR3PsoOutput3 = 139, - Automation1PsoOutputPin_GI4None = 140, - Automation1PsoOutputPin_GI4LaserOutput0 = 141, - Automation1PsoOutputPin_iXC2eDedicatedOutput = 143, - Automation1PsoOutputPin_iXL2eDedicatedOutput = 144, - Automation1PsoOutputPin_iXI4DedicatedOutput = 145, + Automation1PsoOutputPin_GL4None = 100, + Automation1PsoOutputPin_GL4LaserOutput0 = 101, + Automation1PsoOutputPin_XL4sNone = 102, + Automation1PsoOutputPin_XL4sLaserOutput0 = 103, + Automation1PsoOutputPin_XR3None = 104, + Automation1PsoOutputPin_XR3PsoOutput1 = 105, + Automation1PsoOutputPin_XR3PsoOutput2 = 106, + Automation1PsoOutputPin_XR3PsoOutput3 = 107, + Automation1PsoOutputPin_XC4DedicatedOutput = 108, + Automation1PsoOutputPin_XC4AuxiliaryMarkerDifferential = 109, + Automation1PsoOutputPin_XC4AuxiliaryMarkerSingleEnded = 110, + XC4eDedicatedOutput = 111, + XC4eAuxiliaryMarkerDifferential = 112, + XC4eAuxiliaryMarkerSingleEnded = 113, + Automation1PsoOutputPin_XC6eDedicatedOutput = 114, + Automation1PsoOutputPin_XC6eAuxiliaryMarkerDifferential = 115, + Automation1PsoOutputPin_XC6eAuxiliaryMarkerSingleEnded = 116, + Automation1PsoOutputPin_XL5eDedicatedOutput = 117, + Automation1PsoOutputPin_XL5eAuxiliaryMarkerDifferential = 118, + Automation1PsoOutputPin_XL5eAuxiliaryMarkerSingleEnded = 119, + Automation1PsoOutputPin_XC2DedicatedOutput = 120, + Automation1PsoOutputPin_XC2eDedicatedOutput = 121, + Automation1PsoOutputPin_XL2eDedicatedOutput = 122, + Automation1PsoOutputPin_XI4DedicatedOutput = 123, + Automation1PsoOutputPin_iXC4DedicatedOutput = 124, + Automation1PsoOutputPin_iXC4AuxiliaryMarkerDifferential = 125, + Automation1PsoOutputPin_iXC4AuxiliaryMarkerSingleEnded = 126, + Automation1PsoOutputPin_iXC4eDedicatedOutput = 127, + Automation1PsoOutputPin_iXC4eAuxiliaryMarkerDifferential = 128, + Automation1PsoOutputPin_iXC4eAuxiliaryMarkerSingleEnded = 129, + Automation1PsoOutputPin_iXC6eDedicatedOutput = 130, + Automation1PsoOutputPin_iXC6eAuxiliaryMarkerDifferential = 131, + Automation1PsoOutputPin_iXC6eAuxiliaryMarkerSingleEnded = 132, + Automation1PsoOutputPin_iXL5eDedicatedOutput = 133, + Automation1PsoOutputPin_iXL5eAuxiliaryMarkerDifferential = 134, + Automation1PsoOutputPin_iXL5eAuxiliaryMarkerSingleEnded = 135, + Automation1PsoOutputPin_iXR3None = 136, + Automation1PsoOutputPin_iXR3PsoOutput1 = 137, + Automation1PsoOutputPin_iXR3PsoOutput2 = 138, + Automation1PsoOutputPin_iXR3PsoOutput3 = 139, + Automation1PsoOutputPin_GI4None = 140, + Automation1PsoOutputPin_GI4LaserOutput0 = 141, + Automation1PsoOutputPin_iXC2eDedicatedOutput = 143, + Automation1PsoOutputPin_iXL2eDedicatedOutput = 144, + Automation1PsoOutputPin_iXI4DedicatedOutput = 145, """ diff --git a/tomcat_bec/devices/aerotech/AerotechDriveDataCollection.py b/tomcat_bec/devices/aerotech/AerotechDriveDataCollection.py index 0ba20c3..40fd6c8 100644 --- a/tomcat_bec/devices/aerotech/AerotechDriveDataCollection.py +++ b/tomcat_bec/devices/aerotech/AerotechDriveDataCollection.py @@ -1,50 +1,47 @@ import time from collections import OrderedDict -from time import sleep -import numpy as np -from ophyd import Component, Device, EpicsMotor, EpicsSignal, EpicsSignalRO, Kind -from ophyd.status import DeviceStatus, SubscriptionStatus +from ophyd import Component, EpicsSignal, EpicsSignalRO, Kind +from ophyd.status import SubscriptionStatus try: - from AerotechAutomation1Enums import ( - DriveDataCaptureInput, - DriveDataCaptureTrigger, - ) + from AerotechAutomation1Enums import DriveDataCaptureInput, DriveDataCaptureTrigger except ModuleNotFoundError: from tomcat_bec.devices.aerotech.AerotechAutomation1Enums import DriveDataCaptureInput from tomcat_bec.devices.aerotech.AerotechAutomation1Enums import DriveDataCaptureTrigger from ophyd_devices.interfaces.base_classes.psi_detector_base import PSIDetectorBase as PSIDeviceBase -from ophyd_devices.interfaces.base_classes.psi_detector_base import CustomDetectorMixin as CustomDeviceMixin +from ophyd_devices.interfaces.base_classes.psi_detector_base import ( + CustomDetectorMixin as CustomDeviceMixin, +) from bec_lib import bec_logger + logger = bec_logger.logger class AerotechDriveDataCollectionMixin(CustomDeviceMixin): # parent : aa1Tasks def on_stage(self) -> None: - """ Configuration and staging - """ + """Configuration and staging""" # Fish out our configuration from scaninfo (via explicit or generic addressing) scanparam = self.parent.scaninfo.scan_msg.info alias = self.parent.parent.name if self.parent.parent is not None else self.parent.name logger.warning(f"[{alias}] Scan parameters:\n{scanparam}") d = {} - if 'kwargs' in scanparam: - scanargs = scanparam['kwargs'] + if "kwargs" in scanparam: + scanargs = scanparam["kwargs"] for prefix in ["", alias + "_"]: - if f'{prefix}num_points_total' in scanargs: - d['num_points_total'] = scanargs[f'{prefix}num_points_total'] - if f'{prefix}ddc_trigger' in scanargs: - d['ddc_trigger'] = scanargs[f'{prefix}ddc_trigger'] - if f'{prefix}ddc_source0' in scanargs: - d['ddc_source0'] = scanargs[f'{prefix}ddc_source0'] - if f'{prefix}ddc_source1' in scanargs: - d['ddc_source1'] = scanargs[f'{prefix}ddc_source1'] + if f"{prefix}num_points_total" in scanargs: + d["num_points_total"] = scanargs[f"{prefix}num_points_total"] + if f"{prefix}ddc_trigger" in scanargs: + d["ddc_trigger"] = scanargs[f"{prefix}ddc_trigger"] + if f"{prefix}ddc_source0" in scanargs: + d["ddc_source0"] = scanargs[f"{prefix}ddc_source0"] + if f"{prefix}ddc_source1" in scanargs: + d["ddc_source1"] = scanargs[f"{prefix}ddc_source1"] # Perform bluesky-style configuration - if len(d)>0: + if len(d) > 0: logger.warning(f"[{self.parent.name}] Configuring with:\n{d}") self.parent.configure(d=d) @@ -56,19 +53,11 @@ class AerotechDriveDataCollectionMixin(CustomDeviceMixin): # Stage the DDC distance module self.parent._switch.set("Start", settle_time=0.2).wait() - def on_unstage(self): - """ Standard bluesky unstage""" + """Standard bluesky unstage""" self.parent._switch.set("Stop", settle_time=0.2).wait() - - - - - - - class aa1AxisDriveDataCollection(PSIDeviceBase): """Axis data collection @@ -111,7 +100,7 @@ class aa1AxisDriveDataCollection(PSIDeviceBase): USER_ACCESS = ["configure", "reset"] def configure(self, d: dict = {}) -> tuple: - """ Configure data capture + """Configure data capture Configures the hardware synchronized drive data capture (DDC) on an Automation1 axis wit up to 200kHz external input frequency. The @@ -188,7 +177,7 @@ class aa1AxisDriveDataCollection(PSIDeviceBase): return {self.name: ret} def collect(self) -> OrderedDict: - """ Standard collect method + """Standard collect method Note: bluesky expects a generator, while BEC expects a direct return """ diff --git a/tomcat_bec/devices/aerotech/AerotechPso.py b/tomcat_bec/devices/aerotech/AerotechPso.py index 65532e3..eb7c8d7 100644 --- a/tomcat_bec/devices/aerotech/AerotechPso.py +++ b/tomcat_bec/devices/aerotech/AerotechPso.py @@ -1,33 +1,20 @@ -import time -from collections import OrderedDict from time import sleep - import numpy as np -from ophyd import Component, Device, EpicsMotor, EpicsSignal, EpicsSignalRO, Kind -from ophyd.status import DeviceStatus, SubscriptionStatus - -try: - from AerotechAutomation1Enums import ( - DriveDataCaptureInput, - DriveDataCaptureTrigger, - ) -except ModuleNotFoundError: - from tomcat_bec.devices.aerotech.AerotechAutomation1Enums import DriveDataCaptureInput - from tomcat_bec.devices.aerotech.AerotechAutomation1Enums import DriveDataCaptureTrigger +from ophyd import Component, EpicsSignal, EpicsSignalRO, Kind +from ophyd.status import DeviceStatus from ophyd_devices.interfaces.base_classes.psi_detector_base import PSIDetectorBase as PSIDeviceBase -from ophyd_devices.interfaces.base_classes.psi_detector_base import CustomDetectorMixin as CustomDeviceMixin +from ophyd_devices.interfaces.base_classes.psi_detector_base import ( + CustomDetectorMixin as CustomDeviceMixin, +) from bec_lib import bec_logger logger = bec_logger.logger - - class AerotechPsoDistanceMixin(CustomDeviceMixin): # parent : aa1Tasks def on_stage(self) -> None: - """ Configuration and staging - """ + """Configuration and staging""" # logger.warning(self.parent.scaninfo.scan_msg.info['kwargs'].keys()) # Fish out our configuration from scaninfo (via explicit or generic addressing) @@ -35,22 +22,22 @@ class AerotechPsoDistanceMixin(CustomDeviceMixin): alias = self.parent.parent.name if self.parent.parent is not None else self.parent.name logger.warning(f"[{alias}] Scan parameters:\n{scanparam}") d = {} - if 'kwargs' in scanparam: - scanargs = scanparam['kwargs'] + if "kwargs" in scanparam: + scanargs = scanparam["kwargs"] for prefix in ["", alias + "_"]: - if f'{prefix}pso_distance' in scanargs: - d['pso_distance'] = scanargs[f'{prefix}pso_distance'] - if f'{prefix}pso_wavemode' in scanargs: - d['pso_wavemode'] = scanargs[f'{prefix}pso_wavemode'] - if f'{prefix}pso_w_pulse' in scanargs: - d['pso_w_pulse'] = scanargs[f'{prefix}pso_w_pulse'] - if f'{prefix}pso_t_pulse' in scanargs: - d['pso_t_pulse'] = scanargs[f'{prefix}pso_t_pulse'] - if f'{prefix}pso_n_pulse' in scanargs: - d['pso_n_pulse'] = scanargs[f'{prefix}pso_n_pulse'] + if f"{prefix}pso_distance" in scanargs: + d["pso_distance"] = scanargs[f"{prefix}pso_distance"] + if f"{prefix}pso_wavemode" in scanargs: + d["pso_wavemode"] = scanargs[f"{prefix}pso_wavemode"] + if f"{prefix}pso_w_pulse" in scanargs: + d["pso_w_pulse"] = scanargs[f"{prefix}pso_w_pulse"] + if f"{prefix}pso_t_pulse" in scanargs: + d["pso_t_pulse"] = scanargs[f"{prefix}pso_t_pulse"] + if f"{prefix}pso_n_pulse" in scanargs: + d["pso_n_pulse"] = scanargs[f"{prefix}pso_n_pulse"] # Perform bluesky-style configuration - if len(d)>0: + if len(d) > 0: logger.info(f"[{self.parent.name}] Configuring with:\n{d}") self.parent.configure(d=d) @@ -70,11 +57,11 @@ class AerotechPsoDistanceMixin(CustomDeviceMixin): self.parent.dstCounterEna.set("On").wait() def on_unstage(self): - """ Standard bluesky unstage""" + """Standard bluesky unstage""" # Ensure output is set to low # if self.parent.output.value: # self.parent.toggle() - # Turn off window mode + # Turn off window mode self.parent.winOutput.set("Off").wait() self.parent.winEvents.set("Off").wait() # Turn off distance mode @@ -93,55 +80,53 @@ class AerotechPsoDistanceMixin(CustomDeviceMixin): return status - class AerotechPsoWindowMixin(CustomDeviceMixin): # parent : aa1Tasks def on_stage(self) -> None: - """ Configuration and staging - """ + """Configuration and staging""" logger.warning(self.parent.scaninfo.__dict__) # Fish out our configuration from scaninfo (via explicit or generic addressing) prefix = self.parent.parent.name if self.parent.parent is not None else self.parent.name d = {} - if hasattr(self.parent.scaninfo, prefix + '_pso_bounds'): - val = str(getattr(self.parent.scaninfo, prefix + '_pso_bounds')) - d['pso_bounds'] = val - if hasattr(self.parent.scaninfo, prefix + '_pso_wavemode'): - val = str(getattr(self.parent.scaninfo, prefix + '_pso_wavemode')) - d['pso_wavemode'] = val - if hasattr(self.parent.scaninfo, prefix + '_pso_windevent'): - val = str(getattr(self.parent.scaninfo, prefix + '_pso_windevent')) - d['pso_windevent'] = val - if hasattr(self.parent.scaninfo, prefix + '_pso_w_pulse'): - val = getattr(self.parent.scaninfo, prefix + '_pso_w_pulse') - d['pso_w_pulse'] = val - if hasattr(self.parent.scaninfo, prefix + '_pso_t_pulse'): - val = getattr(self.parent.scaninfo, prefix + '_pso_t_pulse') - d['pso_t_pulse'] = val - if hasattr(self.parent.scaninfo, prefix + '_pso_n_pulse'): - val = getattr(self.parent.scaninfo, prefix + '_pso_n_pulse') - d['pso_n_pulse'] = val - if hasattr(self.parent.scaninfo, 'pso_bounds'): - val = str(getattr(self.parent.scaninfo, 'pso_bounds')) - d['pso_bounds'] = val - if hasattr(self.parent.scaninfo, 'pso_wavemode'): - val = str(getattr(self.parent.scaninfo, 'pso_wavemode')) - d['pso_wavemode'] = val - if hasattr(self.parent.scaninfo, 'pso_windevent'): - val = str(getattr(self.parent.scaninfo, 'pso_windevent')) - d['pso_windevent'] = val - if hasattr(self.parent.scaninfo, 'pso_w_pulse'): - val = getattr(self.parent.scaninfo, 'pso_w_pulse') - d['pso_w_pulse'] = val - if hasattr(self.parent.scaninfo, 'pso_t_pulse'): - val = getattr(self.parent.scaninfo, 'pso_t_pulse') - d['pso_t_pulse'] = val - if hasattr(self.parent.scaninfo, 'pso_n_pulse'): - val = getattr(self.parent.scaninfo, 'pso_n_pulse') - d['pso_n_pulse'] = val + if hasattr(self.parent.scaninfo, prefix + "_pso_bounds"): + val = str(getattr(self.parent.scaninfo, prefix + "_pso_bounds")) + d["pso_bounds"] = val + if hasattr(self.parent.scaninfo, prefix + "_pso_wavemode"): + val = str(getattr(self.parent.scaninfo, prefix + "_pso_wavemode")) + d["pso_wavemode"] = val + if hasattr(self.parent.scaninfo, prefix + "_pso_windevent"): + val = str(getattr(self.parent.scaninfo, prefix + "_pso_windevent")) + d["pso_windevent"] = val + if hasattr(self.parent.scaninfo, prefix + "_pso_w_pulse"): + val = getattr(self.parent.scaninfo, prefix + "_pso_w_pulse") + d["pso_w_pulse"] = val + if hasattr(self.parent.scaninfo, prefix + "_pso_t_pulse"): + val = getattr(self.parent.scaninfo, prefix + "_pso_t_pulse") + d["pso_t_pulse"] = val + if hasattr(self.parent.scaninfo, prefix + "_pso_n_pulse"): + val = getattr(self.parent.scaninfo, prefix + "_pso_n_pulse") + d["pso_n_pulse"] = val + if hasattr(self.parent.scaninfo, "pso_bounds"): + val = str(getattr(self.parent.scaninfo, "pso_bounds")) + d["pso_bounds"] = val + if hasattr(self.parent.scaninfo, "pso_wavemode"): + val = str(getattr(self.parent.scaninfo, "pso_wavemode")) + d["pso_wavemode"] = val + if hasattr(self.parent.scaninfo, "pso_windevent"): + val = str(getattr(self.parent.scaninfo, "pso_windevent")) + d["pso_windevent"] = val + if hasattr(self.parent.scaninfo, "pso_w_pulse"): + val = getattr(self.parent.scaninfo, "pso_w_pulse") + d["pso_w_pulse"] = val + if hasattr(self.parent.scaninfo, "pso_t_pulse"): + val = getattr(self.parent.scaninfo, "pso_t_pulse") + d["pso_t_pulse"] = val + if hasattr(self.parent.scaninfo, "pso_n_pulse"): + val = getattr(self.parent.scaninfo, "pso_n_pulse") + d["pso_n_pulse"] = val # Perform bluesky-style configuration - if len(d)>0: + if len(d) > 0: self.parent.configure(d=d) # Only start acquisition if there was config @@ -156,11 +141,11 @@ class AerotechPsoWindowMixin(CustomDeviceMixin): self.winEvents.set(self._eventMode).wait() def on_unstage(self): - """ Standard bluesky unstage""" + """Standard bluesky unstage""" # Ensure output is set to low # if self.parent.output.value: # self.parent.toggle() - # Turn off window mode + # Turn off window mode self.parent.winOutput.set("Off").wait() self.parent.winEvents.set("Off").wait() # Turn off distance mode @@ -172,8 +157,6 @@ class AerotechPsoWindowMixin(CustomDeviceMixin): sleep(0.2) - - class aa1AxisPsoBase(PSIDeviceBase): """Position Sensitive Output - Base class @@ -189,6 +172,7 @@ class aa1AxisPsoBase(PSIDeviceBase): Specific operation modes should be implemented in child classes. """ + # ######################################################################## # General module status status = Component(EpicsSignalRO, "STATUS", auto_monitor=True, kind=Kind.normal) @@ -202,9 +186,13 @@ class aa1AxisPsoBase(PSIDeviceBase): dstEventsEna = Component(EpicsSignal, "DIST:EVENTS", put_complete=True, kind=Kind.config) dstCounterEna = Component(EpicsSignal, "DIST:COUNTER", put_complete=True, kind=Kind.omitted) dstCounterVal = Component(EpicsSignalRO, "DIST:CTR0_RBV", auto_monitor=True, kind=Kind.normal) - dstDistanceVal = Component(EpicsSignalRO, "DIST:DISTANCE_RBV", auto_monitor=True, kind=Kind.normal) + dstDistanceVal = Component( + EpicsSignalRO, "DIST:DISTANCE_RBV", auto_monitor=True, kind=Kind.normal + ) dstArrayIdx = Component(EpicsSignalRO, "DIST:IDX_RBV", auto_monitor=True, kind=Kind.normal) - dstArrayDepleted = Component(EpicsSignalRO, "DIST:DEPLETED-RBV", auto_monitor=True, kind=Kind.normal) + dstArrayDepleted = Component( + EpicsSignalRO, "DIST:DEPLETED-RBV", auto_monitor=True, kind=Kind.normal + ) dstDirection = Component(EpicsSignal, "DIST:EVENTDIR", put_complete=True, kind=Kind.omitted) dstDistance = Component(EpicsSignal, "DIST:DISTANCE", put_complete=True, kind=Kind.normal) @@ -221,7 +209,9 @@ class aa1AxisPsoBase(PSIDeviceBase): _winLower = Component(EpicsSignal, "WINDOW0:LOWER", put_complete=True, kind=Kind.config) _winUpper = Component(EpicsSignal, "WINDOW0:UPPER", put_complete=True, kind=Kind.config) winArrayIdx = Component(EpicsSignalRO, "WINDOW0:IDX_NXT", auto_monitor=True, kind=Kind.normal) - winArrayDepleted = Component(EpicsSignalRO, "WINDOW0:DEPLETED-RBV", auto_monitor=True, kind=Kind.normal) + winArrayDepleted = Component( + EpicsSignalRO, "WINDOW0:DEPLETED-RBV", auto_monitor=True, kind=Kind.normal + ) # ######################################################################## # PSO waveform module @@ -249,14 +239,14 @@ class aa1AxisPsoBase(PSIDeviceBase): return status def toggle(self): - """ Toggle waveform outup""" + """Toggle waveform outup""" orig_wave_mode = self.waveMode.get() self.waveMode.set("Toggle").wait() self.trigger(0.1) self.waveMode.set(orig_wave_mode).wait() def configure(self, d: dict): - """ Configure the emitted waveform""" + """Configure the emitted waveform""" wmode = d.get("pso_wavemode", "pulsed") t_pulse = d.get("pso_t_pulse", 100) w_pulse = d.get("pso_w_pulse", 200) @@ -292,7 +282,6 @@ class aa1AxisPsoBase(PSIDeviceBase): self.outSource.set("Window").wait() - class aa1AxisPsoDistance(aa1AxisPsoBase): """Position Sensitive Output - Distance mode @@ -321,6 +310,7 @@ class aa1AxisPsoDistance(aa1AxisPsoBase): pso.kickoff().wait() ``` """ + custom_prepare_cls = AerotechPsoDistanceMixin USER_ACCESS = ["configure", "prepare", "toggle"] _distance_value = None @@ -342,7 +332,12 @@ class aa1AxisPsoDistance(aa1AxisPsoBase): pso_wavemode = d.get("pso_wavemode", "pulsed") # Validate input parameters - if pso_wavemode is not None and pso_wavemode not in ["pulse", "pulsed", "toggle", "toggled"]: + if pso_wavemode is not None and pso_wavemode not in [ + "pulse", + "pulsed", + "toggle", + "toggled", + ]: raise RuntimeError(f"Unsupported distace triggering mode: {pso_wavemode}") old = self.read_configuration() @@ -388,12 +383,11 @@ class aa1AxisPsoDistance(aa1AxisPsoBase): # return status - class aa1AxisPsoWindow(aa1AxisPsoBase): """Position Sensitive Output - Window mode This class provides convenience wrappers around the Aerotech API's PSO functionality in window - mode. It can either use the event-waveform concept or provide a direct window in/out output + mode. It can either use the event-waveform concept or provide a direct window in/out output signal on the output pin. The latter is well-suited for the generation of trigger enable signals, while event mode allows finetuning of trigger waveform. So the simplified pipeline structure are: @@ -403,6 +397,7 @@ class aa1AxisPsoWindow(aa1AxisPsoBase): NOTE: PSO module has 32 bit counters, and windows are defined in absolute coordinates. This makes them prone to integer overflows. """ + custom_prepare_cls = AerotechPsoWindowMixin USER_ACCESS = ["configure", "prepare", "toggle"] _eventMode = "Enter" @@ -426,7 +421,9 @@ class aa1AxisPsoWindow(aa1AxisPsoBase): if pso_wavemode not in ["pulse", "pulsed", "toggle", "toggled", "output", "flag"]: raise RuntimeError(f"Unsupported window triggering mode: {pso_wavemode}") if len(pso_bounds) % 2 == 1: - raise RuntimeError(f"Window mode requires an even number of bounds, got: {len(pso_bounds)}") + raise RuntimeError( + f"Window mode requires an even number of bounds, got: {len(pso_bounds)}" + ) self._eventMode = pso_eventmode old = self.read_configuration() @@ -450,4 +447,3 @@ class aa1AxisPsoWindow(aa1AxisPsoBase): new = self.read_configuration() return (old, new) - diff --git a/tomcat_bec/devices/aerotech/AerotechTasks.py b/tomcat_bec/devices/aerotech/AerotechTasks.py index b33340e..5a763bf 100644 --- a/tomcat_bec/devices/aerotech/AerotechTasks.py +++ b/tomcat_bec/devices/aerotech/AerotechTasks.py @@ -1,21 +1,23 @@ -import time from time import sleep from ophyd import Component, EpicsSignal, EpicsSignalRO, Kind from ophyd.status import DeviceStatus, SubscriptionStatus from ophyd_devices.interfaces.base_classes.psi_detector_base import PSIDetectorBase as PSIDeviceBase -from ophyd_devices.interfaces.base_classes.psi_detector_base import CustomDetectorMixin as CustomDeviceMixin +from ophyd_devices.interfaces.base_classes.psi_detector_base import ( + CustomDetectorMixin as CustomDeviceMixin, +) from bec_lib import bec_logger + logger = bec_logger.logger class AerotechTasksMixin(CustomDeviceMixin): # parent : aa1Tasks def on_stage(self) -> None: - """ Configuration and staging - - In the BEC model ophyd devices must fish out their own configuration from the 'scaninfo'. + """Configuration and staging + + In the BEC model ophyd devices must fish out their own configuration from the 'scaninfo'. I.e. they need to know which parameters are relevant for them at each scan. NOTE: Tomcat might use multiple cameras with their own separate DAQ instances. @@ -27,20 +29,20 @@ class AerotechTasksMixin(CustomDeviceMixin): alias = self.parent.parent.name if self.parent.parent is not None else self.parent.name logger.warning(f"[{alias}] Scan parameters:\n{scanparam}") d = {} - if 'kwargs' in scanparam: - scanargs = scanparam['kwargs'] + if "kwargs" in scanparam: + scanargs = scanparam["kwargs"] for prefix in ["", alias + "_"]: - if f'{prefix}script_text' in scanargs: - d['script_text'] = scanargs[f'{prefix}script_text'] - if f'{prefix}script_file' in scanargs: - d['script_file'] = scanargs[f'{prefix}script_file'] - if f'{prefix}script_mode' in scanargs: - d['script_mode'] = scanargs[f'{prefix}script_mode'] - if f'{prefix}script_task' in scanargs: - d['script_task'] = scanargs[f'{prefix}script_task'] + if f"{prefix}script_text" in scanargs: + d["script_text"] = scanargs[f"{prefix}script_text"] + if f"{prefix}script_file" in scanargs: + d["script_file"] = scanargs[f"{prefix}script_file"] + if f"{prefix}script_mode" in scanargs: + d["script_mode"] = scanargs[f"{prefix}script_mode"] + if f"{prefix}script_task" in scanargs: + d["script_task"] = scanargs[f"{prefix}script_task"] # Perform bluesky-style configuration - if len(d)>0: + if len(d) > 0: logger.warning(f"[{self.parent.name}] Configuring with:\n{d}") self.parent.configure(d=d) @@ -74,11 +76,6 @@ class AerotechTasksMixin(CustomDeviceMixin): self.parent.switch.set("Stop").wait() - - - - - class aa1Tasks(PSIDeviceBase): """Task management API @@ -109,6 +106,7 @@ class aa1Tasks(PSIDeviceBase): ''' """ + custom_prepare_cls = AerotechTasksMixin _text_to_execute = None _is_configured = False @@ -196,7 +194,7 @@ class aa1Tasks(PSIDeviceBase): ########################################################################## # Bluesky flyer interface def complete(self) -> DeviceStatus: - """ Wait for a RUNNING task""" + """Wait for a RUNNING task""" timestamp_ = 0 task_idx = int(self.taskIndex.get()) diff --git a/tomcat_bec/devices/gigafrost/gigafrostcamera.py b/tomcat_bec/devices/gigafrost/gigafrostcamera.py index ac85729..b7b1d5f 100644 --- a/tomcat_bec/devices/gigafrost/gigafrostcamera.py +++ b/tomcat_bec/devices/gigafrost/gigafrostcamera.py @@ -8,8 +8,6 @@ Created on Thu Jun 27 17:28:43 2024 """ from time import sleep from ophyd import Signal, Component, EpicsSignal, EpicsSignalRO, Kind, DeviceStatus -from ophyd.device import Staged - from ophyd_devices.interfaces.base_classes.psi_detector_base import ( CustomDetectorMixin, PSIDetectorBase, @@ -144,8 +142,8 @@ class GigaFrostCameraMixin(CustomDetectorMixin): def on_stage(self) -> None: """ Configuration and staging - - In the BEC model ophyd devices must fish out their own configuration from the 'scaninfo'. + + In the BEC model ophyd devices must fish out their own configuration from the 'scaninfo'. I.e. they need to know which parameters are relevant for them at each scan. NOTE: Tomcat might use multiple cameras. @@ -161,15 +159,13 @@ class GigaFrostCameraMixin(CustomDetectorMixin): "IOC might be in unknown configuration." ) - self.parent._update_scaninfo() - # Fish out our configuration from scaninfo (via explicit or generic addressing) scanparam = self.parent.scaninfo.scan_msg.info alias = self.parent.parent.name if self.parent.parent is not None else self.parent.name logger.warning(f"[{alias}] Scan parameters:\n{scanparam}") d = {} if 'kwargs' in scanparam: - scanargs = scanparam['kwargs'] + scanargs = scanparam['kwargs'] for prefix in ["", alias + "_"]: if f'{prefix}image_width' in scanargs: d['image_width'] = scanargs[f'{prefix}image_width'] @@ -189,7 +185,7 @@ class GigaFrostCameraMixin(CustomDetectorMixin): d['trigger_mode'] = scanargs[f'{prefix}trigger_mode'] # Perform bluesky-style configuration - if len(d)>0: + if len(d) > 0: logger.warning(f"[{self.parent.name}] Configuring with:\n{d}") self.parent.configure(d=d) @@ -305,16 +301,13 @@ class GigaFrostCamera(PSIDetectorBase): cmdSoftTrigger = Component( EpicsSignal, "SOFT_TRIG.PROC", put_complete=True, kind=Kind.omitted) cmdSoftExposure = Component(EpicsSignal, "SOFT_EXP", put_complete=True) - cfgAcqMode = Component(EpicsSignal, "ACQMODE", put_complete=True, kind=Kind.config) - - ############################################################################################### # Enable schemes # NOTE: 0 physical, 1 virtual (i.e. always running, but logs enable signal) cfgEnableScheme = Component( - EpicsSignal, + EpicsSignal, "MODE_ENBL_EXP_RBV", write_pv="MODE_ENBL_EXP", put_complete=True, @@ -552,7 +545,7 @@ class GigaFrostCamera(PSIDetectorBase): self.cmdSetParam.set(1).wait() def set_trigger_mode(self, trigger_mode): - if trigger_mode=="soft": + if trigger_mode == "soft": # Switch to physical enable signal self.cfgEnableScheme.set(0).wait() # Set enable signal to always @@ -593,7 +586,6 @@ class GigaFrostCamera(PSIDetectorBase): else: raise RuntimeError(f"Unsupported trigger mode: {trigger_mode}") - def stage(self): """ Standard stage command""" if not self._initialized: diff --git a/tomcat_bec/devices/gigafrost/gigafrostclient.py b/tomcat_bec/devices/gigafrost/gigafrostclient.py index 74387f3..11a3a6b 100644 --- a/tomcat_bec/devices/gigafrost/gigafrostclient.py +++ b/tomcat_bec/devices/gigafrost/gigafrostclient.py @@ -12,14 +12,9 @@ from ophyd_devices.interfaces.base_classes.psi_detector_base import ( PSIDetectorBase, ) -try: - from . import gfconstants as const - from . import stddaq_client as stddaq - from . import gigafrostcamera as gfcam -except ModuleNotFoundError: - import tomcat_bec.devices.gigafrost.gfconstants as const - from tomcat_bec.devices.gigafrost.stddaq_client import StdDaqClient - from tomcat_bec.devices.gigafrost.gigafrostcamera import GigaFrostCamera +from . import gfconstants as const +from . import stddaq_client as stddaq +from . import gigafrostcamera as gfcam class GigaFrostClientMixin(CustomDetectorMixin): diff --git a/tomcat_bec/devices/gigafrost/stddaq_client.py b/tomcat_bec/devices/gigafrost/stddaq_client.py index 31ba840..cb9f2af 100644 --- a/tomcat_bec/devices/gigafrost/stddaq_client.py +++ b/tomcat_bec/devices/gigafrost/stddaq_client.py @@ -11,11 +11,10 @@ from time import sleep from threading import Thread import requests -from ophyd import Device, Signal, Component, Kind, DeviceStatus, Staged +from ophyd import Device, Signal, Component, Kind, Staged from websockets.sync.client import connect from websockets.exceptions import ConnectionClosedOK, ConnectionClosedError - from ophyd_devices.interfaces.base_classes.psi_detector_base import PSIDetectorBase as PSIDeviceBase from ophyd_devices.interfaces.base_classes.psi_detector_base import CustomDetectorMixin as CustomDeviceMixin from bec_lib import bec_logger @@ -28,8 +27,8 @@ class StdDaqMixin(CustomDeviceMixin): def on_stage(self) -> None: """ Configuration and staging - - In the BEC model ophyd devices must fish out their own configuration from the 'scaninfo'. + + In the BEC model ophyd devices must fish out their own configuration from the 'scaninfo'. I.e. they need to know which parameters are relevant for them at each scan. NOTE: Tomcat might use multiple cameras with their own separate DAQ instances. @@ -37,10 +36,10 @@ class StdDaqMixin(CustomDeviceMixin): # Fish out our configuration from scaninfo (via explicit or generic addressing) scanparam = self.parent.scaninfo.scan_msg.info alias = self.parent.parent.name if self.parent.parent is not None else self.parent.name - logger.warning(f"[{alias}] Scan parameters:\n{scanparam}") + logger.warning(f"[{alias}] Scan parameters:\n{self.parent.scaninfo}") d = {} if 'kwargs' in scanparam: - scanargs = scanparam['kwargs'] + scanargs = scanparam['kwargs'] for prefix in ["", alias + "_"]: if f'{prefix}image_width' in scanargs: d['image_width'] = scanargs[f'{prefix}image_width'] @@ -52,7 +51,7 @@ class StdDaqMixin(CustomDeviceMixin): d['file_path'] = scanargs[f'{prefix}file_path'] # Perform bluesky-style configuration - if len(d)>0: + if len(d) > 0: logger.warning(f"[{self.parent.name}] Configuring with:\n{d}") self.parent.configure(d=d) @@ -63,7 +62,7 @@ class StdDaqMixin(CustomDeviceMixin): # Try to start a new run file_path = self.parent.file_path.get() - num_images = self.parent.num_images.get() + num_images = self.parent.num_images.get() message = {"command": "start", "path": file_path, "n_image": num_images} # FIXME: This should be simplified once we don't crash the DAQ with stop @@ -128,16 +127,15 @@ class StdDaqMixin(CustomDeviceMixin): try: sleep(0.2) for msg in self.parent._wsclient: - message = json.loads(msg) - self.parent.status.put(message["status"], force=True) - logger.warning(f"[{self.parent.name}] {message['status']}") - + message = json.loads(msg) + self.parent.status.put(message["status"], force=True) + logger.warning(f"[{self.parent.name}] {message['status']}") except (ConnectionClosedError, ConnectionClosedOK, AssertionError): # Libraty throws theese after connection is closed return except Exception as ex: logger.warning(f"[{self.parent.name}] {ex}") - return + return finally: self._mon = None @@ -147,8 +145,8 @@ class StdDaqClient(PSIDeviceBase): This class combines the new websocket and REST interfaces of the stdDAQ replaced the documented python client. The websocket interface starts and stops the acquisition and provides status, - while the REST interface can read and write the JSON configuration file. - + while the REST interface can read and write the JSON configuration file. + The DAQ needs to restart all services to reconfigure with a new config, which might corrupt the currently written files (fix is underway). @@ -223,7 +221,6 @@ class StdDaqClient(PSIDeviceBase): "The stdDAQ websocket interface refused connection 5 times.") logger.debug(f"[{self.name}] Connected to DAQ after {num_retry} tries") - def message(self, message: dict, timeout=1, wait_reply=True): """Send a message to the StdDAQ and receive a reply @@ -350,14 +347,12 @@ class StdDaqClient(PSIDeviceBase): cfg = self.get_daq_config() self.set_daq_config(cfg) - def safestop(self): """ - The current stdDAQ refuses connection if another session is running. This is safety so we don't accidentally kill a running exposure. But this also means that we have to wait - until a dead session dies of timeout. - + until a dead session dies of timeout. + NOTE: REST reconfiguration restarts with systemd and can corrupt currently written files. """ try: diff --git a/tomcat_bec/devices/gigafrost/stddaq_preview.py b/tomcat_bec/devices/gigafrost/stddaq_preview.py index 051b53b..8ee712d 100644 --- a/tomcat_bec/devices/gigafrost/stddaq_preview.py +++ b/tomcat_bec/devices/gigafrost/stddaq_preview.py @@ -134,7 +134,7 @@ class StdDaqPreviewDetector(PSIDetectorBase): cam_widget = gui.add_dock('cam_dock1').add_widget('BECFigure').image('daq_stream1') """ # Subscriptions for plotting image - USER_ACCESS=["kickoff"] + USER_ACCESS = ["kickoff"] SUB_MONITOR = "device_monitor_2d" _default_sub = SUB_MONITOR @@ -184,6 +184,7 @@ class StdDaqPreviewDetector(PSIDetectorBase): """ The DAQ was not meant to be toggled""" return DeviceStatus(self, done=True, success=True, settle_time=0.1) + # Automatically connect to MicroSAXS testbench if directly invoked if __name__ == "__main__": daq = StdDaqPreviewDetector(url="tcp://129.129.95.111:20000", name="preview")