kapillarheizung: state as of 2025-11-26

Comment from Markus:
This needs some redesign. We should not map each
logo parameter to a SECoP module.
I guess that the switch to turn off the heater should be
integrated into the heater modules.

In addition we have to rebase to the wip branch, which would need
a merged version of frappy_psi/logo.py.
This commit is contained in:
2025-11-26 16:14:24 +01:00
parent 6d90f02dd6
commit 14ee1d66e0
2 changed files with 21 additions and 5 deletions

View File

@@ -79,7 +79,7 @@ Mod('Cernox',
'frappy_psi.logo.TempSensor', 'frappy_psi.logo.TempSensor',
'sensor', 'sensor',
io = 'io', io = 'io',
vm_address ="VW14", vm_address ="VW16",
) )
Mod('T_cx', Mod('T_cx',
@@ -107,7 +107,7 @@ Mod('HeaterState',
vm_address_off = "V1246.1", vm_address_off = "V1246.1",
) )
''' '''
"""
Mod('HeaterState', Mod('HeaterState',
'frappy_psi.logo.HeaterParam', 'frappy_psi.logo.HeaterParam',
'heater state', 'heater state',
@@ -121,9 +121,9 @@ Mod('HeaterState_a',
io = 'io', io = 'io',
vm_address = "V0.0", vm_address = "V0.0",
) )
"""
'''
Mod('HeaterState', Mod('HeaterState',
'frappy_psi.logo.ControlHeater', 'frappy_psi.logo.ControlHeater',
'heater state', 'heater state',
@@ -137,7 +137,6 @@ Mod('HeaterState_a',
io = 'io', io = 'io',
vm_address = "V0.0", vm_address = "V0.0",
) )
'''
# currently unused: # currently unused:

View File

@@ -144,7 +144,6 @@ class TempSensor(Snap7Mixin, Readable):
class HeaterParam(Snap7Mixin, Writable): class HeaterParam(Snap7Mixin, Writable):
vm_address = Property('VM address output', datatype= StringType()) vm_address = Property('VM address output', datatype= StringType())
target = Parameter('Heater target', datatype = FloatRange(unit='%')) target = Parameter('Heater target', datatype = FloatRange(unit='%'))
value = Parameter('Heater Param', datatype = FloatRange(unit='%')) value = Parameter('Heater Param', datatype = FloatRange(unit='%'))
@@ -156,3 +155,21 @@ class HeaterParam(Snap7Mixin, Writable):
def read_status(self): def read_status(self):
return IDLE, '' return IDLE, ''
class ControlHeater(Snap7Mixin, Writable):
vm_address = Property('VM address on switch', datatype= StringType())
target = Parameter('Heater state', datatype = BoolType())
value = Parameter('Heater state', datatype = BoolType())
def read_value(self):
return self.get_vm_value(self.vm_address)
def write_target(self, target):
if (target):
return self.set_vm_value(self.vm_address, True)
else:
return self.set_vm_value(self.vm_address, False)
def read_status(self):
return IDLE, ''