mirror of
https://github.com/naruxde/revpimodio2.git
synced 2025-12-28 18:08:02 +01:00
Fehler bei Devicesuche über Namen oder Position in setdefaultvalues,
syncoutputs, writeprocimg cycletools: ton, tof, tp auch ohne c nutzbar mit Angabe in Millisekunden
This commit is contained in:
@@ -82,21 +82,39 @@ Methods</h3>
|
|||||||
<td><a style="color:#0000FF" href="#Cycletools._docycle">_docycle</a></td>
|
<td><a style="color:#0000FF" href="#Cycletools._docycle">_docycle</a></td>
|
||||||
<td>Zyklusarbeiten.</td>
|
<td>Zyklusarbeiten.</td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
|
<td><a style="color:#0000FF" href="#Cycletools.get_tof">get_tof</a></td>
|
||||||
|
<td>Wert der Ausschaltverzoegerung.</td>
|
||||||
|
</tr><tr>
|
||||||
<td><a style="color:#0000FF" href="#Cycletools.get_tofc">get_tofc</a></td>
|
<td><a style="color:#0000FF" href="#Cycletools.get_tofc">get_tofc</a></td>
|
||||||
<td>Wert der Ausschaltverzoegerung.</td>
|
<td>Wert der Ausschaltverzoegerung.</td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
|
<td><a style="color:#0000FF" href="#Cycletools.get_ton">get_ton</a></td>
|
||||||
|
<td>Einschaltverzoegerung.</td>
|
||||||
|
</tr><tr>
|
||||||
<td><a style="color:#0000FF" href="#Cycletools.get_tonc">get_tonc</a></td>
|
<td><a style="color:#0000FF" href="#Cycletools.get_tonc">get_tonc</a></td>
|
||||||
<td>Einschaltverzoegerung.</td>
|
<td>Einschaltverzoegerung.</td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
|
<td><a style="color:#0000FF" href="#Cycletools.get_tp">get_tp</a></td>
|
||||||
|
<td>Impulstimer.</td>
|
||||||
|
</tr><tr>
|
||||||
<td><a style="color:#0000FF" href="#Cycletools.get_tpc">get_tpc</a></td>
|
<td><a style="color:#0000FF" href="#Cycletools.get_tpc">get_tpc</a></td>
|
||||||
<td>Impulstimer.</td>
|
<td>Impulstimer.</td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
|
<td><a style="color:#0000FF" href="#Cycletools.set_tof">set_tof</a></td>
|
||||||
|
<td>Startet bei Aufruf einen ausschaltverzoegerten Timer.</td>
|
||||||
|
</tr><tr>
|
||||||
<td><a style="color:#0000FF" href="#Cycletools.set_tofc">set_tofc</a></td>
|
<td><a style="color:#0000FF" href="#Cycletools.set_tofc">set_tofc</a></td>
|
||||||
<td>Startet bei Aufruf einen ausschaltverzoegerten Timer.</td>
|
<td>Startet bei Aufruf einen ausschaltverzoegerten Timer.</td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
|
<td><a style="color:#0000FF" href="#Cycletools.set_ton">set_ton</a></td>
|
||||||
|
<td>Startet einen einschaltverzoegerten Timer.</td>
|
||||||
|
</tr><tr>
|
||||||
<td><a style="color:#0000FF" href="#Cycletools.set_tonc">set_tonc</a></td>
|
<td><a style="color:#0000FF" href="#Cycletools.set_tonc">set_tonc</a></td>
|
||||||
<td>Startet einen einschaltverzoegerten Timer.</td>
|
<td>Startet einen einschaltverzoegerten Timer.</td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
|
<td><a style="color:#0000FF" href="#Cycletools.set_tp">set_tp</a></td>
|
||||||
|
<td>Startet einen Impuls Timer.</td>
|
||||||
|
</tr><tr>
|
||||||
<td><a style="color:#0000FF" href="#Cycletools.set_tpc">set_tpc</a></td>
|
<td><a style="color:#0000FF" href="#Cycletools.set_tpc">set_tpc</a></td>
|
||||||
<td>Startet einen Impuls Timer.</td>
|
<td>Startet einen Impuls Timer.</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -109,7 +127,7 @@ Static Methods</h3>
|
|||||||
<a NAME="Cycletools.__init__" ID="Cycletools.__init__"></a>
|
<a NAME="Cycletools.__init__" ID="Cycletools.__init__"></a>
|
||||||
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
||||||
Cycletools (Constructor)</h3>
|
Cycletools (Constructor)</h3>
|
||||||
<b>Cycletools</b>(<i></i>)
|
<b>Cycletools</b>(<i>cycletime</i>)
|
||||||
<p>
|
<p>
|
||||||
Init Cycletools class.
|
Init Cycletools class.
|
||||||
</p><a NAME="Cycletools._docycle" ID="Cycletools._docycle"></a>
|
</p><a NAME="Cycletools._docycle" ID="Cycletools._docycle"></a>
|
||||||
@@ -118,7 +136,23 @@ Cycletools._docycle</h3>
|
|||||||
<b>_docycle</b>(<i></i>)
|
<b>_docycle</b>(<i></i>)
|
||||||
<p>
|
<p>
|
||||||
Zyklusarbeiten.
|
Zyklusarbeiten.
|
||||||
</p><a NAME="Cycletools.get_tofc" ID="Cycletools.get_tofc"></a>
|
</p><a NAME="Cycletools.get_tof" ID="Cycletools.get_tof"></a>
|
||||||
|
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
||||||
|
Cycletools.get_tof</h3>
|
||||||
|
<b>get_tof</b>(<i>name</i>)
|
||||||
|
<p>
|
||||||
|
Wert der Ausschaltverzoegerung.
|
||||||
|
</p><dl>
|
||||||
|
<dt><i>name</i></dt>
|
||||||
|
<dd>
|
||||||
|
Eindeutiger Name des Timers
|
||||||
|
</dd>
|
||||||
|
</dl><dl>
|
||||||
|
<dt>Returns:</dt>
|
||||||
|
<dd>
|
||||||
|
Wert <class 'bool'> der Ausschaltverzoegerung
|
||||||
|
</dd>
|
||||||
|
</dl><a NAME="Cycletools.get_tofc" ID="Cycletools.get_tofc"></a>
|
||||||
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
||||||
Cycletools.get_tofc</h3>
|
Cycletools.get_tofc</h3>
|
||||||
<b>get_tofc</b>(<i>name</i>)
|
<b>get_tofc</b>(<i>name</i>)
|
||||||
@@ -132,7 +166,23 @@ Eindeutiger Name des Timers
|
|||||||
</dl><dl>
|
</dl><dl>
|
||||||
<dt>Returns:</dt>
|
<dt>Returns:</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Wert der Ausschaltverzoegerung
|
Wert <class 'bool'> der Ausschaltverzoegerung
|
||||||
|
</dd>
|
||||||
|
</dl><a NAME="Cycletools.get_ton" ID="Cycletools.get_ton"></a>
|
||||||
|
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
||||||
|
Cycletools.get_ton</h3>
|
||||||
|
<b>get_ton</b>(<i>name</i>)
|
||||||
|
<p>
|
||||||
|
Einschaltverzoegerung.
|
||||||
|
</p><dl>
|
||||||
|
<dt><i>name</i></dt>
|
||||||
|
<dd>
|
||||||
|
Eindeutiger Name des Timers
|
||||||
|
</dd>
|
||||||
|
</dl><dl>
|
||||||
|
<dt>Returns:</dt>
|
||||||
|
<dd>
|
||||||
|
Wert <class 'bool'> der Einschaltverzoegerung
|
||||||
</dd>
|
</dd>
|
||||||
</dl><a NAME="Cycletools.get_tonc" ID="Cycletools.get_tonc"></a>
|
</dl><a NAME="Cycletools.get_tonc" ID="Cycletools.get_tonc"></a>
|
||||||
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
||||||
@@ -148,7 +198,23 @@ Eindeutiger Name des Timers
|
|||||||
</dl><dl>
|
</dl><dl>
|
||||||
<dt>Returns:</dt>
|
<dt>Returns:</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Wert der Einschaltverzoegerung
|
Wert <class 'bool'> der Einschaltverzoegerung
|
||||||
|
</dd>
|
||||||
|
</dl><a NAME="Cycletools.get_tp" ID="Cycletools.get_tp"></a>
|
||||||
|
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
||||||
|
Cycletools.get_tp</h3>
|
||||||
|
<b>get_tp</b>(<i>name</i>)
|
||||||
|
<p>
|
||||||
|
Impulstimer.
|
||||||
|
</p><dl>
|
||||||
|
<dt><i>name</i></dt>
|
||||||
|
<dd>
|
||||||
|
Eindeutiger Name des Timers
|
||||||
|
</dd>
|
||||||
|
</dl><dl>
|
||||||
|
<dt>Returns:</dt>
|
||||||
|
<dd>
|
||||||
|
Wert <class 'bool'> des Impulses
|
||||||
</dd>
|
</dd>
|
||||||
</dl><a NAME="Cycletools.get_tpc" ID="Cycletools.get_tpc"></a>
|
</dl><a NAME="Cycletools.get_tpc" ID="Cycletools.get_tpc"></a>
|
||||||
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
||||||
@@ -164,7 +230,21 @@ Eindeutiger Name des Timers
|
|||||||
</dl><dl>
|
</dl><dl>
|
||||||
<dt>Returns:</dt>
|
<dt>Returns:</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Wert der des Impulses
|
Wert <class 'bool'> des Impulses
|
||||||
|
</dd>
|
||||||
|
</dl><a NAME="Cycletools.set_tof" ID="Cycletools.set_tof"></a>
|
||||||
|
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
||||||
|
Cycletools.set_tof</h3>
|
||||||
|
<b>set_tof</b>(<i>name, milliseconds</i>)
|
||||||
|
<p>
|
||||||
|
Startet bei Aufruf einen ausschaltverzoegerten Timer.
|
||||||
|
</p><dl>
|
||||||
|
<dt><i>name</i></dt>
|
||||||
|
<dd>
|
||||||
|
Eindeutiger Name fuer Zugriff auf Timer
|
||||||
|
</dd><dt><i>milliseconds</i></dt>
|
||||||
|
<dd>
|
||||||
|
Verzoegerung in Millisekunden
|
||||||
</dd>
|
</dd>
|
||||||
</dl><a NAME="Cycletools.set_tofc" ID="Cycletools.set_tofc"></a>
|
</dl><a NAME="Cycletools.set_tofc" ID="Cycletools.set_tofc"></a>
|
||||||
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
||||||
@@ -180,6 +260,20 @@ Eindeutiger Name fuer Zugriff auf Timer
|
|||||||
<dd>
|
<dd>
|
||||||
Zyklusanzahl, der Verzoegerung wenn nicht neu gestartet
|
Zyklusanzahl, der Verzoegerung wenn nicht neu gestartet
|
||||||
</dd>
|
</dd>
|
||||||
|
</dl><a NAME="Cycletools.set_ton" ID="Cycletools.set_ton"></a>
|
||||||
|
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
||||||
|
Cycletools.set_ton</h3>
|
||||||
|
<b>set_ton</b>(<i>name, milliseconds</i>)
|
||||||
|
<p>
|
||||||
|
Startet einen einschaltverzoegerten Timer.
|
||||||
|
</p><dl>
|
||||||
|
<dt><i>name</i></dt>
|
||||||
|
<dd>
|
||||||
|
Eindeutiger Name fuer Zugriff auf Timer
|
||||||
|
</dd><dt><i>milliseconds</i></dt>
|
||||||
|
<dd>
|
||||||
|
Millisekunden, der Verzoegerung wenn neu gestartet
|
||||||
|
</dd>
|
||||||
</dl><a NAME="Cycletools.set_tonc" ID="Cycletools.set_tonc"></a>
|
</dl><a NAME="Cycletools.set_tonc" ID="Cycletools.set_tonc"></a>
|
||||||
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
||||||
Cycletools.set_tonc</h3>
|
Cycletools.set_tonc</h3>
|
||||||
@@ -194,6 +288,20 @@ Eindeutiger Name fuer Zugriff auf Timer
|
|||||||
<dd>
|
<dd>
|
||||||
Zyklusanzahl, der Verzoegerung wenn neu gestartet
|
Zyklusanzahl, der Verzoegerung wenn neu gestartet
|
||||||
</dd>
|
</dd>
|
||||||
|
</dl><a NAME="Cycletools.set_tp" ID="Cycletools.set_tp"></a>
|
||||||
|
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
||||||
|
Cycletools.set_tp</h3>
|
||||||
|
<b>set_tp</b>(<i>name, milliseconds</i>)
|
||||||
|
<p>
|
||||||
|
Startet einen Impuls Timer.
|
||||||
|
</p><dl>
|
||||||
|
<dt><i>name</i></dt>
|
||||||
|
<dd>
|
||||||
|
Eindeutiger Name fuer Zugriff auf Timer
|
||||||
|
</dd><dt><i>milliseconds</i></dt>
|
||||||
|
<dd>
|
||||||
|
Millisekunden, die der Impuls anstehen soll
|
||||||
|
</dd>
|
||||||
</dl><a NAME="Cycletools.set_tpc" ID="Cycletools.set_tpc"></a>
|
</dl><a NAME="Cycletools.set_tpc" ID="Cycletools.set_tpc"></a>
|
||||||
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
<h3 style="background-color:#FFFFFF;color:#FF0000">
|
||||||
Cycletools.set_tpc</h3>
|
Cycletools.set_tpc</h3>
|
||||||
|
|||||||
@@ -51,13 +51,19 @@ revpimodio2.device.Gateway.get_rawbytes?4()
|
|||||||
revpimodio2.device.Gateway?1(parent, dict_device, simulator=False)
|
revpimodio2.device.Gateway?1(parent, dict_device, simulator=False)
|
||||||
revpimodio2.device.Virtual.writeinputdefaults?4()
|
revpimodio2.device.Virtual.writeinputdefaults?4()
|
||||||
revpimodio2.helper.Cycletools._docycle?5()
|
revpimodio2.helper.Cycletools._docycle?5()
|
||||||
|
revpimodio2.helper.Cycletools.get_tof?4(name)
|
||||||
revpimodio2.helper.Cycletools.get_tofc?4(name)
|
revpimodio2.helper.Cycletools.get_tofc?4(name)
|
||||||
|
revpimodio2.helper.Cycletools.get_ton?4(name)
|
||||||
revpimodio2.helper.Cycletools.get_tonc?4(name)
|
revpimodio2.helper.Cycletools.get_tonc?4(name)
|
||||||
|
revpimodio2.helper.Cycletools.get_tp?4(name)
|
||||||
revpimodio2.helper.Cycletools.get_tpc?4(name)
|
revpimodio2.helper.Cycletools.get_tpc?4(name)
|
||||||
|
revpimodio2.helper.Cycletools.set_tof?4(name, milliseconds)
|
||||||
revpimodio2.helper.Cycletools.set_tofc?4(name, cycles)
|
revpimodio2.helper.Cycletools.set_tofc?4(name, cycles)
|
||||||
|
revpimodio2.helper.Cycletools.set_ton?4(name, milliseconds)
|
||||||
revpimodio2.helper.Cycletools.set_tonc?4(name, cycles)
|
revpimodio2.helper.Cycletools.set_tonc?4(name, cycles)
|
||||||
|
revpimodio2.helper.Cycletools.set_tp?4(name, milliseconds)
|
||||||
revpimodio2.helper.Cycletools.set_tpc?4(name, cycles)
|
revpimodio2.helper.Cycletools.set_tpc?4(name, cycles)
|
||||||
revpimodio2.helper.Cycletools?1()
|
revpimodio2.helper.Cycletools?1(cycletime)
|
||||||
revpimodio2.helper.EventCallback.run?4()
|
revpimodio2.helper.EventCallback.run?4()
|
||||||
revpimodio2.helper.EventCallback.stop?4()
|
revpimodio2.helper.EventCallback.stop?4()
|
||||||
revpimodio2.helper.EventCallback?1(func, name, value)
|
revpimodio2.helper.EventCallback?1(func, name, value)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#
|
#
|
||||||
"""RevPiModIO Helperklassen und Tools."""
|
"""RevPiModIO Helperklassen und Tools."""
|
||||||
import warnings
|
import warnings
|
||||||
|
from math import ceil
|
||||||
from threading import Event, Lock, Thread
|
from threading import Event, Lock, Thread
|
||||||
from timeit import default_timer
|
from timeit import default_timer
|
||||||
|
|
||||||
@@ -84,9 +85,10 @@ class Cycletools():
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self, cycletime):
|
||||||
"""Init Cycletools class."""
|
"""Init Cycletools class."""
|
||||||
self.__cycle = 0
|
self.__cycle = 0
|
||||||
|
self.__cycletime = cycletime
|
||||||
self.__ucycle = 0
|
self.__ucycle = 0
|
||||||
self.__dict_ton = {}
|
self.__dict_ton = {}
|
||||||
self.__dict_tof = {}
|
self.__dict_tof = {}
|
||||||
@@ -160,12 +162,27 @@ class Cycletools():
|
|||||||
self.flag5c = not self.flag5c
|
self.flag5c = not self.flag5c
|
||||||
self.__cycle = 0
|
self.__cycle = 0
|
||||||
|
|
||||||
|
def get_tof(self, name):
|
||||||
|
"""Wert der Ausschaltverzoegerung.
|
||||||
|
@param name Eindeutiger Name des Timers
|
||||||
|
@return Wert <class 'bool'> der Ausschaltverzoegerung"""
|
||||||
|
return self.__dict_tof.get(name, 0) > 0
|
||||||
|
|
||||||
def get_tofc(self, name):
|
def get_tofc(self, name):
|
||||||
"""Wert der Ausschaltverzoegerung.
|
"""Wert der Ausschaltverzoegerung.
|
||||||
@param name Eindeutiger Name des Timers
|
@param name Eindeutiger Name des Timers
|
||||||
@return Wert der Ausschaltverzoegerung"""
|
@return Wert <class 'bool'> der Ausschaltverzoegerung"""
|
||||||
return self.__dict_tof.get(name, 0) > 0
|
return self.__dict_tof.get(name, 0) > 0
|
||||||
|
|
||||||
|
def set_tof(self, name, milliseconds):
|
||||||
|
"""Startet bei Aufruf einen ausschaltverzoegerten Timer.
|
||||||
|
|
||||||
|
@param name Eindeutiger Name fuer Zugriff auf Timer
|
||||||
|
@param milliseconds Verzoegerung in Millisekunden
|
||||||
|
|
||||||
|
"""
|
||||||
|
self.__dict_tof[name] = ceil(milliseconds / self.__cycletime)
|
||||||
|
|
||||||
def set_tofc(self, name, cycles):
|
def set_tofc(self, name, cycles):
|
||||||
"""Startet bei Aufruf einen ausschaltverzoegerten Timer.
|
"""Startet bei Aufruf einen ausschaltverzoegerten Timer.
|
||||||
|
|
||||||
@@ -175,12 +192,31 @@ class Cycletools():
|
|||||||
"""
|
"""
|
||||||
self.__dict_tof[name] = cycles
|
self.__dict_tof[name] = cycles
|
||||||
|
|
||||||
|
def get_ton(self, name):
|
||||||
|
"""Einschaltverzoegerung.
|
||||||
|
@param name Eindeutiger Name des Timers
|
||||||
|
@return Wert <class 'bool'> der Einschaltverzoegerung"""
|
||||||
|
return self.__dict_ton.get(name, [-1])[0] == 0
|
||||||
|
|
||||||
def get_tonc(self, name):
|
def get_tonc(self, name):
|
||||||
"""Einschaltverzoegerung.
|
"""Einschaltverzoegerung.
|
||||||
@param name Eindeutiger Name des Timers
|
@param name Eindeutiger Name des Timers
|
||||||
@return Wert der Einschaltverzoegerung"""
|
@return Wert <class 'bool'> der Einschaltverzoegerung"""
|
||||||
return self.__dict_ton.get(name, [-1])[0] == 0
|
return self.__dict_ton.get(name, [-1])[0] == 0
|
||||||
|
|
||||||
|
def set_ton(self, name, milliseconds):
|
||||||
|
"""Startet einen einschaltverzoegerten Timer.
|
||||||
|
|
||||||
|
@param name Eindeutiger Name fuer Zugriff auf Timer
|
||||||
|
@param milliseconds Millisekunden, der Verzoegerung wenn neu gestartet
|
||||||
|
|
||||||
|
"""
|
||||||
|
if self.__dict_ton.get(name, [-1])[0] == -1:
|
||||||
|
self.__dict_ton[name] = \
|
||||||
|
[ceil(milliseconds / self.__cycletime), True]
|
||||||
|
else:
|
||||||
|
self.__dict_ton[name][1] = True
|
||||||
|
|
||||||
def set_tonc(self, name, cycles):
|
def set_tonc(self, name, cycles):
|
||||||
"""Startet einen einschaltverzoegerten Timer.
|
"""Startet einen einschaltverzoegerten Timer.
|
||||||
|
|
||||||
@@ -193,12 +229,31 @@ class Cycletools():
|
|||||||
else:
|
else:
|
||||||
self.__dict_ton[name][1] = True
|
self.__dict_ton[name][1] = True
|
||||||
|
|
||||||
|
def get_tp(self, name):
|
||||||
|
"""Impulstimer.
|
||||||
|
@param name Eindeutiger Name des Timers
|
||||||
|
@return Wert <class 'bool'> des Impulses"""
|
||||||
|
return self.__dict_tp.get(name, [-1])[0] > 0
|
||||||
|
|
||||||
def get_tpc(self, name):
|
def get_tpc(self, name):
|
||||||
"""Impulstimer.
|
"""Impulstimer.
|
||||||
@param name Eindeutiger Name des Timers
|
@param name Eindeutiger Name des Timers
|
||||||
@return Wert der des Impulses"""
|
@return Wert <class 'bool'> des Impulses"""
|
||||||
return self.__dict_tp.get(name, [-1])[0] > 0
|
return self.__dict_tp.get(name, [-1])[0] > 0
|
||||||
|
|
||||||
|
def set_tp(self, name, milliseconds):
|
||||||
|
"""Startet einen Impuls Timer.
|
||||||
|
|
||||||
|
@param name Eindeutiger Name fuer Zugriff auf Timer
|
||||||
|
@param milliseconds Millisekunden, die der Impuls anstehen soll
|
||||||
|
|
||||||
|
"""
|
||||||
|
if self.__dict_tp.get(name, [-1])[0] == -1:
|
||||||
|
self.__dict_tp[name] = \
|
||||||
|
[ceil(milliseconds / self.__cycletime), True]
|
||||||
|
else:
|
||||||
|
self.__dict_tp[name][1] = True
|
||||||
|
|
||||||
def set_tpc(self, name, cycles):
|
def set_tpc(self, name, cycles):
|
||||||
"""Startet einen Impuls Timer.
|
"""Startet einen Impuls Timer.
|
||||||
|
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ class RevPiModIO(object):
|
|||||||
|
|
||||||
# Cycleloop starten
|
# Cycleloop starten
|
||||||
self._looprunning = True
|
self._looprunning = True
|
||||||
cycleinfo = helpermodule.Cycletools()
|
cycleinfo = helpermodule.Cycletools(self._imgwriter.refresh)
|
||||||
ec = None
|
ec = None
|
||||||
while ec is None and not self._exit.is_set():
|
while ec is None and not self._exit.is_set():
|
||||||
# Auf neue Daten warten und nur ausführen wenn set()
|
# Auf neue Daten warten und nur ausführen wenn set()
|
||||||
@@ -708,7 +708,7 @@ class RevPiModIO(object):
|
|||||||
mylist = self.device
|
mylist = self.device
|
||||||
else:
|
else:
|
||||||
dev = device if issubclass(type(device), devicemodule.Device) \
|
dev = device if issubclass(type(device), devicemodule.Device) \
|
||||||
else self.__getitem__(device)
|
else self.device.__getitem__(device)
|
||||||
mylist = [dev]
|
mylist = [dev]
|
||||||
|
|
||||||
for dev in mylist:
|
for dev in mylist:
|
||||||
@@ -728,7 +728,7 @@ class RevPiModIO(object):
|
|||||||
mylist = self.device
|
mylist = self.device
|
||||||
else:
|
else:
|
||||||
dev = device if issubclass(type(device), devicemodule.Device) \
|
dev = device if issubclass(type(device), devicemodule.Device) \
|
||||||
else self.__getitem__(device)
|
else self.device.__getitem__(device)
|
||||||
|
|
||||||
if dev._selfupdate:
|
if dev._selfupdate:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
@@ -771,7 +771,7 @@ class RevPiModIO(object):
|
|||||||
mylist = self.device
|
mylist = self.device
|
||||||
else:
|
else:
|
||||||
dev = device if issubclass(type(device), devicemodule.Device) \
|
dev = device if issubclass(type(device), devicemodule.Device) \
|
||||||
else self.__getitem__(device)
|
else self.device.__getitem__(device)
|
||||||
|
|
||||||
if dev._selfupdate:
|
if dev._selfupdate:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
|
|||||||
Reference in New Issue
Block a user