def unload(self, sample): self.prepare_load(wait=True) self.enable_power() try: SampleChanger.unload(self, sample) finally: for msg in self.get_robot_exceptions(): logging.getLogger("HWR").error(msg)
def init(self): """ Descript. : """ cmd_get_config = self.get_channel_object("GetPlateConfig", optional=True) if cmd_get_config: try: ( self.num_rows, self.num_cols, self.num_drops, ) = cmd_get_config.get_value() except Exception: pass else: self.num_cols = self.get_property("numCols") self.num_rows = self.get_property("numRows") self.num_drops = self.get_property("numDrops") self.reference_pos_x = self.get_property("referencePosX") if not self.reference_pos_x: self.reference_pos_x = 0.5 self.stored_pos_x = self.reference_pos_x self.stored_pos_y = 0.5 self.crims_url = self.get_property("crimsWsRoot") self.cmd_move_to_drop = self.get_command_object("MoveToDrop") if not self.cmd_move_to_drop: self.cmd_move_to_location = self.get_command_object( "startMovePlateToLocation") self._init_sc_contents() self.chan_current_phase = self.get_channel_object("CurrentPhase") self.chan_plate_location = self.get_channel_object("PlateLocation") if self.chan_plate_location is not None: self.chan_plate_location.connect_signal( "update", self.plate_location_changed) self.plate_location_changed(self.chan_plate_location.get_value()) self.chan_state = self.get_channel_object("State") if self.chan_state is not None: self.chan_state.connect_signal("update", self.state_changed) SampleChanger.init(self)
def load(self, sample): self.prepare_load(wait=True) self.enable_power() try: res = SampleChanger.load(self, sample) finally: for msg in self.get_robot_exceptions(): logging.getLogger("HWR").error(msg) if res: self.prepare_centring() return res
def init(self): sc3_pucks = self.get_property("sc3_pucks", True) for i in range(8): cell = Cell(self, i + 1, sc3_pucks) self._add_component(cell) self.robot = self.get_property("tango_device") if self.robot: self.robot = DeviceProxy(self.robot) self.exporter_addr = self.get_property("exporter_address") if self.exporter_addr: self.swstate_attr = self.add_channel( { "type": "exporter", "exporter_address": self.exporter_addr, "name": "swstate", }, "State", ) self.controller = self.get_object_by_role("controller") self.prepareLoad = self.get_command_object("moveToLoadingPosition") self.timeout = 3 self.gripper_types = { -1: "No Gripper", 1: "UNIPUCK", 2: "MINISPINE", 3: "FLIPPING", 4: "UNIPUCK_DOUBLE", 5: "PLATE", } SampleChanger.init(self) # self._set_state(SampleChangerState.Disabled) self._update_selection() self.state = self._read_state()