fixed hexapod PI to not move simultaneously in virtual stages
This commit is contained in:
@@ -43,6 +43,7 @@ class HexapodPI:
|
||||
lambda x:self._calc_xyzraw(x,self.y.get_current_value(),self.z.get_current_value()),
|
||||
reset_current_value_to=False,
|
||||
append_aliases=False,
|
||||
change_simultaneously=False,
|
||||
name='x',
|
||||
)
|
||||
self.y = AdjustableVirtual(
|
||||
@@ -50,6 +51,7 @@ class HexapodPI:
|
||||
lambda xraw,yraw,zraw: self._calc_xyz(xraw,yraw,zraw)[1],
|
||||
lambda y:self._calc_xyzraw(self.x.get_current_value(),y,self.z.get_current_value()),
|
||||
reset_current_value_to=False,
|
||||
change_simultaneously=False,
|
||||
append_aliases=False,
|
||||
name='y',
|
||||
)
|
||||
@@ -59,6 +61,7 @@ class HexapodPI:
|
||||
lambda z: self._calc_xyzraw(self.x.get_current_value(),self.y.get_current_value(),z),
|
||||
reset_current_value_to=False,
|
||||
append_aliases=False,
|
||||
change_simultaneously=False,
|
||||
name='z',
|
||||
)
|
||||
@property
|
||||
|
||||
@@ -2,9 +2,11 @@ import sys
|
||||
|
||||
sys.path.append("..")
|
||||
from ..devices_general.motors import MotorRecord
|
||||
from ..devices_general.adjustable import PvRecord
|
||||
|
||||
from epics import PV
|
||||
from ..aliases import Alias
|
||||
from ..aliases import Alias,append_object_to_object
|
||||
import datetime
|
||||
|
||||
|
||||
def addMotorRecordToSelf(self, name=None, Id=None):
|
||||
@@ -25,9 +27,25 @@ class OffsetMirror:
|
||||
addMotorRecordToSelf(self, Id=Id + ":W_Y", name="y")
|
||||
addMotorRecordToSelf(self, Id=Id + ":W_RX", name="rx")
|
||||
addMotorRecordToSelf(self, Id=Id + ":W_RZ", name="rz")
|
||||
append_object_to_object(self,PvRecord,Id+":CURV_SP", pvreadbackname=Id+":CURV", accuracy=None, name="curvature", elog=None )
|
||||
append_object_to_object(self,PvRecord,Id+":ASYMMETRY_SP", pvreadbackname=Id+":ASYMMETRY", accuracy=None, name="asymmetry", elog=None)
|
||||
|
||||
|
||||
def out(self):
|
||||
pass
|
||||
|
||||
def move_in(self):
|
||||
pass
|
||||
|
||||
def get_status(self):
|
||||
s = f'Offset mirror {self.alias.get_full_name()} status ({datetime.datetime.now().strftime("%Y/%m/%d %H:%M:%S")})\n'
|
||||
for var in ['x','y','rx', 'rz', 'curvature', 'asymmetry']:
|
||||
s+=(' '*4+var.ljust(16)+f'{self.__dict__[var].get_current_value():g}\n')
|
||||
return s
|
||||
|
||||
def __str__(self):
|
||||
return self.get_status()
|
||||
|
||||
def __repr__(self):
|
||||
return self.__str__()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user