diff --git a/pxiii_bec/device_configs/x06da_device_config.yaml b/pxiii_bec/device_configs/x06da_device_config.yaml index da92c58..cb1464e 100644 --- a/pxiii_bec/device_configs/x06da_device_config.yaml +++ b/pxiii_bec/device_configs/x06da_device_config.yaml @@ -394,15 +394,6 @@ xbox_diode: readoutPriority: monitored readOnly: true softwareTrigger: false -ms_zoom: - description: Sample microscope zoom - deviceClass: ophyd.EpicsMotor - deviceConfig: {prefix: 'X06DA-ES-SAMCAM:ZOOM'} - onFailure: buffer - enabled: true - readoutPriority: monitored - readOnly: false - softwareTrigger: false samdist: description: Sample distance deviceClass: ophyd.EpicsSignalRO @@ -421,6 +412,15 @@ samrange: readoutPriority: monitored readOnly: true softwareTrigger: false +samzoom: + description: Sample microscope zoom + deviceClass: ophyd.EpicsMotor + deviceConfig: {prefix: 'X06DA-ES-SAMCAM:ZOOM'} + onFailure: buffer + enabled: true + readoutPriority: monitored + readOnly: false + softwareTrigger: false samcam: description: Sample camera device deviceClass: ophyd_devices.devices.areadetector.cam.GenICam @@ -428,7 +428,7 @@ samcam: onFailure: buffer enabled: true readoutPriority: monitored - readOnly: true + readOnly: false softwareTrigger: false @@ -475,7 +475,7 @@ bstop_pneum: onFailure: buffer enabled: true readoutPriority: monitored - readOnly: true + readOnly: false softwareTrigger: false bstop_diode: description: Beamstop diode @@ -493,7 +493,7 @@ frontlight: onFailure: buffer enabled: true readoutPriority: monitored - readOnly: true + readOnly: false softwareTrigger: false backlight: description: Backlight reflector @@ -502,7 +502,7 @@ backlight: onFailure: buffer enabled: true readoutPriority: monitored - readOnly: true + readOnly: false softwareTrigger: false det_y: description: Pilatus height @@ -526,7 +526,24 @@ det_z: - +gmx: + description: ABR horizontal stage + deviceClass: pxiii_bec.devices.A3200Axis + deviceConfig: {prefix: 'X06DA-ES-DF1:GMX', base_pv: 'X06DA-ES'} + onFailure: buffer + enabled: true + readoutPriority: monitored + readOnly: false + softwareTrigger: false +gmy: + description: ABR vertical stage + deviceClass: pxiii_bec.devices.A3200Axis + deviceConfig: {prefix: 'X06DA-ES-DF1:GMY', base_pv: 'X06DA-ES'} + onFailure: buffer + enabled: true + readoutPriority: monitored + readOnly: false + softwareTrigger: false omega: description: ABR rotation stage deviceClass: pxiii_bec.devices.A3200Axis @@ -545,6 +562,53 @@ abr: readoutPriority: monitored readOnly: false softwareTrigger: false +shx: + description: SmarGon X axis + deviceClass: pxiii_bec.devices.SmarGonAxis + deviceConfig: {prefix: 'SCS', sg_url: 'http://x06da-smargopolo.psi.ch:3000'} + onFailure: buffer + enabled: true + readoutPriority: monitored + readOnly: false + softwareTrigger: false +shy: + description: SmarGon Y axis + deviceClass: pxiii_bec.devices.SmarGonAxis + deviceConfig: {prefix: 'SCS', sg_url: 'http://x06da-smargopolo.psi.ch:3000'} + onFailure: buffer + enabled: true + readoutPriority: monitored + readOnly: false + softwareTrigger: false +shz: + description: SmarGon Z axis + deviceClass: pxiii_bec.devices.SmarGonAxis + deviceConfig: {prefix: 'SCS', low_limit: 10, high_limit: 22, sg_url: 'http://x06da-smargopolo.psi.ch:3000'} + onFailure: buffer + enabled: true + readoutPriority: monitored + readOnly: false + softwareTrigger: false +chi: + description: SmarGon CHI axis + deviceClass: pxiii_bec.devices.SmarGonAxis + deviceConfig: {prefix: 'SCS', sg_url: 'http://x06da-smargopolo.psi.ch:3000'} + onFailure: buffer + enabled: true + readoutPriority: monitored + readOnly: false + softwareTrigger: false +phi: + description: SmarGon PHI axis + deviceClass: pxiii_bec.devices.SmarGonAxis + deviceConfig: {prefix: 'SCS', sg_url: 'http://x06da-smargopolo.psi.ch:3000'} + onFailure: buffer + enabled: true + readoutPriority: monitored + readOnly: false + softwareTrigger: false + + samimg: @@ -552,7 +616,7 @@ samimg: deviceClass: ophyd_devices.devices.areadetector.plugins.ImagePlugin_V35 deviceConfig: {prefix: 'X06DA-SAMCAM:image1:'} onFailure: buffer - enabled: true + enabled: false readoutPriority: monitored readOnly: true softwareTrigger: false diff --git a/pxiii_bec/devices/A3200.py b/pxiii_bec/devices/A3200.py index f9958c7..ea67224 100644 --- a/pxiii_bec/devices/A3200.py +++ b/pxiii_bec/devices/A3200.py @@ -140,9 +140,9 @@ class AerotechAbrMixin(CustomDeviceMixin): scan_range_y = scanargs["range"] scan_steps_y = scanargs["steps"] d["scan_command"] = AbrCmd.VERTICAL_LINE_SCAN - d["var_1"] = scan_exp_time - d["var_2"] = scan_range_y - d["var_3"] = scan_steps_y + d["var_1"] = scan_range_y / scan_steps_y + d["var_2"] = scan_steps_y + d["var_3"] = scan_exp_time d["var_4"] = 0 d["var_5"] = 0 d["var_6"] = 0 diff --git a/pxiii_bec/devices/SmarGon.py b/pxiii_bec/devices/SmarGon.py index 0796c36..87f9562 100644 --- a/pxiii_bec/devices/SmarGon.py +++ b/pxiii_bec/devices/SmarGon.py @@ -41,7 +41,7 @@ class SmarGonSignal(Signal): old_value = self._readback self._timestamp = timestamp self._readback = r[self.addr.upper()] - self.value = r[self.addr.upper()] + self._value = r[self.addr.upper()] # Notify subscribers self._run_subs( @@ -65,8 +65,11 @@ class SmarGonSignal(Signal): def get(self, *args, **kwargs): r = self.parent._go_n_get(self.write_addr) - print(r) - self.value = r[self.addr.upper()] + # print(r) + if isinstance(r, dict): + self._value = r[self.addr.upper()] + else: + self._value = r return super().get(*args, **kwargs) @@ -84,8 +87,11 @@ class SmarGonSignalRO(Signal): def get(self, *args, **kwargs): r = self.parent._go_n_get(self.read_addr) - print(r) - self.put(r[self.addr.upper()], force=True) + # print(r) + if isinstance(r, dict): + self.put(r[self.addr.upper()], force=True) + else: + self.put(r, force=True) return super().get(*args, **kwargs) diff --git a/pxiii_bec/devices/__init__.py b/pxiii_bec/devices/__init__.py index d09a6fd..05082c8 100644 --- a/pxiii_bec/devices/__init__.py +++ b/pxiii_bec/devices/__init__.py @@ -6,3 +6,4 @@ Ophyd devices for the PX III beamline, including the MX specific Aerotech A3200 """ from .A3200 import AerotechAbrStage from .A3200utils import A3200Axis +from .SmarGon import SmarGonAxis