From 95cefd12d7e928b9c4db06f0b37d00c6fc1a4e92 Mon Sep 17 00:00:00 2001 From: Jakub Vonka Date: Mon, 3 Oct 2022 22:28:12 +0200 Subject: [PATCH] move() added --- attocube.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/attocube.py b/attocube.py index 7700856..f868799 100644 --- a/attocube.py +++ b/attocube.py @@ -85,9 +85,8 @@ class AttocubeAxis(Adjustable): frequency = PV(ID + "-FREQ_SET"), frequency_rb = PV(ID + "-FREQ_RB"), moving_status = PV(ID + "-MOVING"), - hlm = PV(ID + ":HLM"), - llm = PV(ID + ":LLM"), - set_pos = PV(ID + ":SET_POS"), + hlm = PV(ID + ":HLM"), # not implemented yet, but hopefully will be added later + llm = PV(ID + ":LLM"), # not implemented yet, but hopefully will be added later stop = PV(ID + "-STOP_AUTO_CMD"), move = PV(ID + "-MV_ABS_SET"), stop_auto_cmd = PV(ID + "-STOP_AUTO_CMD"), @@ -96,7 +95,6 @@ class AttocubeAxis(Adjustable): target_reached = PV(ID + "-TARGET_REACHED_RB"), target_ground = PV(ID + "-TARGET_GND_SET"), output_enabled = PV(ID + "-ENABLE_SET"), - twv = PV(ID + ":TWV"), units = PV(ID + "-UNIT"), output_RB = PV(ID + "-ENABLE_RB"), ) @@ -356,6 +354,11 @@ class AttocubeAxis(Adjustable): return UNKNOWN_ERROR + def move(self, val, relative=False, wait=True): + ''''Same as set target value, just for convenience''' + return self.set_target_value(val, relative=relative, wait=wait) + + def gui(self): device, motor = self.ID.split(":") cmd = f'caqtdm -macro "DEVICE={device}" S_ANC350.ui'