added a quick class for the TXS
This commit is contained in:
48
adhoc.py
48
adhoc.py
@ -38,3 +38,51 @@ pbps_und = DeviceZ(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
from types import SimpleNamespace
|
||||||
|
from slic.devices.basedevice import BaseDevice
|
||||||
|
from slic.devices.general.motor import Motor
|
||||||
|
from slic.devices.general.smaract import SmarActAxis
|
||||||
|
from slic.utils.printing import printable_dict
|
||||||
|
|
||||||
|
|
||||||
|
class TXS(BaseDevice):
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.Id = Id = "SAROP11-PTXS128"
|
||||||
|
|
||||||
|
self.x = Motor(Id + ":TRX1")
|
||||||
|
self.y = Motor(Id + ":TRY1")
|
||||||
|
self.z = Motor(Id + ":TRZ1")
|
||||||
|
|
||||||
|
self.bonus = SimpleNamespace(
|
||||||
|
tr_x11 = SmarActAxis(Id + ":TRX11"),
|
||||||
|
rot_y11 = SmarActAxis(Id + ":ROTY11"),
|
||||||
|
rot_x11 = SmarActAxis(Id + ":ROTX11"),
|
||||||
|
rot_x12 = SmarActAxis(Id + ":ROTX12"),
|
||||||
|
rot_x13 = SmarActAxis(Id + ":ROTX13"),
|
||||||
|
tr_x21 = SmarActAxis(Id + ":TRX21"),
|
||||||
|
rot_y21 = SmarActAxis(Id + ":ROTY21"),
|
||||||
|
rot_x21 = SmarActAxis(Id + ":ROTX21"),
|
||||||
|
rot_x22 = SmarActAxis(Id + ":ROTX22"),
|
||||||
|
rot_x23 = SmarActAxis(Id + ":ROTX23")
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
to_print = {}
|
||||||
|
for key, item in self.__dict__.items():
|
||||||
|
if not isinstance(item, Motor):
|
||||||
|
continue
|
||||||
|
to_print[key] = str(item)
|
||||||
|
|
||||||
|
head = "TXS"
|
||||||
|
return printable_dict(to_print, head)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
txs = TXS()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user