first test of transfer functions (setting and getting samples, without hw, just epics level)

This commit is contained in:
Holler Mirko
2024-07-17 15:23:54 +02:00
committed by wakonig_k
parent 347c63d500
commit 143c4dbd65
4 changed files with 15 additions and 13 deletions

View File

@@ -460,7 +460,7 @@ class OMNY(
self.corr_pos_y_2 = []
self.corr_angle_y_2 = []
self.progress = {}
self.align = XrayEyeAlign(self.client, self)
#self.align = XrayEyeAlign(self.client, self)
def start_x_ray_eye_alignment(self):
user_input = input(

View File

@@ -650,7 +650,7 @@ class OMNYSampleTransferMixin:
def otransfer_put_sample(self, pin_position:int):
self._otransfer_check_sensor_connected()
if not self._otransfer_check_free_slot_available_at_position(pin_position,0):
raise OMNYTransferError(f"position {position} is not free")
raise OMNYTransferError(f"position {pin_position} is not free")
# global _ogalil_encoder_steps_per_mm
if pin_position==0:
@@ -658,7 +658,7 @@ class OMNYSampleTransferMixin:
else:
self._omnycam_parking()
_ogalil_encoder_steps_per_mm = 51200
_ogalil_encoder_steps_per_mm = dev.oparkz.get().motor_resolution
self._otransfer_gripper_to_park_z()
_otransy_approach_height = self._otransfer_move_gripper_to_pin_pos(pin_position)
@@ -745,7 +745,7 @@ class OMNYSampleTransferMixin:
self._otransfer_controller_enable_mount_mode()
_ogalil_encoder_steps_per_mm = 51200
_ogalil_encoder_steps_per_mm = dev.oparkz.get().motor_resolution
dev.otransy.controller.socket_put_confirmed(f"getaprch={_otransy_approach_height*_ogalil_encoder_steps_per_mm:.0f}")
input("Ready. Press Enter to start the mount process now...")
@@ -1166,7 +1166,7 @@ class OMNYSampleTransferMixin:
#is there free position available?
if not dev.omny_samples.is_sample_slot_used(installedshuttle,_osampleposition):
if _put_it:
samplename = dev.omny_samples.get_sample_in_gripper()
samplename = dev.omny_samples.get_sample_name_in_gripper()
dev.omny_samples.unset_sample_in_gripper()
dev.omny_samples.set_sample_slot(installedshuttle, _osampleposition, samplename)
return True
@@ -1275,8 +1275,8 @@ class OMNYSampleTransferMixin:
def otransfer_help(self):
print("omny.transfer.otransfer_park_slot(slot) drive the parking station to transfer from <slot> with the gripper\n")
print("omny.transfer.otransfer_park_loadlock_slot(slot) drive the parking station to transfer from <slot> with the loadlock\n")
print("omny.transfer.otransfer_park_slot(slot) drive the parking station to transfer from <slot> with the gripper")
print("omny.transfer.otransfer_park_loadlock_slot(slot) drive the parking station to transfer from <slot> with the loadlock")
print("omny.transfer.otransfer_get_sample(position) pick with the gripper from <position>")
print("omny.transfer.otransfer_put_sample(position) put with the gripper to <position>")
print("To modify the storage information see dev.omny_samples.help()")

View File

@@ -197,7 +197,7 @@ class OMNYGalilController(GalilController):
class OMNYGalilMotor(Device, PositionerBase):
USER_ACCESS = ["controller", "find_reference", "drive_axis_to_limit", "_ogalil_folerr_reset_and_ignore", "ogalil_set_axis_to_pos_wo_reference_search", "get_motor_limit_switch"]
USER_ACCESS = ["controller", "find_reference", "drive_axis_to_limit", "_ogalil_folerr_reset_and_ignore", "_ogalil_set_axis_to_pos_wo_reference_search", "get_motor_limit_switch"]
readback = Cpt(OMNYGalilReadbackSignal, signal_name="readback", kind="hinted")
user_setpoint = Cpt(GalilSetpointSignal, signal_name="setpoint")
motor_resolution = Cpt(GalilMotorResolution, signal_name="resolution", kind="config")

View File

@@ -285,7 +285,8 @@ class OMNYSampleStorage(Device):
row = []
row.extend([f"Position {i:3d}"])
if self.is_sample_slot_used("O", i):
row.extend(self.get_sample_name("O", i))
name = self.get_sample_name("O", i)
row.extend([name])
else:
row.extend(["free"])
t.add_row(row)
@@ -299,8 +300,9 @@ class OMNYSampleStorage(Device):
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(" system can be A, B, C, O")
print(" dev.omny_samples.set_sample_in_gripper('name') / unset_sample_in_gripper()")
print(" dev.omny_samples.set_sample_in_samplestage('name'), unset_sample_in_samplestage()")
print(" dev.omny_samples.set_shuttle_slot(container, slot_nr) / unset_shuttle_slot(slot_nr)")
print(" dev.omny_samples.set_shuttle_slot('A',2)")
print(" omny.otransfer_help()")