Commit 80df8968 authored by blissadm_ID31@bibhelm's avatar blissadm_ID31@bibhelm Committed by Matias Guijarro

icepap: fixed homing of LinkedAxis

parent 7392eb45
Pipeline #6923 passed with stages
in 19 minutes and 49 seconds
......@@ -5,8 +5,15 @@
# Copyright (c) 2017 Beamline Control Unit, ESRF
# Distributed under the GNU LGPLv3. See LICENSE for more info.
from bliss.common.axis import Axis, NoSettingsAxis, DEFAULT_POLLING_TIME, lazy_init
from bliss.common.axis import (
Axis,
NoSettingsAxis,
DEFAULT_POLLING_TIME,
lazy_init,
Motion,
)
from . import _ackcommand, _command
import gevent
class LinkedAxis(Axis):
......@@ -133,15 +140,20 @@ class LinkedAxis(Axis):
# create motion object for hooks
motion = Motion(self, switch, None, "homing")
self.__execute_pre_move_hook(motion)
self._Axis__execute_pre_move_hook(motion)
def start_one(controller, motions):
cnx = controller._cnx
cmd = "HOME STRICT %s %s" % (
motions[0].axis.address,
("+1" if motions[0].target_pos > 0 else "-1"),
home_dir = "+1" if motions[0].target_pos > 0 else "-1"
cmd = "#HOME STRICT %s" % " ".join(
(str(rm.address) + " " + home_dir for rm in self.real_axes)
)
_command(
cnx,
cmd,
pre_cmd="#DISPROT ALL %s ; "
% " ".join((str(rm.address) for rm in self.real_axes)),
)
_ackcommand(cnx, cmd)
# IcePAP status is not immediately MOVING after home search command is sent
gevent.sleep(0.2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment