frappy_psi.logo: add comLog
+ fix bug in frappy_psi/dilution_statemachine.py
This commit is contained in:
parent
2238c20a37
commit
6aec38d03e
@ -206,7 +206,7 @@ class Dilution(HasStates, Drivable):
|
||||
self.initialize_circulation_valves()
|
||||
return Retry
|
||||
|
||||
@status_code(BUSY, 'remove (wait for turbo shut down)'')
|
||||
@status_code(BUSY, 'remove (wait for turbo shut down)')
|
||||
def remove(self, state):
|
||||
"""Entfernt die Mischung."""
|
||||
|
||||
|
@ -63,11 +63,17 @@ class IO(Communicator):
|
||||
self._init()
|
||||
cmd = cmd.split(maxsplit=1)
|
||||
if len(cmd) == 2:
|
||||
self.comLog('> %s %s', cmd[0], cmd[1])
|
||||
self._plc.write(cmd[0], literal_eval(cmd[1]))
|
||||
self.comLog('< OK')
|
||||
try:
|
||||
return self._plc.read(cmd[0])
|
||||
self.comLog('> %s', cmd[0])
|
||||
reply = self._plc.read(cmd[0])
|
||||
self.comLog('< %s', reply)
|
||||
return reply
|
||||
except Exception as e:
|
||||
if self._plc:
|
||||
self.comLog('? %r', e)
|
||||
self.log.exception('error in plc read')
|
||||
self._plc = None
|
||||
raise
|
||||
@ -127,7 +133,7 @@ class Valve(Snap7Mixin, Drivable):
|
||||
self.set_vm_value(self.vm_address_output, target)
|
||||
self._remaining_tries = 5
|
||||
self.status = BUSY, 'switching'
|
||||
self.setFastPoll(True, 0.001)
|
||||
self.setFastPoll(True, 0.5)
|
||||
|
||||
def read_status(self):
|
||||
self.log.debug('read_status')
|
||||
|
Loading…
x
Reference in New Issue
Block a user