Added documentation

Change-Id: Id6e26a4c28fe080a55099cd54d0fa85c15946657
This commit is contained in:
Oksana Shliakhtun
2024-08-19 17:21:40 +02:00
committed by Markus Zolliker
parent c1403763f4
commit f0eb7d95f1
3 changed files with 84 additions and 2 deletions

View File

@ -16,7 +16,7 @@
# Module authors:
# Oksana Shliakhtun <oksana.shliakhtun@psi.ch>
# *****************************************************************************
"""Temperature Controller TC1 Quantum NorthWest"""
from frappy.core import Readable, Parameter, FloatRange, IDLE, ERROR, BoolType,\
StringIO, HasIO, Property, WARN, Drivable, BUSY, StringType, Done
@ -35,6 +35,13 @@ class SensorTC1(HasIO, Readable):
channel = Property('channel name', StringType())
def set_param(self, adr, value=None):
"""
Set parameter.
Every command starts with "[F1", and the end of line is "]".
:param adr: second part of the command
:param value: value to set
:return: value converted to float
"""
short = adr.split()[0]
# try 3 times in case we got an asynchronous message
for _ in range(3):
@ -80,6 +87,16 @@ class TemperatureLoopTC1(SensorTC1, Drivable):
return self.get_param('MT')
def read_status(self):
"""
the device returns 4 symbols according to the current status. These symbols are:
”0” or “1” - number of unreported errors
”+” or “-” - stirrer is on/off
”+” or ”-” - temperature control is on/off
”S” or “C” - current sample holder tempeerature is stable/changing
There could be the fifth status symbol:
”+” or “-” or “W” - rampping is on/off/waiting
:return: status messages
"""
status = super().read_status()
if status[0] == ERROR:
return status