frappy_psi.motorvalve: move doc string to class

- this will allow to add other classes if needed

Change-Id: I452c2be19456829796d899891719f5659fac2ba9
This commit is contained in:
zolliker 2024-09-23 15:05:54 +02:00
parent 7fdb2e7e2f
commit abfb8afdc5

View File

@ -19,28 +19,6 @@
# #
# ***************************************************************************** # *****************************************************************************
"""motor valve using a trinamic PD-1161 motor
the valve has an end switch connected to the 'home' digital input
of the motor controller. Motor settings for the currently used valve:
[valve_motor]
description = valve motor
class = frappy_psi.trinamic.Motor
maxcurrent=0.3 # a value corresponding to the torque needed to firmly close the valve.
move_limit=9999 # no move limit needed
acceleration=150
encoder_tolerance=3.6 # typical value
auto_reset=True # motor stalls on closing
[valve]
description = trinamic angular motor valve
class = frappy_psi.motorvalve.MotorValve
motor = valve_motor
turns = 9 # number of turns needed to open fully
speed = 400 # close to max. speed
lowspeed = 50 # speed for final closing / reference run
"""
from frappy.core import Drivable, Parameter, EnumType, Attached, FloatRange, \ from frappy.core import Drivable, Parameter, EnumType, Attached, FloatRange, \
Command, IDLE, BUSY, WARN, ERROR, PersistentParam, PersistentMixin Command, IDLE, BUSY, WARN, ERROR, PersistentParam, PersistentMixin
@ -50,6 +28,28 @@ from frappy.lib.statemachine import StateMachine, Retry, Stop
class MotorValve(PersistentMixin, Drivable): class MotorValve(PersistentMixin, Drivable):
"""motor valve using a trinamic PD-1161 motor
the valve has an end switch connected to the 'home' digital input
of the motor controller. Motor settings for the currently used valve:
[valve_motor]
description = valve motor
class = frappy_psi.trinamic.Motor
maxcurrent=0.3 # a value corresponding to the torque needed to firmly close the valve.
move_limit=9999 # no move limit needed
acceleration=150
encoder_tolerance=3.6 # typical value
auto_reset=True # motor stalls on closing
[valve]
description = trinamic angular motor valve
class = frappy_psi.motorvalve.MotorValve
motor = valve_motor
turns = 9 # number of turns needed to open fully
speed = 400 # close to max. speed
lowspeed = 50 # speed for final closing / reference run
"""
motor = Attached(Motor) motor = Attached(Motor)
value = Parameter('current state', EnumType( value = Parameter('current state', EnumType(
closed=0, opened=1, undefined=-1), default=-1, update_unchanged='never') closed=0, opened=1, undefined=-1), default=-1, update_unchanged='never')