Fixing SmarGon axes

This commit is contained in:
gac-x06da
2025-01-24 16:17:04 +01:00
parent 21bd57393f
commit 023e0aab2e
4 changed files with 94 additions and 23 deletions
@@ -394,15 +394,6 @@ xbox_diode:
readoutPriority: monitored readoutPriority: monitored
readOnly: true readOnly: true
softwareTrigger: false 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: samdist:
description: Sample distance description: Sample distance
deviceClass: ophyd.EpicsSignalRO deviceClass: ophyd.EpicsSignalRO
@@ -421,6 +412,15 @@ samrange:
readoutPriority: monitored readoutPriority: monitored
readOnly: true readOnly: true
softwareTrigger: false 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: samcam:
description: Sample camera device description: Sample camera device
deviceClass: ophyd_devices.devices.areadetector.cam.GenICam deviceClass: ophyd_devices.devices.areadetector.cam.GenICam
@@ -428,7 +428,7 @@ samcam:
onFailure: buffer onFailure: buffer
enabled: true enabled: true
readoutPriority: monitored readoutPriority: monitored
readOnly: true readOnly: false
softwareTrigger: false softwareTrigger: false
@@ -475,7 +475,7 @@ bstop_pneum:
onFailure: buffer onFailure: buffer
enabled: true enabled: true
readoutPriority: monitored readoutPriority: monitored
readOnly: true readOnly: false
softwareTrigger: false softwareTrigger: false
bstop_diode: bstop_diode:
description: Beamstop diode description: Beamstop diode
@@ -493,7 +493,7 @@ frontlight:
onFailure: buffer onFailure: buffer
enabled: true enabled: true
readoutPriority: monitored readoutPriority: monitored
readOnly: true readOnly: false
softwareTrigger: false softwareTrigger: false
backlight: backlight:
description: Backlight reflector description: Backlight reflector
@@ -502,7 +502,7 @@ backlight:
onFailure: buffer onFailure: buffer
enabled: true enabled: true
readoutPriority: monitored readoutPriority: monitored
readOnly: true readOnly: false
softwareTrigger: false softwareTrigger: false
det_y: det_y:
description: Pilatus height 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: omega:
description: ABR rotation stage description: ABR rotation stage
deviceClass: pxiii_bec.devices.A3200Axis deviceClass: pxiii_bec.devices.A3200Axis
@@ -545,6 +562,53 @@ abr:
readoutPriority: monitored readoutPriority: monitored
readOnly: false readOnly: false
softwareTrigger: 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: samimg:
@@ -552,7 +616,7 @@ samimg:
deviceClass: ophyd_devices.devices.areadetector.plugins.ImagePlugin_V35 deviceClass: ophyd_devices.devices.areadetector.plugins.ImagePlugin_V35
deviceConfig: {prefix: 'X06DA-SAMCAM:image1:'} deviceConfig: {prefix: 'X06DA-SAMCAM:image1:'}
onFailure: buffer onFailure: buffer
enabled: true enabled: false
readoutPriority: monitored readoutPriority: monitored
readOnly: true readOnly: true
softwareTrigger: false softwareTrigger: false
+3 -3
View File
@@ -140,9 +140,9 @@ class AerotechAbrMixin(CustomDeviceMixin):
scan_range_y = scanargs["range"] scan_range_y = scanargs["range"]
scan_steps_y = scanargs["steps"] scan_steps_y = scanargs["steps"]
d["scan_command"] = AbrCmd.VERTICAL_LINE_SCAN d["scan_command"] = AbrCmd.VERTICAL_LINE_SCAN
d["var_1"] = scan_exp_time d["var_1"] = scan_range_y / scan_steps_y
d["var_2"] = scan_range_y d["var_2"] = scan_steps_y
d["var_3"] = scan_steps_y d["var_3"] = scan_exp_time
d["var_4"] = 0 d["var_4"] = 0
d["var_5"] = 0 d["var_5"] = 0
d["var_6"] = 0 d["var_6"] = 0
+11 -5
View File
@@ -41,7 +41,7 @@ class SmarGonSignal(Signal):
old_value = self._readback old_value = self._readback
self._timestamp = timestamp self._timestamp = timestamp
self._readback = r[self.addr.upper()] self._readback = r[self.addr.upper()]
self.value = r[self.addr.upper()] self._value = r[self.addr.upper()]
# Notify subscribers # Notify subscribers
self._run_subs( self._run_subs(
@@ -65,8 +65,11 @@ class SmarGonSignal(Signal):
def get(self, *args, **kwargs): def get(self, *args, **kwargs):
r = self.parent._go_n_get(self.write_addr) r = self.parent._go_n_get(self.write_addr)
print(r) # print(r)
self.value = r[self.addr.upper()] if isinstance(r, dict):
self._value = r[self.addr.upper()]
else:
self._value = r
return super().get(*args, **kwargs) return super().get(*args, **kwargs)
@@ -84,8 +87,11 @@ class SmarGonSignalRO(Signal):
def get(self, *args, **kwargs): def get(self, *args, **kwargs):
r = self.parent._go_n_get(self.read_addr) r = self.parent._go_n_get(self.read_addr)
print(r) # print(r)
self.put(r[self.addr.upper()], force=True) if isinstance(r, dict):
self.put(r[self.addr.upper()], force=True)
else:
self.put(r, force=True)
return super().get(*args, **kwargs) return super().get(*args, **kwargs)
+1
View File
@@ -6,3 +6,4 @@ Ophyd devices for the PX III beamline, including the MX specific Aerotech A3200
""" """
from .A3200 import AerotechAbrStage from .A3200 import AerotechAbrStage
from .A3200utils import A3200Axis from .A3200utils import A3200Axis
from .SmarGon import SmarGonAxis