continue with sample transfer

This commit is contained in:
Holler Mirko
2024-11-05 15:06:35 +01:00
committed by wakonig_k
co-authored by wakonig_k
parent 8ba32172ca
commit 3a06ca484b
3 changed files with 426 additions and 580 deletions
File diff suppressed because it is too large Load Diff
@@ -108,6 +108,7 @@ otransy:
readoutPriority: baseline
userParameter:
up_position: -1.2
gripper_sensorvoltagetarget: -2.94
otransz:
description: Transfer Z
deviceClass: csaxs_bec.devices.omny.galil.ogalil_ophyd.OMNYGalilMotor
+27 -4
View File
@@ -30,6 +30,7 @@ class OMNYSampleStorage(Device):
"is_shuttle_slot_used",
"search_shuttle_in_slot",
"show_all",
"help",
]
SUB_VALUE = "value"
_default_sub = SUB_VALUE
@@ -137,20 +138,28 @@ class OMNYSampleStorage(Device):
elif container == "C":
getattr(self.sample_shuttle_C_placed, f"sample{slot_nr}").set(1)
getattr(self.sample_shuttle_C_names, f"sample{slot_nr}").set(name)
elif container == "O":
getattr(self.sample_placed, f"sample{slot_nr}").set(1)
getattr(self.sample_names, f"sample{slot_nr}").set(name)
def unset_sample_slot(self, shuttle: str, slot_nr: int) -> bool:
def unset_sample_slot(self, container: str, slot_nr: int) -> bool:
if slot_nr > 20:
raise OMNYSampleStorageError(f"Invalid slot number {slot_nr}.")
if shuttle == "A":
if container == "A":
getattr(self.sample_shuttle_A_placed, f"sample{slot_nr}").set(0)
getattr(self.sample_shuttle_A_names, f"sample{slot_nr}").set("-")
if shuttle == "B":
elif container == "B":
getattr(self.sample_shuttle_B_placed, f"sample{slot_nr}").set(0)
getattr(self.sample_shuttle_B_names, f"sample{slot_nr}").set("-")
if shuttle == "C":
elif container == "C":
getattr(self.sample_shuttle_C_placed, f"sample{slot_nr}").set(0)
getattr(self.sample_shuttle_C_names, f"sample{slot_nr}").set("-")
elif container == "O":
getattr(self.sample_placed, f"sample{slot_nr}").set(0)
getattr(self.sample_names, f"sample{slot_nr}").set("-")
def set_shuttle_slot(self, container: str, slot_nr: int) -> bool:
if slot_nr > 6:
@@ -280,3 +289,17 @@ class OMNYSampleStorage(Device):
row.extend(["free"])
t.add_row(row)
print(t)
print("Use dev.omny_samples.help() for assistance.")
def help(self):
print("Help for OMNY sample storage:")
print(" To get an overview use dev.omny_samples.show_all()")
print(" Modify a slot:")
print(" dev.omny_samples.unset_sample_slot('system',position)")
print(" dev.omny_samples.set_sample_slot('system',position,'name')")
print(" system in A, B, C, O")
print(" set_sample_in_gripper('name') / unset_sample_in_gripper()")
print(" set_sample_in_samplestage('name'), unset_sample_in_samplestage()")
print(" set_shuttle_slot(container, slot_nr) / unset_shuttle_slot(slot_nr)")
print(" dev.omny_samples.set_shuttle_slot('A',2)")