Added MIO memory value mappings

This commit is contained in:
akira committed 2021-05-01 08:12:45 +02:00
1 parent 17666edb85
commit a05770e4f8
2 files changed
+20 -2

No files matched your search

+2 -2
View File
@@ -16,7 +16,7 @@ __all__ = [
"RevPiModIO", "RevPiModIODriver", "RevPiModIOSelected", "run_plc", "RevPiModIO", "RevPiModIODriver", "RevPiModIOSelected", "run_plc",
"RevPiNetIO", "RevPiNetIODriver", "RevPiNetIOSelected", "RevPiNetIO", "RevPiNetIODriver", "RevPiNetIOSelected",
"Cycletools", "EventCallback", "Cycletools", "EventCallback",
"AIO", "COMPACT", "DI", "DO", "DIO", "FLAT", "ProductType", "AIO", "COMPACT", "DI", "DO", "DIO", "FLAT", "MIO",
] ]
__author__ = "Sven Sager <akira@revpimodio.org>" __author__ = "Sven Sager <akira@revpimodio.org>"
__copyright__ = "Copyright (C) 2020 Sven Sager" __copyright__ = "Copyright (C) 2020 Sven Sager"
@@ -96,7 +96,7 @@ def consttostr(value) -> str:
# Benötigte Klassen importieren # Benötigte Klassen importieren
from .pictory import ProductType, AIO, COMPACT, DI, DO, DIO, FLAT from .pictory import ProductType, AIO, COMPACT, DI, DO, DIO, FLAT, MIO
from .helper import Cycletools, EventCallback from .helper import Cycletools, EventCallback
from .modio import RevPiModIO, RevPiModIODriver, RevPiModIOSelected, run_plc from .modio import RevPiModIO, RevPiModIODriver, RevPiModIOSelected, run_plc
from .netio import RevPiNetIO, RevPiNetIODriver, RevPiNetIOSelected from .netio import RevPiNetIO, RevPiNetIODriver, RevPiNetIOSelected
+18
View File
@@ -146,6 +146,24 @@ class DIO(DI, DO):
pass pass
class MIO:
"""Memory value mappings for RevPi MIO 1.0 (RevPiMIO_20200901_1_0.rap)."""
ENCODER_MODE_DISABLED = 0
ENCODER_MODE_ENABLED = 1
IO_MODE_DIGITAL_IN = 0
IO_MODE_PULSE_IN = 1
IO_MODE_PWM_IN = 2
IO_MODE_DIGITAL_OUT = 3
IO_MODE_PULSE_OUT = 4
IO_MODE_PWM_OUT = 5
AI_MODE_ANALOG_INPUT = 0
AI_MODE_LOGIC_LEVEL_INPUT = 1
AO_MODE_ANALOG_OUTPUT = 0
AO_MODE_LOGIC_LEVEL_OUTPUT = 1
class COMPACT: class COMPACT:
"""Memory value mappings for RevPi Compact 1.0 (RevPiCompact_20171023_1_0.rap).""" """Memory value mappings for RevPi Compact 1.0 (RevPiCompact_20171023_1_0.rap)."""
DIN_DEBOUNCE_OFF = 0 # Off DIN_DEBOUNCE_OFF = 0 # Off