From 5d9f513f717c1cfbce3e86335d41955497036d34 Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Wed, 18 Sep 2024 09:25:59 +0200 Subject: [PATCH 01/26] chore: Increase to RC1 of upcoming Release 2.7.2 --- src/revpimodio2/__about__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/revpimodio2/__about__.py b/src/revpimodio2/__about__.py index bbe1c74..c315b5c 100644 --- a/src/revpimodio2/__about__.py +++ b/src/revpimodio2/__about__.py @@ -3,4 +3,4 @@ __author__ = "Sven Sager " __copyright__ = "Copyright (C) 2023 Sven Sager" __license__ = "LGPLv2" -__version__ = "2.7.1" +__version__ = "2.7.2rc1" From 629a517ab8a5f09d1c897d868d8031f346aa47ba Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Mon, 28 Oct 2024 12:48:50 +0100 Subject: [PATCH 02/26] test: Connect 4 integrated input and output --- tests/revpi4/test_connect4.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/revpi4/test_connect4.py b/tests/revpi4/test_connect4.py index 463658c..a88b2e7 100644 --- a/tests/revpi4/test_connect4.py +++ b/tests/revpi4/test_connect4.py @@ -57,3 +57,23 @@ class TestRevPi4(TestRevPiModIO): rpi.exit() del rpi + + def test_connect4_ios(self): + rpi = self.modio(configrsc="config_connect4.rsc") + rpi.setdefaultvalues() + + # Test X2 output + self.assertEqual(rpi.io.RevPiOutput.value, 0) + rpi.core.x2out.value = True + self.assertEqual(rpi.io.RevPiOutput.value, 1) + + # Test X2 input + self.assertEqual(rpi.io.RevPiStatus.value, 0) + self.assertFalse(rpi.core.x2in.value) + + # Modify process image: Bit 6 of status is the input (int 64 -> hex 40) + self.fh_procimg.write(b"\x40") + + rpi.readprocimg() + self.assertEqual(rpi.io.RevPiStatus.value, 64) + self.assertTrue(rpi.core.x2in.value) From 1e331feb2fec98d94284edebdc14779621e05527 Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Mon, 28 Oct 2024 13:33:44 +0100 Subject: [PATCH 03/26] fix: Resolve constants of internal module --- src/revpimodio2/_internal.py | 2 ++ tests/test_import.py | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/revpimodio2/_internal.py b/src/revpimodio2/_internal.py index 80cc8bb..b1415ab 100644 --- a/src/revpimodio2/_internal.py +++ b/src/revpimodio2/_internal.py @@ -68,5 +68,7 @@ def consttostr(value) -> str: return "OUT" elif value == 302: return "MEM" + elif value == 4096: + return "PROCESS_IMAGE_SIZE" else: return "" diff --git a/tests/test_import.py b/tests/test_import.py index eb19538..eb41847 100644 --- a/tests/test_import.py +++ b/tests/test_import.py @@ -12,3 +12,27 @@ class ModuleImport(unittest.TestCase): import revpimodio2 self.assertEqual(type(revpimodio2.__version__), str) + + def test_lib_constants(self): + """Tests constants of _internal module.""" + import revpimodio2 + + self.assertEqual(revpimodio2._internal.consttostr(999), "") + + lst_const = [0, 1, 2, 4, 31, 32, 33, 300, 301, 302, 4096] + internal_dict = revpimodio2._internal.__dict__ # type: dict + for key in internal_dict: + if type(internal_dict[key]) is int: + const_value = internal_dict[key] + self.assertEqual(revpimodio2._internal.consttostr(const_value), key) + self.assertTrue(const_value in lst_const) + + # Test argument checker + revpimodio2._internal.acheck(bool, arg01=True, arg02_noneok=None) + revpimodio2._internal.acheck(int, arg01=0, arg02_noneok=10) + revpimodio2._internal.acheck(str, arg01="", arg02_noneok="ja") + + with self.assertRaises(TypeError): + revpimodio2._internal.acheck(str, arg01=None, arg02_noneok="test") + with self.assertRaises(TypeError): + revpimodio2._internal.acheck(bool, arg01=True, arg02=None) From 442071c21223a654c6b377f6bdc72009058de335 Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Mon, 28 Oct 2024 13:52:16 +0100 Subject: [PATCH 04/26] test: Configuration errors in config.rsc --- tests/common/config_floating_offset.rsc | 1019 +++++++++++++++++++++ tests/common/config_overlapping_bits.rsc | 309 +++++++ tests/common/config_overlapping_bytes.rsc | 269 ++++++ tests/common/test_config_rsc_bugs.py | 25 + 4 files changed, 1622 insertions(+) create mode 100644 tests/common/config_floating_offset.rsc create mode 100644 tests/common/config_overlapping_bits.rsc create mode 100644 tests/common/config_overlapping_bytes.rsc create mode 100644 tests/common/test_config_rsc_bugs.py diff --git a/tests/common/config_floating_offset.rsc b/tests/common/config_floating_offset.rsc new file mode 100644 index 0000000..6ea68eb --- /dev/null +++ b/tests/common/config_floating_offset.rsc @@ -0,0 +1,1019 @@ +{ + "App": { + "name": "PiCtory", + "version": "2.1.2", + "saveTS": "20231031173852", + "language": "en", + "layout": { + "north": { + "size": 70, + "initClosed": false, + "initHidden": false + }, + "south": { + "size": 257, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": { + "east": { + "size": 500, + "initClosed": false, + "initHidden": false + } + } + } + }, + "east": { + "size": 70, + "initClosed": true, + "initHidden": false, + "children": {} + }, + "west": { + "size": 200, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": {} + } + } + } + }, + "Summary": { + "inpTotal": 77, + "outTotal": 26.5 + }, + "Devices": [ + { + "GUID": "8012178a-c632-ac37-6d81-98aae223e268", + "id": "device_RevPiConnect4_20230409_1_0_001", + "type": "BASE", + "productType": "136", + "position": "0", + "name": "RevPi Connect 4", + "bmk": "RevPi Connect 4", + "inpVariant": 0, + "outVariant": 0, + "comment": "This is a RevPi Connect 4 Device", + "offset": 0, + "inp": { + "0": [ + "RevPiStatus", + "0", + "8", + "0", + true, + "0000", + "", + "" + ], + "1": [ + "RevPiIOCycle", + "0", + "8", + "1", + true, + "0001", + "", + "" + ], + "2": [ + "RS485ErrorCnt", + "0", + "16", + "2", + false, + "0002", + "", + "" + ], + "3": [ + "Core_Temperature", + "0", + "8", + "4", + false, + "0003", + "", + "" + ], + "4": [ + "Core_Frequency", + "0", + "8", + "5", + false, + "0004", + "", + "" + ] + }, + "out": { + "0": [ + "RevPiOutput", + "0", + "8", + "6", + true, + "0005", + "", + "" + ], + "1": [ + "RS485ErrorLimit1", + "10", + "16", + "7", + false, + "0006", + "", + "" + ], + "2": [ + "RS485ErrorLimit2", + "1000", + "16", + "9", + false, + "0007", + "", + "" + ], + "3": [ + "RevPiLED", + "0", + "16", + "11", + true, + "0008", + "", + "" + ] + }, + "mem": {}, + "extend": {} + }, + { + "GUID": "4e91f8c6-df1c-90be-0d4d-82a6bb3275dc", + "id": "device_RevPiRO_20231018_1_0_001", + "type": "LEFT_RIGHT", + "productType": "137", + "position": "32", + "name": "RevPi RO", + "bmk": "RevPi RO", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 13, + "inp": { + "0": [ + "Status", + "0", + "8", + "0", + false, + "0000", + "", + "" + ] + }, + "out": { + "0": [ + "RelayOutput_1", + "0", + "1", + "1", + true, + "0001", + "", + "0" + ], + "1": [ + "RelayOutput_2", + "0", + "1", + "1", + true, + "0002", + "", + "1" + ], + "2": [ + "RelayOutput_3", + "0", + "1", + "1", + true, + "0003", + "", + "2" + ], + "3": [ + "RelayOutput_4", + "0", + "1", + "1", + true, + "0004", + "", + "3" + ], + "4": [ + "RelayOutputPadding", + "0", + "8", + "1", + true, + "0009", + "", + "" + ] + }, + "mem": { + "0": [ + "RelayCycleWarningThreshold_1", + "0", + "32", + "2", + false, + "0005", + "", + "" + ], + "1": [ + "RelayCycleWarningThreshold_2", + "0", + "32", + "6", + false, + "0006", + "", + "" + ], + "2": [ + "RelayCycleWarningThreshold_3", + "0", + "32", + "10", + false, + "0007", + "", + "" + ], + "3": [ + "RelayCycleWarningThreshold_4", + "0", + "32", + "14", + false, + "0008", + "", + "" + ] + }, + "extend": {} + }, + { + "GUID": "8ee305fb-cb81-7dd0-f60b-d7988da4922e", + "id": "device_RevPiDI_20160818_1_0_001", + "type": "LEFT_RIGHT", + "productType": "97", + "position": "33", + "name": "RevPi DI", + "bmk": "RevPi DI", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 31.5, + "inp": { + "0": [ + "I_1", + "0", + "1", + "0", + true, + "0000", + "", + "0" + ], + "1": [ + "I_2", + "0", + "1", + "0", + true, + "0001", + "", + "1" + ], + "2": [ + "I_3", + "0", + "1", + "0", + true, + "0002", + "", + "2" + ], + "3": [ + "I_4", + "0", + "1", + "0", + true, + "0003", + "", + "3" + ], + "4": [ + "I_5", + "0", + "1", + "0", + true, + "0004", + "", + "4" + ], + "5": [ + "I_6", + "0", + "1", + "0", + true, + "0005", + "", + "5" + ], + "6": [ + "I_7", + "0", + "1", + "0", + true, + "0006", + "", + "6" + ], + "7": [ + "I_8", + "0", + "1", + "0", + true, + "0007", + "", + "7" + ], + "8": [ + "I_9", + "0", + "1", + "0", + true, + "0008", + "", + "8" + ], + "9": [ + "I_10", + "0", + "1", + "0", + true, + "0009", + "", + "9" + ], + "10": [ + "I_11", + "0", + "1", + "0", + true, + "0010", + "", + "10" + ], + "11": [ + "I_12", + "0", + "1", + "0", + true, + "0011", + "", + "11" + ], + "12": [ + "I_13", + "0", + "1", + "0", + true, + "0012", + "", + "12" + ], + "13": [ + "I_14", + "0", + "1", + "0", + true, + "0013", + "", + "13" + ], + "14": [ + "I_15", + "0", + "1", + "0", + true, + "0014", + "", + "14" + ], + "15": [ + "I_16", + "0", + "1", + "0", + true, + "0015", + "", + "15" + ], + "16": [ + "Status_i03", + "0", + "16", + "4", + false, + "0016", + "", + "" + ], + "17": [ + "Counter_1", + "0", + "32", + "6", + false, + "0017", + "", + "" + ], + "18": [ + "Counter_2", + "0", + "32", + "10", + false, + "0018", + "", + "" + ], + "19": [ + "Counter_3", + "0", + "32", + "14", + false, + "0019", + "", + "" + ], + "20": [ + "Counter_4", + "0", + "32", + "18", + false, + "0020", + "", + "" + ], + "21": [ + "Counter_5", + "0", + "32", + "22", + false, + "0021", + "", + "" + ], + "22": [ + "Counter_6", + "0", + "32", + "26", + false, + "0022", + "", + "" + ], + "23": [ + "Counter_7", + "0", + "32", + "30", + false, + "0023", + "", + "" + ], + "24": [ + "Counter_8", + "0", + "32", + "34", + false, + "0024", + "", + "" + ], + "25": [ + "Counter_9", + "0", + "32", + "38", + false, + "0025", + "", + "" + ], + "26": [ + "Counter_10", + "0", + "32", + "42", + false, + "0026", + "", + "" + ], + "27": [ + "Counter_11", + "0", + "32", + "46", + false, + "0027", + "", + "" + ], + "28": [ + "Counter_12", + "0", + "32", + "50", + false, + "0028", + "", + "" + ], + "29": [ + "Counter_13", + "0", + "32", + "54", + false, + "0029", + "", + "" + ], + "30": [ + "Counter_14", + "0", + "32", + "58", + false, + "0030", + "", + "" + ], + "31": [ + "Counter_15", + "0", + "32", + "62", + false, + "0031", + "", + "" + ], + "32": [ + "Counter_16", + "0", + "32", + "66", + false, + "0032", + "", + "" + ], + "33": [ + "Output_Status", + "0", + "16", + "2", + false, + "0050", + "", + "" + ] + }, + "out": { + "0": [ + "Output", + "0", + "16", + "70", + false, + "0051", + "", + "" + ], + "1": [ + "PWM_1", + "0", + "8", + "72", + false, + "0052", + "", + "" + ], + "2": [ + "PWM_2", + "0", + "8", + "73", + false, + "0053", + "", + "" + ], + "3": [ + "PWM_3", + "0", + "8", + "74", + false, + "0054", + "", + "" + ], + "4": [ + "PWM_4", + "0", + "8", + "75", + false, + "0055", + "", + "" + ], + "5": [ + "PWM_5", + "0", + "8", + "76", + false, + "0056", + "", + "" + ], + "6": [ + "PWM_6", + "0", + "8", + "77", + false, + "0057", + "", + "" + ], + "7": [ + "PWM_7", + "0", + "8", + "78", + false, + "0058", + "", + "" + ], + "8": [ + "PWM_8", + "0", + "8", + "79", + false, + "0059", + "", + "" + ], + "9": [ + "PWM_9", + "0", + "8", + "80", + false, + "0060", + "", + "" + ], + "10": [ + "PWM_10", + "0", + "8", + "81", + false, + "0061", + "", + "" + ], + "11": [ + "PWM_11", + "0", + "8", + "82", + false, + "0062", + "", + "" + ], + "12": [ + "PWM_12", + "0", + "8", + "83", + false, + "0063", + "", + "" + ], + "13": [ + "PWM_13", + "0", + "8", + "84", + false, + "0064", + "", + "" + ], + "14": [ + "PWM_14", + "0", + "8", + "85", + false, + "0065", + "", + "" + ], + "15": [ + "PWM_15", + "0", + "8", + "86", + false, + "0066", + "", + "" + ], + "16": [ + "PWM_16", + "0", + "8", + "87", + false, + "0067", + "", + "" + ] + }, + "mem": { + "0": [ + "InputMode_1", + "0", + "8", + "88", + false, + "0033", + "", + "" + ], + "1": [ + "InputMode_2", + "0", + "8", + "89", + false, + "0034", + "", + "" + ], + "2": [ + "InputMode_3", + "0", + "8", + "90", + false, + "0035", + "", + "" + ], + "3": [ + "InputMode_4", + "0", + "8", + "91", + false, + "0036", + "", + "" + ], + "4": [ + "InputMode_5", + "0", + "8", + "92", + false, + "0037", + "", + "" + ], + "5": [ + "InputMode_6", + "0", + "8", + "93", + false, + "0038", + "", + "" + ], + "6": [ + "InputMode_7", + "0", + "8", + "94", + false, + "0039", + "", + "" + ], + "7": [ + "InputMode_8", + "0", + "8", + "95", + false, + "0040", + "", + "" + ], + "8": [ + "InputMode_9", + "0", + "8", + "96", + false, + "0041", + "", + "" + ], + "9": [ + "InputMode_10", + "0", + "8", + "97", + false, + "0042", + "", + "" + ], + "10": [ + "InputMode_11", + "0", + "8", + "98", + false, + "0043", + "", + "" + ], + "11": [ + "InputMode_12", + "0", + "8", + "99", + false, + "0044", + "", + "" + ], + "12": [ + "InputMode_13", + "0", + "8", + "100", + false, + "0045", + "", + "" + ], + "13": [ + "InputMode_14", + "0", + "8", + "101", + false, + "0046", + "", + "" + ], + "14": [ + "InputMode_15", + "0", + "8", + "102", + false, + "0047", + "", + "" + ], + "15": [ + "InputMode_16", + "0", + "8", + "103", + false, + "0048", + "", + "" + ], + "16": [ + "InputDebounce", + "0", + "16", + "104", + false, + "0049", + "", + "" + ], + "17": [ + "OutputPushPull", + "0", + "16", + "106", + false, + "0068", + "", + "" + ], + "18": [ + "OutputOpenLoadDetect", + "0", + "16", + "108", + false, + "0069", + "", + "" + ], + "19": [ + "OutputPWMActive", + "0", + "16", + "110", + false, + "0070", + "", + "" + ], + "20": [ + "OutputPWMFrequency", + "1", + "8", + "112", + false, + "0071", + "", + "" + ] + }, + "extend": {} + } + ], + "Connections": [] +} \ No newline at end of file diff --git a/tests/common/config_overlapping_bits.rsc b/tests/common/config_overlapping_bits.rsc new file mode 100644 index 0000000..479582d --- /dev/null +++ b/tests/common/config_overlapping_bits.rsc @@ -0,0 +1,309 @@ +{ + "App": { + "name": "PiCtory", + "version": "2.1.2", + "saveTS": "20231031130813", + "language": "en", + "layout": { + "north": { + "size": 70, + "initClosed": false, + "initHidden": false + }, + "south": { + "size": 257, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": { + "east": { + "size": 500, + "initClosed": false, + "initHidden": false + } + } + } + }, + "east": { + "size": 70, + "initClosed": true, + "initHidden": false, + "children": {} + }, + "west": { + "size": 200, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": {} + } + } + } + }, + "Summary": { + "inpTotal": 77, + "outTotal": 26 + }, + "Devices": [ + { + "GUID": "8012178a-c632-ac37-6d81-98aae223e268", + "id": "device_RevPiConnect4_20230409_1_0_001", + "type": "BASE", + "productType": "136", + "position": "0", + "name": "RevPi Connect 4", + "bmk": "RevPi Connect 4", + "inpVariant": 0, + "outVariant": 0, + "comment": "This is a RevPi Connect 4 Device", + "offset": 0, + "inp": { + "0": [ + "RevPiStatus", + "0", + "8", + "0", + true, + "0000", + "", + "" + ], + "1": [ + "RevPiIOCycle", + "0", + "8", + "1", + true, + "0001", + "", + "" + ], + "2": [ + "RS485ErrorCnt", + "0", + "16", + "2", + false, + "0002", + "", + "" + ], + "3": [ + "Core_Temperature", + "0", + "8", + "4", + false, + "0003", + "", + "" + ], + "4": [ + "Core_Frequency", + "0", + "8", + "5", + false, + "0004", + "", + "" + ] + }, + "out": { + "0": [ + "RevPiOutput", + "0", + "8", + "6", + true, + "0005", + "", + "" + ], + "1": [ + "RS485ErrorLimit1", + "10", + "16", + "7", + false, + "0006", + "", + "" + ], + "2": [ + "RS485ErrorLimit2", + "1000", + "16", + "9", + false, + "0007", + "", + "" + ], + "3": [ + "RevPiLED", + "0", + "16", + "11", + true, + "0008", + "", + "" + ] + }, + "mem": {}, + "extend": {} + }, + { + "GUID": "fa804e6e-8e80-0ca5-3b96-4ec06bf99ed0", + "id": "device_RevPiRO_20231018_1_0_001", + "type": "LEFT_RIGHT", + "productType": "137", + "position": "32", + "name": "RevPi RO", + "bmk": "RevPi RO", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 13, + "inp": { + "0": [ + "Status", + "0", + "8", + "0", + false, + "0000", + "", + "" + ] + }, + "out": { + "0": [ + "RelayOutput_1", + "0", + "1", + "1", + true, + "0001", + "", + "0" + ], + "1": [ + "RelayOutput_2", + "0", + "1", + "1", + true, + "0002", + "", + "1" + ], + "2": [ + "RelayOutput_3", + "0", + "1", + "1", + true, + "0003", + "", + "2" + ], + "3": [ + "RelayOutput_4", + "0", + "1", + "1", + true, + "0004", + "", + "3" + ], + "4": [ + "RelayOutputPadding_1", + "0", + "1", + "1", + false, + "0009", + "", + "0" + ], + "5": [ + "RelayOutputPadding_2", + "0", + "1", + "1", + false, + "0010", + "", + "1" + ], + "6": [ + "RelayOutputPadding_3", + "0", + "1", + "1", + false, + "0011", + "", + "2" + ], + "7": [ + "RelayOutputPadding_4", + "0", + "1", + "1", + false, + "0012", + "", + "3" + ] + }, + "mem": { + "0": [ + "RelayCycleWarningThreshold_1", + "0", + "32", + "2", + false, + "0005", + "", + "" + ], + "1": [ + "RelayCycleWarningThreshold_2", + "0", + "32", + "6", + false, + "0006", + "", + "" + ], + "2": [ + "RelayCycleWarningThreshold_3", + "0", + "32", + "10", + false, + "0007", + "", + "" + ], + "3": [ + "RelayCycleWarningThreshold_4", + "0", + "32", + "14", + false, + "0008", + "", + "" + ] + }, + "extend": {} + } + ], + "Connections": [] +} \ No newline at end of file diff --git a/tests/common/config_overlapping_bytes.rsc b/tests/common/config_overlapping_bytes.rsc new file mode 100644 index 0000000..b1cbd7c --- /dev/null +++ b/tests/common/config_overlapping_bytes.rsc @@ -0,0 +1,269 @@ +{ + "App": { + "name": "PiCtory", + "version": "2.1.2", + "saveTS": "20231031130813", + "language": "en", + "layout": { + "north": { + "size": 70, + "initClosed": false, + "initHidden": false + }, + "south": { + "size": 257, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": { + "east": { + "size": 500, + "initClosed": false, + "initHidden": false + } + } + } + }, + "east": { + "size": 70, + "initClosed": true, + "initHidden": false, + "children": {} + }, + "west": { + "size": 200, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": {} + } + } + } + }, + "Summary": { + "inpTotal": 77, + "outTotal": 26 + }, + "Devices": [ + { + "GUID": "8012178a-c632-ac37-6d81-98aae223e268", + "id": "device_RevPiConnect4_20230409_1_0_001", + "type": "BASE", + "productType": "136", + "position": "0", + "name": "RevPi Connect 4", + "bmk": "RevPi Connect 4", + "inpVariant": 0, + "outVariant": 0, + "comment": "This is a RevPi Connect 4 Device", + "offset": 0, + "inp": { + "0": [ + "RevPiStatus", + "0", + "8", + "0", + true, + "0000", + "", + "" + ], + "1": [ + "RevPiIOCycle", + "0", + "8", + "1", + true, + "0001", + "", + "" + ], + "2": [ + "RS485ErrorCnt", + "0", + "16", + "2", + false, + "0002", + "", + "" + ], + "3": [ + "Core_Temperature", + "0", + "8", + "4", + false, + "0003", + "", + "" + ], + "4": [ + "Core_Frequency", + "0", + "8", + "5", + false, + "0004", + "", + "" + ] + }, + "out": { + "0": [ + "RevPiOutput", + "0", + "8", + "6", + true, + "0005", + "", + "" + ], + "1": [ + "RS485ErrorLimit1", + "10", + "16", + "7", + false, + "0006", + "", + "" + ], + "2": [ + "RS485ErrorLimit2", + "1000", + "16", + "9", + false, + "0007", + "", + "" + ], + "3": [ + "RevPiLED", + "0", + "16", + "11", + true, + "0008", + "", + "" + ] + }, + "mem": {}, + "extend": {} + }, + { + "GUID": "fa804e6e-8e80-0ca5-3b96-4ec06bf99ed0", + "id": "device_RevPiRO_20231018_1_0_001", + "type": "LEFT_RIGHT", + "productType": "137", + "position": "32", + "name": "RevPi RO", + "bmk": "RevPi RO", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 13, + "inp": { + "0": [ + "Status", + "0", + "8", + "0", + false, + "0000", + "", + "" + ] + }, + "out": { + "0": [ + "RelayOutput_1", + "0", + "1", + "1", + true, + "0001", + "", + "0" + ], + "1": [ + "RelayOutput_2", + "0", + "1", + "1", + true, + "0002", + "", + "1" + ], + "2": [ + "RelayOutput_3", + "0", + "1", + "1", + true, + "0003", + "", + "2" + ], + "3": [ + "RelayOutput_4", + "0", + "1", + "1", + true, + "0004", + "", + "3" + ] + }, + "mem": { + "0": [ + "RelayCycleWarningThreshold_1", + "0", + "32", + "2", + false, + "0005", + "", + "" + ], + "1": [ + "RelayCycleWarningThreshold_2", + "0", + "32", + "6", + false, + "0006", + "", + "" + ], + "2": [ + "RelayCycleWarningThreshold_3", + "0", + "32", + "10", + false, + "0007", + "", + "" + ], + "3": [ + "RelayCycleWarningThreshold_4", + "0", + "32", + "13", + false, + "0008", + "", + "" + ] + }, + "extend": {} + } + ], + "Connections": [] +} \ No newline at end of file diff --git a/tests/common/test_config_rsc_bugs.py b/tests/common/test_config_rsc_bugs.py new file mode 100644 index 0000000..7d6337a --- /dev/null +++ b/tests/common/test_config_rsc_bugs.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +"""Test errors in config.rsc""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" + +from os.path import dirname + +from tests import TestRevPiModIO + + +class TestConfigRscBugs(TestRevPiModIO): + + data_dir = dirname(__file__) + + def test_overlapping(self): + with self.assertWarnsRegex(Warning, r"RelayOutputPadding_[1-4]"): + self.modio(configrsc="config_overlapping_bits.rsc") + + with self.assertWarnsRegex(Warning, r"RelayCycleWarningThreshold_4"): + self.modio(configrsc="config_overlapping_bytes.rsc") + + def test_floating_offsets(self): + with self.assertWarnsRegex(Warning, r"Offset value 31.5"): + self.modio(configrsc="config_floating_offset.rsc") From 125f8bb4fe97c64ecd509ca798343c46f82c5b3a Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Mon, 28 Oct 2024 14:09:39 +0100 Subject: [PATCH 05/26] test: Init ModIO classes --- tests/common/config.rsc | 1 + tests/common/config_bad_offset.rsc | 1 + tests/common/config_core_bits.json | 4517 ++++++++++++++++++++++++++++ tests/common/config_empty.rsc | 0 tests/common/config_null.rsc | 1 + tests/common/config_old.rsc | 1 + tests/common/config_rpi11.rsc | 1 + tests/common/config_unknown.rsc | 1 + tests/common/test_init_modio.py | 139 + 9 files changed, 4662 insertions(+) create mode 100644 tests/common/config.rsc create mode 100644 tests/common/config_bad_offset.rsc create mode 100644 tests/common/config_core_bits.json create mode 100644 tests/common/config_empty.rsc create mode 100644 tests/common/config_null.rsc create mode 100644 tests/common/config_old.rsc create mode 100644 tests/common/config_rpi11.rsc create mode 100644 tests/common/config_unknown.rsc create mode 100644 tests/common/test_init_modio.py diff --git a/tests/common/config.rsc b/tests/common/config.rsc new file mode 100644 index 0000000..de4cbbc --- /dev/null +++ b/tests/common/config.rsc @@ -0,0 +1 @@ +{"App":{"name": "PiCtory", "version": "1.2.3","saveTS": "20170826120906","language": "en","layout": {"north":{"size":70,"initClosed":false,"initHidden":false},"south":{"size":480,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":500,"initClosed":false,"initHidden":false}}}},"east":{"size":70,"initClosed":true,"initHidden":false,"children":{"layout1":{"north":{"size":100,"initClosed":false,"initHidden":false},"south":{"size":98,"initClosed":false,"initHidden":false}}}},"west":{"size":200,"initClosed":false,"initHidden":false,"children":{"layout1":{}}}}},"Summary":{"inpTotal": 338,"outTotal": 113},"Devices":[{"catalogNr": "RevPiCore","GUID": "4ebb85e8-92ea-415d-b191-cc58c2857c0a","id": "device_RevPiCore_20170404_1_2_001","type": "BASE","productType": "95","position": "0","name": "picore01","bmk": "RevPi Core V1.2","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""],"1": ["RevPiIOCycle","0","8","1",true,"0001", "",""],"2": ["RS485ErrorCnt","0","16","2",false,"0002", "",""],"3": ["Core_Temperatur","0","8","4",false,"0003", "",""],"4": ["Core_Frequency","0","8","5",false,"0004", "",""]},"out": {"0": ["RevPiLED","0","8","6",true,"0005", "",""],"1": ["RS485ErrorLimit1","10","16","7",false,"0006", "",""],"2": ["RS485ErrorLimit2","1000","16","9",false,"0007", "",""]},"mem": {},"extend": {}},{"catalogNr": "RevPiDI","GUID": "2e2c089e-6bef-14c0-852b-41b7cf48d846","id": "device_RevPiDI_20160818_1_0_001","type": "LEFT_RIGHT","productType": "97","position": "32","name": "di01","bmk": "RevPi DI","inpVariant": 0,"outVariant": 0,"comment": "","offset": 11,"inp": {"0": ["notaus_ok","0","1","0",true,"0000", "","0"],"1": ["motorschutz_ok","0","1","0",true,"0001", "","1"],"2": ["fu_ok","0","1","0",true,"0002", "","2"],"3": ["fu_motoran","0","1","0",true,"0003", "","3"],"4": ["I_5","0","1","0",true,"0004", "","4"],"5": ["I_6","0","1","0",true,"0005", "","5"],"6": ["I_7","0","1","0",true,"0006", "","6"],"7": ["I_8","0","1","0",true,"0007", "","7"],"8": ["t_automatik","0","1","0",true,"0008", "","8"],"9": ["t_start","0","1","0",true,"0009", "","9"],"10": ["t_stop","0","1","0",true,"0010", "","10"],"11": ["t_quit","0","1","0",true,"0011", "","11"],"12": ["t_notaus","0","1","0",true,"0012", "","12"],"13": ["I_14","0","1","0",true,"0013", "","13"],"14": ["I_15","0","1","0",true,"0014", "","14"],"15": ["I_16","0","1","0",true,"0015", "","15"],"16": ["Status","0","16","4",false,"0016", "",""],"17": ["Counter_1","0","32","6",false,"0017", "",""],"18": ["Counter_2","0","32","10",false,"0018", "",""],"19": ["Counter_3","0","32","14",false,"0019", "",""],"20": ["Counter_4","0","32","18",false,"0020", "",""],"21": ["Counter_5","0","32","22",false,"0021", "",""],"22": ["Counter_6","0","32","26",false,"0022", "",""],"23": ["Counter_7","0","32","30",false,"0023", "",""],"24": ["Counter_8","0","32","34",false,"0024", "",""],"25": ["Counter_9","0","32","38",false,"0025", "",""],"26": ["Counter_10","0","32","42",false,"0026", "",""],"27": ["Counter_11","0","32","46",false,"0027", "",""],"28": ["Counter_12","0","32","50",false,"0028", "",""],"29": ["Counter_13","0","32","54",false,"0029", "",""],"30": ["Counter_14","0","32","58",false,"0030", "",""],"31": ["Counter_15","0","32","62",false,"0031", "",""],"32": ["Counter_16","0","32","66",false,"0032", "",""],"33": ["Output_Status","0","16","2",false,"0050", "",""]},"out": {"0": ["Output","0","16","70",false,"0051", "",""],"1": ["PWM_1","0","8","72",false,"0052", "",""],"2": ["PWM_2","0","8","73",false,"0053", "",""],"3": ["PWM_3","0","8","74",false,"0054", "",""],"4": ["PWM_4","0","8","75",false,"0055", "",""],"5": ["PWM_5","0","8","76",false,"0056", "",""],"6": ["PWM_6","0","8","77",false,"0057", "",""],"7": ["PWM_7","0","8","78",false,"0058", "",""],"8": ["PWM_8","0","8","79",false,"0059", "",""],"9": ["PWM_9","0","8","80",false,"0060", "",""],"10": ["PWM_10","0","8","81",false,"0061", "",""],"11": ["PWM_11","0","8","82",false,"0062", "",""],"12": ["PWM_12","0","8","83",false,"0063", "",""],"13": ["PWM_13","0","8","84",false,"0064", "",""],"14": ["PWM_14","0","8","85",false,"0065", "",""],"15": ["PWM_15","0","8","86",false,"0066", "",""],"16": ["PWM_16","0","8","87",false,"0067", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0033", "",""],"1": ["InputMode_2","0","8","89",false,"0034", "",""],"2": ["InputMode_3","0","8","90",false,"0035", "",""],"3": ["InputMode_4","0","8","91",false,"0036", "",""],"4": ["InputMode_5","0","8","92",false,"0037", "",""],"5": ["InputMode_6","0","8","93",false,"0038", "",""],"6": ["InputMode_7","0","8","94",false,"0039", "",""],"7": ["InputMode_8","0","8","95",false,"0040", "",""],"8": ["InputMode_9","0","8","96",false,"0041", "",""],"9": ["InputMode_10","0","8","97",false,"0042", "",""],"10": ["InputMode_11","0","8","98",false,"0043", "",""],"11": ["InputMode_12","0","8","99",false,"0044", "",""],"12": ["InputMode_13","0","8","100",false,"0045", "",""],"13": ["InputMode_14","0","8","101",false,"0046", "",""],"14": ["InputMode_15","0","8","102",false,"0047", "",""],"15": ["InputMode_16","0","8","103",false,"0048", "",""],"16": ["InputDebounce","0","16","104",false,"0049", "",""],"17": ["OutputPushPull","0","16","106",false,"0068", "",""],"18": ["OutputOpenLoadDetect","0","16","108",false,"0069", "",""],"19": ["OutputPWMActive","0","16","110",false,"0070", "",""],"20": ["OutputPWMFrequency","2","8","112",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDI","GUID": "81e6c459-0398-a7c4-4954-d793ee9a5b89","id": "device_RevPiDI_20160818_1_0_002","type": "LEFT_RIGHT","productType": "97","position": "33","name": "di02","bmk": "RevPi DI","inpVariant": 0,"outVariant": 0,"comment": "","offset": 124,"inp": {"0": ["m_druck_ok","0","1","0",true,"0000", "","0"],"1": ["m_m1_eingefahren","0","1","0",true,"0001", "","1"],"2": ["m_m1_ausgefahren","0","1","0",true,"0002", "","2"],"3": ["m_m2_eingefahren","0","1","0",true,"0003", "","3"],"4": ["m_m2_ausgefahren","0","1","0",true,"0004", "","4"],"5": ["m_m3_eingefahren","0","1","0",true,"0005", "","5"],"6": ["m_m3_ausgefahren","0","1","0",true,"0006", "","6"],"7": ["s_rutsche","0","1","0",true,"0007", "","7"],"8": ["s_metall","0","1","0",true,"0008", "","8"],"9": ["s_magazin1","0","1","0",true,"0009", "","9"],"10": ["s_magazin2","0","1","0",true,"0010", "","10"],"11": ["I_12_i03","0","1","0",true,"0011", "","11"],"12": ["I_13_i03","0","1","0",true,"0012", "","12"],"13": ["I_14_i03","0","1","0",true,"0013", "","13"],"14": ["I_15_i03","0","1","0",true,"0014", "","14"],"15": ["mb_status","0","1","0",true,"0015", "","15"],"16": ["Status_i03","0","16","4",false,"0016", "",""],"17": ["Counter_1_i03","0","32","6",false,"0017", "",""],"18": ["Counter_2_i03","0","32","10",false,"0018", "",""],"19": ["Counter_3_i03","0","32","14",false,"0019", "",""],"20": ["Counter_4_i03","0","32","18",false,"0020", "",""],"21": ["Counter_5_i03","0","32","22",false,"0021", "",""],"22": ["Counter_6_i03","0","32","26",false,"0022", "",""],"23": ["Counter_7_i03","0","32","30",false,"0023", "",""],"24": ["Counter_8_i03","0","32","34",false,"0024", "",""],"25": ["Counter_9_i03","0","32","38",false,"0025", "",""],"26": ["Counter_10_i03","0","32","42",false,"0026", "",""],"27": ["Counter_11_i03","0","32","46",false,"0027", "",""],"28": ["Counter_12_i03","0","32","50",false,"0028", "",""],"29": ["Counter_13_i03","0","32","54",false,"0029", "",""],"30": ["Counter_14_i03","0","32","58",false,"0030", "",""],"31": ["Counter_15_i03","0","32","62",false,"0031", "",""],"32": ["Counter_16_i03","0","32","66",false,"0032", "",""],"33": ["Output_Status_i03","0","16","2",false,"0050", "",""]},"out": {"0": ["Output_i03","0","16","70",false,"0051", "",""],"1": ["PWM_1_i03","0","8","72",false,"0052", "",""],"2": ["PWM_2_i03","0","8","73",false,"0053", "",""],"3": ["PWM_3_i03","0","8","74",false,"0054", "",""],"4": ["PWM_4_i03","0","8","75",false,"0055", "",""],"5": ["PWM_5_i03","0","8","76",false,"0056", "",""],"6": ["PWM_6_i03","0","8","77",false,"0057", "",""],"7": ["PWM_7_i03","0","8","78",false,"0058", "",""],"8": ["PWM_8_i03","0","8","79",false,"0059", "",""],"9": ["PWM_9_i03","0","8","80",false,"0060", "",""],"10": ["PWM_10_i03","0","8","81",false,"0061", "",""],"11": ["PWM_11_i03","0","8","82",false,"0062", "",""],"12": ["PWM_12_i03","0","8","83",false,"0063", "",""],"13": ["PWM_13_i03","0","8","84",false,"0064", "",""],"14": ["PWM_14_i03","0","8","85",false,"0065", "",""],"15": ["PWM_15_i03","0","8","86",false,"0066", "",""],"16": ["PWM_16_i03","0","8","87",false,"0067", "",""]},"mem": {"0": ["InputMode_1_i03","0","8","88",false,"0033", "",""],"1": ["InputMode_2_i03","0","8","89",false,"0034", "",""],"2": ["InputMode_3_i03","0","8","90",false,"0035", "",""],"3": ["InputMode_4_i03","0","8","91",false,"0036", "",""],"4": ["InputMode_5_i03","0","8","92",false,"0037", "",""],"5": ["InputMode_6_i03","0","8","93",false,"0038", "",""],"6": ["InputMode_7_i03","0","8","94",false,"0039", "",""],"7": ["InputMode_8_i03","0","8","95",false,"0040", "",""],"8": ["InputMode_9_i03","0","8","96",false,"0041", "",""],"9": ["InputMode_10_i03","0","8","97",false,"0042", "",""],"10": ["InputMode_11_i03","0","8","98",false,"0043", "",""],"11": ["InputMode_12_i03","0","8","99",false,"0044", "",""],"12": ["InputMode_13_i03","0","8","100",false,"0045", "",""],"13": ["InputMode_14_i03","0","8","101",false,"0046", "",""],"14": ["InputMode_15_i03","0","8","102",false,"0047", "",""],"15": ["InputMode_16_i03","0","8","103",false,"0048", "",""],"16": ["InputDebounce_i03","0","16","104",false,"0049", "",""],"17": ["OutputPushPull_i03","0","16","106",false,"0068", "",""],"18": ["OutputOpenLoadDetect_i03","0","16","108",false,"0069", "",""],"19": ["OutputPWMActive_i03","0","16","110",false,"0070", "",""],"20": ["OutputPWMFrequency_i03","2","8","112",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDO","GUID": "4f8da9ea-91b2-d028-c60d-4476096a9dc2","id": "device_RevPiDO_20160818_1_0_001","type": "LEFT_RIGHT","productType": "98","position": "34","name": "do01","bmk": "RevPi DO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 237,"inp": {"0": ["Output_Status_i04","0","16","2",false,"0000", "",""],"1": ["Status_i04","0","16","4",false,"0001", "",""],"2": ["Input","0","16","0",false,"0038", "",""],"3": ["Counter_1_i04","0","32","6",false,"0039", "",""],"4": ["Counter_2_i04","0","32","10",false,"0040", "",""],"5": ["Counter_3_i04","0","32","14",false,"0041", "",""],"6": ["Counter_4_i04","0","32","18",false,"0042", "",""],"7": ["Counter_5_i04","0","32","22",false,"0043", "",""],"8": ["Counter_6_i04","0","32","26",false,"0044", "",""],"9": ["Counter_7_i04","0","32","30",false,"0045", "",""],"10": ["Counter_8_i04","0","32","34",false,"0046", "",""],"11": ["Counter_9_i04","0","32","38",false,"0047", "",""],"12": ["Counter_10_i04","0","32","42",false,"0048", "",""],"13": ["Counter_11_i04","0","32","46",false,"0049", "",""],"14": ["Counter_12_i04","0","32","50",false,"0050", "",""],"15": ["Counter_13_i04","0","32","54",false,"0051", "",""],"16": ["Counter_14_i04","0","32","58",false,"0052", "",""],"17": ["Counter_15_i04","0","32","62",false,"0053", "",""],"18": ["Counter_16_i04","0","32","66",false,"0054", "",""]},"out": {"0": ["fu_rechts","0","1","70",true,"0002", "","0"],"1": ["fu_links","0","1","70",true,"0003", "","1"],"2": ["fu_schnell","0","1","70",true,"0004", "","2"],"3": ["fu_lahm","0","1","70",true,"0005", "","3"],"4": ["v_druck","0","1","70",true,"0006", "","4"],"5": ["v_m1_einfahren","0","1","70",true,"0007", "","5"],"6": ["v_m1_ausfahren","0","1","70",true,"0008", "","6"],"7": ["v_m2_einfahren","0","1","70",true,"0009", "","7"],"8": ["v_m2_ausfahren","0","1","70",true,"0010", "","8"],"9": ["v_m3_einfahren","0","1","70",true,"0011", "","9"],"10": ["v_m3_ausfahren","0","1","70",true,"0012", "","10"],"11": ["O_12","0","1","70",true,"0013", "","11"],"12": ["O_13","0","1","70",true,"0014", "","12"],"13": ["O_14","0","1","70",true,"0015", "","13"],"14": ["O_15","0","1","70",true,"0016", "","14"],"15": ["fu_frei","0","1","70",true,"0017", "","15"],"16": ["PWM_1_i04","0","8","72",false,"0018", "",""],"17": ["PWM_2_i04","0","8","73",false,"0019", "",""],"18": ["PWM_3_i04","0","8","74",false,"0020", "",""],"19": ["PWM_4_i04","0","8","75",false,"0021", "",""],"20": ["PWM_5_i04","0","8","76",false,"0022", "",""],"21": ["PWM_6_i04","0","8","77",false,"0023", "",""],"22": ["PWM_7_i04","0","8","78",false,"0024", "",""],"23": ["PWM_8_i04","0","8","79",false,"0025", "",""],"24": ["PWM_9_i04","0","8","80",false,"0026", "",""],"25": ["PWM_10_i04","0","8","81",false,"0027", "",""],"26": ["PWM_11_i04","0","8","82",false,"0028", "",""],"27": ["PWM_12_i04","0","8","83",false,"0029", "",""],"28": ["PWM_13_i04","0","8","84",false,"0030", "",""],"29": ["PWM_14_i04","0","8","85",false,"0031", "",""],"30": ["PWM_15_i04","0","8","86",false,"0032", "",""],"31": ["PWM_16_i04","0","8","87",false,"0033", "",""]},"mem": {"0": ["OutputPushPull_i04","0","16","106",false,"0034", "",""],"1": ["OutputOpenLoadDetect_i04","0","16","108",false,"0035", "",""],"2": ["OutputPWMActive_i04","0","16","110",false,"0036", "",""],"3": ["OutputPWMFrequency_i04","1","8","112",false,"0037", "",""],"4": ["InputMode_1_i04","0","8","88",false,"0055", "",""],"5": ["InputMode_2_i04","0","8","89",false,"0056", "",""],"6": ["InputMode_3_i04","0","8","90",false,"0057", "",""],"7": ["InputMode_4_i04","0","8","91",false,"0058", "",""],"8": ["InputMode_5_i04","0","8","92",false,"0059", "",""],"9": ["InputMode_6_i04","0","8","93",false,"0060", "",""],"10": ["InputMode_7_i04","0","8","94",false,"0061", "",""],"11": ["InputMode_8_i04","0","8","95",false,"0062", "",""],"12": ["InputMode_9_i04","0","8","96",false,"0063", "",""],"13": ["InputMode_10_i04","0","8","97",false,"0064", "",""],"14": ["InputMode_11_i04","0","8","98",false,"0065", "",""],"15": ["InputMode_12_i04","0","8","99",false,"0066", "",""],"16": ["InputMode_13_i04","0","8","100",false,"0067", "",""],"17": ["InputMode_14_i04","0","8","101",false,"0068", "",""],"18": ["InputMode_15_i04","0","8","102",false,"0069", "",""],"19": ["InputMode_16_i04","0","8","103",false,"0070", "",""],"20": ["InputDebounce_i04","0","16","104",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDO","GUID": "b8a70c62-9b91-9e1a-af2a-37f74b16aca2","id": "device_RevPiDO_20160818_1_0_002","type": "LEFT_RIGHT","productType": "98","position": "35","name": "do02","bmk": "RevPi DO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 350,"inp": {"0": ["Output_Status_i05","0","16","2",false,"0000", "",""],"1": ["Status_i05","0","16","4",false,"0001", "",""],"2": ["Input_i05","0","16","0",false,"0038", "",""],"3": ["Counter_1_i05","0","32","6",false,"0039", "",""],"4": ["Counter_2_i05","0","32","10",false,"0040", "",""],"5": ["Counter_3_i05","0","32","14",false,"0041", "",""],"6": ["Counter_4_i05","0","32","18",false,"0042", "",""],"7": ["Counter_5_i05","0","32","22",false,"0043", "",""],"8": ["Counter_6_i05","0","32","26",false,"0044", "",""],"9": ["Counter_7_i05","0","32","30",false,"0045", "",""],"10": ["Counter_8_i05","0","32","34",false,"0046", "",""],"11": ["Counter_9_i05","0","32","38",false,"0047", "",""],"12": ["Counter_10_i05","0","32","42",false,"0048", "",""],"13": ["Counter_11_i05","0","32","46",false,"0049", "",""],"14": ["Counter_12_i05","0","32","50",false,"0050", "",""],"15": ["Counter_13_i05","0","32","54",false,"0051", "",""],"16": ["Counter_14_i05","0","32","58",false,"0052", "",""],"17": ["Counter_15_i05","0","32","62",false,"0053", "",""],"18": ["Counter_16_i05","0","32","66",false,"0054", "",""]},"out": {"0": ["fu_reset","0","1","70",true,"0002", "","0"],"1": ["h_start","0","1","70",true,"0003", "","1"],"2": ["h_fehler","0","1","70",true,"0004", "","2"],"3": ["O_04_i05","0","1","70",true,"0005", "","3"],"4": ["O_05_i05","0","1","70",true,"0006", "","4"],"5": ["O_06_i05","0","1","70",true,"0007", "","5"],"6": ["O_07_i05","0","1","70",true,"0008", "","6"],"7": ["O_08_i05","0","1","70",true,"0009", "","7"],"8": ["O_09_i05","0","1","70",true,"0010", "","8"],"9": ["O_10_i05","0","1","70",true,"0011", "","9"],"10": ["O_11_i05","0","1","70",true,"0012", "","10"],"11": ["O_12_i05","0","1","70",true,"0013", "","11"],"12": ["O_13_i05","0","1","70",true,"0014", "","12"],"13": ["O_14_i05","0","1","70",true,"0015", "","13"],"14": ["O_15_i05","0","1","70",true,"0016", "","14"],"15": ["mb_connect","0","1","70",true,"0017", "","15"],"16": ["PWM_1_i05","0","8","72",false,"0018", "",""],"17": ["PWM_2_i05","0","8","73",false,"0019", "",""],"18": ["PWM_3_i05","0","8","74",false,"0020", "",""],"19": ["PWM_4_i05","0","8","75",false,"0021", "",""],"20": ["PWM_5_i05","0","8","76",false,"0022", "",""],"21": ["PWM_6_i05","0","8","77",false,"0023", "",""],"22": ["PWM_7_i05","0","8","78",false,"0024", "",""],"23": ["PWM_8_i05","0","8","79",false,"0025", "",""],"24": ["PWM_9_i05","0","8","80",false,"0026", "",""],"25": ["PWM_10_i05","0","8","81",false,"0027", "",""],"26": ["PWM_11_i05","0","8","82",false,"0028", "",""],"27": ["PWM_12_i05","0","8","83",false,"0029", "",""],"28": ["PWM_13_i05","0","8","84",false,"0030", "",""],"29": ["PWM_14_i05","0","8","85",false,"0031", "",""],"30": ["PWM_15_i05","0","8","86",false,"0032", "",""],"31": ["PWM_16_i05","0","8","87",false,"0033", "",""]},"mem": {"0": ["OutputPushPull_i05","0","16","106",false,"0034", "",""],"1": ["OutputOpenLoadDetect_i05","0","16","108",false,"0035", "",""],"2": ["OutputPWMActive_i05","0","16","110",false,"0036", "",""],"3": ["OutputPWMFrequency_i05","1","8","112",false,"0037", "",""],"4": ["InputMode_1_i05","0","8","88",false,"0055", "",""],"5": ["InputMode_2_i05","0","8","89",false,"0056", "",""],"6": ["InputMode_3_i05","0","8","90",false,"0057", "",""],"7": ["InputMode_4_i05","0","8","91",false,"0058", "",""],"8": ["InputMode_5_i05","0","8","92",false,"0059", "",""],"9": ["InputMode_6_i05","0","8","93",false,"0060", "",""],"10": ["InputMode_7_i05","0","8","94",false,"0061", "",""],"11": ["InputMode_8_i05","0","8","95",false,"0062", "",""],"12": ["InputMode_9_i05","0","8","96",false,"0063", "",""],"13": ["InputMode_10_i05","0","8","97",false,"0064", "",""],"14": ["InputMode_11_i05","0","8","98",false,"0065", "",""],"15": ["InputMode_12_i05","0","8","99",false,"0066", "",""],"16": ["InputMode_13_i05","0","8","100",false,"0067", "",""],"17": ["InputMode_14_i05","0","8","101",false,"0068", "",""],"18": ["InputMode_15_i05","0","8","102",false,"0069", "",""],"19": ["InputMode_16_i05","0","8","103",false,"0070", "",""],"20": ["InputDebounce_i05","0","16","104",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiAIO","GUID": "76f10e57-ecaf-2a45-f4df-b9a66e3f40db","id": "device_RevPiAIO_20170301_1_0_001","type": "LEFT_RIGHT","productType": "103","position": "36","name": "aio01","bmk": "RevPi AIO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 463,"inp": {"0": ["fu_ist","0","16","0",false,"0000", "",""],"1": ["InputValue_2","0","16","2",false,"0001", "",""],"2": ["InputValue_3","0","16","4",false,"0002", "",""],"3": ["InputValue_4","0","16","6",false,"0003", "",""],"4": ["InputStatus_1","0","8","8",false,"0004", "",""],"5": ["InputStatus_2","0","8","9",false,"0005", "",""],"6": ["InputStatus_3","0","8","10",false,"0006", "",""],"7": ["InputStatus_4","0","8","11",false,"0007", "",""],"8": ["tmp_schrank","0","16","12",false,"0008", "",""],"9": ["RTDValue_2","0","16","14",false,"0009", "",""],"10": ["RTDStatus_1","0","8","16",false,"0010", "",""],"11": ["RTDStatus_2","0","8","17",false,"0011", "",""],"12": ["OutputStatus_1","0","8","18",false,"0012", "",""],"13": ["OutputStatus_2","0","8","19",false,"0013", "",""]},"out": {"0": ["OutputValue_1","0","16","20",false,"0014", "",""],"1": ["fu_soll","0","16","22",false,"0015", "",""]},"mem": {"0": ["Input1Range","1","8","24",false,"0016", "You must use wire bridges for current measurement!",""],"1": ["Input1Multiplier","1","16","25",false,"0017", "",""],"2": ["Input1Divisor","1","16","27",false,"0018", "",""],"3": ["Input1Offset","0","16","29",false,"0019", "",""],"4": ["Input2Range","1","8","31",false,"0020", "You must use wire bridges for current measurement!",""],"5": ["Input2Multiplier","1","16","32",false,"0021", "",""],"6": ["Input2Divisor","1","16","34",false,"0022", "",""],"7": ["Input2Offset","0","16","36",false,"0023", "",""],"8": ["Input3Range","1","8","38",false,"0024", "You must use wire bridges for current measurement!",""],"9": ["Input3Multiplier","1","16","39",false,"0025", "",""],"10": ["Input3Divisor","1","16","41",false,"0026", "",""],"11": ["Input3Offset","0","16","43",false,"0027", "",""],"12": ["Input4Range","1","8","45",false,"0028", "You must use wire bridges for current measurement!",""],"13": ["Input4Multiplier","1","16","46",false,"0029", "",""],"14": ["Input4Divisor","1","16","48",false,"0030", "",""],"15": ["Input4Offset","0","16","50",false,"0031", "",""],"16": ["ADC_DataRate","0","8","52",false,"0032", "Use lowest value for highest precision and a maximum 50 Hz suppression",""],"17": ["RTD1Type","0","8","53",false,"0033", "",""],"18": ["RTD1Wiring","0","8","54",false,"0034", "You must use wire bridges for 2-wire sensors!",""],"19": ["RTD1Multiplier","1","16","55",false,"0035", "",""],"20": ["RTD1Divisor","1","16","57",false,"0036", "",""],"21": ["RTD1Offset","0","16","59",false,"0037", "",""],"22": ["RTD2Type","0","8","61",false,"0038", "",""],"23": ["RTD2Wiring","0","8","62",false,"0039", "You must use wire bridges for 2-wire sensors!",""],"24": ["RTD2Multiplier","1","16","63",false,"0040", "",""],"25": ["RTD2Divisor","1","16","65",false,"0041", "",""],"26": ["RTD2Offset","0","16","67",false,"0042", "",""],"27": ["Output1Range","0","8","69",false,"0043", "",""],"28": ["Output1EnableSlew","0","8","70",false,"0044", "Enable slew rate deceleration",""],"29": ["Output1SlewStepSize","0","8","71",false,"0045", "Slew rate step size",""],"30": ["Output1SlewClock","0","8","72",false,"0046", "lock rate of slew rate deceleration in kHz",""],"31": ["Output1Multiplier","1","16","73",false,"0047", "",""],"32": ["Output1Divisor","1","16","75",false,"0048", "",""],"33": ["Output1Offset","0","16","77",false,"0049", "",""],"34": ["Output2Range","2","8","79",false,"0050", "",""],"35": ["Output2EnableSlew","0","8","80",false,"0051", "Enable slew rate deceleration",""],"36": ["Output2SlewStepSize","0","8","81",false,"0052", "Slew rate step size",""],"37": ["Output2SlewClock","0","8","82",false,"0053", "lock rate of slew rate deceleration in kHz",""],"38": ["Output2Multiplier","1","16","83",false,"0054", "",""],"39": ["Output2Divisor","1","16","85",false,"0055", "",""],"40": ["Output2Offset","0","16","87",false,"0056", "",""]},"extend": {}},{"catalogNr": "Virtual01","GUID": "c3bf8705-d96a-6452-2566-40c5d86a5061","id": "device_Virtual01_20160818_1_0_001","type": "VIRTUAL","productType": "32768","position": "64","name": "virt01","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 552,"inp": {"0": ["pbit0_7","0","8","0",false,"0000", "",""],"1": ["pbit8_15","0","8","1",false,"0001", "",""],"2": ["pbit16_23","0","8","2",false,"0002", "",""],"3": ["pbit24_31","0","8","3",false,"0003", "",""],"4": ["magazin1_max","4","8","4",false,"0004", "",""],"5": ["magazin2_max","4","8","5",false,"0005", "",""],"6": ["p_drehzahl1","136","8","6",false,"0006", "",""],"7": ["p_drehzahl2","19","8","7",false,"0007", "",""],"8": ["Input_9","0","8","8",false,"0008", "",""],"9": ["Input_10","0","8","9",false,"0009", "",""],"10": ["Input_11","0","8","10",false,"0010", "",""],"11": ["Input_12","0","8","11",false,"0011", "",""],"12": ["Input_13","0","8","12",false,"0012", "",""],"13": ["Input_14","0","8","13",false,"0013", "",""],"14": ["Input_15","0","8","14",false,"0014", "",""],"15": ["Input_16","0","8","15",false,"0015", "",""],"16": ["Input_17","0","8","16",false,"0016", "",""],"17": ["Input_18","0","8","17",false,"0017", "",""],"18": ["Input_19","0","8","18",false,"0018", "",""],"19": ["Input_20","0","8","19",false,"0019", "",""],"20": ["Input_21","0","8","20",false,"0020", "",""],"21": ["Input_22","0","8","21",false,"0021", "",""],"22": ["Input_23","0","8","22",false,"0022", "",""],"23": ["Input_24","0","8","23",false,"0023", "",""],"24": ["Input_25","0","8","24",false,"0024", "",""],"25": ["Input_26","0","8","25",false,"0025", "",""],"26": ["Input_27","0","8","26",false,"0026", "",""],"27": ["Input_28","0","8","27",false,"0027", "",""],"28": ["Input_29","0","8","28",false,"0028", "",""],"29": ["Input_30","0","8","29",false,"0029", "",""],"30": ["Input_31","0","8","30",false,"0030", "",""],"31": ["Input_32","0","8","31",false,"0031", "",""]},"out": {"0": ["meldung0_7","0","8","32",false,"0032", "",""],"1": ["meldung8_15","0","8","33",false,"0033", "",""],"2": ["meldung16_23","0","8","34",false,"0034", "",""],"3": ["meldung24_31","0","8","35",false,"0035", "",""],"4": ["magazin1","0","8","36",false,"0036", "",""],"5": ["magazin2","0","8","37",false,"0037", "",""],"6": ["Output_7","0","8","38",false,"0038", "",""],"7": ["Output_8","0","8","39",false,"0039", "",""],"8": ["Output_9","0","8","40",false,"0040", "",""],"9": ["Output_10","0","8","41",false,"0041", "",""],"10": ["Output_11","0","8","42",false,"0042", "",""],"11": ["Output_12","0","8","43",false,"0043", "",""],"12": ["Output_13","0","8","44",false,"0044", "",""],"13": ["Output_14","0","8","45",false,"0045", "",""],"14": ["Output_15","0","8","46",false,"0046", "",""],"15": ["Output_16","0","8","47",false,"0047", "",""],"16": ["Output_17","0","8","48",false,"0048", "",""],"17": ["Output_18","0","8","49",false,"0049", "",""],"18": ["Output_19","0","8","50",false,"0050", "",""],"19": ["Output_20","0","8","51",false,"0051", "",""],"20": ["Output_21","0","8","52",false,"0052", "",""],"21": ["Output_22","0","8","53",false,"0053", "",""],"22": ["Output_23","0","8","54",false,"0054", "",""],"23": ["Output_24","0","8","55",false,"0055", "",""],"24": ["Output_25","0","8","56",false,"0056", "",""],"25": ["Output_26","0","8","57",false,"0057", "",""],"26": ["Output_27","0","8","58",false,"0058", "",""],"27": ["Output_28","0","8","59",false,"0059", "",""],"28": ["Output_29","0","8","60",false,"0060", "",""],"29": ["Output_30","0","8","61",false,"0061", "",""],"30": ["Output_31","0","8","62",false,"0062", "",""],"31": ["Output_32","0","8","63",false,"0063", "",""]},"mem": {},"extend": {}}],"Connections":[]} \ No newline at end of file diff --git a/tests/common/config_bad_offset.rsc b/tests/common/config_bad_offset.rsc new file mode 100644 index 0000000..6e27c48 --- /dev/null +++ b/tests/common/config_bad_offset.rsc @@ -0,0 +1 @@ +{ "App": { "name": "PiCtory", "version": "1.4.7", "saveTS": "20210727132341", "language": "en", "layout": { "north": { "size": 70, "initClosed": false, "initHidden": false }, "south": { "size": 200, "initClosed": false, "initHidden": false, "children": { "layout1": { "east": { "size": 500, "initClosed": false, "initHidden": false } } } }, "east": { "size": 70, "initClosed": true, "initHidden": false, "children": {} }, "west": { "size": 256, "initClosed": false, "initHidden": false, "children": { "layout1": {} } } } }, "Summary": { "inpTotal": 876, "outTotal": 711 }, "Devices": [ { "GUID": "429edcc7-77c0-17ad-7228-4aad4b89ce0c", "id": "device_RevPiDIO_20160818_1_0_001", "type": "LEFT_RIGHT", "productType": "96", "position": "31", "name": "RevPi DIO", "bmk": "RevPi DIO", "inpVariant": 0, "outVariant": 0, "comment": "", "offset": 0, "inp": { "0": [ "I_Start", "0", "1", "0", false, "0000", "", "0" ], "1": [ "I_Mode1", "0", "1", "0", false, "0001", "", "1" ], "2": [ "I_Mode2", "0", "1", "0", false, "0002", "", "2" ], "3": [ "I_EmergStop", "0", "1", "0", false, "0003", "", "3" ], "4": [ "I_5", "0", "1", "0", false, "0004", "", "4" ], "5": [ "I_6", "0", "1", "0", false, "0005", "", "5" ], "6": [ "I_7", "0", "1", "0", false, "0006", "", "6" ], "7": [ "I_8", "0", "1", "0", false, "0007", "", "7" ], "8": [ "I_9", "0", "1", "0", false, "0008", "", "8" ], "9": [ "I_10", "0", "1", "0", false, "0009", "", "9" ], "10": [ "I_11", "0", "1", "0", false, "0010", "", "10" ], "11": [ "I_12", "0", "1", "0", false, "0011", "", "11" ], "12": [ "I_13", "0", "1", "0", false, "0012", "", "12" ], "13": [ "I_14", "0", "1", "0", false, "0013", "", "13" ], "14": [ "I_15", "0", "1", "0", false, "0014", "", "14" ], "15": [ "I_16", "0", "1", "0", false, "0015", "", "15" ], "16": [ "Output_Status", "0", "16", "2", false, "0016", "", "" ], "17": [ "Status", "0", "16", "4", false, "0017", "", "" ], "18": [ "Counter_1", "0", "32", "6", false, "0018", "", "" ], "19": [ "Counter_2", "0", "32", "10", false, "0019", "", "" ], "20": [ "Counter_3", "0", "32", "14", false, "0020", "", "" ], "21": [ "Counter_4", "0", "32", "18", false, "0021", "", "" ], "22": [ "Counter_5", "0", "32", "22", false, "0022", "", "" ], "23": [ "Counter_6", "0", "32", "26", false, "0023", "", "" ], "24": [ "Counter_7", "0", "32", "30", false, "0024", "", "" ], "25": [ "Counter_8", "0", "32", "34", false, "0025", "", "" ], "26": [ "Counter_9", "0", "32", "38", false, "0026", "", "" ], "27": [ "Counter_10", "0", "32", "42", false, "0027", "", "" ], "28": [ "Counter_11", "0", "32", "46", false, "0028", "", "" ], "29": [ "Counter_12", "0", "32", "50", false, "0029", "", "" ], "30": [ "Counter_13", "0", "32", "54", false, "0030", "", "" ], "31": [ "Counter_14", "0", "32", "58", false, "0031", "", "" ], "32": [ "Counter_15", "0", "32", "62", false, "0032", "", "" ], "33": [ "Counter_16", "0", "32", "66", false, "0033", "", "" ] }, "out": { "0": [ "O_Start", "0", "1", "70", false, "0034", "", "0" ], "1": [ "O_Running", "0", "1", "70", false, "0035", "", "1" ], "2": [ "O_Mode", "0", "1", "70", false, "0036", "", "2" ], "3": [ "O_Alarm", "0", "1", "70", false, "0037", "", "3" ], "4": [ "O_+5VSupply", "0", "1", "70", false, "0038", "", "4" ], "5": [ "O_6", "0", "1", "70", false, "0039", "", "5" ], "6": [ "O_7", "0", "1", "70", false, "0040", "", "6" ], "7": [ "O_8", "0", "1", "70", false, "0041", "", "7" ], "8": [ "O_9", "0", "1", "70", false, "0042", "", "8" ], "9": [ "O_10", "0", "1", "70", false, "0043", "", "9" ], "10": [ "O_11", "0", "1", "70", false, "0044", "", "10" ], "11": [ "O_12", "0", "1", "70", false, "0045", "", "11" ], "12": [ "O_13", "0", "1", "70", false, "0046", "", "12" ], "13": [ "O_14", "0", "1", "70", false, "0047", "", "13" ], "14": [ "O_15", "0", "1", "70", false, "0048", "", "14" ], "15": [ "O_16", "0", "1", "70", false, "0049", "", "15" ], "16": [ "PWM_1", "0", "8", "72", false, "0050", "", "" ], "17": [ "PWM_2", "0", "8", "73", false, "0051", "", "" ], "18": [ "PWM_3", "0", "8", "74", false, "0052", "", "" ], "19": [ "PWM_4", "0", "8", "75", false, "0053", "", "" ], "20": [ "PWM_5", "0", "8", "76", false, "0054", "", "" ], "21": [ "PWM_6", "0", "8", "77", false, "0055", "", "" ], "22": [ "PWM_7", "0", "8", "78", false, "0056", "", "" ], "23": [ "PWM_8", "0", "8", "79", false, "0057", "", "" ], "24": [ "PWM_9", "0", "8", "80", false, "0058", "", "" ], "25": [ "PWM_10", "0", "8", "81", false, "0059", "", "" ], "26": [ "PWM_11", "0", "8", "82", false, "0060", "", "" ], "27": [ "PWM_12", "0", "8", "83", false, "0061", "", "" ], "28": [ "PWM_13", "0", "8", "84", false, "0062", "", "" ], "29": [ "PWM_14", "0", "8", "85", false, "0063", "", "" ], "30": [ "PWM_15", "0", "8", "86", false, "0064", "", "" ], "31": [ "PWM_16", "0", "8", "87", false, "0065", "", "" ] }, "mem": { "0": [ "InputMode_1", "0", "8", "88", false, "0066", "", "" ], "1": [ "InputMode_2", "0", "8", "89", false, "0067", "", "" ], "2": [ "InputMode_3", "0", "8", "90", false, "0068", "", "" ], "3": [ "InputMode_4", "0", "8", "91", false, "0069", "", "" ], "4": [ "InputMode_5", "0", "8", "92", false, "0070", "", "" ], "5": [ "InputMode_6", "0", "8", "93", false, "0071", "", "" ], "6": [ "InputMode_7", "0", "8", "94", false, "0072", "", "" ], "7": [ "InputMode_8", "0", "8", "95", false, "0073", "", "" ], "8": [ "InputMode_9", "0", "8", "96", false, "0074", "", "" ], "9": [ "InputMode_10", "0", "8", "97", false, "0075", "", "" ], "10": [ "InputMode_11", "0", "8", "98", false, "0076", "", "" ], "11": [ "InputMode_12", "0", "8", "99", false, "0077", "", "" ], "12": [ "InputMode_13", "0", "8", "100", false, "0078", "", "" ], "13": [ "InputMode_14", "0", "8", "101", false, "0079", "", "" ], "14": [ "InputMode_15", "0", "8", "102", false, "0080", "", "" ], "15": [ "InputMode_16", "0", "8", "103", false, "0081", "", "" ], "16": [ "InputDebounce", "0", "16", "104", false, "0082", "", "" ], "17": [ "OutputPushPull", "0", "16", "106", false, "0083", "", "" ], "18": [ "OutputOpenLoadDetect", "0", "16", "108", false, "0084", "", "" ], "19": [ "OutputPWMActive", "0", "16", "110", false, "0085", "", "" ], "20": [ "OutputPWMFrequency", "1", "8", "112", false, "0086", "", "" ] }, "extend": {} }, { "GUID": "6ad3c1a4-6870-3bf1-6d55-b9d991ba9dc0", "id": "device_RevPiConnect_20171023_1_0_001", "type": "BASE", "productType": "105", "position": "0", "name": "RevPi Connect V1.0", "bmk": "RevPi Connect V1.0", "inpVariant": 0, "outVariant": 0, "comment": "This is a RevPi Connect", "offset": 113, "inp": { "0": [ "RevPiStatus", "0", "8", "0", false, "0000", "", "" ], "1": [ "RevPiIOCycle", "0", "8", "1", false, "0001", "", "" ], "2": [ "RS485ErrorCnt", "0", "16", "2", false, "0002", "", "" ], "3": [ "Core_Temperature", "0", "8", "4", false, "0003", "", "" ], "4": [ "Core_Frequency", "0", "8", "5", false, "0004", "", "" ] }, "out": { "0": [ "RevPiLED", "0", "8", "6", false, "0005", "", "" ], "1": [ "RS485ErrorLimit1", "10", "16", "7", false, "0006", "", "" ], "2": [ "RS485ErrorLimit2", "1000", "16", "9", false, "0007", "", "" ] }, "mem": {}, "extend": {} }, { "GUID": "39dc767a-5a61-90a1-c023-f3d898d0099e", "id": "device_Virtual01_20160818_1_0_001", "type": "VIRTUAL", "productType": "32768", "position": "64", "name": "MQTT", "bmk": "Virtual Device 32 Byte", "inpVariant": 0, "outVariant": 0, "comment": "Virtual Device to reserve space in process image for user applications", "offset": 124, "inp": { "0": [ "R_MQTTr_State", "0", "8", "0", true, "0000", "", "" ], "1": [ "R_MQTTr_Substate", "0", "8", "1", true, "0001", "", "" ], "2": [ "R_MQTTr_Failure", "0", "8", "2", true, "0002", "", "" ], "3": [ "R_MQTTr_OverCurrentEvents", "0", "8", "3", true, "0003", "", "" ], "4": [ "R_MQTTr_EstimatedDistance", "0", "8", "4", true, "0004", "", "" ], "5": [ "R_MQTTr_Falltime", "0", "8", "5", false, "0005", "", "" ], "6": [ "Input_7", "0", "8", "6", false, "0006", "", "" ], "7": [ "Input_8", "0", "8", "7", false, "0007", "", "" ], "8": [ "Input_9", "0", "8", "8", false, "0008", "", "" ], "9": [ "Input_10", "0", "8", "9", false, "0009", "", "" ], "10": [ "Input_11", "0", "8", "10", false, "0010", "", "" ], "11": [ "Input_12", "0", "8", "11", false, "0011", "", "" ], "12": [ "Input_13", "0", "8", "12", false, "0012", "", "" ], "13": [ "Input_14", "0", "8", "13", false, "0013", "", "" ], "14": [ "Input_15", "0", "8", "14", false, "0014", "", "" ], "15": [ "Input_16", "0", "8", "15", false, "0015", "", "" ], "16": [ "Input_17", "0", "8", "16", false, "0016", "", "" ], "17": [ "Input_18", "0", "8", "17", false, "0017", "", "" ], "18": [ "Input_19", "0", "8", "18", false, "0018", "", "" ], "19": [ "Input_20", "0", "8", "19", false, "0019", "", "" ], "20": [ "Input_21", "0", "8", "20", false, "0020", "", "" ], "21": [ "Input_22", "0", "8", "21", false, "0021", "", "" ], "22": [ "Input_23", "0", "8", "22", false, "0022", "", "" ], "23": [ "Input_24", "0", "8", "23", false, "0023", "", "" ], "24": [ "Input_25", "0", "8", "24", false, "0024", "", "" ], "25": [ "Input_26", "0", "8", "25", false, "0025", "", "" ], "26": [ "Input_27", "0", "8", "26", false, "0026", "", "" ], "27": [ "Input_28", "0", "8", "27", false, "0027", "", "" ], "28": [ "Input_29", "0", "8", "28", false, "0028", "", "" ], "29": [ "Input_30", "0", "8", "29", false, "0029", "", "" ], "30": [ "Input_31", "0", "8", "30", false, "0030", "", "" ], "31": [ "Input_32", "0", "8", "31", false, "0031", "", "" ] }, "out": { "0": [ "W_MQTTr_Halt", "0", "8", "32", true, "0032", "", "" ], "1": [ "W_MQTTr_Reset", "0", "8", "33", true, "0033", "", "" ], "2": [ "W_MQTTr_Start", "0", "8", "34", true, "0034", "", "" ], "3": [ "W_MQTTr_DontAnimate", "0", "8", "35", true, "0035", "", "" ], "4": [ "W_MQTTr_PicDelay", "0", "8", "36", true, "0036", "", "" ], "5": [ "W_MQTTr_RideDelay", "0", "8", "37", true, "0037", "", "" ], "6": [ "W_MQTTr_SlideShowDelay", "0", "8", "38", true, "0038", "", "" ], "7": [ "W_MQTTr_TimeLimit1", "0", "8", "39", true, "0039", "", "" ], "8": [ "W_MQTTr_TimeLimit2", "0", "8", "40", true, "0040", "", "" ], "9": [ "W_MQTTr_TimeAverage", "0", "8", "41", true, "0041", "", "" ], "10": [ "W_MQTTr_CurrentLimit", "0", "8", "42", true, "0042", "", "" ], "11": [ "W_MQTTr_MinEvents", "0", "8", "43", true, "0043", "", "" ], "12": [ "Output_13", "0", "8", "44", false, "0044", "", "" ], "13": [ "Output_14", "0", "8", "45", false, "0045", "", "" ], "14": [ "Output_15", "0", "8", "46", false, "0046", "", "" ], "15": [ "Output_16", "0", "8", "47", false, "0047", "", "" ], "16": [ "Output_17", "0", "8", "48", false, "0048", "", "" ], "17": [ "Output_18", "0", "8", "49", false, "0049", "", "" ], "18": [ "Output_19", "0", "8", "50", false, "0050", "", "" ], "19": [ "Output_20", "0", "8", "51", false, "0051", "", "" ], "20": [ "Output_21", "0", "8", "52", false, "0052", "", "" ], "21": [ "Output_22", "0", "8", "53", false, "0053", "", "" ], "22": [ "Output_23", "0", "8", "54", false, "0054", "", "" ], "23": [ "Output_24", "0", "8", "55", false, "0055", "", "" ], "24": [ "Output_25", "0", "8", "56", false, "0056", "", "" ], "25": [ "Output_26", "0", "8", "57", false, "0057", "", "" ], "26": [ "Output_27", "0", "8", "58", false, "0058", "", "" ], "27": [ "Output_28", "0", "8", "59", false, "0059", "", "" ], "28": [ "Output_29", "0", "8", "60", false, "0060", "", "" ], "29": [ "Output_30", "0", "8", "61", false, "0061", "", "" ], "30": [ "Output_31", "0", "8", "62", false, "0062", "", "" ], "31": [ "Output_32", "0", "8", "63", false, "0063", "", "" ] }, "mem": {}, "extend": {} }, { "GUID": "cbd86330-5c16-7e19-ff2b-6b316678172a", "id": "device_ModbusTCPMaster_20200904_1_1_001", "type": "VIRTUAL", "productType": "24579", "position": "65", "name": "ModbusTCP Master Motor", "bmk": "ModbusTCP Master 150", "inpVariant": 0, "outVariant": 0, "comment": "ModbusTCP Master with 150 Input/Output Words and 152 Input/Output bits.Max 64 configurable Modbus actions.", "offset": 188, "inp": { "0": [ "I_LiftState", "0", "16", "0", true, "0000", "", "" ], "1": [ "I_LiftFallTime", "0", "16", "2", true, "0001", "", "" ], "2": [ "I_LiftData", "0", "16", "4", true, "0002", "", "" ], "3": [ "LiftData002", "0", "16", "6", false, "0003", "", "" ], "4": [ "LiftData003", "0", "16", "8", false, "0004", "", "" ], "5": [ "LiftData004", "0", "16", "10", false, "0005", "", "" ], "6": [ "LiftData005", "0", "16", "12", false, "0006", "", "" ], "7": [ "LiftData006", "0", "16", "14", false, "0007", "", "" ], "8": [ "LiftData007", "0", "16", "16", false, "0008", "", "" ], "9": [ "LiftData008", "0", "16", "18", false, "0009", "", "" ], "10": [ "LiftData009", "0", "16", "20", false, "0010", "", "" ], "11": [ "LiftData010", "0", "16", "22", false, "0011", "", "" ], "12": [ "Input_Word_13", "0", "16", "24", false, "0012", "", "" ], "13": [ "Input_Word_14", "0", "16", "26", false, "0013", "", "" ], "14": [ "Input_Word_15", "0", "16", "28", false, "0014", "", "" ], "15": [ "Input_Word_16", "0", "16", "30", false, "0015", "", "" ], "16": [ "Input_Word_17", "0", "16", "32", false, "0016", "", "" ], "17": [ "Input_Word_18", "0", "16", "34", false, "0017", "", "" ], "18": [ "Input_Word_19", "0", "16", "36", false, "0018", "", "" ], "19": [ "Input_Word_20", "0", "16", "38", false, "0019", "", "" ], "20": [ "Input_Word_21", "0", "16", "40", false, "0020", "", "" ], "21": [ "Input_Word_22", "0", "16", "42", false, "0021", "", "" ], "22": [ "Input_Word_23", "0", "16", "44", false, "0022", "", "" ], "23": [ "Input_Word_24", "0", "16", "46", false, "0023", "", "" ], "24": [ "Input_Word_25", "0", "16", "48", false, "0024", "", "" ], "25": [ "Input_Word_26", "0", "16", "50", false, "0025", "", "" ], "26": [ "Input_Word_27", "0", "16", "52", false, "0026", "", "" ], "27": [ "Input_Word_28", "0", "16", "54", false, "0027", "", "" ], "28": [ "Input_Word_29", "0", "16", "56", false, "0028", "", "" ], "29": [ "Input_Word_30", "0", "16", "58", false, "0029", "", "" ], "30": [ "Input_Word_31", "0", "16", "60", false, "0030", "", "" ], "31": [ "Input_Word_32", "0", "16", "62", false, "0031", "", "" ], "32": [ "Input_Word_33", "0", "16", "64", false, "0032", "", "" ], "33": [ "Input_Word_34", "0", "16", "66", false, "0033", "", "" ], "34": [ "Input_Word_35", "0", "16", "68", false, "0034", "", "" ], "35": [ "Input_Word_36", "0", "16", "70", false, "0035", "", "" ], "36": [ "Input_Word_37", "0", "16", "72", false, "0036", "", "" ], "37": [ "Input_Word_38", "0", "16", "74", false, "0037", "", "" ], "38": [ "Input_Word_39", "0", "16", "76", false, "0038", "", "" ], "39": [ "Input_Word_40", "0", "16", "78", false, "0039", "", "" ], "40": [ "Input_Word_41", "0", "16", "80", false, "0040", "", "" ], "41": [ "Input_Word_42", "0", "16", "82", false, "0041", "", "" ], "42": [ "Input_Word_43", "0", "16", "84", false, "0042", "", "" ], "43": [ "Input_Word_44", "0", "16", "86", false, "0043", "", "" ], "44": [ "Input_Word_45", "0", "16", "88", false, "0044", "", "" ], "45": [ "Input_Word_46", "0", "16", "90", false, "0045", "", "" ], "46": [ "Input_Word_47", "0", "16", "92", false, "0046", "", "" ], "47": [ "Input_Word_48", "0", "16", "94", false, "0047", "", "" ], "48": [ "Input_Word_49", "0", "16", "96", false, "0048", "", "" ], "49": [ "Input_Word_50", "0", "16", "98", false, "0049", "", "" ], "50": [ "Input_Word_51", "0", "16", "100", false, "0050", "", "" ], "51": [ "Input_Word_52", "0", "16", "102", false, "0051", "", "" ], "52": [ "Input_Word_53", "0", "16", "104", false, "0052", "", "" ], "53": [ "Input_Word_54", "0", "16", "106", false, "0053", "", "" ], "54": [ "Input_Word_55", "0", "16", "108", false, "0054", "", "" ], "55": [ "Input_Word_56", "0", "16", "110", false, "0055", "", "" ], "56": [ "Input_Word_57", "0", "16", "112", false, "0056", "", "" ], "57": [ "Input_Word_58", "0", "16", "114", false, "0057", "", "" ], "58": [ "Input_Word_59", "0", "16", "116", false, "0058", "", "" ], "59": [ "Input_Word_60", "0", "16", "118", false, "0059", "", "" ], "60": [ "Input_Word_61", "0", "16", "120", false, "0060", "", "" ], "61": [ "Input_Word_62", "0", "16", "122", false, "0061", "", "" ], "62": [ "Input_Word_63", "0", "16", "124", false, "0062", "", "" ], "63": [ "Input_Word_64", "0", "16", "126", false, "0063", "", "" ], "64": [ "Input_Word_65", "0", "16", "128", false, "0064", "", "" ], "65": [ "Input_Word_66", "0", "16", "130", false, "0065", "", "" ], "66": [ "Input_Word_67", "0", "16", "132", false, "0066", "", "" ], "67": [ "Input_Word_68", "0", "16", "134", false, "0067", "", "" ], "68": [ "Input_Word_69", "0", "16", "136", false, "0068", "", "" ], "69": [ "Input_Word_70", "0", "16", "138", false, "0069", "", "" ], "70": [ "Input_Word_71", "0", "16", "140", false, "0070", "", "" ], "71": [ "Input_Word_72", "0", "16", "142", false, "0071", "", "" ], "72": [ "Input_Word_73", "0", "16", "144", false, "0072", "", "" ], "73": [ "Input_Word_74", "0", "16", "146", false, "0073", "", "" ], "74": [ "Input_Word_75", "0", "16", "148", false, "0074", "", "" ], "75": [ "Input_Word_76", "0", "16", "150", false, "0075", "", "" ], "76": [ "Input_Word_77", "0", "16", "152", false, "0076", "", "" ], "77": [ "Input_Word_78", "0", "16", "154", false, "0077", "", "" ], "78": [ "Input_Word_79", "0", "16", "156", false, "0078", "", "" ], "79": [ "Input_Word_80", "0", "16", "158", false, "0079", "", "" ], "80": [ "Input_Word_81", "0", "16", "160", false, "0080", "", "" ], "81": [ "Input_Word_82", "0", "16", "162", false, "0081", "", "" ], "82": [ "Input_Word_83", "0", "16", "164", false, "0082", "", "" ], "83": [ "Input_Word_84", "0", "16", "166", false, "0083", "", "" ], "84": [ "Input_Word_85", "0", "16", "168", false, "0084", "", "" ], "85": [ "Input_Word_86", "0", "16", "170", false, "0085", "", "" ], "86": [ "Input_Word_87", "0", "16", "172", false, "0086", "", "" ], "87": [ "Input_Word_88", "0", "16", "174", false, "0087", "", "" ], "88": [ "Input_Word_89", "0", "16", "176", false, "0088", "", "" ], "89": [ "Input_Word_90", "0", "16", "178", false, "0089", "", "" ], "90": [ "Input_Word_91", "0", "16", "180", false, "0090", "", "" ], "91": [ "Input_Word_92", "0", "16", "182", false, "0091", "", "" ], "92": [ "Input_Word_93", "0", "16", "184", false, "0092", "", "" ], "93": [ "Input_Word_94", "0", "16", "186", false, "0093", "", "" ], "94": [ "Input_Word_95", "0", "16", "188", false, "0094", "", "" ], "95": [ "Input_Word_96", "0", "16", "190", false, "0095", "", "" ], "96": [ "Input_Word_97", "0", "16", "192", false, "0096", "", "" ], "97": [ "Input_Word_98", "0", "16", "194", false, "0097", "", "" ], "98": [ "Input_Word_99", "0", "16", "196", false, "0098", "", "" ], "99": [ "Input_Word_100", "0", "16", "198", false, "0099", "", "" ], "100": [ "Input_Word_101", "0", "16", "200", false, "0100", "", "" ], "101": [ "Input_Word_102", "0", "16", "202", false, "0101", "", "" ], "102": [ "Input_Word_103", "0", "16", "204", false, "0102", "", "" ], "103": [ "Input_Word_104", "0", "16", "206", false, "0103", "", "" ], "104": [ "Input_Word_105", "0", "16", "208", false, "0104", "", "" ], "105": [ "Input_Word_106", "0", "16", "210", false, "0105", "", "" ], "106": [ "Input_Word_107", "0", "16", "212", false, "0106", "", "" ], "107": [ "Input_Word_108", "0", "16", "214", false, "0107", "", "" ], "108": [ "Input_Word_109", "0", "16", "216", false, "0108", "", "" ], "109": [ "Input_Word_110", "0", "16", "218", false, "0109", "", "" ], "110": [ "Input_Word_111", "0", "16", "220", false, "0110", "", "" ], "111": [ "Input_Word_112", "0", "16", "222", false, "0111", "", "" ], "112": [ "Input_Word_113", "0", "16", "224", false, "0112", "", "" ], "113": [ "Input_Word_114", "0", "16", "226", false, "0113", "", "" ], "114": [ "Input_Word_115", "0", "16", "228", false, "0114", "", "" ], "115": [ "Input_Word_116", "0", "16", "230", false, "0115", "", "" ], "116": [ "Input_Word_117", "0", "16", "232", false, "0116", "", "" ], "117": [ "Input_Word_118", "0", "16", "234", false, "0117", "", "" ], "118": [ "Input_Word_119", "0", "16", "236", false, "0118", "", "" ], "119": [ "Input_Word_120", "0", "16", "238", false, "0119", "", "" ], "120": [ "Input_Word_121", "0", "16", "240", false, "0120", "", "" ], "121": [ "Input_Word_122", "0", "16", "242", false, "0121", "", "" ], "122": [ "Input_Word_123", "0", "16", "244", false, "0122", "", "" ], "123": [ "Input_Word_124", "0", "16", "246", false, "0123", "", "" ], "124": [ "Input_Word_125", "0", "16", "248", false, "0124", "", "" ], "125": [ "Input_Word_126", "0", "16", "250", false, "0125", "", "" ], "126": [ "Input_Word_127", "0", "16", "252", false, "0126", "", "" ], "127": [ "Input_Word_128", "0", "16", "254", false, "0127", "", "" ], "128": [ "Input_Word_129", "0", "16", "256", false, "0128", "", "" ], "129": [ "Input_Word_130", "0", "16", "258", false, "0129", "", "" ], "130": [ "Input_Word_131", "0", "16", "260", false, "0130", "", "" ], "131": [ "Input_Word_132", "0", "16", "262", false, "0131", "", "" ], "132": [ "Input_Word_133", "0", "16", "264", false, "0132", "", "" ], "133": [ "Input_Word_134", "0", "16", "266", false, "0133", "", "" ], "134": [ "Input_Word_135", "0", "16", "268", false, "0134", "", "" ], "135": [ "Input_Word_136", "0", "16", "270", false, "0135", "", "" ], "136": [ "Input_Word_137", "0", "16", "272", false, "0136", "", "" ], "137": [ "Input_Word_138", "0", "16", "274", false, "0137", "", "" ], "138": [ "Input_Word_139", "0", "16", "276", false, "0138", "", "" ], "139": [ "Input_Word_140", "0", "16", "278", false, "0139", "", "" ], "140": [ "Input_Word_141", "0", "16", "280", false, "0140", "", "" ], "141": [ "Input_Word_142", "0", "16", "282", false, "0141", "", "" ], "142": [ "Input_Word_143", "0", "16", "284", false, "0142", "", "" ], "143": [ "Input_Word_144", "0", "16", "286", false, "0143", "", "" ], "144": [ "Input_Word_145", "0", "16", "288", false, "0144", "", "" ], "145": [ "Input_Word_146", "0", "16", "290", false, "0145", "", "" ], "146": [ "Input_Word_147", "0", "16", "292", false, "0146", "", "" ], "147": [ "Input_Word_148", "0", "16", "294", false, "0147", "", "" ], "148": [ "Input_Word_149", "0", "16", "296", false, "0148", "", "" ], "149": [ "Input_Word_150", "0", "16", "298", false, "0149", "", "" ], "150": [ "Input_Bit_1", "0", "1", "300", false, "0150", "", "0" ], "151": [ "Input_Bit_2", "0", "1", "300", false, "0151", "", "1" ], "152": [ "Input_Bit_3", "0", "1", "300", false, "0152", "", "2" ], "153": [ "Input_Bit_4", "0", "1", "300", false, "0153", "", "3" ], "154": [ "Input_Bit_5", "0", "1", "300", false, "0154", "", "4" ], "155": [ "Input_Bit_6", "0", "1", "300", false, "0155", "", "5" ], "156": [ "Input_Bit_7", "0", "1", "300", false, "0156", "", "6" ], "157": [ "Input_Bit_8", "0", "1", "300", false, "0157", "", "7" ], "158": [ "Input_Bit_9", "0", "1", "300", false, "0158", "", "8" ], "159": [ "Input_Bit_10", "0", "1", "300", false, "0159", "", "9" ], "160": [ "Input_Bit_11", "0", "1", "300", false, "0160", "", "10" ], "161": [ "Input_Bit_12", "0", "1", "300", false, "0161", "", "11" ], "162": [ "Input_Bit_13", "0", "1", "300", false, "0162", "", "12" ], "163": [ "Input_Bit_14", "0", "1", "300", false, "0163", "", "13" ], "164": [ "Input_Bit_15", "0", "1", "300", false, "0164", "", "14" ], "165": [ "Input_Bit_16", "0", "1", "300", false, "0165", "", "15" ], "166": [ "Input_Bit_17", "0", "1", "300", false, "0166", "", "16" ], "167": [ "Input_Bit_18", "0", "1", "300", false, "0167", "", "17" ], "168": [ "Input_Bit_19", "0", "1", "300", false, "0168", "", "18" ], "169": [ "Input_Bit_20", "0", "1", "300", false, "0169", "", "19" ], "170": [ "Input_Bit_21", "0", "1", "300", false, "0170", "", "20" ], "171": [ "Input_Bit_22", "0", "1", "300", false, "0171", "", "21" ], "172": [ "Input_Bit_23", "0", "1", "300", false, "0172", "", "22" ], "173": [ "Input_Bit_24", "0", "1", "300", false, "0173", "", "23" ], "174": [ "Input_Bit_25", "0", "1", "300", false, "0174", "", "24" ], "175": [ "Input_Bit_26", "0", "1", "300", false, "0175", "", "25" ], "176": [ "Input_Bit_27", "0", "1", "300", false, "0176", "", "26" ], "177": [ "Input_Bit_28", "0", "1", "300", false, "0177", "", "27" ], "178": [ "Input_Bit_29", "0", "1", "300", false, "0178", "", "28" ], "179": [ "Input_Bit_30", "0", "1", "300", false, "0179", "", "29" ], "180": [ "Input_Bit_31", "0", "1", "300", false, "0180", "", "30" ], "181": [ "Input_Bit_32", "0", "1", "300", false, "0181", "", "31" ], "182": [ "Input_Bit_33", "0", "1", "300", false, "0182", "", "32" ], "183": [ "Input_Bit_34", "0", "1", "300", false, "0183", "", "33" ], "184": [ "Input_Bit_35", "0", "1", "300", false, "0184", "", "34" ], "185": [ "Input_Bit_36", "0", "1", "300", false, "0185", "", "35" ], "186": [ "Input_Bit_37", "0", "1", "300", false, "0186", "", "36" ], "187": [ "Input_Bit_38", "0", "1", "300", false, "0187", "", "37" ], "188": [ "Input_Bit_39", "0", "1", "300", false, "0188", "", "38" ], "189": [ "Input_Bit_40", "0", "1", "300", false, "0189", "", "39" ], "190": [ "Input_Bit_41", "0", "1", "300", false, "0190", "", "40" ], "191": [ "Input_Bit_42", "0", "1", "300", false, "0191", "", "41" ], "192": [ "Input_Bit_43", "0", "1", "300", false, "0192", "", "42" ], "193": [ "Input_Bit_44", "0", "1", "300", false, "0193", "", "43" ], "194": [ "Input_Bit_45", "0", "1", "300", false, "0194", "", "44" ], "195": [ "Input_Bit_46", "0", "1", "300", false, "0195", "", "45" ], "196": [ "Input_Bit_47", "0", "1", "300", false, "0196", "", "46" ], "197": [ "Input_Bit_48", "0", "1", "300", false, "0197", "", "47" ], "198": [ "Input_Bit_49", "0", "1", "300", false, "0198", "", "48" ], "199": [ "Input_Bit_50", "0", "1", "300", false, "0199", "", "49" ], "200": [ "Input_Bit_51", "0", "1", "300", false, "0200", "", "50" ], "201": [ "Input_Bit_52", "0", "1", "300", false, "0201", "", "51" ], "202": [ "Input_Bit_53", "0", "1", "300", false, "0202", "", "52" ], "203": [ "Input_Bit_54", "0", "1", "300", false, "0203", "", "53" ], "204": [ "Input_Bit_55", "0", "1", "300", false, "0204", "", "54" ], "205": [ "Input_Bit_56", "0", "1", "300", false, "0205", "", "55" ], "206": [ "Input_Bit_57", "0", "1", "300", false, "0206", "", "56" ], "207": [ "Input_Bit_58", "0", "1", "300", false, "0207", "", "57" ], "208": [ "Input_Bit_59", "0", "1", "300", false, "0208", "", "58" ], "209": [ "Input_Bit_60", "0", "1", "300", false, "0209", "", "59" ], "210": [ "Input_Bit_61", "0", "1", "300", false, "0210", "", "60" ], "211": [ "Input_Bit_62", "0", "1", "300", false, "0211", "", "61" ], "212": [ "Input_Bit_63", "0", "1", "300", false, "0212", "", "62" ], "213": [ "Input_Bit_64", "0", "1", "300", false, "0213", "", "63" ], "214": [ "Input_Bit_65", "0", "1", "300", false, "0214", "", "64" ], "215": [ "Input_Bit_66", "0", "1", "300", false, "0215", "", "65" ], "216": [ "Input_Bit_67", "0", "1", "300", false, "0216", "", "66" ], "217": [ "Input_Bit_68", "0", "1", "300", false, "0217", "", "67" ], "218": [ "Input_Bit_69", "0", "1", "300", false, "0218", "", "68" ], "219": [ "Input_Bit_70", "0", "1", "300", false, "0219", "", "69" ], "220": [ "Input_Bit_71", "0", "1", "300", false, "0220", "", "70" ], "221": [ "Input_Bit_72", "0", "1", "300", false, "0221", "", "71" ], "222": [ "Input_Bit_73", "0", "1", "300", false, "0222", "", "72" ], "223": [ "Input_Bit_74", "0", "1", "300", false, "0223", "", "73" ], "224": [ "Input_Bit_75", "0", "1", "300", false, "0224", "", "74" ], "225": [ "Input_Bit_76", "0", "1", "300", false, "0225", "", "75" ], "226": [ "Input_Bit_77", "0", "1", "300", false, "0226", "", "76" ], "227": [ "Input_Bit_78", "0", "1", "300", false, "0227", "", "77" ], "228": [ "Input_Bit_79", "0", "1", "300", false, "0228", "", "78" ], "229": [ "Input_Bit_80", "0", "1", "300", false, "0229", "", "79" ], "230": [ "Input_Bit_81", "0", "1", "300", false, "0230", "", "80" ], "231": [ "Input_Bit_82", "0", "1", "300", false, "0231", "", "81" ], "232": [ "Input_Bit_83", "0", "1", "300", false, "0232", "", "82" ], "233": [ "Input_Bit_84", "0", "1", "300", false, "0233", "", "83" ], "234": [ "Input_Bit_85", "0", "1", "300", false, "0234", "", "84" ], "235": [ "Input_Bit_86", "0", "1", "300", false, "0235", "", "85" ], "236": [ "Input_Bit_87", "0", "1", "300", false, "0236", "", "86" ], "237": [ "Input_Bit_88", "0", "1", "300", false, "0237", "", "87" ], "238": [ "Input_Bit_89", "0", "1", "300", false, "0238", "", "88" ], "239": [ "Input_Bit_90", "0", "1", "300", false, "0239", "", "89" ], "240": [ "Input_Bit_91", "0", "1", "300", false, "0240", "", "90" ], "241": [ "Input_Bit_92", "0", "1", "300", false, "0241", "", "91" ], "242": [ "Input_Bit_93", "0", "1", "300", false, "0242", "", "92" ], "243": [ "Input_Bit_94", "0", "1", "300", false, "0243", "", "93" ], "244": [ "Input_Bit_95", "0", "1", "300", false, "0244", "", "94" ], "245": [ "Input_Bit_96", "0", "1", "300", false, "0245", "", "95" ], "246": [ "Input_Bit_97", "0", "1", "300", false, "0246", "", "96" ], "247": [ "Input_Bit_98", "0", "1", "300", false, "0247", "", "97" ], "248": [ "Input_Bit_99", "0", "1", "300", false, "0248", "", "98" ], "249": [ "Input_Bit_100", "0", "1", "300", false, "0249", "", "99" ], "250": [ "Input_Bit_101", "0", "1", "300", false, "0250", "", "100" ], "251": [ "Input_Bit_102", "0", "1", "300", false, "0251", "", "101" ], "252": [ "Input_Bit_103", "0", "1", "300", false, "0252", "", "102" ], "253": [ "Input_Bit_104", "0", "1", "300", false, "0253", "", "103" ], "254": [ "Input_Bit_105", "0", "1", "300", false, "0254", "", "104" ], "255": [ "Input_Bit_106", "0", "1", "300", false, "0255", "", "105" ], "256": [ "Input_Bit_107", "0", "1", "300", false, "0256", "", "106" ], "257": [ "Input_Bit_108", "0", "1", "300", false, "0257", "", "107" ], "258": [ "Input_Bit_109", "0", "1", "300", false, "0258", "", "108" ], "259": [ "Input_Bit_110", "0", "1", "300", false, "0259", "", "109" ], "260": [ "Input_Bit_111", "0", "1", "300", false, "0260", "", "110" ], "261": [ "Input_Bit_112", "0", "1", "300", false, "0261", "", "111" ], "262": [ "Input_Bit_113", "0", "1", "300", false, "0262", "", "112" ], "263": [ "Input_Bit_114", "0", "1", "300", false, "0263", "", "113" ], "264": [ "Input_Bit_115", "0", "1", "300", false, "0264", "", "114" ], "265": [ "Input_Bit_116", "0", "1", "300", false, "0265", "", "115" ], "266": [ "Input_Bit_117", "0", "1", "300", false, "0266", "", "116" ], "267": [ "Input_Bit_118", "0", "1", "300", false, "0267", "", "117" ], "268": [ "Input_Bit_119", "0", "1", "300", false, "0268", "", "118" ], "269": [ "Input_Bit_120", "0", "1", "300", false, "0269", "", "119" ], "270": [ "Input_Bit_121", "0", "1", "300", false, "0270", "", "120" ], "271": [ "Input_Bit_122", "0", "1", "300", false, "0271", "", "121" ], "272": [ "Input_Bit_123", "0", "1", "300", false, "0272", "", "122" ], "273": [ "Input_Bit_124", "0", "1", "300", false, "0273", "", "123" ], "274": [ "Input_Bit_125", "0", "1", "300", false, "0274", "", "124" ], "275": [ "Input_Bit_126", "0", "1", "300", false, "0275", "", "125" ], "276": [ "Input_Bit_127", "0", "1", "300", false, "0276", "", "126" ], "277": [ "Input_Bit_128", "0", "1", "300", false, "0277", "", "127" ], "278": [ "Input_Bit_129", "0", "1", "300", false, "0278", "", "128" ], "279": [ "Input_Bit_130", "0", "1", "300", false, "0279", "", "129" ], "280": [ "Input_Bit_131", "0", "1", "300", false, "0280", "", "130" ], "281": [ "Input_Bit_132", "0", "1", "300", false, "0281", "", "131" ], "282": [ "Input_Bit_133", "0", "1", "300", false, "0282", "", "132" ], "283": [ "Input_Bit_134", "0", "1", "300", false, "0283", "", "133" ], "284": [ "Input_Bit_135", "0", "1", "300", false, "0284", "", "134" ], "285": [ "Input_Bit_136", "0", "1", "300", false, "0285", "", "135" ], "286": [ "Input_Bit_137", "0", "1", "300", false, "0286", "", "136" ], "287": [ "Input_Bit_138", "0", "1", "300", false, "0287", "", "137" ], "288": [ "Input_Bit_139", "0", "1", "300", false, "0288", "", "138" ], "289": [ "Input_Bit_140", "0", "1", "300", false, "0289", "", "139" ], "290": [ "Input_Bit_141", "0", "1", "300", false, "0290", "", "140" ], "291": [ "Input_Bit_142", "0", "1", "300", false, "0291", "", "141" ], "292": [ "Input_Bit_143", "0", "1", "300", false, "0292", "", "142" ], "293": [ "Input_Bit_144", "0", "1", "300", false, "0293", "", "143" ], "294": [ "Input_Bit_145", "0", "1", "300", false, "0294", "", "144" ], "295": [ "Input_Bit_146", "0", "1", "300", false, "0295", "", "145" ], "296": [ "Input_Bit_147", "0", "1", "300", false, "0296", "", "146" ], "297": [ "Input_Bit_148", "0", "1", "300", false, "0297", "", "147" ], "298": [ "Input_Bit_149", "0", "1", "300", false, "0298", "", "148" ], "299": [ "Input_Bit_150", "0", "1", "300", false, "0299", "", "149" ], "300": [ "Input_Bit_151", "0", "1", "300", false, "0300", "", "150" ], "301": [ "Input_Bit_152", "0", "1", "300", false, "0301", "", "151" ], "302": [ "Modbus_Action_Status_1", "255", "8", "319", false, "0302", "", "" ], "303": [ "Modbus_Action_Status_2", "255", "8", "320", false, "0303", "", "" ], "304": [ "Modbus_Action_Status_3", "255", "8", "321", false, "0304", "", "" ], "305": [ "Modbus_Action_Status_4", "255", "8", "322", false, "0305", "", "" ], "306": [ "Modbus_Action_Status_5", "255", "8", "323", false, "0306", "", "" ], "307": [ "Modbus_Action_Status_6", "255", "8", "324", false, "0307", "", "" ], "308": [ "Modbus_Action_Status_7", "255", "8", "325", false, "0308", "", "" ], "309": [ "Modbus_Action_Status_8", "255", "8", "326", false, "0309", "", "" ], "310": [ "Modbus_Action_Status_9", "255", "8", "327", false, "0310", "", "" ], "311": [ "Modbus_Action_Status_10", "255", "8", "328", false, "0311", "", "" ], "312": [ "Modbus_Action_Status_11", "255", "8", "329", false, "0312", "", "" ], "313": [ "Modbus_Action_Status_12", "255", "8", "330", false, "0313", "", "" ], "314": [ "Modbus_Action_Status_13", "255", "8", "331", false, "0314", "", "" ], "315": [ "Modbus_Action_Status_14", "255", "8", "332", false, "0315", "", "" ], "316": [ "Modbus_Action_Status_15", "255", "8", "333", false, "0316", "", "" ], "317": [ "Modbus_Action_Status_16", "255", "8", "334", false, "0317", "", "" ], "318": [ "Modbus_Action_Status_17", "255", "8", "335", false, "0318", "", "" ], "319": [ "Modbus_Action_Status_18", "255", "8", "336", false, "0319", "", "" ], "320": [ "Modbus_Action_Status_19", "255", "8", "337", false, "0320", "", "" ], "321": [ "Modbus_Action_Status_20", "255", "8", "338", false, "0321", "", "" ], "322": [ "Modbus_Action_Status_21", "255", "8", "339", false, "0322", "", "" ], "323": [ "Modbus_Action_Status_22", "255", "8", "340", false, "0323", "", "" ], "324": [ "Modbus_Action_Status_23", "255", "8", "341", false, "0324", "", "" ], "325": [ "Modbus_Action_Status_24", "255", "8", "342", false, "0325", "", "" ], "326": [ "Modbus_Action_Status_25", "255", "8", "343", false, "0326", "", "" ], "327": [ "Modbus_Action_Status_26", "255", "8", "344", false, "0327", "", "" ], "328": [ "Modbus_Action_Status_27", "255", "8", "345", false, "0328", "", "" ], "329": [ "Modbus_Action_Status_28", "255", "8", "346", false, "0329", "", "" ], "330": [ "Modbus_Action_Status_29", "255", "8", "347", false, "0330", "", "" ], "331": [ "Modbus_Action_Status_30", "255", "8", "348", false, "0331", "", "" ], "332": [ "Modbus_Action_Status_31", "255", "8", "349", false, "0332", "", "" ], "333": [ "Modbus_Action_Status_32", "255", "8", "350", false, "0333", "", "" ], "334": [ "Modbus_Action_Status_33", "255", "8", "351", false, "0334", "", "" ], "335": [ "Modbus_Action_Status_34", "255", "8", "352", false, "0335", "", "" ], "336": [ "Modbus_Action_Status_35", "255", "8", "353", false, "0336", "", "" ], "337": [ "Modbus_Action_Status_36", "255", "8", "354", false, "0337", "", "" ], "338": [ "Modbus_Action_Status_37", "255", "8", "355", false, "0338", "", "" ], "339": [ "Modbus_Action_Status_38", "255", "8", "356", false, "0339", "", "" ], "340": [ "Modbus_Action_Status_39", "255", "8", "357", false, "0340", "", "" ], "341": [ "Modbus_Action_Status_40", "255", "8", "358", false, "0341", "", "" ], "342": [ "Modbus_Action_Status_41", "255", "8", "359", false, "0342", "", "" ], "343": [ "Modbus_Action_Status_42", "255", "8", "360", false, "0343", "", "" ], "344": [ "Modbus_Action_Status_43", "255", "8", "361", false, "0344", "", "" ], "345": [ "Modbus_Action_Status_44", "255", "8", "362", false, "0345", "", "" ], "346": [ "Modbus_Action_Status_45", "255", "8", "363", false, "0346", "", "" ], "347": [ "Modbus_Action_Status_46", "255", "8", "364", false, "0347", "", "" ], "348": [ "Modbus_Action_Status_47", "255", "8", "365", false, "0348", "", "" ], "349": [ "Modbus_Action_Status_48", "255", "8", "366", false, "0349", "", "" ], "350": [ "Modbus_Action_Status_49", "255", "8", "367", false, "0350", "", "" ], "351": [ "Modbus_Action_Status_50", "255", "8", "368", false, "0351", "", "" ], "352": [ "Modbus_Action_Status_51", "255", "8", "369", false, "0352", "", "" ], "353": [ "Modbus_Action_Status_52", "255", "8", "370", false, "0353", "", "" ], "354": [ "Modbus_Action_Status_53", "255", "8", "371", false, "0354", "", "" ], "355": [ "Modbus_Action_Status_54", "255", "8", "372", false, "0355", "", "" ], "356": [ "Modbus_Action_Status_55", "255", "8", "373", false, "0356", "", "" ], "357": [ "Modbus_Action_Status_56", "255", "8", "374", false, "0357", "", "" ], "358": [ "Modbus_Action_Status_57", "255", "8", "375", false, "0358", "", "" ], "359": [ "Modbus_Action_Status_58", "255", "8", "376", false, "0359", "", "" ], "360": [ "Modbus_Action_Status_59", "255", "8", "377", false, "0360", "", "" ], "361": [ "Modbus_Action_Status_60", "255", "8", "378", false, "0361", "", "" ], "362": [ "Modbus_Action_Status_61", "255", "8", "379", false, "0362", "", "" ], "363": [ "Modbus_Action_Status_62", "255", "8", "380", false, "0363", "", "" ], "364": [ "Modbus_Action_Status_63", "255", "8", "381", false, "0364", "", "" ], "365": [ "Modbus_Action_Status_64", "255", "8", "382", false, "0365", "", "" ], "366": [ "Modbus_Master_Status", "255", "8", "383", false, "0366", "", "" ] }, "out": { "0": [ "O_Command", "0", "16", "384", false, "0367", "", "" ], "1": [ "Output_Word_2", "0", "16", "386", false, "0368", "", "" ], "2": [ "Output_Word_3", "0", "16", "388", false, "0369", "", "" ], "3": [ "Output_Word_4", "0", "16", "390", false, "0370", "", "" ], "4": [ "Output_Word_5", "0", "16", "392", false, "0371", "", "" ], "5": [ "Output_Word_6", "0", "16", "394", false, "0372", "", "" ], "6": [ "Output_Word_7", "0", "16", "396", false, "0373", "", "" ], "7": [ "Output_Word_8", "0", "16", "398", false, "0374", "", "" ], "8": [ "Output_Word_9", "0", "16", "400", false, "0375", "", "" ], "9": [ "Output_Word_10", "0", "16", "402", false, "0376", "", "" ], "10": [ "Output_Word_11", "0", "16", "404", false, "0377", "", "" ], "11": [ "Output_Word_12", "0", "16", "406", false, "0378", "", "" ], "12": [ "Output_Word_13", "0", "16", "408", false, "0379", "", "" ], "13": [ "Output_Word_14", "0", "16", "410", false, "0380", "", "" ], "14": [ "Output_Word_15", "0", "16", "412", false, "0381", "", "" ], "15": [ "Output_Word_16", "0", "16", "414", false, "0382", "", "" ], "16": [ "Output_Word_17", "0", "16", "416", false, "0383", "", "" ], "17": [ "Output_Word_18", "0", "16", "418", false, "0384", "", "" ], "18": [ "Output_Word_19", "0", "16", "420", false, "0385", "", "" ], "19": [ "Output_Word_20", "0", "16", "422", false, "0386", "", "" ], "20": [ "Output_Word_21", "0", "16", "424", false, "0387", "", "" ], "21": [ "Output_Word_22", "0", "16", "426", false, "0388", "", "" ], "22": [ "Output_Word_23", "0", "16", "428", false, "0389", "", "" ], "23": [ "Output_Word_24", "0", "16", "430", false, "0390", "", "" ], "24": [ "Output_Word_25", "0", "16", "432", false, "0391", "", "" ], "25": [ "Output_Word_26", "0", "16", "434", false, "0392", "", "" ], "26": [ "Output_Word_27", "0", "16", "436", false, "0393", "", "" ], "27": [ "Output_Word_28", "0", "16", "438", false, "0394", "", "" ], "28": [ "Output_Word_29", "0", "16", "440", false, "0395", "", "" ], "29": [ "Output_Word_30", "0", "16", "442", false, "0396", "", "" ], "30": [ "Output_Word_31", "0", "16", "444", false, "0397", "", "" ], "31": [ "Output_Word_32", "0", "16", "446", false, "0398", "", "" ], "32": [ "Output_Word_33", "0", "16", "448", false, "0399", "", "" ], "33": [ "Output_Word_34", "0", "16", "450", false, "0400", "", "" ], "34": [ "Output_Word_35", "0", "16", "452", false, "0401", "", "" ], "35": [ "Output_Word_36", "0", "16", "454", false, "0402", "", "" ], "36": [ "Output_Word_37", "0", "16", "456", false, "0403", "", "" ], "37": [ "Output_Word_38", "0", "16", "458", false, "0404", "", "" ], "38": [ "Output_Word_39", "0", "16", "460", false, "0405", "", "" ], "39": [ "Output_Word_40", "0", "16", "462", false, "0406", "", "" ], "40": [ "Output_Word_41", "0", "16", "464", false, "0407", "", "" ], "41": [ "Output_Word_42", "0", "16", "466", false, "0408", "", "" ], "42": [ "Output_Word_43", "0", "16", "468", false, "0409", "", "" ], "43": [ "Output_Word_44", "0", "16", "470", false, "0410", "", "" ], "44": [ "Output_Word_45", "0", "16", "472", false, "0411", "", "" ], "45": [ "Output_Word_46", "0", "16", "474", false, "0412", "", "" ], "46": [ "Output_Word_47", "0", "16", "476", false, "0413", "", "" ], "47": [ "Output_Word_48", "0", "16", "478", false, "0414", "", "" ], "48": [ "Output_Word_49", "0", "16", "480", false, "0415", "", "" ], "49": [ "Output_Word_50", "0", "16", "482", false, "0416", "", "" ], "50": [ "Output_Word_51", "0", "16", "484", false, "0417", "", "" ], "51": [ "Output_Word_52", "0", "16", "486", false, "0418", "", "" ], "52": [ "Output_Word_53", "0", "16", "488", false, "0419", "", "" ], "53": [ "Output_Word_54", "0", "16", "490", false, "0420", "", "" ], "54": [ "Output_Word_55", "0", "16", "492", false, "0421", "", "" ], "55": [ "Output_Word_56", "0", "16", "494", false, "0422", "", "" ], "56": [ "Output_Word_57", "0", "16", "496", false, "0423", "", "" ], "57": [ "Output_Word_58", "0", "16", "498", false, "0424", "", "" ], "58": [ "Output_Word_59", "0", "16", "500", false, "0425", "", "" ], "59": [ "Output_Word_60", "0", "16", "502", false, "0426", "", "" ], "60": [ "Output_Word_61", "0", "16", "504", false, "0427", "", "" ], "61": [ "Output_Word_62", "0", "16", "506", false, "0428", "", "" ], "62": [ "Output_Word_63", "0", "16", "508", false, "0429", "", "" ], "63": [ "Output_Word_64", "0", "16", "510", false, "0430", "", "" ], "64": [ "Output_Word_65", "0", "16", "512", false, "0431", "", "" ], "65": [ "Output_Word_66", "0", "16", "514", false, "0432", "", "" ], "66": [ "Output_Word_67", "0", "16", "516", false, "0433", "", "" ], "67": [ "Output_Word_68", "0", "16", "518", false, "0434", "", "" ], "68": [ "Output_Word_69", "0", "16", "520", false, "0435", "", "" ], "69": [ "Output_Word_70", "0", "16", "522", false, "0436", "", "" ], "70": [ "Output_Word_71", "0", "16", "524", false, "0437", "", "" ], "71": [ "Output_Word_72", "0", "16", "526", false, "0438", "", "" ], "72": [ "Output_Word_73", "0", "16", "528", false, "0439", "", "" ], "73": [ "Output_Word_74", "0", "16", "530", false, "0440", "", "" ], "74": [ "Output_Word_75", "0", "16", "532", false, "0441", "", "" ], "75": [ "Output_Word_76", "0", "16", "534", false, "0442", "", "" ], "76": [ "Output_Word_77", "0", "16", "536", false, "0443", "", "" ], "77": [ "Output_Word_78", "0", "16", "538", false, "0444", "", "" ], "78": [ "Output_Word_79", "0", "16", "540", false, "0445", "", "" ], "79": [ "Output_Word_80", "0", "16", "542", false, "0446", "", "" ], "80": [ "Output_Word_81", "0", "16", "544", false, "0447", "", "" ], "81": [ "Output_Word_82", "0", "16", "546", false, "0448", "", "" ], "82": [ "Output_Word_83", "0", "16", "548", false, "0449", "", "" ], "83": [ "Output_Word_84", "0", "16", "550", false, "0450", "", "" ], "84": [ "Output_Word_85", "0", "16", "552", false, "0451", "", "" ], "85": [ "Output_Word_86", "0", "16", "554", false, "0452", "", "" ], "86": [ "Output_Word_87", "0", "16", "556", false, "0453", "", "" ], "87": [ "Output_Word_88", "0", "16", "558", false, "0454", "", "" ], "88": [ "Output_Word_89", "0", "16", "560", false, "0455", "", "" ], "89": [ "Output_Word_90", "0", "16", "562", false, "0456", "", "" ], "90": [ "Output_Word_91", "0", "16", "564", false, "0457", "", "" ], "91": [ "Output_Word_92", "0", "16", "566", false, "0458", "", "" ], "92": [ "Output_Word_93", "0", "16", "568", false, "0459", "", "" ], "93": [ "Output_Word_94", "0", "16", "570", false, "0460", "", "" ], "94": [ "Output_Word_95", "0", "16", "572", false, "0461", "", "" ], "95": [ "Output_Word_96", "0", "16", "574", false, "0462", "", "" ], "96": [ "Output_Word_97", "0", "16", "576", false, "0463", "", "" ], "97": [ "Output_Word_98", "0", "16", "578", false, "0464", "", "" ], "98": [ "Output_Word_99", "0", "16", "580", false, "0465", "", "" ], "99": [ "Output_Word_100", "0", "16", "582", false, "0466", "", "" ], "100": [ "Output_Word_101", "0", "16", "584", false, "0467", "", "" ], "101": [ "Output_Word_102", "0", "16", "586", false, "0468", "", "" ], "102": [ "Output_Word_103", "0", "16", "588", false, "0469", "", "" ], "103": [ "Output_Word_104", "0", "16", "590", false, "0470", "", "" ], "104": [ "Output_Word_105", "0", "16", "592", false, "0471", "", "" ], "105": [ "Output_Word_106", "0", "16", "594", false, "0472", "", "" ], "106": [ "Output_Word_107", "0", "16", "596", false, "0473", "", "" ], "107": [ "Output_Word_108", "0", "16", "598", false, "0474", "", "" ], "108": [ "Output_Word_109", "0", "16", "600", false, "0475", "", "" ], "109": [ "Output_Word_110", "0", "16", "602", false, "0476", "", "" ], "110": [ "Output_Word_111", "0", "16", "604", false, "0477", "", "" ], "111": [ "Output_Word_112", "0", "16", "606", false, "0478", "", "" ], "112": [ "Output_Word_113", "0", "16", "608", false, "0479", "", "" ], "113": [ "Output_Word_114", "0", "16", "610", false, "0480", "", "" ], "114": [ "Output_Word_115", "0", "16", "612", false, "0481", "", "" ], "115": [ "Output_Word_116", "0", "16", "614", false, "0482", "", "" ], "116": [ "Output_Word_117", "0", "16", "616", false, "0483", "", "" ], "117": [ "Output_Word_118", "0", "16", "618", false, "0484", "", "" ], "118": [ "Output_Word_119", "0", "16", "620", false, "0485", "", "" ], "119": [ "Output_Word_120", "0", "16", "622", false, "0486", "", "" ], "120": [ "Output_Word_121", "0", "16", "624", false, "0487", "", "" ], "121": [ "Output_Word_122", "0", "16", "626", false, "0488", "", "" ], "122": [ "Output_Word_123", "0", "16", "628", false, "0489", "", "" ], "123": [ "Output_Word_124", "0", "16", "630", false, "0490", "", "" ], "124": [ "Output_Word_125", "0", "16", "632", false, "0491", "", "" ], "125": [ "Output_Word_126", "0", "16", "634", false, "0492", "", "" ], "126": [ "Output_Word_127", "0", "16", "636", false, "0493", "", "" ], "127": [ "Output_Word_128", "0", "16", "638", false, "0494", "", "" ], "128": [ "Output_Word_129", "0", "16", "640", false, "0495", "", "" ], "129": [ "Output_Word_130", "0", "16", "642", false, "0496", "", "" ], "130": [ "Output_Word_131", "0", "16", "644", false, "0497", "", "" ], "131": [ "Output_Word_132", "0", "16", "646", false, "0498", "", "" ], "132": [ "Output_Word_133", "0", "16", "648", false, "0499", "", "" ], "133": [ "Output_Word_134", "0", "16", "650", false, "0500", "", "" ], "134": [ "Output_Word_135", "0", "16", "652", false, "0501", "", "" ], "135": [ "Output_Word_136", "0", "16", "654", false, "0502", "", "" ], "136": [ "Output_Word_137", "0", "16", "656", false, "0503", "", "" ], "137": [ "Output_Word_138", "0", "16", "658", false, "0504", "", "" ], "138": [ "Output_Word_139", "0", "16", "660", false, "0505", "", "" ], "139": [ "Output_Word_140", "0", "16", "662", false, "0506", "", "" ], "140": [ "Output_Word_141", "0", "16", "664", false, "0507", "", "" ], "141": [ "Output_Word_142", "0", "16", "666", false, "0508", "", "" ], "142": [ "Output_Word_143", "0", "16", "668", false, "0509", "", "" ], "143": [ "Output_Word_144", "0", "16", "670", false, "0510", "", "" ], "144": [ "Output_Word_145", "0", "16", "672", false, "0511", "", "" ], "145": [ "Output_Word_146", "0", "16", "674", false, "0512", "", "" ], "146": [ "Output_Word_147", "0", "16", "676", false, "0513", "", "" ], "147": [ "Output_Word_148", "0", "16", "678", false, "0514", "", "" ], "148": [ "Output_Word_149", "0", "16", "680", false, "0515", "", "" ], "149": [ "Output_Word_150", "0", "16", "682", false, "0516", "", "" ], "150": [ "O_HeartBeat", "0", "1", "684", false, "0517", "", "0" ], "151": [ "Output_Bit_2", "0", "1", "684", false, "0518", "", "1" ], "152": [ "Output_Bit_3", "0", "1", "684", false, "0519", "", "2" ], "153": [ "Output_Bit_4", "0", "1", "684", false, "0520", "", "3" ], "154": [ "Output_Bit_5", "0", "1", "684", false, "0521", "", "4" ], "155": [ "Output_Bit_6", "0", "1", "684", false, "0522", "", "5" ], "156": [ "Output_Bit_7", "0", "1", "684", false, "0523", "", "6" ], "157": [ "Output_Bit_8", "0", "1", "684", false, "0524", "", "7" ], "158": [ "Output_Bit_9", "0", "1", "684", false, "0525", "", "8" ], "159": [ "Output_Bit_10", "0", "1", "684", false, "0526", "", "9" ], "160": [ "Output_Bit_11", "0", "1", "684", false, "0527", "", "10" ], "161": [ "Output_Bit_12", "0", "1", "684", false, "0528", "", "11" ], "162": [ "Output_Bit_13", "0", "1", "684", false, "0529", "", "12" ], "163": [ "Output_Bit_14", "0", "1", "684", false, "0530", "", "13" ], "164": [ "Output_Bit_15", "0", "1", "684", false, "0531", "", "14" ], "165": [ "Output_Bit_16", "0", "1", "684", false, "0532", "", "15" ], "166": [ "Output_Bit_17", "0", "1", "684", false, "0533", "", "16" ], "167": [ "Output_Bit_18", "0", "1", "684", false, "0534", "", "17" ], "168": [ "Output_Bit_19", "0", "1", "684", false, "0535", "", "18" ], "169": [ "Output_Bit_20", "0", "1", "684", false, "0536", "", "19" ], "170": [ "Output_Bit_21", "0", "1", "684", false, "0537", "", "20" ], "171": [ "Output_Bit_22", "0", "1", "684", false, "0538", "", "21" ], "172": [ "Output_Bit_23", "0", "1", "684", false, "0539", "", "22" ], "173": [ "Output_Bit_24", "0", "1", "684", false, "0540", "", "23" ], "174": [ "Output_Bit_25", "0", "1", "684", false, "0541", "", "24" ], "175": [ "Output_Bit_26", "0", "1", "684", false, "0542", "", "25" ], "176": [ "Output_Bit_27", "0", "1", "684", false, "0543", "", "26" ], "177": [ "Output_Bit_28", "0", "1", "684", false, "0544", "", "27" ], "178": [ "Output_Bit_29", "0", "1", "684", false, "0545", "", "28" ], "179": [ "Output_Bit_30", "0", "1", "684", false, "0546", "", "29" ], "180": [ "Output_Bit_31", "0", "1", "684", false, "0547", "", "30" ], "181": [ "Output_Bit_32", "0", "1", "684", false, "0548", "", "31" ], "182": [ "Output_Bit_33", "0", "1", "684", false, "0549", "", "32" ], "183": [ "Output_Bit_34", "0", "1", "684", false, "0550", "", "33" ], "184": [ "Output_Bit_35", "0", "1", "684", false, "0551", "", "34" ], "185": [ "Output_Bit_36", "0", "1", "684", false, "0552", "", "35" ], "186": [ "Output_Bit_37", "0", "1", "684", false, "0553", "", "36" ], "187": [ "Output_Bit_38", "0", "1", "684", false, "0554", "", "37" ], "188": [ "Output_Bit_39", "0", "1", "684", false, "0555", "", "38" ], "189": [ "Output_Bit_40", "0", "1", "684", false, "0556", "", "39" ], "190": [ "Output_Bit_41", "0", "1", "684", false, "0557", "", "40" ], "191": [ "Output_Bit_42", "0", "1", "684", false, "0558", "", "41" ], "192": [ "Output_Bit_43", "0", "1", "684", false, "0559", "", "42" ], "193": [ "Output_Bit_44", "0", "1", "684", false, "0560", "", "43" ], "194": [ "Output_Bit_45", "0", "1", "684", false, "0561", "", "44" ], "195": [ "Output_Bit_46", "0", "1", "684", false, "0562", "", "45" ], "196": [ "Output_Bit_47", "0", "1", "684", false, "0563", "", "46" ], "197": [ "Output_Bit_48", "0", "1", "684", false, "0564", "", "47" ], "198": [ "Output_Bit_49", "0", "1", "684", false, "0565", "", "48" ], "199": [ "Output_Bit_50", "0", "1", "684", false, "0566", "", "49" ], "200": [ "Output_Bit_51", "0", "1", "684", false, "0567", "", "50" ], "201": [ "Output_Bit_52", "0", "1", "684", false, "0568", "", "51" ], "202": [ "Output_Bit_53", "0", "1", "684", false, "0569", "", "52" ], "203": [ "Output_Bit_54", "0", "1", "684", false, "0570", "", "53" ], "204": [ "Output_Bit_55", "0", "1", "684", false, "0571", "", "54" ], "205": [ "Output_Bit_56", "0", "1", "684", false, "0572", "", "55" ], "206": [ "Output_Bit_57", "0", "1", "684", false, "0573", "", "56" ], "207": [ "Output_Bit_58", "0", "1", "684", false, "0574", "", "57" ], "208": [ "Output_Bit_59", "0", "1", "684", false, "0575", "", "58" ], "209": [ "Output_Bit_60", "0", "1", "684", false, "0576", "", "59" ], "210": [ "Output_Bit_61", "0", "1", "684", false, "0577", "", "60" ], "211": [ "Output_Bit_62", "0", "1", "684", false, "0578", "", "61" ], "212": [ "Output_Bit_63", "0", "1", "684", false, "0579", "", "62" ], "213": [ "Output_Bit_64", "0", "1", "684", false, "0580", "", "63" ], "214": [ "Output_Bit_65", "0", "1", "684", false, "0581", "", "64" ], "215": [ "Output_Bit_66", "0", "1", "684", false, "0582", "", "65" ], "216": [ "Output_Bit_67", "0", "1", "684", false, "0583", "", "66" ], "217": [ "Output_Bit_68", "0", "1", "684", false, "0584", "", "67" ], "218": [ "Output_Bit_69", "0", "1", "684", false, "0585", "", "68" ], "219": [ "Output_Bit_70", "0", "1", "684", false, "0586", "", "69" ], "220": [ "Output_Bit_71", "0", "1", "684", false, "0587", "", "70" ], "221": [ "Output_Bit_72", "0", "1", "684", false, "0588", "", "71" ], "222": [ "Output_Bit_73", "0", "1", "684", false, "0589", "", "72" ], "223": [ "Output_Bit_74", "0", "1", "684", false, "0590", "", "73" ], "224": [ "Output_Bit_75", "0", "1", "684", false, "0591", "", "74" ], "225": [ "Output_Bit_76", "0", "1", "684", false, "0592", "", "75" ], "226": [ "Output_Bit_77", "0", "1", "684", false, "0593", "", "76" ], "227": [ "Output_Bit_78", "0", "1", "684", false, "0594", "", "77" ], "228": [ "Output_Bit_79", "0", "1", "684", false, "0595", "", "78" ], "229": [ "Output_Bit_80", "0", "1", "684", false, "0596", "", "79" ], "230": [ "Output_Bit_81", "0", "1", "684", false, "0597", "", "80" ], "231": [ "Output_Bit_82", "0", "1", "684", false, "0598", "", "81" ], "232": [ "Output_Bit_83", "0", "1", "684", false, "0599", "", "82" ], "233": [ "Output_Bit_84", "0", "1", "684", false, "0600", "", "83" ], "234": [ "Output_Bit_85", "0", "1", "684", false, "0601", "", "84" ], "235": [ "Output_Bit_86", "0", "1", "684", false, "0602", "", "85" ], "236": [ "Output_Bit_87", "0", "1", "684", false, "0603", "", "86" ], "237": [ "Output_Bit_88", "0", "1", "684", false, "0604", "", "87" ], "238": [ "Output_Bit_89", "0", "1", "684", false, "0605", "", "88" ], "239": [ "Output_Bit_90", "0", "1", "684", false, "0606", "", "89" ], "240": [ "Output_Bit_91", "0", "1", "684", false, "0607", "", "90" ], "241": [ "Output_Bit_92", "0", "1", "684", false, "0608", "", "91" ], "242": [ "Output_Bit_93", "0", "1", "684", false, "0609", "", "92" ], "243": [ "Output_Bit_94", "0", "1", "684", false, "0610", "", "93" ], "244": [ "Output_Bit_95", "0", "1", "684", false, "0611", "", "94" ], "245": [ "Output_Bit_96", "0", "1", "684", false, "0612", "", "95" ], "246": [ "Output_Bit_97", "0", "1", "684", false, "0613", "", "96" ], "247": [ "Output_Bit_98", "0", "1", "684", false, "0614", "", "97" ], "248": [ "Output_Bit_99", "0", "1", "684", false, "0615", "", "98" ], "249": [ "Output_Bit_100", "0", "1", "684", false, "0616", "", "99" ], "250": [ "Output_Bit_101", "0", "1", "684", false, "0617", "", "100" ], "251": [ "Output_Bit_102", "0", "1", "684", false, "0618", "", "101" ], "252": [ "Output_Bit_103", "0", "1", "684", false, "0619", "", "102" ], "253": [ "Output_Bit_104", "0", "1", "684", false, "0620", "", "103" ], "254": [ "Output_Bit_105", "0", "1", "684", false, "0621", "", "104" ], "255": [ "Output_Bit_106", "0", "1", "684", false, "0622", "", "105" ], "256": [ "Output_Bit_107", "0", "1", "684", false, "0623", "", "106" ], "257": [ "Output_Bit_108", "0", "1", "684", false, "0624", "", "107" ], "258": [ "Output_Bit_109", "0", "1", "684", false, "0625", "", "108" ], "259": [ "Output_Bit_110", "0", "1", "684", false, "0626", "", "109" ], "260": [ "Output_Bit_111", "0", "1", "684", false, "0627", "", "110" ], "261": [ "Output_Bit_112", "0", "1", "684", false, "0628", "", "111" ], "262": [ "Output_Bit_113", "0", "1", "684", false, "0629", "", "112" ], "263": [ "Output_Bit_114", "0", "1", "684", false, "0630", "", "113" ], "264": [ "Output_Bit_115", "0", "1", "684", false, "0631", "", "114" ], "265": [ "Output_Bit_116", "0", "1", "684", false, "0632", "", "115" ], "266": [ "Output_Bit_117", "0", "1", "684", false, "0633", "", "116" ], "267": [ "Output_Bit_118", "0", "1", "684", false, "0634", "", "117" ], "268": [ "Output_Bit_119", "0", "1", "684", false, "0635", "", "118" ], "269": [ "Output_Bit_120", "0", "1", "684", false, "0636", "", "119" ], "270": [ "Output_Bit_121", "0", "1", "684", false, "0637", "", "120" ], "271": [ "Output_Bit_122", "0", "1", "684", false, "0638", "", "121" ], "272": [ "Output_Bit_123", "0", "1", "684", false, "0639", "", "122" ], "273": [ "Output_Bit_124", "0", "1", "684", false, "0640", "", "123" ], "274": [ "Output_Bit_125", "0", "1", "684", false, "0641", "", "124" ], "275": [ "Output_Bit_126", "0", "1", "684", false, "0642", "", "125" ], "276": [ "Output_Bit_127", "0", "1", "684", false, "0643", "", "126" ], "277": [ "Output_Bit_128", "0", "1", "684", false, "0644", "", "127" ], "278": [ "Output_Bit_129", "0", "1", "684", false, "0645", "", "128" ], "279": [ "Output_Bit_130", "0", "1", "684", false, "0646", "", "129" ], "280": [ "Output_Bit_131", "0", "1", "684", false, "0647", "", "130" ], "281": [ "Output_Bit_132", "0", "1", "684", false, "0648", "", "131" ], "282": [ "Output_Bit_133", "0", "1", "684", false, "0649", "", "132" ], "283": [ "Output_Bit_134", "0", "1", "684", false, "0650", "", "133" ], "284": [ "Output_Bit_135", "0", "1", "684", false, "0651", "", "134" ], "285": [ "Output_Bit_136", "0", "1", "684", false, "0652", "", "135" ], "286": [ "Output_Bit_137", "0", "1", "684", false, "0653", "", "136" ], "287": [ "Output_Bit_138", "0", "1", "684", false, "0654", "", "137" ], "288": [ "Output_Bit_139", "0", "1", "684", false, "0655", "", "138" ], "289": [ "Output_Bit_140", "0", "1", "684", false, "0656", "", "139" ], "290": [ "Output_Bit_141", "0", "1", "684", false, "0657", "", "140" ], "291": [ "Output_Bit_142", "0", "1", "684", false, "0658", "", "141" ], "292": [ "Output_Bit_143", "0", "1", "684", false, "0659", "", "142" ], "293": [ "Output_Bit_144", "0", "1", "684", false, "0660", "", "143" ], "294": [ "Output_Bit_145", "0", "1", "684", false, "0661", "", "144" ], "295": [ "Output_Bit_146", "0", "1", "684", false, "0662", "", "145" ], "296": [ "Output_Bit_147", "0", "1", "684", false, "0663", "", "146" ], "297": [ "Output_Bit_148", "0", "1", "684", false, "0664", "", "147" ], "298": [ "Output_Bit_149", "0", "1", "684", false, "0665", "", "148" ], "299": [ "Output_Bit_150", "0", "1", "684", false, "0666", "", "149" ], "300": [ "Output_Bit_151", "0", "1", "684", false, "0667", "", "150" ], "301": [ "Output_Bit_152", "0", "1", "684", false, "0668", "", "151" ], "302": [ "Action_Status_Reset_1", "0", "1", "703", false, "0669", "", "0" ], "303": [ "Action_Status_Reset_2", "0", "1", "703", false, "0670", "", "1" ], "304": [ "Action_Status_Reset_3", "0", "1", "703", false, "0671", "", "2" ], "305": [ "Action_Status_Reset_4", "0", "1", "703", false, "0672", "", "3" ], "306": [ "Action_Status_Reset_5", "0", "1", "703", false, "0673", "", "4" ], "307": [ "Action_Status_Reset_6", "0", "1", "703", false, "0674", "", "5" ], "308": [ "Action_Status_Reset_7", "0", "1", "703", false, "0675", "", "6" ], "309": [ "Action_Status_Reset_8", "0", "1", "703", false, "0676", "", "7" ], "310": [ "Action_Status_Reset_9", "0", "1", "703", false, "0677", "", "8" ], "311": [ "Action_Status_Reset_10", "0", "1", "703", false, "0678", "", "9" ], "312": [ "Action_Status_Reset_11", "0", "1", "703", false, "0679", "", "10" ], "313": [ "Action_Status_Reset_12", "0", "1", "703", false, "0680", "", "11" ], "314": [ "Action_Status_Reset_13", "0", "1", "703", false, "0681", "", "12" ], "315": [ "Action_Status_Reset_14", "0", "1", "703", false, "0682", "", "13" ], "316": [ "Action_Status_Reset_15", "0", "1", "703", false, "0683", "", "14" ], "317": [ "Action_Status_Reset_16", "0", "1", "703", false, "0684", "", "15" ], "318": [ "Action_Status_Reset_17", "0", "1", "703", false, "0685", "", "16" ], "319": [ "Action_Status_Reset_18", "0", "1", "703", false, "0686", "", "17" ], "320": [ "Action_Status_Reset_19", "0", "1", "703", false, "0687", "", "18" ], "321": [ "Action_Status_Reset_20", "0", "1", "703", false, "0688", "", "19" ], "322": [ "Action_Status_Reset_21", "0", "1", "703", false, "0689", "", "20" ], "323": [ "Action_Status_Reset_22", "0", "1", "703", false, "0690", "", "21" ], "324": [ "Action_Status_Reset_23", "0", "1", "703", false, "0691", "", "22" ], "325": [ "Action_Status_Reset_24", "0", "1", "703", false, "0692", "", "23" ], "326": [ "Action_Status_Reset_25", "0", "1", "703", false, "0693", "", "24" ], "327": [ "Action_Status_Reset_26", "0", "1", "703", false, "0694", "", "25" ], "328": [ "Action_Status_Reset_27", "0", "1", "703", false, "0695", "", "26" ], "329": [ "Action_Status_Reset_28", "0", "1", "703", false, "0696", "", "27" ], "330": [ "Action_Status_Reset_29", "0", "1", "703", false, "0697", "", "28" ], "331": [ "Action_Status_Reset_30", "0", "1", "703", false, "0698", "", "29" ], "332": [ "Action_Status_Reset_31", "0", "1", "703", false, "0699", "", "30" ], "333": [ "Action_Status_Reset_32", "0", "1", "703", false, "0700", "", "31" ], "334": [ "Action_Status_Reset_33", "0", "1", "703", false, "0701", "", "32" ], "335": [ "Action_Status_Reset_34", "0", "1", "703", false, "0702", "", "33" ], "336": [ "Action_Status_Reset_35", "0", "1", "703", false, "0703", "", "34" ], "337": [ "Action_Status_Reset_36", "0", "1", "703", false, "0704", "", "35" ], "338": [ "Action_Status_Reset_37", "0", "1", "703", false, "0705", "", "36" ], "339": [ "Action_Status_Reset_38", "0", "1", "703", false, "0706", "", "37" ], "340": [ "Action_Status_Reset_39", "0", "1", "703", false, "0707", "", "38" ], "341": [ "Action_Status_Reset_40", "0", "1", "703", false, "0708", "", "39" ], "342": [ "Action_Status_Reset_41", "0", "1", "703", false, "0709", "", "40" ], "343": [ "Action_Status_Reset_42", "0", "1", "703", false, "0710", "", "41" ], "344": [ "Action_Status_Reset_43", "0", "1", "703", false, "0711", "", "42" ], "345": [ "Action_Status_Reset_44", "0", "1", "703", false, "0712", "", "43" ], "346": [ "Action_Status_Reset_45", "0", "1", "703", false, "0713", "", "44" ], "347": [ "Action_Status_Reset_46", "0", "1", "703", false, "0714", "", "45" ], "348": [ "Action_Status_Reset_47", "0", "1", "703", false, "0715", "", "46" ], "349": [ "Action_Status_Reset_48", "0", "1", "703", false, "0716", "", "47" ], "350": [ "Action_Status_Reset_49", "0", "1", "703", false, "0717", "", "48" ], "351": [ "Action_Status_Reset_50", "0", "1", "703", false, "0718", "", "49" ], "352": [ "Action_Status_Reset_51", "0", "1", "703", false, "0719", "", "50" ], "353": [ "Action_Status_Reset_52", "0", "1", "703", false, "0720", "", "51" ], "354": [ "Action_Status_Reset_53", "0", "1", "703", false, "0721", "", "52" ], "355": [ "Action_Status_Reset_54", "0", "1", "703", false, "0722", "", "53" ], "356": [ "Action_Status_Reset_55", "0", "1", "703", false, "0723", "", "54" ], "357": [ "Action_Status_Reset_56", "0", "1", "703", false, "0724", "", "55" ], "358": [ "Action_Status_Reset_57", "0", "1", "703", false, "0725", "", "56" ], "359": [ "Action_Status_Reset_58", "0", "1", "703", false, "0726", "", "57" ], "360": [ "Action_Status_Reset_59", "0", "1", "703", false, "0727", "", "58" ], "361": [ "Action_Status_Reset_60", "0", "1", "703", false, "0728", "", "59" ], "362": [ "Action_Status_Reset_61", "0", "1", "703", false, "0729", "", "60" ], "363": [ "Action_Status_Reset_62", "0", "1", "703", false, "0730", "", "61" ], "364": [ "Action_Status_Reset_63", "0", "1", "703", false, "0731", "", "62" ], "365": [ "Action_Status_Reset_64", "0", "1", "703", false, "0732", "", "63" ], "366": [ "Master_Status_Reset", "0", "8", "767", false, "0733", "", "" ] }, "mem": { "0": [ "slave_IP_address", "192.168.1.11", "128", "768", false, "0734", "", "" ], "1": [ "slave_TCP_port", "502", "16", "784", false, "0735", "", "" ] }, "extend": { "deviceMisc": { "tbl_A_rowcount": "3", "ModbusMasterStatus_ModbusTCPMaster_20200904_1_1": "Modbus_Master_Status", "MasterStatusReset_ModbusTCPMaster_20200904_1_1": "Master_Status_Reset" }, "data": { "ActionId_01_ModbusTCPMaster_20200904_1_1": "1", "SlaveAddress_01_ModbusTCPMaster_20200904_1_1": "1", "SlaveIP_01_ModbusTCPMaster_20200904_1_1": "", "SlavePort_01_ModbusTCPMaster_20200904_1_1": "", "FunctionCode_01_ModbusTCPMaster_20200904_1_1": "4", "RegisterAddress_01_ModbusTCPMaster_20200904_1_1": "1", "QuantityOfRegisters_01_ModbusTCPMaster_20200904_1_1": "102", "ActionInterval_01_ModbusTCPMaster_20200904_1_1": "250", "DeviceValue_01_ModbusTCPMaster_20200904_1_1": "I_LiftState", "ModbusActionStatus_01_ModbusTCPMaster_20200904_1_1": "Modbus_Action_Status_1", "ActionStatusReset_01_ModbusTCPMaster_20200904_1_1": "Action_Status_Reset_1", "ActionId_02_ModbusTCPMaster_20200904_1_1": "2", "SlaveAddress_02_ModbusTCPMaster_20200904_1_1": "1", "SlaveIP_02_ModbusTCPMaster_20200904_1_1": "", "SlavePort_02_ModbusTCPMaster_20200904_1_1": "", "FunctionCode_02_ModbusTCPMaster_20200904_1_1": "5", "RegisterAddress_02_ModbusTCPMaster_20200904_1_1": "1", "QuantityOfRegisters_02_ModbusTCPMaster_20200904_1_1": "1", "ActionInterval_02_ModbusTCPMaster_20200904_1_1": "250", "DeviceValue_02_ModbusTCPMaster_20200904_1_1": "O_HeartBeat", "ModbusActionStatus_02_ModbusTCPMaster_20200904_1_1": "Modbus_Action_Status_2", "ActionStatusReset_02_ModbusTCPMaster_20200904_1_1": "Action_Status_Reset_2", "ActionId_03_ModbusTCPMaster_20200904_1_1": "3", "SlaveAddress_03_ModbusTCPMaster_20200904_1_1": "1", "SlaveIP_03_ModbusTCPMaster_20200904_1_1": "", "SlavePort_03_ModbusTCPMaster_20200904_1_1": "", "FunctionCode_03_ModbusTCPMaster_20200904_1_1": "6", "RegisterAddress_03_ModbusTCPMaster_20200904_1_1": "1", "QuantityOfRegisters_03_ModbusTCPMaster_20200904_1_1": "1", "ActionInterval_03_ModbusTCPMaster_20200904_1_1": "250", "DeviceValue_03_ModbusTCPMaster_20200904_1_1": "O_Command", "ModbusActionStatus_03_ModbusTCPMaster_20200904_1_1": "Modbus_Action_Status_3", "ActionStatusReset_03_ModbusTCPMaster_20200904_1_1": "Action_Status_Reset_3" } } }, { "GUID": "b7070f94-c2b2-1f9a-3b31-dfc5065b2184", "id": "device_ModbusTCPMaster_20200904_1_1_002", "type": "VIRTUAL", "productType": "24579", "position": "66", "name": "ModbusTCP Master Light", "bmk": "ModbusTCP Master 150", "inpVariant": 0, "outVariant": 0, "comment": "ModbusTCP Master with 150 Input/Output Words and 152 Input/Output bits.Max 64 configurable Modbus actions.", "offset": 918, "inp": { "0": [ "I_LighState", "0", "16", "0", true, "0000", "", "" ], "1": [ "Input_Word_2", "0", "16", "2", false, "0001", "", "" ], "2": [ "Input_Word_3", "0", "16", "4", false, "0002", "", "" ], "3": [ "Input_Word_4", "0", "16", "6", false, "0003", "", "" ], "4": [ "Input_Word_5", "0", "16", "8", false, "0004", "", "" ], "5": [ "Input_Word_6", "0", "16", "10", false, "0005", "", "" ], "6": [ "Input_Word_7", "0", "16", "12", false, "0006", "", "" ], "7": [ "Input_Word_8", "0", "16", "14", false, "0007", "", "" ], "8": [ "Input_Word_9", "0", "16", "16", false, "0008", "", "" ], "9": [ "Input_Word_10", "0", "16", "18", false, "0009", "", "" ], "10": [ "Input_Word_11", "0", "16", "20", false, "0010", "", "" ], "11": [ "Input_Word_12", "0", "16", "22", false, "0011", "", "" ], "12": [ "Input_Word_13_i05", "0", "16", "24", false, "0012", "", "" ], "13": [ "Input_Word_14_i05", "0", "16", "26", false, "0013", "", "" ], "14": [ "Input_Word_15_i05", "0", "16", "28", false, "0014", "", "" ], "15": [ "Input_Word_16_i05", "0", "16", "30", false, "0015", "", "" ], "16": [ "Input_Word_17_i05", "0", "16", "32", false, "0016", "", "" ], "17": [ "Input_Word_18_i05", "0", "16", "34", false, "0017", "", "" ], "18": [ "Input_Word_19_i05", "0", "16", "36", false, "0018", "", "" ], "19": [ "Input_Word_20_i05", "0", "16", "38", false, "0019", "", "" ], "20": [ "Input_Word_21_i05", "0", "16", "40", false, "0020", "", "" ], "21": [ "Input_Word_22_i05", "0", "16", "42", false, "0021", "", "" ], "22": [ "Input_Word_23_i05", "0", "16", "44", false, "0022", "", "" ], "23": [ "Input_Word_24_i05", "0", "16", "46", false, "0023", "", "" ], "24": [ "Input_Word_25_i05", "0", "16", "48", false, "0024", "", "" ], "25": [ "Input_Word_26_i05", "0", "16", "50", false, "0025", "", "" ], "26": [ "Input_Word_27_i05", "0", "16", "52", false, "0026", "", "" ], "27": [ "Input_Word_28_i05", "0", "16", "54", false, "0027", "", "" ], "28": [ "Input_Word_29_i05", "0", "16", "56", false, "0028", "", "" ], "29": [ "Input_Word_30_i05", "0", "16", "58", false, "0029", "", "" ], "30": [ "Input_Word_31_i05", "0", "16", "60", false, "0030", "", "" ], "31": [ "Input_Word_32_i05", "0", "16", "62", false, "0031", "", "" ], "32": [ "Input_Word_33_i05", "0", "16", "64", false, "0032", "", "" ], "33": [ "Input_Word_34_i05", "0", "16", "66", false, "0033", "", "" ], "34": [ "Input_Word_35_i05", "0", "16", "68", false, "0034", "", "" ], "35": [ "Input_Word_36_i05", "0", "16", "70", false, "0035", "", "" ], "36": [ "Input_Word_37_i05", "0", "16", "72", false, "0036", "", "" ], "37": [ "Input_Word_38_i05", "0", "16", "74", false, "0037", "", "" ], "38": [ "Input_Word_39_i05", "0", "16", "76", false, "0038", "", "" ], "39": [ "Input_Word_40_i05", "0", "16", "78", false, "0039", "", "" ], "40": [ "Input_Word_41_i05", "0", "16", "80", false, "0040", "", "" ], "41": [ "Input_Word_42_i05", "0", "16", "82", false, "0041", "", "" ], "42": [ "Input_Word_43_i05", "0", "16", "84", false, "0042", "", "" ], "43": [ "Input_Word_44_i05", "0", "16", "86", false, "0043", "", "" ], "44": [ "Input_Word_45_i05", "0", "16", "88", false, "0044", "", "" ], "45": [ "Input_Word_46_i05", "0", "16", "90", false, "0045", "", "" ], "46": [ "Input_Word_47_i05", "0", "16", "92", false, "0046", "", "" ], "47": [ "Input_Word_48_i05", "0", "16", "94", false, "0047", "", "" ], "48": [ "Input_Word_49_i05", "0", "16", "96", false, "0048", "", "" ], "49": [ "Input_Word_50_i05", "0", "16", "98", false, "0049", "", "" ], "50": [ "Input_Word_51_i05", "0", "16", "100", false, "0050", "", "" ], "51": [ "Input_Word_52_i05", "0", "16", "102", false, "0051", "", "" ], "52": [ "Input_Word_53_i05", "0", "16", "104", false, "0052", "", "" ], "53": [ "Input_Word_54_i05", "0", "16", "106", false, "0053", "", "" ], "54": [ "Input_Word_55_i05", "0", "16", "108", false, "0054", "", "" ], "55": [ "Input_Word_56_i05", "0", "16", "110", false, "0055", "", "" ], "56": [ "Input_Word_57_i05", "0", "16", "112", false, "0056", "", "" ], "57": [ "Input_Word_58_i05", "0", "16", "114", false, "0057", "", "" ], "58": [ "Input_Word_59_i05", "0", "16", "116", false, "0058", "", "" ], "59": [ "Input_Word_60_i05", "0", "16", "118", false, "0059", "", "" ], "60": [ "Input_Word_61_i05", "0", "16", "120", false, "0060", "", "" ], "61": [ "Input_Word_62_i05", "0", "16", "122", false, "0061", "", "" ], "62": [ "Input_Word_63_i05", "0", "16", "124", false, "0062", "", "" ], "63": [ "Input_Word_64_i05", "0", "16", "126", false, "0063", "", "" ], "64": [ "Input_Word_65_i05", "0", "16", "128", false, "0064", "", "" ], "65": [ "Input_Word_66_i05", "0", "16", "130", false, "0065", "", "" ], "66": [ "Input_Word_67_i05", "0", "16", "132", false, "0066", "", "" ], "67": [ "Input_Word_68_i05", "0", "16", "134", false, "0067", "", "" ], "68": [ "Input_Word_69_i05", "0", "16", "136", false, "0068", "", "" ], "69": [ "Input_Word_70_i05", "0", "16", "138", false, "0069", "", "" ], "70": [ "Input_Word_71_i05", "0", "16", "140", false, "0070", "", "" ], "71": [ "Input_Word_72_i05", "0", "16", "142", false, "0071", "", "" ], "72": [ "Input_Word_73_i05", "0", "16", "144", false, "0072", "", "" ], "73": [ "Input_Word_74_i05", "0", "16", "146", false, "0073", "", "" ], "74": [ "Input_Word_75_i05", "0", "16", "148", false, "0074", "", "" ], "75": [ "Input_Word_76_i05", "0", "16", "150", false, "0075", "", "" ], "76": [ "Input_Word_77_i05", "0", "16", "152", false, "0076", "", "" ], "77": [ "Input_Word_78_i05", "0", "16", "154", false, "0077", "", "" ], "78": [ "Input_Word_79_i05", "0", "16", "156", false, "0078", "", "" ], "79": [ "Input_Word_80_i05", "0", "16", "158", false, "0079", "", "" ], "80": [ "Input_Word_81_i05", "0", "16", "160", false, "0080", "", "" ], "81": [ "Input_Word_82_i05", "0", "16", "162", false, "0081", "", "" ], "82": [ "Input_Word_83_i05", "0", "16", "164", false, "0082", "", "" ], "83": [ "Input_Word_84_i05", "0", "16", "166", false, "0083", "", "" ], "84": [ "Input_Word_85_i05", "0", "16", "168", false, "0084", "", "" ], "85": [ "Input_Word_86_i05", "0", "16", "170", false, "0085", "", "" ], "86": [ "Input_Word_87_i05", "0", "16", "172", false, "0086", "", "" ], "87": [ "Input_Word_88_i05", "0", "16", "174", false, "0087", "", "" ], "88": [ "Input_Word_89_i05", "0", "16", "176", false, "0088", "", "" ], "89": [ "Input_Word_90_i05", "0", "16", "178", false, "0089", "", "" ], "90": [ "Input_Word_91_i05", "0", "16", "180", false, "0090", "", "" ], "91": [ "Input_Word_92_i05", "0", "16", "182", false, "0091", "", "" ], "92": [ "Input_Word_93_i05", "0", "16", "184", false, "0092", "", "" ], "93": [ "Input_Word_94_i05", "0", "16", "186", false, "0093", "", "" ], "94": [ "Input_Word_95_i05", "0", "16", "188", false, "0094", "", "" ], "95": [ "Input_Word_96_i05", "0", "16", "190", false, "0095", "", "" ], "96": [ "Input_Word_97_i05", "0", "16", "192", false, "0096", "", "" ], "97": [ "Input_Word_98_i05", "0", "16", "194", false, "0097", "", "" ], "98": [ "Input_Word_99_i05", "0", "16", "196", false, "0098", "", "" ], "99": [ "Input_Word_100_i05", "0", "16", "198", false, "0099", "", "" ], "100": [ "Input_Word_101_i05", "0", "16", "200", false, "0100", "", "" ], "101": [ "Input_Word_102_i05", "0", "16", "202", false, "0101", "", "" ], "102": [ "Input_Word_103_i05", "0", "16", "204", false, "0102", "", "" ], "103": [ "Input_Word_104_i05", "0", "16", "206", false, "0103", "", "" ], "104": [ "Input_Word_105_i05", "0", "16", "208", false, "0104", "", "" ], "105": [ "Input_Word_106_i05", "0", "16", "210", false, "0105", "", "" ], "106": [ "Input_Word_107_i05", "0", "16", "212", false, "0106", "", "" ], "107": [ "Input_Word_108_i05", "0", "16", "214", false, "0107", "", "" ], "108": [ "Input_Word_109_i05", "0", "16", "216", false, "0108", "", "" ], "109": [ "Input_Word_110_i05", "0", "16", "218", false, "0109", "", "" ], "110": [ "Input_Word_111_i05", "0", "16", "220", false, "0110", "", "" ], "111": [ "Input_Word_112_i05", "0", "16", "222", false, "0111", "", "" ], "112": [ "Input_Word_113_i05", "0", "16", "224", false, "0112", "", "" ], "113": [ "Input_Word_114_i05", "0", "16", "226", false, "0113", "", "" ], "114": [ "Input_Word_115_i05", "0", "16", "228", false, "0114", "", "" ], "115": [ "Input_Word_116_i05", "0", "16", "230", false, "0115", "", "" ], "116": [ "Input_Word_117_i05", "0", "16", "232", false, "0116", "", "" ], "117": [ "Input_Word_118_i05", "0", "16", "234", false, "0117", "", "" ], "118": [ "Input_Word_119_i05", "0", "16", "236", false, "0118", "", "" ], "119": [ "Input_Word_120_i05", "0", "16", "238", false, "0119", "", "" ], "120": [ "Input_Word_121_i05", "0", "16", "240", false, "0120", "", "" ], "121": [ "Input_Word_122_i05", "0", "16", "242", false, "0121", "", "" ], "122": [ "Input_Word_123_i05", "0", "16", "244", false, "0122", "", "" ], "123": [ "Input_Word_124_i05", "0", "16", "246", false, "0123", "", "" ], "124": [ "Input_Word_125_i05", "0", "16", "248", false, "0124", "", "" ], "125": [ "Input_Word_126_i05", "0", "16", "250", false, "0125", "", "" ], "126": [ "Input_Word_127_i05", "0", "16", "252", false, "0126", "", "" ], "127": [ "Input_Word_128_i05", "0", "16", "254", false, "0127", "", "" ], "128": [ "Input_Word_129_i05", "0", "16", "256", false, "0128", "", "" ], "129": [ "Input_Word_130_i05", "0", "16", "258", false, "0129", "", "" ], "130": [ "Input_Word_131_i05", "0", "16", "260", false, "0130", "", "" ], "131": [ "Input_Word_132_i05", "0", "16", "262", false, "0131", "", "" ], "132": [ "Input_Word_133_i05", "0", "16", "264", false, "0132", "", "" ], "133": [ "Input_Word_134_i05", "0", "16", "266", false, "0133", "", "" ], "134": [ "Input_Word_135_i05", "0", "16", "268", false, "0134", "", "" ], "135": [ "Input_Word_136_i05", "0", "16", "270", false, "0135", "", "" ], "136": [ "Input_Word_137_i05", "0", "16", "272", false, "0136", "", "" ], "137": [ "Input_Word_138_i05", "0", "16", "274", false, "0137", "", "" ], "138": [ "Input_Word_139_i05", "0", "16", "276", false, "0138", "", "" ], "139": [ "Input_Word_140_i05", "0", "16", "278", false, "0139", "", "" ], "140": [ "Input_Word_141_i05", "0", "16", "280", false, "0140", "", "" ], "141": [ "Input_Word_142_i05", "0", "16", "282", false, "0141", "", "" ], "142": [ "Input_Word_143_i05", "0", "16", "284", false, "0142", "", "" ], "143": [ "Input_Word_144_i05", "0", "16", "286", false, "0143", "", "" ], "144": [ "Input_Word_145_i05", "0", "16", "288", false, "0144", "", "" ], "145": [ "Input_Word_146_i05", "0", "16", "290", false, "0145", "", "" ], "146": [ "Input_Word_147_i05", "0", "16", "292", false, "0146", "", "" ], "147": [ "Input_Word_148_i05", "0", "16", "294", false, "0147", "", "" ], "148": [ "Input_Word_149_i05", "0", "16", "296", false, "0148", "", "" ], "149": [ "Input_Word_150_i05", "0", "16", "298", false, "0149", "", "" ], "150": [ "Input_Bit_1_i05", "0", "1", "300", false, "0150", "", "0" ], "151": [ "Input_Bit_2_i05", "0", "1", "300", false, "0151", "", "1" ], "152": [ "Input_Bit_3_i05", "0", "1", "300", false, "0152", "", "2" ], "153": [ "Input_Bit_4_i05", "0", "1", "300", false, "0153", "", "3" ], "154": [ "Input_Bit_5_i05", "0", "1", "300", false, "0154", "", "4" ], "155": [ "Input_Bit_6_i05", "0", "1", "300", false, "0155", "", "5" ], "156": [ "Input_Bit_7_i05", "0", "1", "300", false, "0156", "", "6" ], "157": [ "Input_Bit_8_i05", "0", "1", "300", false, "0157", "", "7" ], "158": [ "Input_Bit_9_i05", "0", "1", "300", false, "0158", "", "8" ], "159": [ "Input_Bit_10_i05", "0", "1", "300", false, "0159", "", "9" ], "160": [ "Input_Bit_11_i05", "0", "1", "300", false, "0160", "", "10" ], "161": [ "Input_Bit_12_i05", "0", "1", "300", false, "0161", "", "11" ], "162": [ "Input_Bit_13_i05", "0", "1", "300", false, "0162", "", "12" ], "163": [ "Input_Bit_14_i05", "0", "1", "300", false, "0163", "", "13" ], "164": [ "Input_Bit_15_i05", "0", "1", "300", false, "0164", "", "14" ], "165": [ "Input_Bit_16_i05", "0", "1", "300", false, "0165", "", "15" ], "166": [ "Input_Bit_17_i05", "0", "1", "300", false, "0166", "", "16" ], "167": [ "Input_Bit_18_i05", "0", "1", "300", false, "0167", "", "17" ], "168": [ "Input_Bit_19_i05", "0", "1", "300", false, "0168", "", "18" ], "169": [ "Input_Bit_20_i05", "0", "1", "300", false, "0169", "", "19" ], "170": [ "Input_Bit_21_i05", "0", "1", "300", false, "0170", "", "20" ], "171": [ "Input_Bit_22_i05", "0", "1", "300", false, "0171", "", "21" ], "172": [ "Input_Bit_23_i05", "0", "1", "300", false, "0172", "", "22" ], "173": [ "Input_Bit_24_i05", "0", "1", "300", false, "0173", "", "23" ], "174": [ "Input_Bit_25_i05", "0", "1", "300", false, "0174", "", "24" ], "175": [ "Input_Bit_26_i05", "0", "1", "300", false, "0175", "", "25" ], "176": [ "Input_Bit_27_i05", "0", "1", "300", false, "0176", "", "26" ], "177": [ "Input_Bit_28_i05", "0", "1", "300", false, "0177", "", "27" ], "178": [ "Input_Bit_29_i05", "0", "1", "300", false, "0178", "", "28" ], "179": [ "Input_Bit_30_i05", "0", "1", "300", false, "0179", "", "29" ], "180": [ "Input_Bit_31_i05", "0", "1", "300", false, "0180", "", "30" ], "181": [ "Input_Bit_32_i05", "0", "1", "300", false, "0181", "", "31" ], "182": [ "Input_Bit_33_i05", "0", "1", "300", false, "0182", "", "32" ], "183": [ "Input_Bit_34_i05", "0", "1", "300", false, "0183", "", "33" ], "184": [ "Input_Bit_35_i05", "0", "1", "300", false, "0184", "", "34" ], "185": [ "Input_Bit_36_i05", "0", "1", "300", false, "0185", "", "35" ], "186": [ "Input_Bit_37_i05", "0", "1", "300", false, "0186", "", "36" ], "187": [ "Input_Bit_38_i05", "0", "1", "300", false, "0187", "", "37" ], "188": [ "Input_Bit_39_i05", "0", "1", "300", false, "0188", "", "38" ], "189": [ "Input_Bit_40_i05", "0", "1", "300", false, "0189", "", "39" ], "190": [ "Input_Bit_41_i05", "0", "1", "300", false, "0190", "", "40" ], "191": [ "Input_Bit_42_i05", "0", "1", "300", false, "0191", "", "41" ], "192": [ "Input_Bit_43_i05", "0", "1", "300", false, "0192", "", "42" ], "193": [ "Input_Bit_44_i05", "0", "1", "300", false, "0193", "", "43" ], "194": [ "Input_Bit_45_i05", "0", "1", "300", false, "0194", "", "44" ], "195": [ "Input_Bit_46_i05", "0", "1", "300", false, "0195", "", "45" ], "196": [ "Input_Bit_47_i05", "0", "1", "300", false, "0196", "", "46" ], "197": [ "Input_Bit_48_i05", "0", "1", "300", false, "0197", "", "47" ], "198": [ "Input_Bit_49_i05", "0", "1", "300", false, "0198", "", "48" ], "199": [ "Input_Bit_50_i05", "0", "1", "300", false, "0199", "", "49" ], "200": [ "Input_Bit_51_i05", "0", "1", "300", false, "0200", "", "50" ], "201": [ "Input_Bit_52_i05", "0", "1", "300", false, "0201", "", "51" ], "202": [ "Input_Bit_53_i05", "0", "1", "300", false, "0202", "", "52" ], "203": [ "Input_Bit_54_i05", "0", "1", "300", false, "0203", "", "53" ], "204": [ "Input_Bit_55_i05", "0", "1", "300", false, "0204", "", "54" ], "205": [ "Input_Bit_56_i05", "0", "1", "300", false, "0205", "", "55" ], "206": [ "Input_Bit_57_i05", "0", "1", "300", false, "0206", "", "56" ], "207": [ "Input_Bit_58_i05", "0", "1", "300", false, "0207", "", "57" ], "208": [ "Input_Bit_59_i05", "0", "1", "300", false, "0208", "", "58" ], "209": [ "Input_Bit_60_i05", "0", "1", "300", false, "0209", "", "59" ], "210": [ "Input_Bit_61_i05", "0", "1", "300", false, "0210", "", "60" ], "211": [ "Input_Bit_62_i05", "0", "1", "300", false, "0211", "", "61" ], "212": [ "Input_Bit_63_i05", "0", "1", "300", false, "0212", "", "62" ], "213": [ "Input_Bit_64_i05", "0", "1", "300", false, "0213", "", "63" ], "214": [ "Input_Bit_65_i05", "0", "1", "300", false, "0214", "", "64" ], "215": [ "Input_Bit_66_i05", "0", "1", "300", false, "0215", "", "65" ], "216": [ "Input_Bit_67_i05", "0", "1", "300", false, "0216", "", "66" ], "217": [ "Input_Bit_68_i05", "0", "1", "300", false, "0217", "", "67" ], "218": [ "Input_Bit_69_i05", "0", "1", "300", false, "0218", "", "68" ], "219": [ "Input_Bit_70_i05", "0", "1", "300", false, "0219", "", "69" ], "220": [ "Input_Bit_71_i05", "0", "1", "300", false, "0220", "", "70" ], "221": [ "Input_Bit_72_i05", "0", "1", "300", false, "0221", "", "71" ], "222": [ "Input_Bit_73_i05", "0", "1", "300", false, "0222", "", "72" ], "223": [ "Input_Bit_74_i05", "0", "1", "300", false, "0223", "", "73" ], "224": [ "Input_Bit_75_i05", "0", "1", "300", false, "0224", "", "74" ], "225": [ "Input_Bit_76_i05", "0", "1", "300", false, "0225", "", "75" ], "226": [ "Input_Bit_77_i05", "0", "1", "300", false, "0226", "", "76" ], "227": [ "Input_Bit_78_i05", "0", "1", "300", false, "0227", "", "77" ], "228": [ "Input_Bit_79_i05", "0", "1", "300", false, "0228", "", "78" ], "229": [ "Input_Bit_80_i05", "0", "1", "300", false, "0229", "", "79" ], "230": [ "Input_Bit_81_i05", "0", "1", "300", false, "0230", "", "80" ], "231": [ "Input_Bit_82_i05", "0", "1", "300", false, "0231", "", "81" ], "232": [ "Input_Bit_83_i05", "0", "1", "300", false, "0232", "", "82" ], "233": [ "Input_Bit_84_i05", "0", "1", "300", false, "0233", "", "83" ], "234": [ "Input_Bit_85_i05", "0", "1", "300", false, "0234", "", "84" ], "235": [ "Input_Bit_86_i05", "0", "1", "300", false, "0235", "", "85" ], "236": [ "Input_Bit_87_i05", "0", "1", "300", false, "0236", "", "86" ], "237": [ "Input_Bit_88_i05", "0", "1", "300", false, "0237", "", "87" ], "238": [ "Input_Bit_89_i05", "0", "1", "300", false, "0238", "", "88" ], "239": [ "Input_Bit_90_i05", "0", "1", "300", false, "0239", "", "89" ], "240": [ "Input_Bit_91_i05", "0", "1", "300", false, "0240", "", "90" ], "241": [ "Input_Bit_92_i05", "0", "1", "300", false, "0241", "", "91" ], "242": [ "Input_Bit_93_i05", "0", "1", "300", false, "0242", "", "92" ], "243": [ "Input_Bit_94_i05", "0", "1", "300", false, "0243", "", "93" ], "244": [ "Input_Bit_95_i05", "0", "1", "300", false, "0244", "", "94" ], "245": [ "Input_Bit_96_i05", "0", "1", "300", false, "0245", "", "95" ], "246": [ "Input_Bit_97_i05", "0", "1", "300", false, "0246", "", "96" ], "247": [ "Input_Bit_98_i05", "0", "1", "300", false, "0247", "", "97" ], "248": [ "Input_Bit_99_i05", "0", "1", "300", false, "0248", "", "98" ], "249": [ "Input_Bit_100_i05", "0", "1", "300", false, "0249", "", "99" ], "250": [ "Input_Bit_101_i05", "0", "1", "300", false, "0250", "", "100" ], "251": [ "Input_Bit_102_i05", "0", "1", "300", false, "0251", "", "101" ], "252": [ "Input_Bit_103_i05", "0", "1", "300", false, "0252", "", "102" ], "253": [ "Input_Bit_104_i05", "0", "1", "300", false, "0253", "", "103" ], "254": [ "Input_Bit_105_i05", "0", "1", "300", false, "0254", "", "104" ], "255": [ "Input_Bit_106_i05", "0", "1", "300", false, "0255", "", "105" ], "256": [ "Input_Bit_107_i05", "0", "1", "300", false, "0256", "", "106" ], "257": [ "Input_Bit_108_i05", "0", "1", "300", false, "0257", "", "107" ], "258": [ "Input_Bit_109_i05", "0", "1", "300", false, "0258", "", "108" ], "259": [ "Input_Bit_110_i05", "0", "1", "300", false, "0259", "", "109" ], "260": [ "Input_Bit_111_i05", "0", "1", "300", false, "0260", "", "110" ], "261": [ "Input_Bit_112_i05", "0", "1", "300", false, "0261", "", "111" ], "262": [ "Input_Bit_113_i05", "0", "1", "300", false, "0262", "", "112" ], "263": [ "Input_Bit_114_i05", "0", "1", "300", false, "0263", "", "113" ], "264": [ "Input_Bit_115_i05", "0", "1", "300", false, "0264", "", "114" ], "265": [ "Input_Bit_116_i05", "0", "1", "300", false, "0265", "", "115" ], "266": [ "Input_Bit_117_i05", "0", "1", "300", false, "0266", "", "116" ], "267": [ "Input_Bit_118_i05", "0", "1", "300", false, "0267", "", "117" ], "268": [ "Input_Bit_119_i05", "0", "1", "300", false, "0268", "", "118" ], "269": [ "Input_Bit_120_i05", "0", "1", "300", false, "0269", "", "119" ], "270": [ "Input_Bit_121_i05", "0", "1", "300", false, "0270", "", "120" ], "271": [ "Input_Bit_122_i05", "0", "1", "300", false, "0271", "", "121" ], "272": [ "Input_Bit_123_i05", "0", "1", "300", false, "0272", "", "122" ], "273": [ "Input_Bit_124_i05", "0", "1", "300", false, "0273", "", "123" ], "274": [ "Input_Bit_125_i05", "0", "1", "300", false, "0274", "", "124" ], "275": [ "Input_Bit_126_i05", "0", "1", "300", false, "0275", "", "125" ], "276": [ "Input_Bit_127_i05", "0", "1", "300", false, "0276", "", "126" ], "277": [ "Input_Bit_128_i05", "0", "1", "300", false, "0277", "", "127" ], "278": [ "Input_Bit_129_i05", "0", "1", "300", false, "0278", "", "128" ], "279": [ "Input_Bit_130_i05", "0", "1", "300", false, "0279", "", "129" ], "280": [ "Input_Bit_131_i05", "0", "1", "300", false, "0280", "", "130" ], "281": [ "Input_Bit_132_i05", "0", "1", "300", false, "0281", "", "131" ], "282": [ "Input_Bit_133_i05", "0", "1", "300", false, "0282", "", "132" ], "283": [ "Input_Bit_134_i05", "0", "1", "300", false, "0283", "", "133" ], "284": [ "Input_Bit_135_i05", "0", "1", "300", false, "0284", "", "134" ], "285": [ "Input_Bit_136_i05", "0", "1", "300", false, "0285", "", "135" ], "286": [ "Input_Bit_137_i05", "0", "1", "300", false, "0286", "", "136" ], "287": [ "Input_Bit_138_i05", "0", "1", "300", false, "0287", "", "137" ], "288": [ "Input_Bit_139_i05", "0", "1", "300", false, "0288", "", "138" ], "289": [ "Input_Bit_140_i05", "0", "1", "300", false, "0289", "", "139" ], "290": [ "Input_Bit_141_i05", "0", "1", "300", false, "0290", "", "140" ], "291": [ "Input_Bit_142_i05", "0", "1", "300", false, "0291", "", "141" ], "292": [ "Input_Bit_143_i05", "0", "1", "300", false, "0292", "", "142" ], "293": [ "Input_Bit_144_i05", "0", "1", "300", false, "0293", "", "143" ], "294": [ "Input_Bit_145_i05", "0", "1", "300", false, "0294", "", "144" ], "295": [ "Input_Bit_146_i05", "0", "1", "300", false, "0295", "", "145" ], "296": [ "Input_Bit_147_i05", "0", "1", "300", false, "0296", "", "146" ], "297": [ "Input_Bit_148_i05", "0", "1", "300", false, "0297", "", "147" ], "298": [ "Input_Bit_149_i05", "0", "1", "300", false, "0298", "", "148" ], "299": [ "Input_Bit_150_i05", "0", "1", "300", false, "0299", "", "149" ], "300": [ "Input_Bit_151_i05", "0", "1", "300", false, "0300", "", "150" ], "301": [ "Input_Bit_152_i05", "0", "1", "300", false, "0301", "", "151" ], "302": [ "Modbus_Action_Status_1_i05", "255", "8", "319", false, "0302", "", "" ], "303": [ "Modbus_Action_Status_2_i05", "255", "8", "320", false, "0303", "", "" ], "304": [ "Modbus_Action_Status_3_i05", "255", "8", "321", false, "0304", "", "" ], "305": [ "Modbus_Action_Status_4_i05", "255", "8", "322", false, "0305", "", "" ], "306": [ "Modbus_Action_Status_5_i05", "255", "8", "323", false, "0306", "", "" ], "307": [ "Modbus_Action_Status_6_i05", "255", "8", "324", false, "0307", "", "" ], "308": [ "Modbus_Action_Status_7_i05", "255", "8", "325", false, "0308", "", "" ], "309": [ "Modbus_Action_Status_8_i05", "255", "8", "326", false, "0309", "", "" ], "310": [ "Modbus_Action_Status_9_i05", "255", "8", "327", false, "0310", "", "" ], "311": [ "Modbus_Action_Status_10_i05", "255", "8", "328", false, "0311", "", "" ], "312": [ "Modbus_Action_Status_11_i05", "255", "8", "329", false, "0312", "", "" ], "313": [ "Modbus_Action_Status_12_i05", "255", "8", "330", false, "0313", "", "" ], "314": [ "Modbus_Action_Status_13_i05", "255", "8", "331", false, "0314", "", "" ], "315": [ "Modbus_Action_Status_14_i05", "255", "8", "332", false, "0315", "", "" ], "316": [ "Modbus_Action_Status_15_i05", "255", "8", "333", false, "0316", "", "" ], "317": [ "Modbus_Action_Status_16_i05", "255", "8", "334", false, "0317", "", "" ], "318": [ "Modbus_Action_Status_17_i05", "255", "8", "335", false, "0318", "", "" ], "319": [ "Modbus_Action_Status_18_i05", "255", "8", "336", false, "0319", "", "" ], "320": [ "Modbus_Action_Status_19_i05", "255", "8", "337", false, "0320", "", "" ], "321": [ "Modbus_Action_Status_20_i05", "255", "8", "338", false, "0321", "", "" ], "322": [ "Modbus_Action_Status_21_i05", "255", "8", "339", false, "0322", "", "" ], "323": [ "Modbus_Action_Status_22_i05", "255", "8", "340", false, "0323", "", "" ], "324": [ "Modbus_Action_Status_23_i05", "255", "8", "341", false, "0324", "", "" ], "325": [ "Modbus_Action_Status_24_i05", "255", "8", "342", false, "0325", "", "" ], "326": [ "Modbus_Action_Status_25_i05", "255", "8", "343", false, "0326", "", "" ], "327": [ "Modbus_Action_Status_26_i05", "255", "8", "344", false, "0327", "", "" ], "328": [ "Modbus_Action_Status_27_i05", "255", "8", "345", false, "0328", "", "" ], "329": [ "Modbus_Action_Status_28_i05", "255", "8", "346", false, "0329", "", "" ], "330": [ "Modbus_Action_Status_29_i05", "255", "8", "347", false, "0330", "", "" ], "331": [ "Modbus_Action_Status_30_i05", "255", "8", "348", false, "0331", "", "" ], "332": [ "Modbus_Action_Status_31_i05", "255", "8", "349", false, "0332", "", "" ], "333": [ "Modbus_Action_Status_32_i05", "255", "8", "350", false, "0333", "", "" ], "334": [ "Modbus_Action_Status_33_i05", "255", "8", "351", false, "0334", "", "" ], "335": [ "Modbus_Action_Status_34_i05", "255", "8", "352", false, "0335", "", "" ], "336": [ "Modbus_Action_Status_35_i05", "255", "8", "353", false, "0336", "", "" ], "337": [ "Modbus_Action_Status_36_i05", "255", "8", "354", false, "0337", "", "" ], "338": [ "Modbus_Action_Status_37_i05", "255", "8", "355", false, "0338", "", "" ], "339": [ "Modbus_Action_Status_38_i05", "255", "8", "356", false, "0339", "", "" ], "340": [ "Modbus_Action_Status_39_i05", "255", "8", "357", false, "0340", "", "" ], "341": [ "Modbus_Action_Status_40_i05", "255", "8", "358", false, "0341", "", "" ], "342": [ "Modbus_Action_Status_41_i05", "255", "8", "359", false, "0342", "", "" ], "343": [ "Modbus_Action_Status_42_i05", "255", "8", "360", false, "0343", "", "" ], "344": [ "Modbus_Action_Status_43_i05", "255", "8", "361", false, "0344", "", "" ], "345": [ "Modbus_Action_Status_44_i05", "255", "8", "362", false, "0345", "", "" ], "346": [ "Modbus_Action_Status_45_i05", "255", "8", "363", false, "0346", "", "" ], "347": [ "Modbus_Action_Status_46_i05", "255", "8", "364", false, "0347", "", "" ], "348": [ "Modbus_Action_Status_47_i05", "255", "8", "365", false, "0348", "", "" ], "349": [ "Modbus_Action_Status_48_i05", "255", "8", "366", false, "0349", "", "" ], "350": [ "Modbus_Action_Status_49_i05", "255", "8", "367", false, "0350", "", "" ], "351": [ "Modbus_Action_Status_50_i05", "255", "8", "368", false, "0351", "", "" ], "352": [ "Modbus_Action_Status_51_i05", "255", "8", "369", false, "0352", "", "" ], "353": [ "Modbus_Action_Status_52_i05", "255", "8", "370", false, "0353", "", "" ], "354": [ "Modbus_Action_Status_53_i05", "255", "8", "371", false, "0354", "", "" ], "355": [ "Modbus_Action_Status_54_i05", "255", "8", "372", false, "0355", "", "" ], "356": [ "Modbus_Action_Status_55_i05", "255", "8", "373", false, "0356", "", "" ], "357": [ "Modbus_Action_Status_56_i05", "255", "8", "374", false, "0357", "", "" ], "358": [ "Modbus_Action_Status_57_i05", "255", "8", "375", false, "0358", "", "" ], "359": [ "Modbus_Action_Status_58_i05", "255", "8", "376", false, "0359", "", "" ], "360": [ "Modbus_Action_Status_59_i05", "255", "8", "377", false, "0360", "", "" ], "361": [ "Modbus_Action_Status_60_i05", "255", "8", "378", false, "0361", "", "" ], "362": [ "Modbus_Action_Status_61_i05", "255", "8", "379", false, "0362", "", "" ], "363": [ "Modbus_Action_Status_62_i05", "255", "8", "380", false, "0363", "", "" ], "364": [ "Modbus_Action_Status_63_i05", "255", "8", "381", false, "0364", "", "" ], "365": [ "Modbus_Action_Status_64_i05", "255", "8", "382", false, "0365", "", "" ], "366": [ "Modbus_Master_Status_i05", "255", "8", "383", false, "0366", "", "" ] }, "out": { "0": [ "O_LightValues", "0", "16", "384", false, "0367", "", "" ], "1": [ "Output_Word_2_i05", "0", "16", "386", false, "0368", "", "" ], "2": [ "Output_Word_3_i05", "0", "16", "388", false, "0369", "", "" ], "3": [ "Output_Word_4_i05", "0", "16", "390", false, "0370", "", "" ], "4": [ "Output_Word_5_i05", "0", "16", "392", false, "0371", "", "" ], "5": [ "Output_Word_6_i05", "0", "16", "394", false, "0372", "", "" ], "6": [ "Output_Word_7_i05", "0", "16", "396", false, "0373", "", "" ], "7": [ "Output_Word_8_i05", "0", "16", "398", false, "0374", "", "" ], "8": [ "Output_Word_9_i05", "0", "16", "400", false, "0375", "", "" ], "9": [ "Output_Word_10_i05", "0", "16", "402", false, "0376", "", "" ], "10": [ "Output_Word_11_i05", "0", "16", "404", false, "0377", "", "" ], "11": [ "Output_Word_12_i05", "0", "16", "406", false, "0378", "", "" ], "12": [ "Output_Word_13_i05", "0", "16", "408", false, "0379", "", "" ], "13": [ "Output_Word_14_i05", "0", "16", "410", false, "0380", "", "" ], "14": [ "Output_Word_15_i05", "0", "16", "412", false, "0381", "", "" ], "15": [ "Output_Word_16_i05", "0", "16", "414", false, "0382", "", "" ], "16": [ "Output_Word_17_i05", "0", "16", "416", false, "0383", "", "" ], "17": [ "Output_Word_18_i05", "0", "16", "418", false, "0384", "", "" ], "18": [ "Output_Word_19_i05", "0", "16", "420", false, "0385", "", "" ], "19": [ "Output_Word_20_i05", "0", "16", "422", false, "0386", "", "" ], "20": [ "Output_Word_21_i05", "0", "16", "424", false, "0387", "", "" ], "21": [ "Output_Word_22_i05", "0", "16", "426", false, "0388", "", "" ], "22": [ "Output_Word_23_i05", "0", "16", "428", false, "0389", "", "" ], "23": [ "Output_Word_24_i05", "0", "16", "430", false, "0390", "", "" ], "24": [ "Output_Word_25_i05", "0", "16", "432", false, "0391", "", "" ], "25": [ "Output_Word_26_i05", "0", "16", "434", false, "0392", "", "" ], "26": [ "Output_Word_27_i05", "0", "16", "436", false, "0393", "", "" ], "27": [ "Output_Word_28_i05", "0", "16", "438", false, "0394", "", "" ], "28": [ "Output_Word_29_i05", "0", "16", "440", false, "0395", "", "" ], "29": [ "Output_Word_30_i05", "0", "16", "442", false, "0396", "", "" ], "30": [ "Output_Word_31_i05", "0", "16", "444", false, "0397", "", "" ], "31": [ "Output_Word_32_i05", "0", "16", "446", false, "0398", "", "" ], "32": [ "Output_Word_33_i05", "0", "16", "448", false, "0399", "", "" ], "33": [ "Output_Word_34_i05", "0", "16", "450", false, "0400", "", "" ], "34": [ "Output_Word_35_i05", "0", "16", "452", false, "0401", "", "" ], "35": [ "Output_Word_36_i05", "0", "16", "454", false, "0402", "", "" ], "36": [ "Output_Word_37_i05", "0", "16", "456", false, "0403", "", "" ], "37": [ "Output_Word_38_i05", "0", "16", "458", false, "0404", "", "" ], "38": [ "Output_Word_39_i05", "0", "16", "460", false, "0405", "", "" ], "39": [ "Output_Word_40_i05", "0", "16", "462", false, "0406", "", "" ], "40": [ "Output_Word_41_i05", "0", "16", "464", false, "0407", "", "" ], "41": [ "Output_Word_42_i05", "0", "16", "466", false, "0408", "", "" ], "42": [ "Output_Word_43_i05", "0", "16", "468", false, "0409", "", "" ], "43": [ "Output_Word_44_i05", "0", "16", "470", false, "0410", "", "" ], "44": [ "Output_Word_45_i05", "0", "16", "472", false, "0411", "", "" ], "45": [ "Output_Word_46_i05", "0", "16", "474", false, "0412", "", "" ], "46": [ "Output_Word_47_i05", "0", "16", "476", false, "0413", "", "" ], "47": [ "Output_Word_48_i05", "0", "16", "478", false, "0414", "", "" ], "48": [ "Output_Word_49_i05", "0", "16", "480", false, "0415", "", "" ], "49": [ "Output_Word_50_i05", "0", "16", "482", false, "0416", "", "" ], "50": [ "Output_Word_51_i05", "0", "16", "484", false, "0417", "", "" ], "51": [ "Output_Word_52_i05", "0", "16", "486", false, "0418", "", "" ], "52": [ "Output_Word_53_i05", "0", "16", "488", false, "0419", "", "" ], "53": [ "Output_Word_54_i05", "0", "16", "490", false, "0420", "", "" ], "54": [ "Output_Word_55_i05", "0", "16", "492", false, "0421", "", "" ], "55": [ "Output_Word_56_i05", "0", "16", "494", false, "0422", "", "" ], "56": [ "Output_Word_57_i05", "0", "16", "496", false, "0423", "", "" ], "57": [ "Output_Word_58_i05", "0", "16", "498", false, "0424", "", "" ], "58": [ "Output_Word_59_i05", "0", "16", "500", false, "0425", "", "" ], "59": [ "Output_Word_60_i05", "0", "16", "502", false, "0426", "", "" ], "60": [ "Output_Word_61_i05", "0", "16", "504", false, "0427", "", "" ], "61": [ "Output_Word_62_i05", "0", "16", "506", false, "0428", "", "" ], "62": [ "Output_Word_63_i05", "0", "16", "508", false, "0429", "", "" ], "63": [ "Output_Word_64_i05", "0", "16", "510", false, "0430", "", "" ], "64": [ "Output_Word_65_i05", "0", "16", "512", false, "0431", "", "" ], "65": [ "Output_Word_66_i05", "0", "16", "514", false, "0432", "", "" ], "66": [ "Output_Word_67_i05", "0", "16", "516", false, "0433", "", "" ], "67": [ "Output_Word_68_i05", "0", "16", "518", false, "0434", "", "" ], "68": [ "Output_Word_69_i05", "0", "16", "520", false, "0435", "", "" ], "69": [ "Output_Word_70_i05", "0", "16", "522", false, "0436", "", "" ], "70": [ "Output_Word_71_i05", "0", "16", "524", false, "0437", "", "" ], "71": [ "Output_Word_72_i05", "0", "16", "526", false, "0438", "", "" ], "72": [ "Output_Word_73_i05", "0", "16", "528", false, "0439", "", "" ], "73": [ "Output_Word_74_i05", "0", "16", "530", false, "0440", "", "" ], "74": [ "Output_Word_75_i05", "0", "16", "532", false, "0441", "", "" ], "75": [ "Output_Word_76_i05", "0", "16", "534", false, "0442", "", "" ], "76": [ "Output_Word_77_i05", "0", "16", "536", false, "0443", "", "" ], "77": [ "Output_Word_78_i05", "0", "16", "538", false, "0444", "", "" ], "78": [ "Output_Word_79_i05", "0", "16", "540", false, "0445", "", "" ], "79": [ "Output_Word_80_i05", "0", "16", "542", false, "0446", "", "" ], "80": [ "Output_Word_81_i05", "0", "16", "544", false, "0447", "", "" ], "81": [ "Output_Word_82_i05", "0", "16", "546", false, "0448", "", "" ], "82": [ "Output_Word_83_i05", "0", "16", "548", false, "0449", "", "" ], "83": [ "Output_Word_84_i05", "0", "16", "550", false, "0450", "", "" ], "84": [ "Output_Word_85_i05", "0", "16", "552", false, "0451", "", "" ], "85": [ "Output_Word_86_i05", "0", "16", "554", false, "0452", "", "" ], "86": [ "Output_Word_87_i05", "0", "16", "556", false, "0453", "", "" ], "87": [ "Output_Word_88_i05", "0", "16", "558", false, "0454", "", "" ], "88": [ "Output_Word_89_i05", "0", "16", "560", false, "0455", "", "" ], "89": [ "Output_Word_90_i05", "0", "16", "562", false, "0456", "", "" ], "90": [ "Output_Word_91_i05", "0", "16", "564", false, "0457", "", "" ], "91": [ "Output_Word_92_i05", "0", "16", "566", false, "0458", "", "" ], "92": [ "Output_Word_93_i05", "0", "16", "568", false, "0459", "", "" ], "93": [ "Output_Word_94_i05", "0", "16", "570", false, "0460", "", "" ], "94": [ "Output_Word_95_i05", "0", "16", "572", false, "0461", "", "" ], "95": [ "Output_Word_96_i05", "0", "16", "574", false, "0462", "", "" ], "96": [ "Output_Word_97_i05", "0", "16", "576", false, "0463", "", "" ], "97": [ "Output_Word_98_i05", "0", "16", "578", false, "0464", "", "" ], "98": [ "Output_Word_99_i05", "0", "16", "580", false, "0465", "", "" ], "99": [ "Output_Word_100_i05", "0", "16", "582", false, "0466", "", "" ], "100": [ "Output_Word_101_i05", "0", "16", "584", false, "0467", "", "" ], "101": [ "Output_Word_102_i05", "0", "16", "586", false, "0468", "", "" ], "102": [ "Output_Word_103_i05", "0", "16", "588", false, "0469", "", "" ], "103": [ "Output_Word_104_i05", "0", "16", "590", false, "0470", "", "" ], "104": [ "Output_Word_105_i05", "0", "16", "592", false, "0471", "", "" ], "105": [ "Output_Word_106_i05", "0", "16", "594", false, "0472", "", "" ], "106": [ "Output_Word_107_i05", "0", "16", "596", false, "0473", "", "" ], "107": [ "Output_Word_108_i05", "0", "16", "598", false, "0474", "", "" ], "108": [ "Output_Word_109_i05", "0", "16", "600", false, "0475", "", "" ], "109": [ "Output_Word_110_i05", "0", "16", "602", false, "0476", "", "" ], "110": [ "Output_Word_111_i05", "0", "16", "604", false, "0477", "", "" ], "111": [ "Output_Word_112_i05", "0", "16", "606", false, "0478", "", "" ], "112": [ "Output_Word_113_i05", "0", "16", "608", false, "0479", "", "" ], "113": [ "Output_Word_114_i05", "0", "16", "610", false, "0480", "", "" ], "114": [ "Output_Word_115_i05", "0", "16", "612", false, "0481", "", "" ], "115": [ "Output_Word_116_i05", "0", "16", "614", false, "0482", "", "" ], "116": [ "Output_Word_117_i05", "0", "16", "616", false, "0483", "", "" ], "117": [ "Output_Word_118_i05", "0", "16", "618", false, "0484", "", "" ], "118": [ "Output_Word_119_i05", "0", "16", "620", false, "0485", "", "" ], "119": [ "Output_Word_120_i05", "0", "16", "622", false, "0486", "", "" ], "120": [ "Output_Word_121_i05", "0", "16", "624", false, "0487", "", "" ], "121": [ "Output_Word_122_i05", "0", "16", "626", false, "0488", "", "" ], "122": [ "Output_Word_123_i05", "0", "16", "628", false, "0489", "", "" ], "123": [ "Output_Word_124_i05", "0", "16", "630", false, "0490", "", "" ], "124": [ "Output_Word_125_i05", "0", "16", "632", false, "0491", "", "" ], "125": [ "Output_Word_126_i05", "0", "16", "634", false, "0492", "", "" ], "126": [ "Output_Word_127_i05", "0", "16", "636", false, "0493", "", "" ], "127": [ "Output_Word_128_i05", "0", "16", "638", false, "0494", "", "" ], "128": [ "Output_Word_129_i05", "0", "16", "640", false, "0495", "", "" ], "129": [ "Output_Word_130_i05", "0", "16", "642", false, "0496", "", "" ], "130": [ "Output_Word_131_i05", "0", "16", "644", false, "0497", "", "" ], "131": [ "Output_Word_132_i05", "0", "16", "646", false, "0498", "", "" ], "132": [ "Output_Word_133_i05", "0", "16", "648", false, "0499", "", "" ], "133": [ "Output_Word_134_i05", "0", "16", "650", false, "0500", "", "" ], "134": [ "Output_Word_135_i05", "0", "16", "652", false, "0501", "", "" ], "135": [ "Output_Word_136_i05", "0", "16", "654", false, "0502", "", "" ], "136": [ "Output_Word_137_i05", "0", "16", "656", false, "0503", "", "" ], "137": [ "Output_Word_138_i05", "0", "16", "658", false, "0504", "", "" ], "138": [ "Output_Word_139_i05", "0", "16", "660", false, "0505", "", "" ], "139": [ "Output_Word_140_i05", "0", "16", "662", false, "0506", "", "" ], "140": [ "Output_Word_141_i05", "0", "16", "664", false, "0507", "", "" ], "141": [ "Output_Word_142_i05", "0", "16", "666", false, "0508", "", "" ], "142": [ "Output_Word_143_i05", "0", "16", "668", false, "0509", "", "" ], "143": [ "Output_Word_144_i05", "0", "16", "670", false, "0510", "", "" ], "144": [ "Output_Word_145_i05", "0", "16", "672", false, "0511", "", "" ], "145": [ "Output_Word_146_i05", "0", "16", "674", false, "0512", "", "" ], "146": [ "Output_Word_147_i05", "0", "16", "676", false, "0513", "", "" ], "147": [ "Output_Word_148_i05", "0", "16", "678", false, "0514", "", "" ], "148": [ "Output_Word_149_i05", "0", "16", "680", false, "0515", "", "" ], "149": [ "Output_Word_150_i05", "0", "16", "682", false, "0516", "", "" ], "150": [ "O_HeartBeatL", "0", "1", "684", false, "0517", "", "0" ], "151": [ "Output_Bit_2_i05", "0", "1", "684", false, "0518", "", "1" ], "152": [ "Output_Bit_3_i05", "0", "1", "684", false, "0519", "", "2" ], "153": [ "Output_Bit_4_i05", "0", "1", "684", false, "0520", "", "3" ], "154": [ "Output_Bit_5_i05", "0", "1", "684", false, "0521", "", "4" ], "155": [ "Output_Bit_6_i05", "0", "1", "684", false, "0522", "", "5" ], "156": [ "Output_Bit_7_i05", "0", "1", "684", false, "0523", "", "6" ], "157": [ "Output_Bit_8_i05", "0", "1", "684", false, "0524", "", "7" ], "158": [ "Output_Bit_9_i05", "0", "1", "684", false, "0525", "", "8" ], "159": [ "Output_Bit_10_i05", "0", "1", "684", false, "0526", "", "9" ], "160": [ "Output_Bit_11_i05", "0", "1", "684", false, "0527", "", "10" ], "161": [ "Output_Bit_12_i05", "0", "1", "684", false, "0528", "", "11" ], "162": [ "Output_Bit_13_i05", "0", "1", "684", false, "0529", "", "12" ], "163": [ "Output_Bit_14_i05", "0", "1", "684", false, "0530", "", "13" ], "164": [ "Output_Bit_15_i05", "0", "1", "684", false, "0531", "", "14" ], "165": [ "Output_Bit_16_i05", "0", "1", "684", false, "0532", "", "15" ], "166": [ "Output_Bit_17_i05", "0", "1", "684", false, "0533", "", "16" ], "167": [ "Output_Bit_18_i05", "0", "1", "684", false, "0534", "", "17" ], "168": [ "Output_Bit_19_i05", "0", "1", "684", false, "0535", "", "18" ], "169": [ "Output_Bit_20_i05", "0", "1", "684", false, "0536", "", "19" ], "170": [ "Output_Bit_21_i05", "0", "1", "684", false, "0537", "", "20" ], "171": [ "Output_Bit_22_i05", "0", "1", "684", false, "0538", "", "21" ], "172": [ "Output_Bit_23_i05", "0", "1", "684", false, "0539", "", "22" ], "173": [ "Output_Bit_24_i05", "0", "1", "684", false, "0540", "", "23" ], "174": [ "Output_Bit_25_i05", "0", "1", "684", false, "0541", "", "24" ], "175": [ "Output_Bit_26_i05", "0", "1", "684", false, "0542", "", "25" ], "176": [ "Output_Bit_27_i05", "0", "1", "684", false, "0543", "", "26" ], "177": [ "Output_Bit_28_i05", "0", "1", "684", false, "0544", "", "27" ], "178": [ "Output_Bit_29_i05", "0", "1", "684", false, "0545", "", "28" ], "179": [ "Output_Bit_30_i05", "0", "1", "684", false, "0546", "", "29" ], "180": [ "Output_Bit_31_i05", "0", "1", "684", false, "0547", "", "30" ], "181": [ "Output_Bit_32_i05", "0", "1", "684", false, "0548", "", "31" ], "182": [ "Output_Bit_33_i05", "0", "1", "684", false, "0549", "", "32" ], "183": [ "Output_Bit_34_i05", "0", "1", "684", false, "0550", "", "33" ], "184": [ "Output_Bit_35_i05", "0", "1", "684", false, "0551", "", "34" ], "185": [ "Output_Bit_36_i05", "0", "1", "684", false, "0552", "", "35" ], "186": [ "Output_Bit_37_i05", "0", "1", "684", false, "0553", "", "36" ], "187": [ "Output_Bit_38_i05", "0", "1", "684", false, "0554", "", "37" ], "188": [ "Output_Bit_39_i05", "0", "1", "684", false, "0555", "", "38" ], "189": [ "Output_Bit_40_i05", "0", "1", "684", false, "0556", "", "39" ], "190": [ "Output_Bit_41_i05", "0", "1", "684", false, "0557", "", "40" ], "191": [ "Output_Bit_42_i05", "0", "1", "684", false, "0558", "", "41" ], "192": [ "Output_Bit_43_i05", "0", "1", "684", false, "0559", "", "42" ], "193": [ "Output_Bit_44_i05", "0", "1", "684", false, "0560", "", "43" ], "194": [ "Output_Bit_45_i05", "0", "1", "684", false, "0561", "", "44" ], "195": [ "Output_Bit_46_i05", "0", "1", "684", false, "0562", "", "45" ], "196": [ "Output_Bit_47_i05", "0", "1", "684", false, "0563", "", "46" ], "197": [ "Output_Bit_48_i05", "0", "1", "684", false, "0564", "", "47" ], "198": [ "Output_Bit_49_i05", "0", "1", "684", false, "0565", "", "48" ], "199": [ "Output_Bit_50_i05", "0", "1", "684", false, "0566", "", "49" ], "200": [ "Output_Bit_51_i05", "0", "1", "684", false, "0567", "", "50" ], "201": [ "Output_Bit_52_i05", "0", "1", "684", false, "0568", "", "51" ], "202": [ "Output_Bit_53_i05", "0", "1", "684", false, "0569", "", "52" ], "203": [ "Output_Bit_54_i05", "0", "1", "684", false, "0570", "", "53" ], "204": [ "Output_Bit_55_i05", "0", "1", "684", false, "0571", "", "54" ], "205": [ "Output_Bit_56_i05", "0", "1", "684", false, "0572", "", "55" ], "206": [ "Output_Bit_57_i05", "0", "1", "684", false, "0573", "", "56" ], "207": [ "Output_Bit_58_i05", "0", "1", "684", false, "0574", "", "57" ], "208": [ "Output_Bit_59_i05", "0", "1", "684", false, "0575", "", "58" ], "209": [ "Output_Bit_60_i05", "0", "1", "684", false, "0576", "", "59" ], "210": [ "Output_Bit_61_i05", "0", "1", "684", false, "0577", "", "60" ], "211": [ "Output_Bit_62_i05", "0", "1", "684", false, "0578", "", "61" ], "212": [ "Output_Bit_63_i05", "0", "1", "684", false, "0579", "", "62" ], "213": [ "Output_Bit_64_i05", "0", "1", "684", false, "0580", "", "63" ], "214": [ "Output_Bit_65_i05", "0", "1", "684", false, "0581", "", "64" ], "215": [ "Output_Bit_66_i05", "0", "1", "684", false, "0582", "", "65" ], "216": [ "Output_Bit_67_i05", "0", "1", "684", false, "0583", "", "66" ], "217": [ "Output_Bit_68_i05", "0", "1", "684", false, "0584", "", "67" ], "218": [ "Output_Bit_69_i05", "0", "1", "684", false, "0585", "", "68" ], "219": [ "Output_Bit_70_i05", "0", "1", "684", false, "0586", "", "69" ], "220": [ "Output_Bit_71_i05", "0", "1", "684", false, "0587", "", "70" ], "221": [ "Output_Bit_72_i05", "0", "1", "684", false, "0588", "", "71" ], "222": [ "Output_Bit_73_i05", "0", "1", "684", false, "0589", "", "72" ], "223": [ "Output_Bit_74_i05", "0", "1", "684", false, "0590", "", "73" ], "224": [ "Output_Bit_75_i05", "0", "1", "684", false, "0591", "", "74" ], "225": [ "Output_Bit_76_i05", "0", "1", "684", false, "0592", "", "75" ], "226": [ "Output_Bit_77_i05", "0", "1", "684", false, "0593", "", "76" ], "227": [ "Output_Bit_78_i05", "0", "1", "684", false, "0594", "", "77" ], "228": [ "Output_Bit_79_i05", "0", "1", "684", false, "0595", "", "78" ], "229": [ "Output_Bit_80_i05", "0", "1", "684", false, "0596", "", "79" ], "230": [ "Output_Bit_81_i05", "0", "1", "684", false, "0597", "", "80" ], "231": [ "Output_Bit_82_i05", "0", "1", "684", false, "0598", "", "81" ], "232": [ "Output_Bit_83_i05", "0", "1", "684", false, "0599", "", "82" ], "233": [ "Output_Bit_84_i05", "0", "1", "684", false, "0600", "", "83" ], "234": [ "Output_Bit_85_i05", "0", "1", "684", false, "0601", "", "84" ], "235": [ "Output_Bit_86_i05", "0", "1", "684", false, "0602", "", "85" ], "236": [ "Output_Bit_87_i05", "0", "1", "684", false, "0603", "", "86" ], "237": [ "Output_Bit_88_i05", "0", "1", "684", false, "0604", "", "87" ], "238": [ "Output_Bit_89_i05", "0", "1", "684", false, "0605", "", "88" ], "239": [ "Output_Bit_90_i05", "0", "1", "684", false, "0606", "", "89" ], "240": [ "Output_Bit_91_i05", "0", "1", "684", false, "0607", "", "90" ], "241": [ "Output_Bit_92_i05", "0", "1", "684", false, "0608", "", "91" ], "242": [ "Output_Bit_93_i05", "0", "1", "684", false, "0609", "", "92" ], "243": [ "Output_Bit_94_i05", "0", "1", "684", false, "0610", "", "93" ], "244": [ "Output_Bit_95_i05", "0", "1", "684", false, "0611", "", "94" ], "245": [ "Output_Bit_96_i05", "0", "1", "684", false, "0612", "", "95" ], "246": [ "Output_Bit_97_i05", "0", "1", "684", false, "0613", "", "96" ], "247": [ "Output_Bit_98_i05", "0", "1", "684", false, "0614", "", "97" ], "248": [ "Output_Bit_99_i05", "0", "1", "684", false, "0615", "", "98" ], "249": [ "Output_Bit_100_i05", "0", "1", "684", false, "0616", "", "99" ], "250": [ "Output_Bit_101_i05", "0", "1", "684", false, "0617", "", "100" ], "251": [ "Output_Bit_102_i05", "0", "1", "684", false, "0618", "", "101" ], "252": [ "Output_Bit_103_i05", "0", "1", "684", false, "0619", "", "102" ], "253": [ "Output_Bit_104_i05", "0", "1", "684", false, "0620", "", "103" ], "254": [ "Output_Bit_105_i05", "0", "1", "684", false, "0621", "", "104" ], "255": [ "Output_Bit_106_i05", "0", "1", "684", false, "0622", "", "105" ], "256": [ "Output_Bit_107_i05", "0", "1", "684", false, "0623", "", "106" ], "257": [ "Output_Bit_108_i05", "0", "1", "684", false, "0624", "", "107" ], "258": [ "Output_Bit_109_i05", "0", "1", "684", false, "0625", "", "108" ], "259": [ "Output_Bit_110_i05", "0", "1", "684", false, "0626", "", "109" ], "260": [ "Output_Bit_111_i05", "0", "1", "684", false, "0627", "", "110" ], "261": [ "Output_Bit_112_i05", "0", "1", "684", false, "0628", "", "111" ], "262": [ "Output_Bit_113_i05", "0", "1", "684", false, "0629", "", "112" ], "263": [ "Output_Bit_114_i05", "0", "1", "684", false, "0630", "", "113" ], "264": [ "Output_Bit_115_i05", "0", "1", "684", false, "0631", "", "114" ], "265": [ "Output_Bit_116_i05", "0", "1", "684", false, "0632", "", "115" ], "266": [ "Output_Bit_117_i05", "0", "1", "684", false, "0633", "", "116" ], "267": [ "Output_Bit_118_i05", "0", "1", "684", false, "0634", "", "117" ], "268": [ "Output_Bit_119_i05", "0", "1", "684", false, "0635", "", "118" ], "269": [ "Output_Bit_120_i05", "0", "1", "684", false, "0636", "", "119" ], "270": [ "Output_Bit_121_i05", "0", "1", "684", false, "0637", "", "120" ], "271": [ "Output_Bit_122_i05", "0", "1", "684", false, "0638", "", "121" ], "272": [ "Output_Bit_123_i05", "0", "1", "684", false, "0639", "", "122" ], "273": [ "Output_Bit_124_i05", "0", "1", "684", false, "0640", "", "123" ], "274": [ "Output_Bit_125_i05", "0", "1", "684", false, "0641", "", "124" ], "275": [ "Output_Bit_126_i05", "0", "1", "684", false, "0642", "", "125" ], "276": [ "Output_Bit_127_i05", "0", "1", "684", false, "0643", "", "126" ], "277": [ "Output_Bit_128_i05", "0", "1", "684", false, "0644", "", "127" ], "278": [ "Output_Bit_129_i05", "0", "1", "684", false, "0645", "", "128" ], "279": [ "Output_Bit_130_i05", "0", "1", "684", false, "0646", "", "129" ], "280": [ "Output_Bit_131_i05", "0", "1", "684", false, "0647", "", "130" ], "281": [ "Output_Bit_132_i05", "0", "1", "684", false, "0648", "", "131" ], "282": [ "Output_Bit_133_i05", "0", "1", "684", false, "0649", "", "132" ], "283": [ "Output_Bit_134_i05", "0", "1", "684", false, "0650", "", "133" ], "284": [ "Output_Bit_135_i05", "0", "1", "684", false, "0651", "", "134" ], "285": [ "Output_Bit_136_i05", "0", "1", "684", false, "0652", "", "135" ], "286": [ "Output_Bit_137_i05", "0", "1", "684", false, "0653", "", "136" ], "287": [ "Output_Bit_138_i05", "0", "1", "684", false, "0654", "", "137" ], "288": [ "Output_Bit_139_i05", "0", "1", "684", false, "0655", "", "138" ], "289": [ "Output_Bit_140_i05", "0", "1", "684", false, "0656", "", "139" ], "290": [ "Output_Bit_141_i05", "0", "1", "684", false, "0657", "", "140" ], "291": [ "Output_Bit_142_i05", "0", "1", "684", false, "0658", "", "141" ], "292": [ "Output_Bit_143_i05", "0", "1", "684", false, "0659", "", "142" ], "293": [ "Output_Bit_144_i05", "0", "1", "684", false, "0660", "", "143" ], "294": [ "Output_Bit_145_i05", "0", "1", "684", false, "0661", "", "144" ], "295": [ "Output_Bit_146_i05", "0", "1", "684", false, "0662", "", "145" ], "296": [ "Output_Bit_147_i05", "0", "1", "684", false, "0663", "", "146" ], "297": [ "Output_Bit_148_i05", "0", "1", "684", false, "0664", "", "147" ], "298": [ "Output_Bit_149_i05", "0", "1", "684", false, "0665", "", "148" ], "299": [ "Output_Bit_150_i05", "0", "1", "684", false, "0666", "", "149" ], "300": [ "Output_Bit_151_i05", "0", "1", "684", false, "0667", "", "150" ], "301": [ "Output_Bit_152_i05", "0", "1", "684", false, "0668", "", "151" ], "302": [ "Action_Status_Reset_1_i05", "0", "1", "703", false, "0669", "", "0" ], "303": [ "Action_Status_Reset_2_i05", "0", "1", "703", false, "0670", "", "1" ], "304": [ "Action_Status_Reset_3_i05", "0", "1", "703", false, "0671", "", "2" ], "305": [ "Action_Status_Reset_4_i05", "0", "1", "703", false, "0672", "", "3" ], "306": [ "Action_Status_Reset_5_i05", "0", "1", "703", false, "0673", "", "4" ], "307": [ "Action_Status_Reset_6_i05", "0", "1", "703", false, "0674", "", "5" ], "308": [ "Action_Status_Reset_7_i05", "0", "1", "703", false, "0675", "", "6" ], "309": [ "Action_Status_Reset_8_i05", "0", "1", "703", false, "0676", "", "7" ], "310": [ "Action_Status_Reset_9_i05", "0", "1", "703", false, "0677", "", "8" ], "311": [ "Action_Status_Reset_10_i05", "0", "1", "703", false, "0678", "", "9" ], "312": [ "Action_Status_Reset_11_i05", "0", "1", "703", false, "0679", "", "10" ], "313": [ "Action_Status_Reset_12_i05", "0", "1", "703", false, "0680", "", "11" ], "314": [ "Action_Status_Reset_13_i05", "0", "1", "703", false, "0681", "", "12" ], "315": [ "Action_Status_Reset_14_i05", "0", "1", "703", false, "0682", "", "13" ], "316": [ "Action_Status_Reset_15_i05", "0", "1", "703", false, "0683", "", "14" ], "317": [ "Action_Status_Reset_16_i05", "0", "1", "703", false, "0684", "", "15" ], "318": [ "Action_Status_Reset_17_i05", "0", "1", "703", false, "0685", "", "16" ], "319": [ "Action_Status_Reset_18_i05", "0", "1", "703", false, "0686", "", "17" ], "320": [ "Action_Status_Reset_19_i05", "0", "1", "703", false, "0687", "", "18" ], "321": [ "Action_Status_Reset_20_i05", "0", "1", "703", false, "0688", "", "19" ], "322": [ "Action_Status_Reset_21_i05", "0", "1", "703", false, "0689", "", "20" ], "323": [ "Action_Status_Reset_22_i05", "0", "1", "703", false, "0690", "", "21" ], "324": [ "Action_Status_Reset_23_i05", "0", "1", "703", false, "0691", "", "22" ], "325": [ "Action_Status_Reset_24_i05", "0", "1", "703", false, "0692", "", "23" ], "326": [ "Action_Status_Reset_25_i05", "0", "1", "703", false, "0693", "", "24" ], "327": [ "Action_Status_Reset_26_i05", "0", "1", "703", false, "0694", "", "25" ], "328": [ "Action_Status_Reset_27_i05", "0", "1", "703", false, "0695", "", "26" ], "329": [ "Action_Status_Reset_28_i05", "0", "1", "703", false, "0696", "", "27" ], "330": [ "Action_Status_Reset_29_i05", "0", "1", "703", false, "0697", "", "28" ], "331": [ "Action_Status_Reset_30_i05", "0", "1", "703", false, "0698", "", "29" ], "332": [ "Action_Status_Reset_31_i05", "0", "1", "703", false, "0699", "", "30" ], "333": [ "Action_Status_Reset_32_i05", "0", "1", "703", false, "0700", "", "31" ], "334": [ "Action_Status_Reset_33_i05", "0", "1", "703", false, "0701", "", "32" ], "335": [ "Action_Status_Reset_34_i05", "0", "1", "703", false, "0702", "", "33" ], "336": [ "Action_Status_Reset_35_i05", "0", "1", "703", false, "0703", "", "34" ], "337": [ "Action_Status_Reset_36_i05", "0", "1", "703", false, "0704", "", "35" ], "338": [ "Action_Status_Reset_37_i05", "0", "1", "703", false, "0705", "", "36" ], "339": [ "Action_Status_Reset_38_i05", "0", "1", "703", false, "0706", "", "37" ], "340": [ "Action_Status_Reset_39_i05", "0", "1", "703", false, "0707", "", "38" ], "341": [ "Action_Status_Reset_40_i05", "0", "1", "703", false, "0708", "", "39" ], "342": [ "Action_Status_Reset_41_i05", "0", "1", "703", false, "0709", "", "40" ], "343": [ "Action_Status_Reset_42_i05", "0", "1", "703", false, "0710", "", "41" ], "344": [ "Action_Status_Reset_43_i05", "0", "1", "703", false, "0711", "", "42" ], "345": [ "Action_Status_Reset_44_i05", "0", "1", "703", false, "0712", "", "43" ], "346": [ "Action_Status_Reset_45_i05", "0", "1", "703", false, "0713", "", "44" ], "347": [ "Action_Status_Reset_46_i05", "0", "1", "703", false, "0714", "", "45" ], "348": [ "Action_Status_Reset_47_i05", "0", "1", "703", false, "0715", "", "46" ], "349": [ "Action_Status_Reset_48_i05", "0", "1", "703", false, "0716", "", "47" ], "350": [ "Action_Status_Reset_49_i05", "0", "1", "703", false, "0717", "", "48" ], "351": [ "Action_Status_Reset_50_i05", "0", "1", "703", false, "0718", "", "49" ], "352": [ "Action_Status_Reset_51_i05", "0", "1", "703", false, "0719", "", "50" ], "353": [ "Action_Status_Reset_52_i05", "0", "1", "703", false, "0720", "", "51" ], "354": [ "Action_Status_Reset_53_i05", "0", "1", "703", false, "0721", "", "52" ], "355": [ "Action_Status_Reset_54_i05", "0", "1", "703", false, "0722", "", "53" ], "356": [ "Action_Status_Reset_55_i05", "0", "1", "703", false, "0723", "", "54" ], "357": [ "Action_Status_Reset_56_i05", "0", "1", "703", false, "0724", "", "55" ], "358": [ "Action_Status_Reset_57_i05", "0", "1", "703", false, "0725", "", "56" ], "359": [ "Action_Status_Reset_58_i05", "0", "1", "703", false, "0726", "", "57" ], "360": [ "Action_Status_Reset_59_i05", "0", "1", "703", false, "0727", "", "58" ], "361": [ "Action_Status_Reset_60_i05", "0", "1", "703", false, "0728", "", "59" ], "362": [ "Action_Status_Reset_61_i05", "0", "1", "703", false, "0729", "", "60" ], "363": [ "Action_Status_Reset_62_i05", "0", "1", "703", false, "0730", "", "61" ], "364": [ "Action_Status_Reset_63_i05", "0", "1", "703", false, "0731", "", "62" ], "365": [ "Action_Status_Reset_64_i05", "0", "1", "703", false, "0732", "", "63" ], "366": [ "Master_Status_Reset_i05", "0", "8", "767", false, "0733", "", "" ] }, "mem": { "0": [ "slave_IP_address_i05", "192.168.01.21", "128", "768", false, "0734", "", "" ], "1": [ "slave_TCP_port_i05", "502", "16", "784", false, "0735", "", "" ] }, "extend": { "deviceMisc": { "tbl_A_rowcount": "3", "ModbusMasterStatus_ModbusTCPMaster_20200904_1_1": "Modbus_Master_Status_i05", "MasterStatusReset_ModbusTCPMaster_20200904_1_1": "Master_Status_Reset_i05" }, "data": { "ActionId_01_ModbusTCPMaster_20200904_1_1": "1", "SlaveAddress_01_ModbusTCPMaster_20200904_1_1": "1", "SlaveIP_01_ModbusTCPMaster_20200904_1_1": "", "SlavePort_01_ModbusTCPMaster_20200904_1_1": "", "FunctionCode_01_ModbusTCPMaster_20200904_1_1": "4", "RegisterAddress_01_ModbusTCPMaster_20200904_1_1": "1", "QuantityOfRegisters_01_ModbusTCPMaster_20200904_1_1": "1", "ActionInterval_01_ModbusTCPMaster_20200904_1_1": "250", "DeviceValue_01_ModbusTCPMaster_20200904_1_1": "I_LighState", "ModbusActionStatus_01_ModbusTCPMaster_20200904_1_1": "Modbus_Action_Status_1_i05", "ActionStatusReset_01_ModbusTCPMaster_20200904_1_1": "Action_Status_Reset_1_i05", "ActionId_02_ModbusTCPMaster_20200904_1_1": "2", "SlaveAddress_02_ModbusTCPMaster_20200904_1_1": "1", "SlaveIP_02_ModbusTCPMaster_20200904_1_1": "", "SlavePort_02_ModbusTCPMaster_20200904_1_1": "", "FunctionCode_02_ModbusTCPMaster_20200904_1_1": "5", "RegisterAddress_02_ModbusTCPMaster_20200904_1_1": "1", "QuantityOfRegisters_02_ModbusTCPMaster_20200904_1_1": "1", "ActionInterval_02_ModbusTCPMaster_20200904_1_1": "250", "DeviceValue_02_ModbusTCPMaster_20200904_1_1": "O_HeartBeatL", "ModbusActionStatus_02_ModbusTCPMaster_20200904_1_1": "Modbus_Action_Status_2_i05", "ActionStatusReset_02_ModbusTCPMaster_20200904_1_1": "Action_Status_Reset_2_i05", "ActionId_03_ModbusTCPMaster_20200904_1_1": "3", "SlaveAddress_03_ModbusTCPMaster_20200904_1_1": "1", "SlaveIP_03_ModbusTCPMaster_20200904_1_1": "", "SlavePort_03_ModbusTCPMaster_20200904_1_1": "", "FunctionCode_03_ModbusTCPMaster_20200904_1_1": "16", "RegisterAddress_03_ModbusTCPMaster_20200904_1_1": "1", "QuantityOfRegisters_03_ModbusTCPMaster_20200904_1_1": "44", "ActionInterval_03_ModbusTCPMaster_20200904_1_1": "100", "DeviceValue_03_ModbusTCPMaster_20200904_1_1": "O_LightValues", "ModbusActionStatus_03_ModbusTCPMaster_20200904_1_1": "Modbus_Action_Status_3_i05", "ActionStatusReset_03_ModbusTCPMaster_20200904_1_1": "Action_Status_Reset_3_i05" } } } ], "Connections": [] } \ No newline at end of file diff --git a/tests/common/config_core_bits.json b/tests/common/config_core_bits.json new file mode 100644 index 0000000..8abc1cd --- /dev/null +++ b/tests/common/config_core_bits.json @@ -0,0 +1,4517 @@ +{ + "App": { + "name": "PiCtory", + "version": "1.2.3", + "saveTS": "20170826120906", + "language": "en", + "layout": { + "north": { + "size": 70, + "initClosed": false, + "initHidden": false + }, + "south": { + "size": 480, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": { + "east": { + "size": 500, + "initClosed": false, + "initHidden": false + } + } + } + }, + "east": { + "size": 70, + "initClosed": true, + "initHidden": false, + "children": { + "layout1": { + "north": { + "size": 100, + "initClosed": false, + "initHidden": false + }, + "south": { + "size": 98, + "initClosed": false, + "initHidden": false + } + } + } + }, + "west": { + "size": 200, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": {} + } + } + } + }, + "Summary": { + "inpTotal": 338, + "outTotal": 113 + }, + "Devices": [ + { + "GUID": "6ad3c1a4-6870-3bf1-6d55-b9d991ba9dc0", + "id": "device_RevPiConnect_20171023_1_0_001", + "type": "BASE", + "productType": "105", + "position": "0", + "name": "RevPi Connect V1.0", + "bmk": "RevPi Connect V1.0", + "inpVariant": 0, + "outVariant": 0, + "comment": "This is a RevPi Connect", + "offset": 0, + "inp": { + "0": [ + "stat0", + "0", + "1", + "0", + true, + "0000", + "", + "0" + ], + "1": [ + "stat1", + "0", + "1", + "0", + true, + "0001", + "", + "1" + ], + "2": [ + "stat2", + "0", + "1", + "0", + true, + "0002", + "", + "2" + ], + "3": [ + "stat3", + "0", + "1", + "0", + true, + "0003", + "", + "3" + ], + "4": [ + "stat4", + "0", + "1", + "0", + true, + "0004", + "", + "4" + ], + "5": [ + "stat5", + "0", + "1", + "0", + true, + "005", + "", + "5" + ], + "6": [ + "x2in", + "0", + "1", + "0", + true, + "0006", + "", + "6" + ], + "7": [ + "stat7", + "0", + "1", + "0", + true, + "0007", + "", + "7" + ], + "8": [ + "RevPiIOCycle", + "0", + "8", + "1", + true, + "0008", + "", + "" + ], + "9": [ + "RS485ErrorCnt", + "0", + "16", + "2", + false, + "0009", + "", + "" + ], + "10": [ + "Core_Temperatur", + "0", + "8", + "4", + false, + "0010", + "", + "" + ], + "11": [ + "Core_Frequency", + "0", + "8", + "5", + false, + "0011", + "", + "" + ] + }, + "out": { + "0": [ + "a1green", + "0", + "1", + "6", + true, + "0012", + "", + "0" + ], + "1": [ + "a1red", + "0", + "1", + "6", + true, + "0013", + "", + "1" + ], + "2": [ + "a2green", + "0", + "1", + "6", + true, + "0014", + "", + "2" + ], + "3": [ + "a2red", + "0", + "1", + "6", + true, + "0015", + "", + "3" + ], + "4": [ + "a3green", + "0", + "1", + "6", + true, + "0016", + "", + "4" + ], + "5": [ + "a3red", + "0", + "1", + "6", + true, + "0017", + "", + "5" + ], + "6": [ + "x2out", + "0", + "1", + "6", + true, + "0018", + "", + "6" + ], + "7": [ + "wd", + "0", + "1", + "6", + true, + "0019", + "", + "7" + ], + "8": [ + "RS485ErrorLimit1", + "10", + "16", + "7", + false, + "0020", + "", + "" + ], + "9": [ + "RS485ErrorLimit2", + "1000", + "16", + "9", + false, + "0021", + "", + "" + ] + }, + "mem": {}, + "extend": {} + }, + { + "catalogNr": "RevPiDI", + "GUID": "2e2c089e-6bef-14c0-852b-41b7cf48d846", + "id": "device_RevPiDI_20160818_1_0_001", + "type": "LEFT_RIGHT", + "productType": "97", + "position": "32", + "name": "di01", + "bmk": "RevPi DI", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 11, + "inp": { + "0": [ + "notaus_ok", + "0", + "1", + "0", + true, + "0000", + "", + "0" + ], + "1": [ + "motorschutz_ok", + "0", + "1", + "0", + true, + "0001", + "", + "1" + ], + "2": [ + "fu_ok", + "0", + "1", + "0", + true, + "0002", + "", + "2" + ], + "3": [ + "fu_motoran", + "0", + "1", + "0", + true, + "0003", + "", + "3" + ], + "4": [ + "I_5", + "0", + "1", + "0", + true, + "0004", + "", + "4" + ], + "5": [ + "I_6", + "0", + "1", + "0", + true, + "0005", + "", + "5" + ], + "6": [ + "I_7", + "0", + "1", + "0", + true, + "0006", + "", + "6" + ], + "7": [ + "I_8", + "0", + "1", + "0", + true, + "0007", + "", + "7" + ], + "8": [ + "t_automatik", + "0", + "1", + "0", + true, + "0008", + "", + "8" + ], + "9": [ + "t_start", + "0", + "1", + "0", + true, + "0009", + "", + "9" + ], + "10": [ + "t_stop", + "0", + "1", + "0", + true, + "0010", + "", + "10" + ], + "11": [ + "t_quit", + "0", + "1", + "0", + true, + "0011", + "", + "11" + ], + "12": [ + "t_notaus", + "0", + "1", + "0", + true, + "0012", + "", + "12" + ], + "13": [ + "I_14", + "0", + "1", + "0", + true, + "0013", + "", + "13" + ], + "14": [ + "I_15", + "0", + "1", + "0", + true, + "0014", + "", + "14" + ], + "15": [ + "I_16", + "0", + "1", + "0", + true, + "0015", + "", + "15" + ], + "16": [ + "Status", + "0", + "16", + "4", + false, + "0016", + "", + "" + ], + "17": [ + "Counter_1", + "0", + "32", + "6", + false, + "0017", + "", + "" + ], + "18": [ + "Counter_2", + "0", + "32", + "10", + false, + "0018", + "", + "" + ], + "19": [ + "Counter_3", + "0", + "32", + "14", + false, + "0019", + "", + "" + ], + "20": [ + "Counter_4", + "0", + "32", + "18", + false, + "0020", + "", + "" + ], + "21": [ + "Counter_5", + "0", + "32", + "22", + false, + "0021", + "", + "" + ], + "22": [ + "Counter_6", + "0", + "32", + "26", + false, + "0022", + "", + "" + ], + "23": [ + "Counter_7", + "0", + "32", + "30", + false, + "0023", + "", + "" + ], + "24": [ + "Counter_8", + "0", + "32", + "34", + false, + "0024", + "", + "" + ], + "25": [ + "Counter_9", + "0", + "32", + "38", + false, + "0025", + "", + "" + ], + "26": [ + "Counter_10", + "0", + "32", + "42", + false, + "0026", + "", + "" + ], + "27": [ + "Counter_11", + "0", + "32", + "46", + false, + "0027", + "", + "" + ], + "28": [ + "Counter_12", + "0", + "32", + "50", + false, + "0028", + "", + "" + ], + "29": [ + "Counter_13", + "0", + "32", + "54", + false, + "0029", + "", + "" + ], + "30": [ + "Counter_14", + "0", + "32", + "58", + false, + "0030", + "", + "" + ], + "31": [ + "Counter_15", + "0", + "32", + "62", + false, + "0031", + "", + "" + ], + "32": [ + "Counter_16", + "0", + "32", + "66", + false, + "0032", + "", + "" + ], + "33": [ + "Output_Status", + "0", + "16", + "2", + false, + "0050", + "", + "" + ] + }, + "out": { + "0": [ + "Output", + "0", + "16", + "70", + false, + "0051", + "", + "" + ], + "1": [ + "PWM_1", + "0", + "8", + "72", + false, + "0052", + "", + "" + ], + "2": [ + "PWM_2", + "0", + "8", + "73", + false, + "0053", + "", + "" + ], + "3": [ + "PWM_3", + "0", + "8", + "74", + false, + "0054", + "", + "" + ], + "4": [ + "PWM_4", + "0", + "8", + "75", + false, + "0055", + "", + "" + ], + "5": [ + "PWM_5", + "0", + "8", + "76", + false, + "0056", + "", + "" + ], + "6": [ + "PWM_6", + "0", + "8", + "77", + false, + "0057", + "", + "" + ], + "7": [ + "PWM_7", + "0", + "8", + "78", + false, + "0058", + "", + "" + ], + "8": [ + "PWM_8", + "0", + "8", + "79", + false, + "0059", + "", + "" + ], + "9": [ + "PWM_9", + "0", + "8", + "80", + false, + "0060", + "", + "" + ], + "10": [ + "PWM_10", + "0", + "8", + "81", + false, + "0061", + "", + "" + ], + "11": [ + "PWM_11", + "0", + "8", + "82", + false, + "0062", + "", + "" + ], + "12": [ + "PWM_12", + "0", + "8", + "83", + false, + "0063", + "", + "" + ], + "13": [ + "PWM_13", + "0", + "8", + "84", + false, + "0064", + "", + "" + ], + "14": [ + "PWM_14", + "0", + "8", + "85", + false, + "0065", + "", + "" + ], + "15": [ + "PWM_15", + "0", + "8", + "86", + false, + "0066", + "", + "" + ], + "16": [ + "PWM_16", + "0", + "8", + "87", + false, + "0067", + "", + "" + ] + }, + "mem": { + "0": [ + "InputMode_1", + "0", + "8", + "88", + false, + "0033", + "", + "" + ], + "1": [ + "InputMode_2", + "0", + "8", + "89", + false, + "0034", + "", + "" + ], + "2": [ + "InputMode_3", + "0", + "8", + "90", + false, + "0035", + "", + "" + ], + "3": [ + "InputMode_4", + "0", + "8", + "91", + false, + "0036", + "", + "" + ], + "4": [ + "InputMode_5", + "0", + "8", + "92", + false, + "0037", + "", + "" + ], + "5": [ + "InputMode_6", + "0", + "8", + "93", + false, + "0038", + "", + "" + ], + "6": [ + "InputMode_7", + "0", + "8", + "94", + false, + "0039", + "", + "" + ], + "7": [ + "InputMode_8", + "0", + "8", + "95", + false, + "0040", + "", + "" + ], + "8": [ + "InputMode_9", + "0", + "8", + "96", + false, + "0041", + "", + "" + ], + "9": [ + "InputMode_10", + "0", + "8", + "97", + false, + "0042", + "", + "" + ], + "10": [ + "InputMode_11", + "0", + "8", + "98", + false, + "0043", + "", + "" + ], + "11": [ + "InputMode_12", + "0", + "8", + "99", + false, + "0044", + "", + "" + ], + "12": [ + "InputMode_13", + "0", + "8", + "100", + false, + "0045", + "", + "" + ], + "13": [ + "InputMode_14", + "0", + "8", + "101", + false, + "0046", + "", + "" + ], + "14": [ + "InputMode_15", + "0", + "8", + "102", + false, + "0047", + "", + "" + ], + "15": [ + "InputMode_16", + "0", + "8", + "103", + false, + "0048", + "", + "" + ], + "16": [ + "InputDebounce", + "0", + "16", + "104", + false, + "0049", + "", + "" + ], + "17": [ + "OutputPushPull", + "0", + "16", + "106", + false, + "0068", + "", + "" + ], + "18": [ + "OutputOpenLoadDetect", + "0", + "16", + "108", + false, + "0069", + "", + "" + ], + "19": [ + "OutputPWMActive", + "0", + "16", + "110", + false, + "0070", + "", + "" + ], + "20": [ + "OutputPWMFrequency", + "2", + "8", + "112", + false, + "0071", + "", + "" + ] + }, + "extend": {} + }, + { + "catalogNr": "RevPiDI", + "GUID": "81e6c459-0398-a7c4-4954-d793ee9a5b89", + "id": "device_RevPiDI_20160818_1_0_002", + "type": "LEFT_RIGHT", + "productType": "97", + "position": "33", + "name": "di02", + "bmk": "RevPi DI", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 124, + "inp": { + "0": [ + "m_druck_ok", + "0", + "1", + "0", + true, + "0000", + "", + "0" + ], + "1": [ + "m_m1_eingefahren", + "0", + "1", + "0", + true, + "0001", + "", + "1" + ], + "2": [ + "m_m1_ausgefahren", + "0", + "1", + "0", + true, + "0002", + "", + "2" + ], + "3": [ + "m_m2_eingefahren", + "0", + "1", + "0", + true, + "0003", + "", + "3" + ], + "4": [ + "m_m2_ausgefahren", + "0", + "1", + "0", + true, + "0004", + "", + "4" + ], + "5": [ + "m_m3_eingefahren", + "0", + "1", + "0", + true, + "0005", + "", + "5" + ], + "6": [ + "m_m3_ausgefahren", + "0", + "1", + "0", + true, + "0006", + "", + "6" + ], + "7": [ + "s_rutsche", + "0", + "1", + "0", + true, + "0007", + "", + "7" + ], + "8": [ + "s_metall", + "0", + "1", + "0", + true, + "0008", + "", + "8" + ], + "9": [ + "s_magazin1", + "0", + "1", + "0", + true, + "0009", + "", + "9" + ], + "10": [ + "s_magazin2", + "0", + "1", + "0", + true, + "0010", + "", + "10" + ], + "11": [ + "I_12_i03", + "0", + "1", + "0", + true, + "0011", + "", + "11" + ], + "12": [ + "I_13_i03", + "0", + "1", + "0", + true, + "0012", + "", + "12" + ], + "13": [ + "I_14_i03", + "0", + "1", + "0", + true, + "0013", + "", + "13" + ], + "14": [ + "I_15_i03", + "0", + "1", + "0", + true, + "0014", + "", + "14" + ], + "15": [ + "mb_status", + "0", + "1", + "0", + true, + "0015", + "", + "15" + ], + "16": [ + "Status_i03", + "0", + "16", + "4", + false, + "0016", + "", + "" + ], + "17": [ + "Counter_1_i03", + "0", + "32", + "6", + false, + "0017", + "", + "" + ], + "18": [ + "Counter_2_i03", + "0", + "32", + "10", + false, + "0018", + "", + "" + ], + "19": [ + "Counter_3_i03", + "0", + "32", + "14", + false, + "0019", + "", + "" + ], + "20": [ + "Counter_4_i03", + "0", + "32", + "18", + false, + "0020", + "", + "" + ], + "21": [ + "Counter_5_i03", + "0", + "32", + "22", + false, + "0021", + "", + "" + ], + "22": [ + "Counter_6_i03", + "0", + "32", + "26", + false, + "0022", + "", + "" + ], + "23": [ + "Counter_7_i03", + "0", + "32", + "30", + false, + "0023", + "", + "" + ], + "24": [ + "Counter_8_i03", + "0", + "32", + "34", + false, + "0024", + "", + "" + ], + "25": [ + "Counter_9_i03", + "0", + "32", + "38", + false, + "0025", + "", + "" + ], + "26": [ + "Counter_10_i03", + "0", + "32", + "42", + false, + "0026", + "", + "" + ], + "27": [ + "Counter_11_i03", + "0", + "32", + "46", + false, + "0027", + "", + "" + ], + "28": [ + "Counter_12_i03", + "0", + "32", + "50", + false, + "0028", + "", + "" + ], + "29": [ + "Counter_13_i03", + "0", + "32", + "54", + false, + "0029", + "", + "" + ], + "30": [ + "Counter_14_i03", + "0", + "32", + "58", + false, + "0030", + "", + "" + ], + "31": [ + "Counter_15_i03", + "0", + "32", + "62", + false, + "0031", + "", + "" + ], + "32": [ + "Counter_16_i03", + "0", + "32", + "66", + false, + "0032", + "", + "" + ], + "33": [ + "Output_Status_i03", + "0", + "16", + "2", + false, + "0050", + "", + "" + ] + }, + "out": { + "0": [ + "Output_i03", + "0", + "16", + "70", + false, + "0051", + "", + "" + ], + "1": [ + "PWM_1_i03", + "0", + "8", + "72", + false, + "0052", + "", + "" + ], + "2": [ + "PWM_2_i03", + "0", + "8", + "73", + false, + "0053", + "", + "" + ], + "3": [ + "PWM_3_i03", + "0", + "8", + "74", + false, + "0054", + "", + "" + ], + "4": [ + "PWM_4_i03", + "0", + "8", + "75", + false, + "0055", + "", + "" + ], + "5": [ + "PWM_5_i03", + "0", + "8", + "76", + false, + "0056", + "", + "" + ], + "6": [ + "PWM_6_i03", + "0", + "8", + "77", + false, + "0057", + "", + "" + ], + "7": [ + "PWM_7_i03", + "0", + "8", + "78", + false, + "0058", + "", + "" + ], + "8": [ + "PWM_8_i03", + "0", + "8", + "79", + false, + "0059", + "", + "" + ], + "9": [ + "PWM_9_i03", + "0", + "8", + "80", + false, + "0060", + "", + "" + ], + "10": [ + "PWM_10_i03", + "0", + "8", + "81", + false, + "0061", + "", + "" + ], + "11": [ + "PWM_11_i03", + "0", + "8", + "82", + false, + "0062", + "", + "" + ], + "12": [ + "PWM_12_i03", + "0", + "8", + "83", + false, + "0063", + "", + "" + ], + "13": [ + "PWM_13_i03", + "0", + "8", + "84", + false, + "0064", + "", + "" + ], + "14": [ + "PWM_14_i03", + "0", + "8", + "85", + false, + "0065", + "", + "" + ], + "15": [ + "PWM_15_i03", + "0", + "8", + "86", + false, + "0066", + "", + "" + ], + "16": [ + "PWM_16_i03", + "0", + "8", + "87", + false, + "0067", + "", + "" + ] + }, + "mem": { + "0": [ + "InputMode_1_i03", + "0", + "8", + "88", + false, + "0033", + "", + "" + ], + "1": [ + "InputMode_2_i03", + "0", + "8", + "89", + false, + "0034", + "", + "" + ], + "2": [ + "InputMode_3_i03", + "0", + "8", + "90", + false, + "0035", + "", + "" + ], + "3": [ + "InputMode_4_i03", + "0", + "8", + "91", + false, + "0036", + "", + "" + ], + "4": [ + "InputMode_5_i03", + "0", + "8", + "92", + false, + "0037", + "", + "" + ], + "5": [ + "InputMode_6_i03", + "0", + "8", + "93", + false, + "0038", + "", + "" + ], + "6": [ + "InputMode_7_i03", + "0", + "8", + "94", + false, + "0039", + "", + "" + ], + "7": [ + "InputMode_8_i03", + "0", + "8", + "95", + false, + "0040", + "", + "" + ], + "8": [ + "InputMode_9_i03", + "0", + "8", + "96", + false, + "0041", + "", + "" + ], + "9": [ + "InputMode_10_i03", + "0", + "8", + "97", + false, + "0042", + "", + "" + ], + "10": [ + "InputMode_11_i03", + "0", + "8", + "98", + false, + "0043", + "", + "" + ], + "11": [ + "InputMode_12_i03", + "0", + "8", + "99", + false, + "0044", + "", + "" + ], + "12": [ + "InputMode_13_i03", + "0", + "8", + "100", + false, + "0045", + "", + "" + ], + "13": [ + "InputMode_14_i03", + "0", + "8", + "101", + false, + "0046", + "", + "" + ], + "14": [ + "InputMode_15_i03", + "0", + "8", + "102", + false, + "0047", + "", + "" + ], + "15": [ + "InputMode_16_i03", + "0", + "8", + "103", + false, + "0048", + "", + "" + ], + "16": [ + "InputDebounce_i03", + "0", + "16", + "104", + false, + "0049", + "", + "" + ], + "17": [ + "OutputPushPull_i03", + "0", + "16", + "106", + false, + "0068", + "", + "" + ], + "18": [ + "OutputOpenLoadDetect_i03", + "0", + "16", + "108", + false, + "0069", + "", + "" + ], + "19": [ + "OutputPWMActive_i03", + "0", + "16", + "110", + false, + "0070", + "", + "" + ], + "20": [ + "OutputPWMFrequency_i03", + "2", + "8", + "112", + false, + "0071", + "", + "" + ] + }, + "extend": {} + }, + { + "catalogNr": "RevPiDO", + "GUID": "4f8da9ea-91b2-d028-c60d-4476096a9dc2", + "id": "device_RevPiDO_20160818_1_0_001", + "type": "LEFT_RIGHT", + "productType": "98", + "position": "34", + "name": "do01", + "bmk": "RevPi DO", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 237, + "inp": { + "0": [ + "Output_Status_i04", + "0", + "16", + "2", + false, + "0000", + "", + "" + ], + "1": [ + "Status_i04", + "0", + "16", + "4", + false, + "0001", + "", + "" + ], + "2": [ + "Input", + "0", + "16", + "0", + false, + "0038", + "", + "" + ], + "3": [ + "Counter_1_i04", + "0", + "32", + "6", + false, + "0039", + "", + "" + ], + "4": [ + "Counter_2_i04", + "0", + "32", + "10", + false, + "0040", + "", + "" + ], + "5": [ + "Counter_3_i04", + "0", + "32", + "14", + false, + "0041", + "", + "" + ], + "6": [ + "Counter_4_i04", + "0", + "32", + "18", + false, + "0042", + "", + "" + ], + "7": [ + "Counter_5_i04", + "0", + "32", + "22", + false, + "0043", + "", + "" + ], + "8": [ + "Counter_6_i04", + "0", + "32", + "26", + false, + "0044", + "", + "" + ], + "9": [ + "Counter_7_i04", + "0", + "32", + "30", + false, + "0045", + "", + "" + ], + "10": [ + "Counter_8_i04", + "0", + "32", + "34", + false, + "0046", + "", + "" + ], + "11": [ + "Counter_9_i04", + "0", + "32", + "38", + false, + "0047", + "", + "" + ], + "12": [ + "Counter_10_i04", + "0", + "32", + "42", + false, + "0048", + "", + "" + ], + "13": [ + "Counter_11_i04", + "0", + "32", + "46", + false, + "0049", + "", + "" + ], + "14": [ + "Counter_12_i04", + "0", + "32", + "50", + false, + "0050", + "", + "" + ], + "15": [ + "Counter_13_i04", + "0", + "32", + "54", + false, + "0051", + "", + "" + ], + "16": [ + "Counter_14_i04", + "0", + "32", + "58", + false, + "0052", + "", + "" + ], + "17": [ + "Counter_15_i04", + "0", + "32", + "62", + false, + "0053", + "", + "" + ], + "18": [ + "Counter_16_i04", + "0", + "32", + "66", + false, + "0054", + "", + "" + ] + }, + "out": { + "0": [ + "fu_rechts", + "0", + "1", + "70", + true, + "0002", + "", + "0" + ], + "1": [ + "fu_links", + "0", + "1", + "70", + true, + "0003", + "", + "1" + ], + "2": [ + "fu_schnell", + "0", + "1", + "70", + true, + "0004", + "", + "2" + ], + "3": [ + "fu_lahm", + "0", + "1", + "70", + true, + "0005", + "", + "3" + ], + "4": [ + "v_druck", + "0", + "1", + "70", + true, + "0006", + "", + "4" + ], + "5": [ + "v_m1_einfahren", + "0", + "1", + "70", + true, + "0007", + "", + "5" + ], + "6": [ + "v_m1_ausfahren", + "0", + "1", + "70", + true, + "0008", + "", + "6" + ], + "7": [ + "v_m2_einfahren", + "0", + "1", + "70", + true, + "0009", + "", + "7" + ], + "8": [ + "v_m2_ausfahren", + "0", + "1", + "70", + true, + "0010", + "", + "8" + ], + "9": [ + "v_m3_einfahren", + "0", + "1", + "70", + true, + "0011", + "", + "9" + ], + "10": [ + "v_m3_ausfahren", + "0", + "1", + "70", + true, + "0012", + "", + "10" + ], + "11": [ + "O_12", + "0", + "1", + "70", + true, + "0013", + "", + "11" + ], + "12": [ + "O_13", + "0", + "1", + "70", + true, + "0014", + "", + "12" + ], + "13": [ + "O_14", + "0", + "1", + "70", + true, + "0015", + "", + "13" + ], + "14": [ + "O_15", + "0", + "1", + "70", + true, + "0016", + "", + "14" + ], + "15": [ + "fu_frei", + "0", + "1", + "70", + true, + "0017", + "", + "15" + ], + "16": [ + "PWM_1_i04", + "0", + "8", + "72", + false, + "0018", + "", + "" + ], + "17": [ + "PWM_2_i04", + "0", + "8", + "73", + false, + "0019", + "", + "" + ], + "18": [ + "PWM_3_i04", + "0", + "8", + "74", + false, + "0020", + "", + "" + ], + "19": [ + "PWM_4_i04", + "0", + "8", + "75", + false, + "0021", + "", + "" + ], + "20": [ + "PWM_5_i04", + "0", + "8", + "76", + false, + "0022", + "", + "" + ], + "21": [ + "PWM_6_i04", + "0", + "8", + "77", + false, + "0023", + "", + "" + ], + "22": [ + "PWM_7_i04", + "0", + "8", + "78", + false, + "0024", + "", + "" + ], + "23": [ + "PWM_8_i04", + "0", + "8", + "79", + false, + "0025", + "", + "" + ], + "24": [ + "PWM_9_i04", + "0", + "8", + "80", + false, + "0026", + "", + "" + ], + "25": [ + "PWM_10_i04", + "0", + "8", + "81", + false, + "0027", + "", + "" + ], + "26": [ + "PWM_11_i04", + "0", + "8", + "82", + false, + "0028", + "", + "" + ], + "27": [ + "PWM_12_i04", + "0", + "8", + "83", + false, + "0029", + "", + "" + ], + "28": [ + "PWM_13_i04", + "0", + "8", + "84", + false, + "0030", + "", + "" + ], + "29": [ + "PWM_14_i04", + "0", + "8", + "85", + false, + "0031", + "", + "" + ], + "30": [ + "PWM_15_i04", + "0", + "8", + "86", + false, + "0032", + "", + "" + ], + "31": [ + "PWM_16_i04", + "0", + "8", + "87", + false, + "0033", + "", + "" + ] + }, + "mem": { + "0": [ + "OutputPushPull_i04", + "0", + "16", + "106", + false, + "0034", + "", + "" + ], + "1": [ + "OutputOpenLoadDetect_i04", + "0", + "16", + "108", + false, + "0035", + "", + "" + ], + "2": [ + "OutputPWMActive_i04", + "0", + "16", + "110", + false, + "0036", + "", + "" + ], + "3": [ + "OutputPWMFrequency_i04", + "1", + "8", + "112", + false, + "0037", + "", + "" + ], + "4": [ + "InputMode_1_i04", + "0", + "8", + "88", + false, + "0055", + "", + "" + ], + "5": [ + "InputMode_2_i04", + "0", + "8", + "89", + false, + "0056", + "", + "" + ], + "6": [ + "InputMode_3_i04", + "0", + "8", + "90", + false, + "0057", + "", + "" + ], + "7": [ + "InputMode_4_i04", + "0", + "8", + "91", + false, + "0058", + "", + "" + ], + "8": [ + "InputMode_5_i04", + "0", + "8", + "92", + false, + "0059", + "", + "" + ], + "9": [ + "InputMode_6_i04", + "0", + "8", + "93", + false, + "0060", + "", + "" + ], + "10": [ + "InputMode_7_i04", + "0", + "8", + "94", + false, + "0061", + "", + "" + ], + "11": [ + "InputMode_8_i04", + "0", + "8", + "95", + false, + "0062", + "", + "" + ], + "12": [ + "InputMode_9_i04", + "0", + "8", + "96", + false, + "0063", + "", + "" + ], + "13": [ + "InputMode_10_i04", + "0", + "8", + "97", + false, + "0064", + "", + "" + ], + "14": [ + "InputMode_11_i04", + "0", + "8", + "98", + false, + "0065", + "", + "" + ], + "15": [ + "InputMode_12_i04", + "0", + "8", + "99", + false, + "0066", + "", + "" + ], + "16": [ + "InputMode_13_i04", + "0", + "8", + "100", + false, + "0067", + "", + "" + ], + "17": [ + "InputMode_14_i04", + "0", + "8", + "101", + false, + "0068", + "", + "" + ], + "18": [ + "InputMode_15_i04", + "0", + "8", + "102", + false, + "0069", + "", + "" + ], + "19": [ + "InputMode_16_i04", + "0", + "8", + "103", + false, + "0070", + "", + "" + ], + "20": [ + "InputDebounce_i04", + "0", + "16", + "104", + false, + "0071", + "", + "" + ] + }, + "extend": {} + }, + { + "catalogNr": "RevPiDO", + "GUID": "b8a70c62-9b91-9e1a-af2a-37f74b16aca2", + "id": "device_RevPiDO_20160818_1_0_002", + "type": "LEFT_RIGHT", + "productType": "98", + "position": "35", + "name": "do02", + "bmk": "RevPi DO", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 350, + "inp": { + "0": [ + "Output_Status_i05", + "0", + "16", + "2", + false, + "0000", + "", + "" + ], + "1": [ + "Status_i05", + "0", + "16", + "4", + false, + "0001", + "", + "" + ], + "2": [ + "Input_i05", + "0", + "16", + "0", + false, + "0038", + "", + "" + ], + "3": [ + "Counter_1_i05", + "0", + "32", + "6", + false, + "0039", + "", + "" + ], + "4": [ + "Counter_2_i05", + "0", + "32", + "10", + false, + "0040", + "", + "" + ], + "5": [ + "Counter_3_i05", + "0", + "32", + "14", + false, + "0041", + "", + "" + ], + "6": [ + "Counter_4_i05", + "0", + "32", + "18", + false, + "0042", + "", + "" + ], + "7": [ + "Counter_5_i05", + "0", + "32", + "22", + false, + "0043", + "", + "" + ], + "8": [ + "Counter_6_i05", + "0", + "32", + "26", + false, + "0044", + "", + "" + ], + "9": [ + "Counter_7_i05", + "0", + "32", + "30", + false, + "0045", + "", + "" + ], + "10": [ + "Counter_8_i05", + "0", + "32", + "34", + false, + "0046", + "", + "" + ], + "11": [ + "Counter_9_i05", + "0", + "32", + "38", + false, + "0047", + "", + "" + ], + "12": [ + "Counter_10_i05", + "0", + "32", + "42", + false, + "0048", + "", + "" + ], + "13": [ + "Counter_11_i05", + "0", + "32", + "46", + false, + "0049", + "", + "" + ], + "14": [ + "Counter_12_i05", + "0", + "32", + "50", + false, + "0050", + "", + "" + ], + "15": [ + "Counter_13_i05", + "0", + "32", + "54", + false, + "0051", + "", + "" + ], + "16": [ + "Counter_14_i05", + "0", + "32", + "58", + false, + "0052", + "", + "" + ], + "17": [ + "Counter_15_i05", + "0", + "32", + "62", + false, + "0053", + "", + "" + ], + "18": [ + "Counter_16_i05", + "0", + "32", + "66", + false, + "0054", + "", + "" + ] + }, + "out": { + "0": [ + "fu_reset", + "0", + "1", + "70", + true, + "0002", + "", + "0" + ], + "1": [ + "h_start", + "0", + "1", + "70", + true, + "0003", + "", + "1" + ], + "2": [ + "h_fehler", + "0", + "1", + "70", + true, + "0004", + "", + "2" + ], + "3": [ + "O_04_i05", + "0", + "1", + "70", + true, + "0005", + "", + "3" + ], + "4": [ + "O_05_i05", + "0", + "1", + "70", + true, + "0006", + "", + "4" + ], + "5": [ + "O_06_i05", + "0", + "1", + "70", + true, + "0007", + "", + "5" + ], + "6": [ + "O_07_i05", + "0", + "1", + "70", + true, + "0008", + "", + "6" + ], + "7": [ + "O_08_i05", + "0", + "1", + "70", + true, + "0009", + "", + "7" + ], + "8": [ + "O_09_i05", + "0", + "1", + "70", + true, + "0010", + "", + "8" + ], + "9": [ + "O_10_i05", + "0", + "1", + "70", + true, + "0011", + "", + "9" + ], + "10": [ + "O_11_i05", + "0", + "1", + "70", + true, + "0012", + "", + "10" + ], + "11": [ + "O_12_i05", + "0", + "1", + "70", + true, + "0013", + "", + "11" + ], + "12": [ + "O_13_i05", + "0", + "1", + "70", + true, + "0014", + "", + "12" + ], + "13": [ + "O_14_i05", + "0", + "1", + "70", + true, + "0015", + "", + "13" + ], + "14": [ + "O_15_i05", + "0", + "1", + "70", + true, + "0016", + "", + "14" + ], + "15": [ + "mb_connect", + "0", + "1", + "70", + true, + "0017", + "", + "15" + ], + "16": [ + "PWM_1_i05", + "0", + "8", + "72", + false, + "0018", + "", + "" + ], + "17": [ + "PWM_2_i05", + "0", + "8", + "73", + false, + "0019", + "", + "" + ], + "18": [ + "PWM_3_i05", + "0", + "8", + "74", + false, + "0020", + "", + "" + ], + "19": [ + "PWM_4_i05", + "0", + "8", + "75", + false, + "0021", + "", + "" + ], + "20": [ + "PWM_5_i05", + "0", + "8", + "76", + false, + "0022", + "", + "" + ], + "21": [ + "PWM_6_i05", + "0", + "8", + "77", + false, + "0023", + "", + "" + ], + "22": [ + "PWM_7_i05", + "0", + "8", + "78", + false, + "0024", + "", + "" + ], + "23": [ + "PWM_8_i05", + "0", + "8", + "79", + false, + "0025", + "", + "" + ], + "24": [ + "PWM_9_i05", + "0", + "8", + "80", + false, + "0026", + "", + "" + ], + "25": [ + "PWM_10_i05", + "0", + "8", + "81", + false, + "0027", + "", + "" + ], + "26": [ + "PWM_11_i05", + "0", + "8", + "82", + false, + "0028", + "", + "" + ], + "27": [ + "PWM_12_i05", + "0", + "8", + "83", + false, + "0029", + "", + "" + ], + "28": [ + "PWM_13_i05", + "0", + "8", + "84", + false, + "0030", + "", + "" + ], + "29": [ + "PWM_14_i05", + "0", + "8", + "85", + false, + "0031", + "", + "" + ], + "30": [ + "PWM_15_i05", + "0", + "8", + "86", + false, + "0032", + "", + "" + ], + "31": [ + "PWM_16_i05", + "0", + "8", + "87", + false, + "0033", + "", + "" + ] + }, + "mem": { + "0": [ + "OutputPushPull_i05", + "0", + "16", + "106", + false, + "0034", + "", + "" + ], + "1": [ + "OutputOpenLoadDetect_i05", + "0", + "16", + "108", + false, + "0035", + "", + "" + ], + "2": [ + "OutputPWMActive_i05", + "0", + "16", + "110", + false, + "0036", + "", + "" + ], + "3": [ + "OutputPWMFrequency_i05", + "1", + "8", + "112", + false, + "0037", + "", + "" + ], + "4": [ + "InputMode_1_i05", + "0", + "8", + "88", + false, + "0055", + "", + "" + ], + "5": [ + "InputMode_2_i05", + "0", + "8", + "89", + false, + "0056", + "", + "" + ], + "6": [ + "InputMode_3_i05", + "0", + "8", + "90", + false, + "0057", + "", + "" + ], + "7": [ + "InputMode_4_i05", + "0", + "8", + "91", + false, + "0058", + "", + "" + ], + "8": [ + "InputMode_5_i05", + "0", + "8", + "92", + false, + "0059", + "", + "" + ], + "9": [ + "InputMode_6_i05", + "0", + "8", + "93", + false, + "0060", + "", + "" + ], + "10": [ + "InputMode_7_i05", + "0", + "8", + "94", + false, + "0061", + "", + "" + ], + "11": [ + "InputMode_8_i05", + "0", + "8", + "95", + false, + "0062", + "", + "" + ], + "12": [ + "InputMode_9_i05", + "0", + "8", + "96", + false, + "0063", + "", + "" + ], + "13": [ + "InputMode_10_i05", + "0", + "8", + "97", + false, + "0064", + "", + "" + ], + "14": [ + "InputMode_11_i05", + "0", + "8", + "98", + false, + "0065", + "", + "" + ], + "15": [ + "InputMode_12_i05", + "0", + "8", + "99", + false, + "0066", + "", + "" + ], + "16": [ + "InputMode_13_i05", + "0", + "8", + "100", + false, + "0067", + "", + "" + ], + "17": [ + "InputMode_14_i05", + "0", + "8", + "101", + false, + "0068", + "", + "" + ], + "18": [ + "InputMode_15_i05", + "0", + "8", + "102", + false, + "0069", + "", + "" + ], + "19": [ + "InputMode_16_i05", + "0", + "8", + "103", + false, + "0070", + "", + "" + ], + "20": [ + "InputDebounce_i05", + "0", + "16", + "104", + false, + "0071", + "", + "" + ] + }, + "extend": {} + }, + { + "catalogNr": "RevPiAIO", + "GUID": "76f10e57-ecaf-2a45-f4df-b9a66e3f40db", + "id": "device_RevPiAIO_20170301_1_0_001", + "type": "LEFT_RIGHT", + "productType": "103", + "position": "36", + "name": "aio01", + "bmk": "RevPi AIO", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 463, + "inp": { + "0": [ + "fu_ist", + "0", + "16", + "0", + false, + "0000", + "", + "" + ], + "1": [ + "InputValue_2", + "0", + "16", + "2", + false, + "0001", + "", + "" + ], + "2": [ + "InputValue_3", + "0", + "16", + "4", + false, + "0002", + "", + "" + ], + "3": [ + "InputValue_4", + "0", + "16", + "6", + false, + "0003", + "", + "" + ], + "4": [ + "InputStatus_1", + "0", + "8", + "8", + false, + "0004", + "", + "" + ], + "5": [ + "InputStatus_2", + "0", + "8", + "9", + false, + "0005", + "", + "" + ], + "6": [ + "InputStatus_3", + "0", + "8", + "10", + false, + "0006", + "", + "" + ], + "7": [ + "InputStatus_4", + "0", + "8", + "11", + false, + "0007", + "", + "" + ], + "8": [ + "tmp_schrank", + "0", + "16", + "12", + false, + "0008", + "", + "" + ], + "9": [ + "RTDValue_2", + "0", + "16", + "14", + false, + "0009", + "", + "" + ], + "10": [ + "RTDStatus_1", + "0", + "8", + "16", + false, + "0010", + "", + "" + ], + "11": [ + "RTDStatus_2", + "0", + "8", + "17", + false, + "0011", + "", + "" + ], + "12": [ + "OutputStatus_1", + "0", + "8", + "18", + false, + "0012", + "", + "" + ], + "13": [ + "OutputStatus_2", + "0", + "8", + "19", + false, + "0013", + "", + "" + ] + }, + "out": { + "0": [ + "OutputValue_1", + "0", + "16", + "20", + false, + "0014", + "", + "" + ], + "1": [ + "fu_soll", + "0", + "16", + "22", + false, + "0015", + "", + "" + ] + }, + "mem": { + "0": [ + "Input1Range", + "1", + "8", + "24", + false, + "0016", + "You must use wire bridges for current measurement!", + "" + ], + "1": [ + "Input1Multiplier", + "1", + "16", + "25", + false, + "0017", + "", + "" + ], + "2": [ + "Input1Divisor", + "1", + "16", + "27", + false, + "0018", + "", + "" + ], + "3": [ + "Input1Offset", + "0", + "16", + "29", + false, + "0019", + "", + "" + ], + "4": [ + "Input2Range", + "1", + "8", + "31", + false, + "0020", + "You must use wire bridges for current measurement!", + "" + ], + "5": [ + "Input2Multiplier", + "1", + "16", + "32", + false, + "0021", + "", + "" + ], + "6": [ + "Input2Divisor", + "1", + "16", + "34", + false, + "0022", + "", + "" + ], + "7": [ + "Input2Offset", + "0", + "16", + "36", + false, + "0023", + "", + "" + ], + "8": [ + "Input3Range", + "1", + "8", + "38", + false, + "0024", + "You must use wire bridges for current measurement!", + "" + ], + "9": [ + "Input3Multiplier", + "1", + "16", + "39", + false, + "0025", + "", + "" + ], + "10": [ + "Input3Divisor", + "1", + "16", + "41", + false, + "0026", + "", + "" + ], + "11": [ + "Input3Offset", + "0", + "16", + "43", + false, + "0027", + "", + "" + ], + "12": [ + "Input4Range", + "1", + "8", + "45", + false, + "0028", + "You must use wire bridges for current measurement!", + "" + ], + "13": [ + "Input4Multiplier", + "1", + "16", + "46", + false, + "0029", + "", + "" + ], + "14": [ + "Input4Divisor", + "1", + "16", + "48", + false, + "0030", + "", + "" + ], + "15": [ + "Input4Offset", + "0", + "16", + "50", + false, + "0031", + "", + "" + ], + "16": [ + "ADC_DataRate", + "0", + "8", + "52", + false, + "0032", + "Use lowest value for highest precision and a maximum 50 Hz suppression", + "" + ], + "17": [ + "RTD1Type", + "0", + "8", + "53", + false, + "0033", + "", + "" + ], + "18": [ + "RTD1Wiring", + "0", + "8", + "54", + false, + "0034", + "You must use wire bridges for 2-wire sensors!", + "" + ], + "19": [ + "RTD1Multiplier", + "1", + "16", + "55", + false, + "0035", + "", + "" + ], + "20": [ + "RTD1Divisor", + "1", + "16", + "57", + false, + "0036", + "", + "" + ], + "21": [ + "RTD1Offset", + "0", + "16", + "59", + false, + "0037", + "", + "" + ], + "22": [ + "RTD2Type", + "0", + "8", + "61", + false, + "0038", + "", + "" + ], + "23": [ + "RTD2Wiring", + "0", + "8", + "62", + false, + "0039", + "You must use wire bridges for 2-wire sensors!", + "" + ], + "24": [ + "RTD2Multiplier", + "1", + "16", + "63", + false, + "0040", + "", + "" + ], + "25": [ + "RTD2Divisor", + "1", + "16", + "65", + false, + "0041", + "", + "" + ], + "26": [ + "RTD2Offset", + "0", + "16", + "67", + false, + "0042", + "", + "" + ], + "27": [ + "Output1Range", + "0", + "8", + "69", + false, + "0043", + "", + "" + ], + "28": [ + "Output1EnableSlew", + "0", + "8", + "70", + false, + "0044", + "Enable slew rate deceleration", + "" + ], + "29": [ + "Output1SlewStepSize", + "0", + "8", + "71", + false, + "0045", + "Slew rate step size", + "" + ], + "30": [ + "Output1SlewClock", + "0", + "8", + "72", + false, + "0046", + "lock rate of slew rate deceleration in kHz", + "" + ], + "31": [ + "Output1Multiplier", + "1", + "16", + "73", + false, + "0047", + "", + "" + ], + "32": [ + "Output1Divisor", + "1", + "16", + "75", + false, + "0048", + "", + "" + ], + "33": [ + "Output1Offset", + "0", + "16", + "77", + false, + "0049", + "", + "" + ], + "34": [ + "Output2Range", + "2", + "8", + "79", + false, + "0050", + "", + "" + ], + "35": [ + "Output2EnableSlew", + "0", + "8", + "80", + false, + "0051", + "Enable slew rate deceleration", + "" + ], + "36": [ + "Output2SlewStepSize", + "0", + "8", + "81", + false, + "0052", + "Slew rate step size", + "" + ], + "37": [ + "Output2SlewClock", + "0", + "8", + "82", + false, + "0053", + "lock rate of slew rate deceleration in kHz", + "" + ], + "38": [ + "Output2Multiplier", + "1", + "16", + "83", + false, + "0054", + "", + "" + ], + "39": [ + "Output2Divisor", + "1", + "16", + "85", + false, + "0055", + "", + "" + ], + "40": [ + "Output2Offset", + "0", + "16", + "87", + false, + "0056", + "", + "" + ] + }, + "extend": {} + }, + { + "catalogNr": "Virtual01", + "GUID": "c3bf8705-d96a-6452-2566-40c5d86a5061", + "id": "device_Virtual01_20160818_1_0_001", + "type": "VIRTUAL", + "productType": "32768", + "position": "64", + "name": "virt01", + "bmk": "Virtual Device 32 Byte", + "inpVariant": 0, + "outVariant": 0, + "comment": "Virtual Device to reserve space in process image for user applications", + "offset": 552, + "inp": { + "0": [ + "pbit0_7", + "0", + "8", + "0", + false, + "0000", + "", + "" + ], + "1": [ + "pbit8_15", + "0", + "8", + "1", + false, + "0001", + "", + "" + ], + "2": [ + "pbit16_23", + "0", + "8", + "2", + false, + "0002", + "", + "" + ], + "3": [ + "pbit24_31", + "0", + "8", + "3", + false, + "0003", + "", + "" + ], + "4": [ + "magazin1_max", + "4", + "8", + "4", + false, + "0004", + "", + "" + ], + "5": [ + "magazin2_max", + "4", + "8", + "5", + false, + "0005", + "", + "" + ], + "6": [ + "p_drehzahl1", + "136", + "8", + "6", + false, + "0006", + "", + "" + ], + "7": [ + "p_drehzahl2", + "19", + "8", + "7", + false, + "0007", + "", + "" + ], + "8": [ + "Input_9", + "0", + "8", + "8", + false, + "0008", + "", + "" + ], + "9": [ + "Input_10", + "0", + "8", + "9", + false, + "0009", + "", + "" + ], + "10": [ + "Input_11", + "0", + "8", + "10", + false, + "0010", + "", + "" + ], + "11": [ + "Input_12", + "0", + "8", + "11", + false, + "0011", + "", + "" + ], + "12": [ + "Input_13", + "0", + "8", + "12", + false, + "0012", + "", + "" + ], + "13": [ + "Input_14", + "0", + "8", + "13", + false, + "0013", + "", + "" + ], + "14": [ + "Input_15", + "0", + "8", + "14", + false, + "0014", + "", + "" + ], + "15": [ + "Input_16", + "0", + "8", + "15", + false, + "0015", + "", + "" + ], + "16": [ + "Input_17", + "0", + "8", + "16", + false, + "0016", + "", + "" + ], + "17": [ + "Input_18", + "0", + "8", + "17", + false, + "0017", + "", + "" + ], + "18": [ + "Input_19", + "0", + "8", + "18", + false, + "0018", + "", + "" + ], + "19": [ + "Input_20", + "0", + "8", + "19", + false, + "0019", + "", + "" + ], + "20": [ + "Input_21", + "0", + "8", + "20", + false, + "0020", + "", + "" + ], + "21": [ + "Input_22", + "0", + "8", + "21", + false, + "0021", + "", + "" + ], + "22": [ + "Input_23", + "0", + "8", + "22", + false, + "0022", + "", + "" + ], + "23": [ + "Input_24", + "0", + "8", + "23", + false, + "0023", + "", + "" + ], + "24": [ + "Input_25", + "0", + "8", + "24", + false, + "0024", + "", + "" + ], + "25": [ + "Input_26", + "0", + "8", + "25", + false, + "0025", + "", + "" + ], + "26": [ + "Input_27", + "0", + "8", + "26", + false, + "0026", + "", + "" + ], + "27": [ + "Input_28", + "0", + "8", + "27", + false, + "0027", + "", + "" + ], + "28": [ + "Input_29", + "0", + "8", + "28", + false, + "0028", + "", + "" + ], + "29": [ + "Input_30", + "0", + "8", + "29", + false, + "0029", + "", + "" + ], + "30": [ + "Input_31", + "0", + "8", + "30", + false, + "0030", + "", + "" + ], + "31": [ + "Input_32", + "0", + "8", + "31", + false, + "0031", + "", + "" + ] + }, + "out": { + "0": [ + "meldung0_7", + "0", + "8", + "32", + false, + "0032", + "", + "" + ], + "1": [ + "meldung8_15", + "0", + "8", + "33", + false, + "0033", + "", + "" + ], + "2": [ + "meldung16_23", + "0", + "8", + "34", + false, + "0034", + "", + "" + ], + "3": [ + "meldung24_31", + "0", + "8", + "35", + false, + "0035", + "", + "" + ], + "4": [ + "magazin1", + "0", + "8", + "36", + false, + "0036", + "", + "" + ], + "5": [ + "magazin2", + "0", + "8", + "37", + false, + "0037", + "", + "" + ], + "6": [ + "Output_7", + "0", + "8", + "38", + false, + "0038", + "", + "" + ], + "7": [ + "Output_8", + "0", + "8", + "39", + false, + "0039", + "", + "" + ], + "8": [ + "Output_9", + "0", + "8", + "40", + false, + "0040", + "", + "" + ], + "9": [ + "Output_10", + "0", + "8", + "41", + false, + "0041", + "", + "" + ], + "10": [ + "Output_11", + "0", + "8", + "42", + false, + "0042", + "", + "" + ], + "11": [ + "Output_12", + "0", + "8", + "43", + false, + "0043", + "", + "" + ], + "12": [ + "Output_13", + "0", + "8", + "44", + false, + "0044", + "", + "" + ], + "13": [ + "Output_14", + "0", + "8", + "45", + false, + "0045", + "", + "" + ], + "14": [ + "Output_15", + "0", + "8", + "46", + false, + "0046", + "", + "" + ], + "15": [ + "Output_16", + "0", + "8", + "47", + false, + "0047", + "", + "" + ], + "16": [ + "Output_17", + "0", + "8", + "48", + false, + "0048", + "", + "" + ], + "17": [ + "Output_18", + "0", + "8", + "49", + false, + "0049", + "", + "" + ], + "18": [ + "Output_19", + "0", + "8", + "50", + false, + "0050", + "", + "" + ], + "19": [ + "Output_20", + "0", + "8", + "51", + false, + "0051", + "", + "" + ], + "20": [ + "Output_21", + "0", + "8", + "52", + false, + "0052", + "", + "" + ], + "21": [ + "Output_22", + "0", + "8", + "53", + false, + "0053", + "", + "" + ], + "22": [ + "Output_23", + "0", + "8", + "54", + false, + "0054", + "", + "" + ], + "23": [ + "Output_24", + "0", + "8", + "55", + false, + "0055", + "", + "" + ], + "24": [ + "Output_25", + "0", + "8", + "56", + false, + "0056", + "", + "" + ], + "25": [ + "Output_26", + "0", + "8", + "57", + false, + "0057", + "", + "" + ], + "26": [ + "Output_27", + "0", + "8", + "58", + false, + "0058", + "", + "" + ], + "27": [ + "Output_28", + "0", + "8", + "59", + false, + "0059", + "", + "" + ], + "28": [ + "Output_29", + "0", + "8", + "60", + false, + "0060", + "", + "" + ], + "29": [ + "Output_30", + "0", + "8", + "61", + false, + "0061", + "", + "" + ], + "30": [ + "Output_31", + "0", + "8", + "62", + false, + "0062", + "", + "" + ], + "31": [ + "Output_32", + "0", + "8", + "63", + false, + "0063", + "", + "" + ] + }, + "mem": {}, + "extend": {} + } + ], + "Connections": [] +} diff --git a/tests/common/config_empty.rsc b/tests/common/config_empty.rsc new file mode 100644 index 0000000..e69de29 diff --git a/tests/common/config_null.rsc b/tests/common/config_null.rsc new file mode 100644 index 0000000..a823101 --- /dev/null +++ b/tests/common/config_null.rsc @@ -0,0 +1 @@ +{"App":{"name": "PiCtory", "version": "1.2.3","saveTS": "20170826120906","language": "en","layout": {"north":{"size":70,"initClosed":false,"initHidden":false},"south":{"size":480,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":500,"initClosed":false,"initHidden":false}}}},"east":{"size":70,"initClosed":true,"initHidden":false,"children":{"layout1":{"north":{"size":100,"initClosed":false,"initHidden":false},"south":{"size":98,"initClosed":false,"initHidden":false}}}},"west":{"size":200,"initClosed":false,"initHidden":false,"children":{"layout1":{}}}}},"Summary":{"inpTotal": 338,"outTotal": 113},"Devices":[{"catalogNr": "RevPiCore","GUID": "4ebb85e8-92ea-415d-b191-cc58c2857c0a","id": "device_RevPiCore_20170404_1_2_001","type": "BASE","productType": "95","position": "0","name": "picore01","bmk": "RevPi Core V1.2","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""],"1": ["RevPiIOCycle","0","8","1",true,"0001", "",""],"2": ["RS485ErrorCnt","0","16","2",false,"0002", "",""],"3": ["Core_Temperatur","0","8","4",false,"0003", "",""],"4": ["Core_Frequency","0","8","5",false,"0004", "",""]},"out": {"0": ["RevPiLED","0","8","6",true,"0005", "",""],"1": ["RS485ErrorLimit1","10","16","7",false,"0006", "",""],"2": ["RS485ErrorLimit2","1000","16","9",false,"0007", "",""]},"mem": {},"extend": {}},{"catalogNr": "RevPiDI","GUID": "2e2c089e-6bef-14c0-852b-41b7cf48d846","id": "device_RevPiDI_20160818_1_0_001","type": "LEFT_RIGHT","productType": "97","position": "32","name": "di01","bmk": "RevPi DI","inpVariant": 0,"outVariant": 0,"comment": "","offset": 11,"inp": {"0": ["notaus_ok",null,"1","0",true,"0000", "","0"],"1": ["motorschutz_ok","null","1","0",true,"0001", "","1"],"2": ["fu_ok","0","1","0",true,"0002", "","2"],"3": ["fu_motoran","0","1","0",true,"0003", "","3"],"4": ["I_5","0","1","0",true,"0004", "","4"],"5": ["I_6","0","1","0",true,"0005", "","5"],"6": ["I_7","0","1","0",true,"0006", "","6"],"7": ["I_8","0","1","0",true,"0007", "","7"],"8": ["t_automatik","0","1","0",true,"0008", "","8"],"9": ["t_start","0","1","0",true,"0009", "","9"],"10": ["t_stop","0","1","0",true,"0010", "","10"],"11": ["t_quit","0","1","0",true,"0011", "","11"],"12": ["t_notaus","0","1","0",true,"0012", "","12"],"13": ["I_14","0","1","0",true,"0013", "","13"],"14": ["I_15","0","1","0",true,"0014", "","14"],"15": ["I_16","0","1","0",true,"0015", "","15"],"16": ["Status","0","16","4",false,"0016", "",""],"17": ["Counter_1","0","32","6",false,"0017", "",""],"18": ["Counter_2","0","32","10",false,"0018", "",""],"19": ["Counter_3","0","32","14",false,"0019", "",""],"20": ["Counter_4","0","32","18",false,"0020", "",""],"21": ["Counter_5","0","32","22",false,"0021", "",""],"22": ["Counter_6","0","32","26",false,"0022", "",""],"23": ["Counter_7","0","32","30",false,"0023", "",""],"24": ["Counter_8","0","32","34",false,"0024", "",""],"25": ["Counter_9","0","32","38",false,"0025", "",""],"26": ["Counter_10","0","32","42",false,"0026", "",""],"27": ["Counter_11","0","32","46",false,"0027", "",""],"28": ["Counter_12","0","32","50",false,"0028", "",""],"29": ["Counter_13","0","32","54",false,"0029", "",""],"30": ["Counter_14","0","32","58",false,"0030", "",""],"31": ["Counter_15","0","32","62",false,"0031", "",""],"32": ["Counter_16","0","32","66",false,"0032", "",""],"33": ["Output_Status","0","16","2",false,"0050", "",""]},"out": {"0": ["Output","0","16","70",false,"0051", "",""],"1": ["PWM_1","0","8","72",false,"0052", "",""],"2": ["PWM_2","0","8","73",false,"0053", "",""],"3": ["PWM_3","0","8","74",false,"0054", "",""],"4": ["PWM_4","0","8","75",false,"0055", "",""],"5": ["PWM_5","0","8","76",false,"0056", "",""],"6": ["PWM_6","0","8","77",false,"0057", "",""],"7": ["PWM_7","0","8","78",false,"0058", "",""],"8": ["PWM_8","0","8","79",false,"0059", "",""],"9": ["PWM_9","0","8","80",false,"0060", "",""],"10": ["PWM_10","0","8","81",false,"0061", "",""],"11": ["PWM_11","0","8","82",false,"0062", "",""],"12": ["PWM_12","0","8","83",false,"0063", "",""],"13": ["PWM_13","0","8","84",false,"0064", "",""],"14": ["PWM_14","0","8","85",false,"0065", "",""],"15": ["PWM_15","0","8","86",false,"0066", "",""],"16": ["PWM_16","0","8","87",false,"0067", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0033", "",""],"1": ["InputMode_2","0","8","89",false,"0034", "",""],"2": ["InputMode_3","0","8","90",false,"0035", "",""],"3": ["InputMode_4","0","8","91",false,"0036", "",""],"4": ["InputMode_5","0","8","92",false,"0037", "",""],"5": ["InputMode_6","0","8","93",false,"0038", "",""],"6": ["InputMode_7","0","8","94",false,"0039", "",""],"7": ["InputMode_8","0","8","95",false,"0040", "",""],"8": ["InputMode_9","0","8","96",false,"0041", "",""],"9": ["InputMode_10","0","8","97",false,"0042", "",""],"10": ["InputMode_11","0","8","98",false,"0043", "",""],"11": ["InputMode_12","0","8","99",false,"0044", "",""],"12": ["InputMode_13","0","8","100",false,"0045", "",""],"13": ["InputMode_14","0","8","101",false,"0046", "",""],"14": ["InputMode_15","0","8","102",false,"0047", "",""],"15": ["InputMode_16","0","8","103",false,"0048", "",""],"16": ["InputDebounce","0","16","104",false,"0049", "",""],"17": ["OutputPushPull","0","16","106",false,"0068", "",""],"18": ["OutputOpenLoadDetect","0","16","108",false,"0069", "",""],"19": ["OutputPWMActive","0","16","110",false,"0070", "",""],"20": ["OutputPWMFrequency","2","8","112",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDI","GUID": "81e6c459-0398-a7c4-4954-d793ee9a5b89","id": "device_RevPiDI_20160818_1_0_002","type": "LEFT_RIGHT","productType": "97","position": "33","name": "di02","bmk": "RevPi DI","inpVariant": 0,"outVariant": 0,"comment": "","offset": 124,"inp": {"0": ["m_druck_ok","0","1","0",true,"0000", "","0"],"1": ["m_m1_eingefahren","0","1","0",true,"0001", "","1"],"2": ["m_m1_ausgefahren","0","1","0",true,"0002", "","2"],"3": ["m_m2_eingefahren","0","1","0",true,"0003", "","3"],"4": ["m_m2_ausgefahren","0","1","0",true,"0004", "","4"],"5": ["m_m3_eingefahren","0","1","0",true,"0005", "","5"],"6": ["m_m3_ausgefahren","0","1","0",true,"0006", "","6"],"7": ["s_rutsche","0","1","0",true,"0007", "","7"],"8": ["s_metall","0","1","0",true,"0008", "","8"],"9": ["s_magazin1","0","1","0",true,"0009", "","9"],"10": ["s_magazin2","0","1","0",true,"0010", "","10"],"11": ["I_12_i03","0","1","0",true,"0011", "","11"],"12": ["I_13_i03","0","1","0",true,"0012", "","12"],"13": ["I_14_i03","0","1","0",true,"0013", "","13"],"14": ["I_15_i03","0","1","0",true,"0014", "","14"],"15": ["mb_status","0","1","0",true,"0015", "","15"],"16": ["Status_i03","0","16","4",false,"0016", "",""],"17": ["Counter_1_i03","0","32","6",false,"0017", "",""],"18": ["Counter_2_i03","0","32","10",false,"0018", "",""],"19": ["Counter_3_i03","0","32","14",false,"0019", "",""],"20": ["Counter_4_i03","0","32","18",false,"0020", "",""],"21": ["Counter_5_i03","0","32","22",false,"0021", "",""],"22": ["Counter_6_i03","0","32","26",false,"0022", "",""],"23": ["Counter_7_i03","0","32","30",false,"0023", "",""],"24": ["Counter_8_i03","0","32","34",false,"0024", "",""],"25": ["Counter_9_i03","0","32","38",false,"0025", "",""],"26": ["Counter_10_i03","0","32","42",false,"0026", "",""],"27": ["Counter_11_i03","0","32","46",false,"0027", "",""],"28": ["Counter_12_i03","0","32","50",false,"0028", "",""],"29": ["Counter_13_i03","0","32","54",false,"0029", "",""],"30": ["Counter_14_i03","0","32","58",false,"0030", "",""],"31": ["Counter_15_i03","0","32","62",false,"0031", "",""],"32": ["Counter_16_i03","0","32","66",false,"0032", "",""],"33": ["Output_Status_i03","0","16","2",false,"0050", "",""]},"out": {"0": ["Output_i03","0","16","70",false,"0051", "",""],"1": ["PWM_1_i03","0","8","72",false,"0052", "",""],"2": ["PWM_2_i03","0","8","73",false,"0053", "",""],"3": ["PWM_3_i03","0","8","74",false,"0054", "",""],"4": ["PWM_4_i03","0","8","75",false,"0055", "",""],"5": ["PWM_5_i03","0","8","76",false,"0056", "",""],"6": ["PWM_6_i03","0","8","77",false,"0057", "",""],"7": ["PWM_7_i03","0","8","78",false,"0058", "",""],"8": ["PWM_8_i03","0","8","79",false,"0059", "",""],"9": ["PWM_9_i03","0","8","80",false,"0060", "",""],"10": ["PWM_10_i03","0","8","81",false,"0061", "",""],"11": ["PWM_11_i03","0","8","82",false,"0062", "",""],"12": ["PWM_12_i03","0","8","83",false,"0063", "",""],"13": ["PWM_13_i03","0","8","84",false,"0064", "",""],"14": ["PWM_14_i03","0","8","85",false,"0065", "",""],"15": ["PWM_15_i03","0","8","86",false,"0066", "",""],"16": ["PWM_16_i03","0","8","87",false,"0067", "",""]},"mem": {"0": ["InputMode_1_i03","0","8","88",false,"0033", "",""],"1": ["InputMode_2_i03","0","8","89",false,"0034", "",""],"2": ["InputMode_3_i03","0","8","90",false,"0035", "",""],"3": ["InputMode_4_i03","0","8","91",false,"0036", "",""],"4": ["InputMode_5_i03","0","8","92",false,"0037", "",""],"5": ["InputMode_6_i03","0","8","93",false,"0038", "",""],"6": ["InputMode_7_i03","0","8","94",false,"0039", "",""],"7": ["InputMode_8_i03","0","8","95",false,"0040", "",""],"8": ["InputMode_9_i03","0","8","96",false,"0041", "",""],"9": ["InputMode_10_i03","0","8","97",false,"0042", "",""],"10": ["InputMode_11_i03","0","8","98",false,"0043", "",""],"11": ["InputMode_12_i03","0","8","99",false,"0044", "",""],"12": ["InputMode_13_i03","0","8","100",false,"0045", "",""],"13": ["InputMode_14_i03","0","8","101",false,"0046", "",""],"14": ["InputMode_15_i03","0","8","102",false,"0047", "",""],"15": ["InputMode_16_i03","0","8","103",false,"0048", "",""],"16": ["InputDebounce_i03","0","16","104",false,"0049", "",""],"17": ["OutputPushPull_i03","0","16","106",false,"0068", "",""],"18": ["OutputOpenLoadDetect_i03","0","16","108",false,"0069", "",""],"19": ["OutputPWMActive_i03","0","16","110",false,"0070", "",""],"20": ["OutputPWMFrequency_i03","2","8","112",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDO","GUID": "4f8da9ea-91b2-d028-c60d-4476096a9dc2","id": "device_RevPiDO_20160818_1_0_001","type": "LEFT_RIGHT","productType": "98","position": "34","name": "do01","bmk": "RevPi DO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 237,"inp": {"0": ["Output_Status_i04","0","16","2",false,"0000", "",""],"1": ["Status_i04","0","16","4",false,"0001", "",""],"2": ["Input","0","16","0",false,"0038", "",""],"3": ["Counter_1_i04","0","32","6",false,"0039", "",""],"4": ["Counter_2_i04","0","32","10",false,"0040", "",""],"5": ["Counter_3_i04","0","32","14",false,"0041", "",""],"6": ["Counter_4_i04","0","32","18",false,"0042", "",""],"7": ["Counter_5_i04","0","32","22",false,"0043", "",""],"8": ["Counter_6_i04","0","32","26",false,"0044", "",""],"9": ["Counter_7_i04","0","32","30",false,"0045", "",""],"10": ["Counter_8_i04","0","32","34",false,"0046", "",""],"11": ["Counter_9_i04","0","32","38",false,"0047", "",""],"12": ["Counter_10_i04","0","32","42",false,"0048", "",""],"13": ["Counter_11_i04","0","32","46",false,"0049", "",""],"14": ["Counter_12_i04","0","32","50",false,"0050", "",""],"15": ["Counter_13_i04","0","32","54",false,"0051", "",""],"16": ["Counter_14_i04","0","32","58",false,"0052", "",""],"17": ["Counter_15_i04","0","32","62",false,"0053", "",""],"18": ["Counter_16_i04","0","32","66",false,"0054", "",""]},"out": {"0": ["fu_rechts","0","1","70",true,"0002", "","0"],"1": ["fu_links","0","1","70",true,"0003", "","1"],"2": ["fu_schnell","0","1","70",true,"0004", "","2"],"3": ["fu_lahm","0","1","70",true,"0005", "","3"],"4": ["v_druck","0","1","70",true,"0006", "","4"],"5": ["v_m1_einfahren","0","1","70",true,"0007", "","5"],"6": ["v_m1_ausfahren","0","1","70",true,"0008", "","6"],"7": ["v_m2_einfahren","0","1","70",true,"0009", "","7"],"8": ["v_m2_ausfahren","0","1","70",true,"0010", "","8"],"9": ["v_m3_einfahren","0","1","70",true,"0011", "","9"],"10": ["v_m3_ausfahren","0","1","70",true,"0012", "","10"],"11": ["O_12","0","1","70",true,"0013", "","11"],"12": ["O_13","0","1","70",true,"0014", "","12"],"13": ["O_14","0","1","70",true,"0015", "","13"],"14": ["O_15","0","1","70",true,"0016", "","14"],"15": ["fu_frei","0","1","70",true,"0017", "","15"],"16": ["PWM_1_i04","0","8","72",false,"0018", "",""],"17": ["PWM_2_i04","0","8","73",false,"0019", "",""],"18": ["PWM_3_i04","0","8","74",false,"0020", "",""],"19": ["PWM_4_i04","0","8","75",false,"0021", "",""],"20": ["PWM_5_i04","0","8","76",false,"0022", "",""],"21": ["PWM_6_i04","0","8","77",false,"0023", "",""],"22": ["PWM_7_i04","0","8","78",false,"0024", "",""],"23": ["PWM_8_i04","0","8","79",false,"0025", "",""],"24": ["PWM_9_i04","0","8","80",false,"0026", "",""],"25": ["PWM_10_i04","0","8","81",false,"0027", "",""],"26": ["PWM_11_i04","0","8","82",false,"0028", "",""],"27": ["PWM_12_i04","0","8","83",false,"0029", "",""],"28": ["PWM_13_i04","0","8","84",false,"0030", "",""],"29": ["PWM_14_i04","0","8","85",false,"0031", "",""],"30": ["PWM_15_i04","0","8","86",false,"0032", "",""],"31": ["PWM_16_i04","0","8","87",false,"0033", "",""]},"mem": {"0": ["OutputPushPull_i04","0","16","106",false,"0034", "",""],"1": ["OutputOpenLoadDetect_i04","0","16","108",false,"0035", "",""],"2": ["OutputPWMActive_i04","0","16","110",false,"0036", "",""],"3": ["OutputPWMFrequency_i04","1","8","112",false,"0037", "",""],"4": ["InputMode_1_i04","0","8","88",false,"0055", "",""],"5": ["InputMode_2_i04","0","8","89",false,"0056", "",""],"6": ["InputMode_3_i04","0","8","90",false,"0057", "",""],"7": ["InputMode_4_i04","0","8","91",false,"0058", "",""],"8": ["InputMode_5_i04","0","8","92",false,"0059", "",""],"9": ["InputMode_6_i04","0","8","93",false,"0060", "",""],"10": ["InputMode_7_i04","0","8","94",false,"0061", "",""],"11": ["InputMode_8_i04","0","8","95",false,"0062", "",""],"12": ["InputMode_9_i04","0","8","96",false,"0063", "",""],"13": ["InputMode_10_i04","0","8","97",false,"0064", "",""],"14": ["InputMode_11_i04","0","8","98",false,"0065", "",""],"15": ["InputMode_12_i04","0","8","99",false,"0066", "",""],"16": ["InputMode_13_i04","0","8","100",false,"0067", "",""],"17": ["InputMode_14_i04","0","8","101",false,"0068", "",""],"18": ["InputMode_15_i04","0","8","102",false,"0069", "",""],"19": ["InputMode_16_i04","0","8","103",false,"0070", "",""],"20": ["InputDebounce_i04","0","16","104",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDO","GUID": "b8a70c62-9b91-9e1a-af2a-37f74b16aca2","id": "device_RevPiDO_20160818_1_0_002","type": "LEFT_RIGHT","productType": "98","position": "35","name": "do02","bmk": "RevPi DO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 350,"inp": {"0": ["Output_Status_i05","0","16","2",false,"0000", "",""],"1": ["Status_i05","0","16","4",false,"0001", "",""],"2": ["Input_i05","0","16","0",false,"0038", "",""],"3": ["Counter_1_i05","0","32","6",false,"0039", "",""],"4": ["Counter_2_i05","0","32","10",false,"0040", "",""],"5": ["Counter_3_i05","0","32","14",false,"0041", "",""],"6": ["Counter_4_i05","0","32","18",false,"0042", "",""],"7": ["Counter_5_i05","0","32","22",false,"0043", "",""],"8": ["Counter_6_i05","0","32","26",false,"0044", "",""],"9": ["Counter_7_i05","0","32","30",false,"0045", "",""],"10": ["Counter_8_i05","0","32","34",false,"0046", "",""],"11": ["Counter_9_i05","0","32","38",false,"0047", "",""],"12": ["Counter_10_i05","0","32","42",false,"0048", "",""],"13": ["Counter_11_i05","0","32","46",false,"0049", "",""],"14": ["Counter_12_i05","0","32","50",false,"0050", "",""],"15": ["Counter_13_i05","0","32","54",false,"0051", "",""],"16": ["Counter_14_i05","0","32","58",false,"0052", "",""],"17": ["Counter_15_i05","0","32","62",false,"0053", "",""],"18": ["Counter_16_i05","0","32","66",false,"0054", "",""]},"out": {"0": ["fu_reset","0","1","70",true,"0002", "","0"],"1": ["h_start","0","1","70",true,"0003", "","1"],"2": ["h_fehler","0","1","70",true,"0004", "","2"],"3": ["O_04_i05","0","1","70",true,"0005", "","3"],"4": ["O_05_i05","0","1","70",true,"0006", "","4"],"5": ["O_06_i05","0","1","70",true,"0007", "","5"],"6": ["O_07_i05","0","1","70",true,"0008", "","6"],"7": ["O_08_i05","0","1","70",true,"0009", "","7"],"8": ["O_09_i05","0","1","70",true,"0010", "","8"],"9": ["O_10_i05","0","1","70",true,"0011", "","9"],"10": ["O_11_i05","0","1","70",true,"0012", "","10"],"11": ["O_12_i05","0","1","70",true,"0013", "","11"],"12": ["O_13_i05","0","1","70",true,"0014", "","12"],"13": ["O_14_i05","0","1","70",true,"0015", "","13"],"14": ["O_15_i05","0","1","70",true,"0016", "","14"],"15": ["mb_connect","0","1","70",true,"0017", "","15"],"16": ["PWM_1_i05","0","8","72",false,"0018", "",""],"17": ["PWM_2_i05","0","8","73",false,"0019", "",""],"18": ["PWM_3_i05","0","8","74",false,"0020", "",""],"19": ["PWM_4_i05","0","8","75",false,"0021", "",""],"20": ["PWM_5_i05","0","8","76",false,"0022", "",""],"21": ["PWM_6_i05","0","8","77",false,"0023", "",""],"22": ["PWM_7_i05","0","8","78",false,"0024", "",""],"23": ["PWM_8_i05","0","8","79",false,"0025", "",""],"24": ["PWM_9_i05","0","8","80",false,"0026", "",""],"25": ["PWM_10_i05","0","8","81",false,"0027", "",""],"26": ["PWM_11_i05","0","8","82",false,"0028", "",""],"27": ["PWM_12_i05","0","8","83",false,"0029", "",""],"28": ["PWM_13_i05","0","8","84",false,"0030", "",""],"29": ["PWM_14_i05","0","8","85",false,"0031", "",""],"30": ["PWM_15_i05","0","8","86",false,"0032", "",""],"31": ["PWM_16_i05","0","8","87",false,"0033", "",""]},"mem": {"0": ["OutputPushPull_i05","0","16","106",false,"0034", "",""],"1": ["OutputOpenLoadDetect_i05","0","16","108",false,"0035", "",""],"2": ["OutputPWMActive_i05","0","16","110",false,"0036", "",""],"3": ["OutputPWMFrequency_i05","1","8","112",false,"0037", "",""],"4": ["InputMode_1_i05","0","8","88",false,"0055", "",""],"5": ["InputMode_2_i05","0","8","89",false,"0056", "",""],"6": ["InputMode_3_i05","0","8","90",false,"0057", "",""],"7": ["InputMode_4_i05","0","8","91",false,"0058", "",""],"8": ["InputMode_5_i05","0","8","92",false,"0059", "",""],"9": ["InputMode_6_i05","0","8","93",false,"0060", "",""],"10": ["InputMode_7_i05","0","8","94",false,"0061", "",""],"11": ["InputMode_8_i05","0","8","95",false,"0062", "",""],"12": ["InputMode_9_i05","0","8","96",false,"0063", "",""],"13": ["InputMode_10_i05","0","8","97",false,"0064", "",""],"14": ["InputMode_11_i05","0","8","98",false,"0065", "",""],"15": ["InputMode_12_i05","0","8","99",false,"0066", "",""],"16": ["InputMode_13_i05","0","8","100",false,"0067", "",""],"17": ["InputMode_14_i05","0","8","101",false,"0068", "",""],"18": ["InputMode_15_i05","0","8","102",false,"0069", "",""],"19": ["InputMode_16_i05","0","8","103",false,"0070", "",""],"20": ["InputDebounce_i05","0","16","104",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiAIO","GUID": "76f10e57-ecaf-2a45-f4df-b9a66e3f40db","id": "device_RevPiAIO_20170301_1_0_001","type": "LEFT_RIGHT","productType": "103","position": "36","name": "aio01","bmk": "RevPi AIO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 463,"inp": {"0": ["fu_ist","0","16","0",false,"0000", "",""],"1": ["InputValue_2","0","16","2",false,"0001", "",""],"2": ["InputValue_3","0","16","4",false,"0002", "",""],"3": ["InputValue_4","0","16","6",false,"0003", "",""],"4": ["InputStatus_1","0","8","8",false,"0004", "",""],"5": ["InputStatus_2","0","8","9",false,"0005", "",""],"6": ["InputStatus_3","0","8","10",false,"0006", "",""],"7": ["InputStatus_4","0","8","11",false,"0007", "",""],"8": ["tmp_schrank","0","16","12",false,"0008", "",""],"9": ["RTDValue_2","0","16","14",false,"0009", "",""],"10": ["RTDStatus_1","0","8","16",false,"0010", "",""],"11": ["RTDStatus_2","0","8","17",false,"0011", "",""],"12": ["OutputStatus_1","0","8","18",false,"0012", "",""],"13": ["OutputStatus_2","0","8","19",false,"0013", "",""]},"out": {"0": ["OutputValue_1","0","16","20",false,"0014", "",""],"1": ["fu_soll","0","16","22",false,"0015", "",""]},"mem": {"0": ["Input1Range","1","8","24",false,"0016", "You must use wire bridges for current measurement!",""],"1": ["Input1Multiplier","1","16","25",false,"0017", "",""],"2": ["Input1Divisor","1","16","27",false,"0018", "",""],"3": ["Input1Offset","0","16","29",false,"0019", "",""],"4": ["Input2Range","1","8","31",false,"0020", "You must use wire bridges for current measurement!",""],"5": ["Input2Multiplier","1","16","32",false,"0021", "",""],"6": ["Input2Divisor","1","16","34",false,"0022", "",""],"7": ["Input2Offset","0","16","36",false,"0023", "",""],"8": ["Input3Range","1","8","38",false,"0024", "You must use wire bridges for current measurement!",""],"9": ["Input3Multiplier","1","16","39",false,"0025", "",""],"10": ["Input3Divisor","1","16","41",false,"0026", "",""],"11": ["Input3Offset","0","16","43",false,"0027", "",""],"12": ["Input4Range","1","8","45",false,"0028", "You must use wire bridges for current measurement!",""],"13": ["Input4Multiplier","1","16","46",false,"0029", "",""],"14": ["Input4Divisor","1","16","48",false,"0030", "",""],"15": ["Input4Offset","0","16","50",false,"0031", "",""],"16": ["ADC_DataRate","0","8","52",false,"0032", "Use lowest value for highest precision and a maximum 50 Hz suppression",""],"17": ["RTD1Type","0","8","53",false,"0033", "",""],"18": ["RTD1Wiring","0","8","54",false,"0034", "You must use wire bridges for 2-wire sensors!",""],"19": ["RTD1Multiplier","1","16","55",false,"0035", "",""],"20": ["RTD1Divisor","1","16","57",false,"0036", "",""],"21": ["RTD1Offset","0","16","59",false,"0037", "",""],"22": ["RTD2Type","0","8","61",false,"0038", "",""],"23": ["RTD2Wiring","0","8","62",false,"0039", "You must use wire bridges for 2-wire sensors!",""],"24": ["RTD2Multiplier","1","16","63",false,"0040", "",""],"25": ["RTD2Divisor","1","16","65",false,"0041", "",""],"26": ["RTD2Offset","0","16","67",false,"0042", "",""],"27": ["Output1Range","0","8","69",false,"0043", "",""],"28": ["Output1EnableSlew","0","8","70",false,"0044", "Enable slew rate deceleration",""],"29": ["Output1SlewStepSize","0","8","71",false,"0045", "Slew rate step size",""],"30": ["Output1SlewClock","0","8","72",false,"0046", "lock rate of slew rate deceleration in kHz",""],"31": ["Output1Multiplier","1","16","73",false,"0047", "",""],"32": ["Output1Divisor","1","16","75",false,"0048", "",""],"33": ["Output1Offset","0","16","77",false,"0049", "",""],"34": ["Output2Range","2","8","79",false,"0050", "",""],"35": ["Output2EnableSlew","0","8","80",false,"0051", "Enable slew rate deceleration",""],"36": ["Output2SlewStepSize","0","8","81",false,"0052", "Slew rate step size",""],"37": ["Output2SlewClock","0","8","82",false,"0053", "lock rate of slew rate deceleration in kHz",""],"38": ["Output2Multiplier","1","16","83",false,"0054", "",""],"39": ["Output2Divisor","1","16","85",false,"0055", "",""],"40": ["Output2Offset","0","16","87",false,"0056", "",""]},"extend": {}},{"catalogNr": "Virtual01","GUID": "c3bf8705-d96a-6452-2566-40c5d86a5061","id": "device_Virtual01_20160818_1_0_001","type": "VIRTUAL","productType": "32768","position": "64","name": "virt01","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 552,"inp": {"0": ["pbit0_7","0","8","0",false,"0000", "",""],"1": ["pbit8_15","0","8","1",false,"0001", "",""],"2": ["pbit16_23","0","8","2",false,"0002", "",""],"3": ["pbit24_31","0","8","3",false,"0003", "",""],"4": ["magazin1_max","4","8","4",false,"0004", "",""],"5": ["magazin2_max","4","8","5",false,"0005", "",""],"6": ["p_drehzahl1","136","8","6",false,"0006", "",""],"7": ["p_drehzahl2","19","8","7",false,"0007", "",""],"8": ["Input_9","0","8","8",false,"0008", "",""],"9": ["Input_10","0","8","9",false,"0009", "",""],"10": ["Input_11","0","8","10",false,"0010", "",""],"11": ["Input_12","0","8","11",false,"0011", "",""],"12": ["Input_13","0","8","12",false,"0012", "",""],"13": ["Input_14","0","8","13",false,"0013", "",""],"14": ["Input_15","0","8","14",false,"0014", "",""],"15": ["Input_16","0","8","15",false,"0015", "",""],"16": ["Input_17","0","8","16",false,"0016", "",""],"17": ["Input_18","0","8","17",false,"0017", "",""],"18": ["Input_19","0","8","18",false,"0018", "",""],"19": ["Input_20","0","8","19",false,"0019", "",""],"20": ["Input_21","0","8","20",false,"0020", "",""],"21": ["Input_22","0","8","21",false,"0021", "",""],"22": ["Input_23","0","8","22",false,"0022", "",""],"23": ["Input_24","0","8","23",false,"0023", "",""],"24": ["Input_25","0","8","24",false,"0024", "",""],"25": ["Input_26","0","8","25",false,"0025", "",""],"26": ["Input_27","0","8","26",false,"0026", "",""],"27": ["Input_28","0","8","27",false,"0027", "",""],"28": ["Input_29","0","8","28",false,"0028", "",""],"29": ["Input_30","0","8","29",false,"0029", "",""],"30": ["Input_31","0","8","30",false,"0030", "",""],"31": ["Input_32","0","8","31",false,"0031", "",""]},"out": {"0": ["meldung0_7","0","8","32",false,"0032", "",""],"1": ["meldung8_15","0","8","33",false,"0033", "",""],"2": ["meldung16_23","0","8","34",false,"0034", "",""],"3": ["meldung24_31","0","8","35",false,"0035", "",""],"4": ["magazin1","0","8","36",false,"0036", "",""],"5": ["magazin2","0","8","37",false,"0037", "",""],"6": ["Output_7","0","8","38",false,"0038", "",""],"7": ["Output_8","0","8","39",false,"0039", "",""],"8": ["Output_9","0","8","40",false,"0040", "",""],"9": ["Output_10","0","8","41",false,"0041", "",""],"10": ["Output_11","0","8","42",false,"0042", "",""],"11": ["Output_12","0","8","43",false,"0043", "",""],"12": ["Output_13","0","8","44",false,"0044", "",""],"13": ["Output_14","0","8","45",false,"0045", "",""],"14": ["Output_15","0","8","46",false,"0046", "",""],"15": ["Output_16","0","8","47",false,"0047", "",""],"16": ["Output_17","0","8","48",false,"0048", "",""],"17": ["Output_18","0","8","49",false,"0049", "",""],"18": ["Output_19","0","8","50",false,"0050", "",""],"19": ["Output_20","0","8","51",false,"0051", "",""],"20": ["Output_21","0","8","52",false,"0052", "",""],"21": ["Output_22","0","8","53",false,"0053", "",""],"22": ["Output_23","0","8","54",false,"0054", "",""],"23": ["Output_24","0","8","55",false,"0055", "",""],"24": ["Output_25","0","8","56",false,"0056", "",""],"25": ["Output_26","0","8","57",false,"0057", "",""],"26": ["Output_27","0","8","58",false,"0058", "",""],"27": ["Output_28","0","8","59",false,"0059", "",""],"28": ["Output_29","0","8","60",false,"0060", "",""],"29": ["Output_30","0","8","61",false,"0061", "",""],"30": ["Output_31","0","8","62",false,"0062", "",""],"31": ["Output_32","0","8","63",false,"0063", "",""]},"mem": {},"extend": {}}],"Connections":[]} diff --git a/tests/common/config_old.rsc b/tests/common/config_old.rsc new file mode 100644 index 0000000..0547787 --- /dev/null +++ b/tests/common/config_old.rsc @@ -0,0 +1 @@ +{"App":{"name": "RevolutionPi Configurator", "version": "1.0","language": "en","layout": {"north":{"size":50,"initClosed":false,"initHidden":false},"south":{"size":393,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":844,"initClosed":false,"initHidden":false}}}},"east":{"size":200,"initClosed":true,"initHidden":false,"children":{"layout1":{"north":{"size":100,"initClosed":false,"initHidden":false},"south":{"size":98,"initClosed":false,"initHidden":false}}}},"west":{"size":381,"initClosed":false,"initHidden":false,"children":{"layout1":{"south":{"size":53,"initClosed":false,"initHidden":false}}}}}},"Summary":{"inpTotal": 679,"outTotal": 627},"Devices":[{"catalogNr": "RevPiCore","id": "device_RevPiCore_20160818_1_0_001","type": "BASE","productType": "95","position": "0","name": "RevPi Core","bmk": "RevPi Core","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""]},"out": {"0": ["RevPiLED","0","8","1",true,"0001", "",""]},"mem": {}},{"catalogNr": "RevPiDIO","id": "device_RevPiDIO_20160818_1_0_001","type": "LEFT_RIGHT","productType": "96","position": "32","name": "RevPi DIO","bmk": "RevPi DIO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 2,"inp": {"0": ["t_aus","0","1","0",true,"0000", "","0"],"1": ["t_an","0","1","0",true,"0001", "","1"],"2": ["t_links","0","1","0",true,"0002", "","2"],"3": ["t_rechts","0","1","0",true,"0003", "","3"],"4": ["t_hoch","0","1","0",true,"0004", "","4"],"5": ["t_runter","0","1","0",true,"0005", "","5"],"6": ["t_blau","0","1","0",true,"0006", "","6"],"7": ["t_rot","0","1","0",true,"0007", "","7"],"8": ["Input_Pin_9","0","1","0",true,"0008", "","8"],"9": ["Input_Pin_10","0","1","0",true,"0009", "","9"],"10": ["Input_Pin_11","0","1","0",true,"0010", "","10"],"11": ["Input_Pin_12","0","1","0",true,"0011", "","11"],"12": ["Input_Pin_13","0","1","0",true,"0012", "","12"],"13": ["Input_Pin_14","0","1","0",true,"0013", "","13"],"14": ["Input_Pin_15","0","1","0",true,"0014", "","14"],"15": ["Input_Pin_16","0","1","0",true,"0015", "","15"],"16": ["Output_Status","0","16","2",false,"0016", "",""],"17": ["Status","0","16","4",false,"0017", "",""],"18": ["Counter_1","0","32","6",false,"0018", "",""],"19": ["Counter_2","0","32","10",false,"0019", "",""],"20": ["Counter_3","0","32","14",false,"0020", "",""],"21": ["Counter_4","0","32","18",false,"0021", "",""],"22": ["Counter_5","0","32","22",false,"0022", "",""],"23": ["Counter_6","0","32","26",false,"0023", "",""],"24": ["Counter_7","0","32","30",false,"0024", "",""],"25": ["Counter_8","0","32","34",false,"0025", "",""],"26": ["Counter_9","0","32","38",false,"0026", "",""],"27": ["Counter_10","0","32","42",false,"0027", "",""],"28": ["Counter_11","0","32","46",false,"0028", "",""],"29": ["Counter_12","0","32","50",false,"0029", "",""],"30": ["Counter_13","0","32","54",false,"0030", "",""],"31": ["Counter_14","0","32","58",false,"0031", "",""],"32": ["Counter_15","0","32","62",false,"0032", "",""],"33": ["Counter_16","0","32","66",false,"0033", "",""]},"out": {"0": ["O_1","0","1","70",true,"0034", "","0"],"1": ["O_2","0","1","70",true,"0035", "","1"],"2": ["O_3","0","1","70",true,"0036", "","2"],"3": ["O_4","0","1","70",true,"0037", "","3"],"4": ["O_5","0","1","70",true,"0038", "","4"],"5": ["O_6","0","1","70",true,"0039", "","5"],"6": ["O_7","0","1","70",true,"0040", "","6"],"7": ["O_8","0","1","70",true,"0041", "","7"],"8": ["h_an","0","1","70",true,"0042", "","8"],"9": ["h_richtung","0","1","70",true,"0043", "","9"],"10": ["h_hoch","0","1","70",true,"0044", "","10"],"11": ["h_runter","0","1","70",true,"0045", "","11"],"12": ["h_blau","0","1","70",true,"0046", "","12"],"13": ["h_rot","0","1","70",true,"0047", "","13"],"14": ["Output_Pin_15","0","1","70",true,"0048", "","14"],"15": ["Output_Pin_16","0","1","70",true,"0049", "","15"],"16": ["PWM_1","0","8","72",false,"0050", "",""],"17": ["PWM_2","0","8","73",false,"0051", "",""],"18": ["PWM_3","0","8","74",false,"0052", "",""],"19": ["PWM_4","0","8","75",false,"0053", "",""],"20": ["PWM_5","0","8","76",false,"0054", "",""],"21": ["PWM_6","0","8","77",false,"0055", "",""],"22": ["PWM_7","0","8","78",false,"0056", "",""],"23": ["PWM_8","0","8","79",false,"0057", "",""],"24": ["PWM_9","0","8","80",false,"0058", "",""],"25": ["PWM_10","0","8","81",false,"0059", "",""],"26": ["PWM_11","0","8","82",false,"0060", "",""],"27": ["PWM_12","0","8","83",false,"0061", "",""],"28": ["PWM_13","0","8","84",false,"0062", "",""],"29": ["PWM_14","0","8","85",false,"0063", "",""],"30": ["PWM_15","0","8","86",false,"0064", "",""],"31": ["PWM_16","0","8","87",false,"0065", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0066", "",""],"1": ["InputMode_2","0","8","89",false,"0067", "",""],"2": ["InputMode_3","0","8","90",false,"0068", "",""],"3": ["InputMode_4","0","8","91",false,"0069", "",""],"4": ["InputMode_5","0","8","92",false,"0070", "",""],"5": ["InputMode_6","0","8","93",false,"0071", "",""],"6": ["InputMode_7","0","8","94",false,"0072", "",""],"7": ["InputMode_8","0","8","95",false,"0073", "",""],"8": ["InputMode_9","0","8","96",false,"0074", "",""],"9": ["InputMode_10","0","8","97",false,"0075", "",""],"10": ["InputMode_11","0","8","98",false,"0076", "",""],"11": ["InputMode_12","0","8","99",false,"0077", "",""],"12": ["InputMode_13","0","8","100",false,"0078", "",""],"13": ["InputMode_14","0","8","101",false,"0079", "",""],"14": ["InputMode_15","0","8","102",false,"0080", "",""],"15": ["InputMode_16","0","8","103",false,"0081", "",""],"16": ["InputDebounce","0","16","104",false,"0082", "",""],"17": ["OutputPushPull","0","16","106",false,"0083", "",""],"18": ["OutputOpenLoadDetect","0","16","108",false,"0084", "",""],"19": ["OutputPWMActive","0","16","110",false,"0085", "",""],"20": ["OutputPWMFrequency","1","8","112",false,"0086", "",""]}},{"catalogNr": "RevPiGateProfinet","id": "device_RevPiGateProfinet_20160916_1_0_001","type": "EDGE","productType": "79","position": "33","name": "Gateway Profinet IRT","bmk": "Gateway Profinet IRT","inpVariant": 0,"outVariant": 0,"comment": "","offset": 115,"inp": {"0": ["Input_1","0","8","0",false,"0000", "",""],"1": ["Input_2","0","8","1",false,"0001", "",""],"2": ["Input_3","0","8","2",false,"0002", "",""],"3": ["Input_4","0","8","3",false,"0003", "",""],"4": ["Input_5","0","8","4",false,"0004", "",""],"5": ["Input_6","0","8","5",false,"0005", "",""],"6": ["Input_7","0","8","6",false,"0006", "",""],"7": ["Input_8","0","8","7",false,"0007", "",""],"8": ["Input_9","0","8","8",false,"0008", "",""],"9": ["Input_10","0","8","9",false,"0009", "",""],"10": ["Input_11","0","8","10",false,"0010", "",""],"11": ["Input_12","0","8","11",false,"0011", "",""],"12": ["Input_13","0","8","12",false,"0012", "",""],"13": ["Input_14","0","8","13",false,"0013", "",""],"14": ["Input_15","0","8","14",false,"0014", "",""],"15": ["Input_16","0","8","15",false,"0015", "",""],"16": ["Input_17","0","8","16",false,"0016", "",""],"17": ["Input_18","0","8","17",false,"0017", "",""],"18": ["Input_19","0","8","18",false,"0018", "",""],"19": ["Input_20","0","8","19",false,"0019", "",""],"20": ["Dummy_in","not used","3936","20",false,"0040", "",""]},"out": {"0": ["Output_1","0","8","512",false,"0020", "",""],"1": ["Output_2","0","8","513",false,"0021", "",""],"2": ["Output_3","0","8","514",false,"0022", "",""],"3": ["Output_4","0","8","515",false,"0023", "",""],"4": ["Output_5","0","8","516",false,"0024", "",""],"5": ["Output_6","0","8","517",false,"0025", "",""],"6": ["Output_7","0","8","518",false,"0026", "",""],"7": ["Output_8","0","8","519",false,"0027", "",""],"8": ["Output_9","0","8","520",false,"0028", "",""],"9": ["Output_10","0","8","521",false,"0029", "",""],"10": ["Output_11","0","8","522",false,"0030", "",""],"11": ["Output_12","0","8","523",false,"0031", "",""],"12": ["Output_13","0","8","524",false,"0032", "",""],"13": ["Output_14","0","8","525",false,"0033", "",""],"14": ["Output_15","0","8","526",false,"0034", "",""],"15": ["Output_16","0","8","527",false,"0035", "",""],"16": ["Output_17","0","8","528",false,"0036", "",""],"17": ["Output_18","0","8","529",false,"0037", "",""],"18": ["Output_19","0","8","530",false,"0038", "",""],"19": ["Output_20","0","8","531",false,"0039", "",""],"20": ["Dummy_out","not used","3936","532",false,"0041", "",""]},"mem": {}},{"catalogNr": "Virtual01","id": "device_Virtual01_20160818_1_0_001","type": "VIRTUAL","productType": "32768","position": "adap.","name": "virt01","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 1139,"inp": {"0": ["Input_1_i04","0","8","0",false,"0000", "",""],"1": ["Input_2_i04","0","8","1",false,"0001", "",""],"2": ["Input_3_i04","0","8","2",false,"0002", "",""],"3": ["Input_4_i04","0","8","3",false,"0003", "",""],"4": ["Input_5_i04","0","8","4",false,"0004", "",""],"5": ["Input_6_i04","0","8","5",false,"0005", "",""],"6": ["Input_7_i04","0","8","6",false,"0006", "",""],"7": ["Input_8_i04","0","8","7",false,"0007", "",""],"8": ["Input_9_i04","0","8","8",false,"0008", "",""],"9": ["Input_10_i04","0","8","9",false,"0009", "",""],"10": ["Input_11_i04","0","8","10",false,"0010", "",""],"11": ["Input_12_i04","0","8","11",false,"0011", "",""],"12": ["Input_13_i04","0","8","12",false,"0012", "",""],"13": ["Input_14_i04","0","8","13",false,"0013", "",""],"14": ["Input_15_i04","0","8","14",false,"0014", "",""],"15": ["Input_16_i04","0","8","15",false,"0015", "",""],"16": ["Input_17_i04","0","8","16",false,"0016", "",""],"17": ["Input_18_i04","0","8","17",false,"0017", "",""],"18": ["Input_19_i04","0","8","18",false,"0018", "",""],"19": ["Input_20_i04","0","8","19",false,"0019", "",""],"20": ["Input_21","0","8","20",false,"0020", "",""],"21": ["Input_22","0","8","21",false,"0021", "",""],"22": ["Input_23","0","8","22",false,"0022", "",""],"23": ["Input_24","0","8","23",false,"0023", "",""],"24": ["Input_25","0","8","24",false,"0024", "",""],"25": ["Input_26","0","8","25",false,"0025", "",""],"26": ["Input_27","0","8","26",false,"0026", "",""],"27": ["Input_28","0","8","27",false,"0027", "",""],"28": ["Input_29","0","8","28",false,"0028", "",""],"29": ["Input_30","0","8","29",false,"0029", "",""],"30": ["Input_31","0","8","30",false,"0030", "",""],"31": ["Input_32","0","8","31",false,"0031", "",""]},"out": {"0": ["Output_1_i04","0","8","32",false,"0032", "",""],"1": ["Output_2_i04","0","8","33",false,"0033", "",""],"2": ["Output_3_i04","0","8","34",false,"0034", "",""],"3": ["Output_4_i04","0","8","35",false,"0035", "",""],"4": ["Output_5_i04","0","8","36",false,"0036", "",""],"5": ["Output_6_i04","0","8","37",false,"0037", "",""],"6": ["Output_7_i04","0","8","38",false,"0038", "",""],"7": ["Output_8_i04","0","8","39",false,"0039", "",""],"8": ["Output_9_i04","0","8","40",false,"0040", "",""],"9": ["Output_10_i04","0","8","41",false,"0041", "",""],"10": ["Output_11_i04","0","8","42",false,"0042", "",""],"11": ["Output_12_i04","0","8","43",false,"0043", "",""],"12": ["Output_13_i04","0","8","44",false,"0044", "",""],"13": ["Output_14_i04","0","8","45",false,"0045", "",""],"14": ["Output_15_i04","0","8","46",false,"0046", "",""],"15": ["Output_16_i04","0","8","47",false,"0047", "",""],"16": ["Output_17_i04","0","8","48",false,"0048", "",""],"17": ["Output_18_i04","0","8","49",false,"0049", "",""],"18": ["Output_19_i04","0","8","50",false,"0050", "",""],"19": ["Output_20_i04","0","8","51",false,"0051", "",""],"20": ["Output_21","0","8","52",false,"0052", "",""],"21": ["Output_22","0","8","53",false,"0053", "",""],"22": ["Output_23","0","8","54",false,"0054", "",""],"23": ["Output_24","0","8","55",false,"0055", "",""],"24": ["Output_25","0","8","56",false,"0056", "",""],"25": ["Output_26","0","8","57",false,"0057", "",""],"26": ["Output_27","0","8","58",false,"0058", "",""],"27": ["Output_28","0","8","59",false,"0059", "",""],"28": ["Output_29","0","8","60",false,"0060", "",""],"29": ["Output_30","0","8","61",false,"0061", "",""],"30": ["Output_31","0","8","62",false,"0062", "",""],"31": ["Output_32","0","8","63",false,"0063", "",""]},"mem": {}},{"catalogNr": "Virtual01","id": "device_Virtual01_20160818_1_0_002","type": "VIRTUAL","productType": "32768","position": "adap.","name": "Virtual Device 32 Byte","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 1203,"inp": {"0": ["Input_1_i05","0","8","0",false,"0000", "",""],"1": ["Input_2_i05","0","8","1",false,"0001", "",""],"2": ["Input_3_i05","0","8","2",false,"0002", "",""],"3": ["Input_4_i05","0","8","3",false,"0003", "",""],"4": ["Input_5_i05","0","8","4",false,"0004", "",""],"5": ["Input_6_i05","0","8","5",false,"0005", "",""],"6": ["Input_7_i05","0","8","6",false,"0006", "",""],"7": ["Input_8_i05","0","8","7",false,"0007", "",""],"8": ["Input_9_i05","0","8","8",false,"0008", "",""],"9": ["Input_10_i05","0","8","9",false,"0009", "",""],"10": ["Input_11_i05","0","8","10",false,"0010", "",""],"11": ["Input_12_i05","0","8","11",false,"0011", "",""],"12": ["Input_13_i05","0","8","12",false,"0012", "",""],"13": ["Input_14_i05","0","8","13",false,"0013", "",""],"14": ["Input_15_i05","0","8","14",false,"0014", "",""],"15": ["Input_16_i05","0","8","15",false,"0015", "",""],"16": ["Input_17_i05","0","8","16",false,"0016", "",""],"17": ["Input_18_i05","0","8","17",false,"0017", "",""],"18": ["Input_19_i05","0","8","18",false,"0018", "",""],"19": ["Input_20_i05","0","8","19",false,"0019", "",""],"20": ["Input_21_i05","0","8","20",false,"0020", "",""],"21": ["Input_22_i05","0","8","21",false,"0021", "",""],"22": ["Input_23_i05","0","8","22",false,"0022", "",""],"23": ["Input_24_i05","0","8","23",false,"0023", "",""],"24": ["Input_25_i05","0","8","24",false,"0024", "",""],"25": ["Input_26_i05","0","8","25",false,"0025", "",""],"26": ["Input_27_i05","0","8","26",false,"0026", "",""],"27": ["Input_28_i05","0","8","27",false,"0027", "",""],"28": ["Input_29_i05","0","8","28",false,"0028", "",""],"29": ["Input_30_i05","0","8","29",false,"0029", "",""],"30": ["Input_31_i05","0","8","30",false,"0030", "",""],"31": ["Input_32_i05","0","8","31",false,"0031", "",""]},"out": {"0": ["Output_1_i05","0","8","32",false,"0032", "",""],"1": ["Output_2_i05","0","8","33",false,"0033", "",""],"2": ["Output_3_i05","0","8","34",false,"0034", "",""],"3": ["Output_4_i05","0","8","35",false,"0035", "",""],"4": ["Output_5_i05","0","8","36",false,"0036", "",""],"5": ["Output_6_i05","0","8","37",false,"0037", "",""],"6": ["Output_7_i05","0","8","38",false,"0038", "",""],"7": ["Output_8_i05","0","8","39",false,"0039", "",""],"8": ["Output_9_i05","0","8","40",false,"0040", "",""],"9": ["Output_10_i05","0","8","41",false,"0041", "",""],"10": ["Output_11_i05","0","8","42",false,"0042", "",""],"11": ["Output_12_i05","0","8","43",false,"0043", "",""],"12": ["Output_13_i05","0","8","44",false,"0044", "",""],"13": ["Output_14_i05","0","8","45",false,"0045", "",""],"14": ["Output_15_i05","0","8","46",false,"0046", "",""],"15": ["Output_16_i05","0","8","47",false,"0047", "",""],"16": ["Output_17_i05","0","8","48",false,"0048", "",""],"17": ["Output_18_i05","0","8","49",false,"0049", "",""],"18": ["Output_19_i05","0","8","50",false,"0050", "",""],"19": ["Output_20_i05","0","8","51",false,"0051", "",""],"20": ["Output_21_i05","0","8","52",false,"0052", "",""],"21": ["Output_22_i05","0","8","53",false,"0053", "",""],"22": ["Output_23_i05","0","8","54",false,"0054", "",""],"23": ["Output_24_i05","0","8","55",false,"0055", "",""],"24": ["Output_25_i05","0","8","56",false,"0056", "",""],"25": ["Output_26_i05","0","8","57",false,"0057", "",""],"26": ["Output_27_i05","0","8","58",false,"0058", "",""],"27": ["Output_28_i05","0","8","59",false,"0059", "",""],"28": ["Output_29_i05","0","8","60",false,"0060", "",""],"29": ["Output_30_i05","0","8","61",false,"0061", "",""],"30": ["Output_31_i05","0","8","62",false,"0062", "",""],"31": ["Output_32_i05","0","8","63",false,"0063", "",""]},"mem": {}},{"catalogNr": "Virtual01","id": "device_Virtual01_20160818_1_0_003","type": "VIRTUAL","productType": "32768","position": "adap.","name": "Virtual Device 32 Byte","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 1267,"inp": {"0": ["Input_1_i06","0","8","0",false,"0000", "",""],"1": ["Input_2_i06","0","8","1",false,"0001", "",""],"2": ["Input_3_i06","0","8","2",false,"0002", "",""],"3": ["Input_4_i06","0","8","3",false,"0003", "",""],"4": ["Input_5_i06","0","8","4",false,"0004", "",""],"5": ["Input_6_i06","0","8","5",false,"0005", "",""],"6": ["Input_7_i06","0","8","6",false,"0006", "",""],"7": ["Input_8_i06","0","8","7",false,"0007", "",""],"8": ["Input_9_i06","0","8","8",false,"0008", "",""],"9": ["Input_10_i06","0","8","9",false,"0009", "",""],"10": ["Input_11_i06","0","8","10",false,"0010", "",""],"11": ["Input_12_i06","0","8","11",false,"0011", "",""],"12": ["Input_13_i06","0","8","12",false,"0012", "",""],"13": ["Input_14_i06","0","8","13",false,"0013", "",""],"14": ["Input_15_i06","0","8","14",false,"0014", "",""],"15": ["Input_16_i06","0","8","15",false,"0015", "",""],"16": ["Input_17_i06","0","8","16",false,"0016", "",""],"17": ["Input_18_i06","0","8","17",false,"0017", "",""],"18": ["Input_19_i06","0","8","18",false,"0018", "",""],"19": ["Input_20_i06","0","8","19",false,"0019", "",""],"20": ["Input_21_i06","0","8","20",false,"0020", "",""],"21": ["Input_22_i06","0","8","21",false,"0021", "",""],"22": ["Input_23_i06","0","8","22",false,"0022", "",""],"23": ["Input_24_i06","0","8","23",false,"0023", "",""],"24": ["Input_25_i06","0","8","24",false,"0024", "",""],"25": ["Input_26_i06","0","8","25",false,"0025", "",""],"26": ["Input_27_i06","0","8","26",false,"0026", "",""],"27": ["Input_28_i06","0","8","27",false,"0027", "",""],"28": ["Input_29_i06","0","8","28",false,"0028", "",""],"29": ["Input_30_i06","0","8","29",false,"0029", "",""],"30": ["Input_31_i06","0","8","30",false,"0030", "",""],"31": ["Input_32_i06","0","8","31",false,"0031", "",""]},"out": {"0": ["Output_1_i06","0","8","32",false,"0032", "",""],"1": ["Output_2_i06","0","8","33",false,"0033", "",""],"2": ["Output_3_i06","0","8","34",false,"0034", "",""],"3": ["Output_4_i06","0","8","35",false,"0035", "",""],"4": ["Output_5_i06","0","8","36",false,"0036", "",""],"5": ["Output_6_i06","0","8","37",false,"0037", "",""],"6": ["Output_7_i06","0","8","38",false,"0038", "",""],"7": ["Output_8_i06","0","8","39",false,"0039", "",""],"8": ["Output_9_i06","0","8","40",false,"0040", "",""],"9": ["Output_10_i06","0","8","41",false,"0041", "",""],"10": ["Output_11_i06","0","8","42",false,"0042", "",""],"11": ["Output_12_i06","0","8","43",false,"0043", "",""],"12": ["Output_13_i06","0","8","44",false,"0044", "",""],"13": ["Output_14_i06","0","8","45",false,"0045", "",""],"14": ["Output_15_i06","0","8","46",false,"0046", "",""],"15": ["Output_16_i06","0","8","47",false,"0047", "",""],"16": ["Output_17_i06","0","8","48",false,"0048", "",""],"17": ["Output_18_i06","0","8","49",false,"0049", "",""],"18": ["Output_19_i06","0","8","50",false,"0050", "",""],"19": ["Output_20_i06","0","8","51",false,"0051", "",""],"20": ["Output_21_i06","0","8","52",false,"0052", "",""],"21": ["Output_22_i06","0","8","53",false,"0053", "",""],"22": ["Output_23_i06","0","8","54",false,"0054", "",""],"23": ["Output_24_i06","0","8","55",false,"0055", "",""],"24": ["Output_25_i06","0","8","56",false,"0056", "",""],"25": ["Output_26_i06","0","8","57",false,"0057", "",""],"26": ["Output_27_i06","0","8","58",false,"0058", "",""],"27": ["Output_28_i06","0","8","59",false,"0059", "",""],"28": ["Output_29_i06","0","8","60",false,"0060", "",""],"29": ["Output_30_i06","0","8","61",false,"0061", "",""],"30": ["Output_31_i06","0","8","62",false,"0062", "",""],"31": ["Output_32_i06","0","8","63",false,"0063", "",""]},"mem": {}}]} \ No newline at end of file diff --git a/tests/common/config_rpi11.rsc b/tests/common/config_rpi11.rsc new file mode 100644 index 0000000..63a83ce --- /dev/null +++ b/tests/common/config_rpi11.rsc @@ -0,0 +1 @@ +{"App":{"name": "PiCtory", "version": "1.2.5","saveTS": "20171108151243","language": "en","layout": {"north":{"size":70,"initClosed":false,"initHidden":false},"south":{"size":325,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":500,"initClosed":false,"initHidden":false}}}},"east":{"size":0,"initClosed":true,"initHidden":false,"children":{}},"west":{"size":313,"initClosed":false,"initHidden":false,"children":{"layout1":{}}}}},"Summary":{"inpTotal": 618,"outTotal": 567},"Devices":[{"catalogNr": "RevPiCore","GUID": "ae718ac0-90ba-69fb-1a35-06850c1a920e","id": "device_RevPiCore_20170210_1_1_001","type": "BASE","productType": "95","position": "0","name": "revpicore","bmk": "RevPi Core V1.1","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""],"1": ["RevPiIOCycle","0","8","1",true,"0001", "",""],"2": ["RS485ErrorCnt","0","16","2",false,"0002", "",""]},"out": {"0": ["RevPiLED","0","8","4",true,"0003", "",""],"1": ["RS485ErrorLimit1","10","16","5",false,"0004", "",""],"2": ["RS485ErrorLimit2","1000","16","7",false,"0005", "",""]},"mem": {},"extend": {}},{"catalogNr": "RevPiDIO","GUID": "d5f2dbc8-05d9-0a85-4c19-b9cd5d3517a9","id": "device_RevPiDIO_20160818_1_0_001","type": "LEFT_RIGHT","productType": "96","position": "32","name": "dio01","bmk": "RevPi DIO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 9,"inp": {"0": ["t_aus","0","1","0",true,"0000", "","0"],"1": ["t_an","0","1","0",true,"0001", "","1"],"2": ["t_links","0","1","0",true,"0002", "","2"],"3": ["t_rechts","0","1","0",true,"0003", "","3"],"4": ["t_hoch","0","1","0",true,"0004", "","4"],"5": ["t_runter","0","1","0",true,"0005", "","5"],"6": ["t_blau","0","1","0",true,"0006", "","6"],"7": ["t_rot","0","1","0",true,"0007", "","7"],"8": ["I_9","0","1","0",true,"0008", "","8"],"9": ["I_10","0","1","0",true,"0009", "","9"],"10": ["I_11","0","1","0",true,"0010", "","10"],"11": ["I_12","0","1","0",true,"0011", "","11"],"12": ["I_13","0","1","0",true,"0012", "","12"],"13": ["I_14","0","1","0",true,"0013", "","13"],"14": ["I_15","0","1","0",true,"0014", "","14"],"15": ["I_16","0","1","0",true,"0015", "","15"],"16": ["Output_Status","0","16","2",false,"0016", "",""],"17": ["Status","0","16","4",false,"0017", "",""],"18": ["Counter_1","0","32","6",false,"0018", "",""],"19": ["Counter_2","0","32","10",false,"0019", "",""],"20": ["Counter_3","0","32","14",false,"0020", "",""],"21": ["Counter_4","0","32","18",false,"0021", "",""],"22": ["Counter_5","0","32","22",false,"0022", "",""],"23": ["Counter_6","0","32","26",false,"0023", "",""],"24": ["Counter_7","0","32","30",false,"0024", "",""],"25": ["Counter_8","0","32","34",false,"0025", "",""],"26": ["Counter_9","0","32","38",false,"0026", "",""],"27": ["Counter_10","0","32","42",false,"0027", "",""],"28": ["Counter_11","0","32","46",false,"0028", "",""],"29": ["Counter_12","0","32","50",false,"0029", "",""],"30": ["Counter_13","0","32","54",false,"0030", "",""],"31": ["Counter_14","0","32","58",false,"0031", "",""],"32": ["Counter_15","0","32","62",false,"0032", "",""],"33": ["Counter_16","0","32","66",false,"0033", "",""]},"out": {"0": ["h_an","0","1","70",true,"0034", "","0"],"1": ["h_richtung","0","1","70",true,"0035", "","1"],"2": ["h_hoch","0","1","70",true,"0036", "","2"],"3": ["h_runter","0","1","70",true,"0037", "","3"],"4": ["h_blau","0","1","70",true,"0038", "","4"],"5": ["h_rot","0","1","70",true,"0039", "","5"],"6": ["O_7","0","1","70",true,"0040", "","6"],"7": ["O_8","0","1","70",true,"0041", "","7"],"8": ["O_9","0","1","70",true,"0042", "","8"],"9": ["O_10","0","1","70",true,"0043", "","9"],"10": ["O_11","0","1","70",true,"0044", "","10"],"11": ["O_12","0","1","70",true,"0045", "","11"],"12": ["O_13","0","1","70",true,"0046", "","12"],"13": ["O_14","0","1","70",true,"0047", "","13"],"14": ["O_15","0","1","70",true,"0048", "","14"],"15": ["O_16","0","1","70",true,"0049", "","15"],"16": ["PWM_1","0","8","72",false,"0050", "",""],"17": ["PWM_2","0","8","73",false,"0051", "",""],"18": ["PWM_3","0","8","74",false,"0052", "",""],"19": ["PWM_4","0","8","75",false,"0053", "",""],"20": ["PWM_5","0","8","76",false,"0054", "",""],"21": ["PWM_6","0","8","77",false,"0055", "",""],"22": ["PWM_7","0","8","78",false,"0056", "",""],"23": ["PWM_8","0","8","79",false,"0057", "",""],"24": ["PWM_9","0","8","80",false,"0058", "",""],"25": ["PWM_10","0","8","81",false,"0059", "",""],"26": ["PWM_11","0","8","82",false,"0060", "",""],"27": ["PWM_12","0","8","83",false,"0061", "",""],"28": ["PWM_13","0","8","84",false,"0062", "",""],"29": ["PWM_14","0","8","85",false,"0063", "",""],"30": ["PWM_15","0","8","86",false,"0064", "",""],"31": ["PWM_16","0","8","87",false,"0065", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0066", "",""],"1": ["InputMode_2","0","8","89",false,"0067", "",""],"2": ["InputMode_3","0","8","90",false,"0068", "",""],"3": ["InputMode_4","0","8","91",false,"0069", "",""],"4": ["InputMode_5","0","8","92",false,"0070", "",""],"5": ["InputMode_6","0","8","93",false,"0071", "",""],"6": ["InputMode_7","0","8","94",false,"0072", "",""],"7": ["InputMode_8","0","8","95",false,"0073", "",""],"8": ["InputMode_9","0","8","96",false,"0074", "",""],"9": ["InputMode_10","0","8","97",false,"0075", "",""],"10": ["InputMode_11","0","8","98",false,"0076", "",""],"11": ["InputMode_12","0","8","99",false,"0077", "",""],"12": ["InputMode_13","0","8","100",false,"0078", "",""],"13": ["InputMode_14","0","8","101",false,"0079", "",""],"14": ["InputMode_15","0","8","102",false,"0080", "",""],"15": ["InputMode_16","0","8","103",false,"0081", "",""],"16": ["InputDebounce","0","16","104",false,"0082", "",""],"17": ["OutputPushPull","0","16","106",false,"0083", "",""],"18": ["OutputOpenLoadDetect","0","16","108",false,"0084", "",""],"19": ["OutputPWMActive","0","16","110",false,"0085", "",""],"20": ["OutputPWMFrequency","1","8","112",false,"0086", "",""]},"extend": {}},{"catalogNr": "RevPiGateProfinet","GUID": "30558b90-40a4-7eaa-2a50-c7aaa2a8639b","id": "device_RevPiGateProfinet_20160916_1_0_001","type": "EDGE","productType": "79","position": "33","name": "profinet01","bmk": "Gateway Profinet IRT","inpVariant": 0,"outVariant": 0,"comment": "","offset": 122,"inp": {"0": ["Input_1_i06","0","8","0",false,"0000", "",""],"1": ["Input_2_i06","0","8","1",false,"0001", "",""],"2": ["Input_3_i06","0","8","2",false,"0002", "",""],"3": ["Input_4_i06","0","8","3",false,"0003", "",""],"4": ["Input_5_i06","0","8","4",false,"0004", "",""],"5": ["Input_6_i06","0","8","5",false,"0005", "",""],"6": ["Input_7_i06","0","8","6",false,"0006", "",""],"7": ["Input_8_i06","0","8","7",false,"0007", "",""],"8": ["Input_9_i06","0","8","8",false,"0008", "",""],"9": ["Input_10_i06","0","8","9",false,"0009", "",""],"10": ["Input_11_i06","0","8","10",false,"0010", "",""],"11": ["Input_12_i06","0","8","11",false,"0011", "",""],"12": ["Input_13_i06","0","8","12",false,"0012", "",""],"13": ["Input_14_i06","0","8","13",false,"0013", "",""],"14": ["Input_15_i06","0","8","14",false,"0014", "",""],"15": ["Input_16_i06","0","8","15",false,"0015", "",""],"16": ["Input_17_i06","0","8","16",false,"0016", "",""],"17": ["Input_18_i06","0","8","17",false,"0017", "",""],"18": ["Input_19_i06","0","8","18",false,"0018", "",""],"19": ["Input_20_i06","0","8","19",false,"0019", "",""],"20": ["Dummy_in","not used","3936","20",false,"0040", "",""]},"out": {"0": ["Output_1_i06","0","8","512",false,"0020", "",""],"1": ["Output_2_i06","0","8","513",false,"0021", "",""],"2": ["Output_3_i06","0","8","514",false,"0022", "",""],"3": ["Output_4_i06","0","8","515",false,"0023", "",""],"4": ["Output_5_i06","0","8","516",false,"0024", "",""],"5": ["Output_6_i06","0","8","517",false,"0025", "",""],"6": ["Output_7_i06","0","8","518",false,"0026", "",""],"7": ["Output_8_i06","0","8","519",false,"0027", "",""],"8": ["Output_9_i06","0","8","520",false,"0028", "",""],"9": ["Output_10_i06","0","8","521",false,"0029", "",""],"10": ["Output_11_i06","0","8","522",false,"0030", "",""],"11": ["Output_12_i06","0","8","523",false,"0031", "",""],"12": ["Output_13_i06","0","8","524",false,"0032", "",""],"13": ["Output_14_i06","0","8","525",false,"0033", "",""],"14": ["Output_15_i06","0","8","526",false,"0034", "",""],"15": ["Output_16_i06","0","8","527",false,"0035", "",""],"16": ["Output_17_i06","0","8","528",false,"0036", "",""],"17": ["Output_18_i06","0","8","529",false,"0037", "",""],"18": ["Output_19_i06","0","8","530",false,"0038", "",""],"19": ["Output_20_i06","0","8","531",false,"0039", "",""],"20": ["Dummy_out","not used","3936","532",false,"0041", "",""]},"mem": {},"extend": {}},{"catalogNr": "Virtual01","GUID": "18c193b5-b10c-cb9a-39f6-2ae74e294501","id": "device_Virtual01_20160818_1_0_001","type": "VIRTUAL","productType": "32768","position": "64","name": "virt01","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 1146,"inp": {"0": ["Input_1","0","8","0",false,"0000", "",""],"1": ["Input_2","0","8","1",false,"0001", "",""],"2": ["Input_3","0","8","2",false,"0002", "",""],"3": ["Input_4","0","8","3",false,"0003", "",""],"4": ["Input_5","0","8","4",false,"0004", "",""],"5": ["Input_6","0","8","5",false,"0005", "",""],"6": ["Input_7","0","8","6",false,"0006", "",""],"7": ["Input_8","0","8","7",false,"0007", "",""],"8": ["Input_9","0","8","8",false,"0008", "",""],"9": ["Input_10","0","8","9",false,"0009", "",""],"10": ["Input_11","0","8","10",false,"0010", "",""],"11": ["Input_12","0","8","11",false,"0011", "",""],"12": ["Input_13","0","8","12",false,"0012", "",""],"13": ["Input_14","0","8","13",false,"0013", "",""],"14": ["Input_15","0","8","14",false,"0014", "",""],"15": ["Input_16","0","8","15",false,"0015", "",""],"16": ["Input_17","0","8","16",false,"0016", "",""],"17": ["Input_18","0","8","17",false,"0017", "",""],"18": ["Input_19","0","8","18",false,"0018", "",""],"19": ["Input_20","0","8","19",false,"0019", "",""],"20": ["Input_21","0","8","20",false,"0020", "",""],"21": ["Input_22","0","8","21",false,"0021", "",""],"22": ["Input_23","0","8","22",false,"0022", "",""],"23": ["Input_24","0","8","23",false,"0023", "",""],"24": ["Input_25","0","8","24",false,"0024", "",""],"25": ["Input_26","0","8","25",false,"0025", "",""],"26": ["Input_27","0","8","26",false,"0026", "",""],"27": ["Input_28","0","8","27",false,"0027", "",""],"28": ["Input_29","0","8","28",false,"0028", "",""],"29": ["Input_30","0","8","29",false,"0029", "",""],"30": ["Input_31","0","8","30",false,"0030", "",""],"31": ["Input_32","0","8","31",false,"0031", "",""]},"out": {"0": ["Output_1","0","8","32",false,"0032", "",""],"1": ["Output_2","0","8","33",false,"0033", "",""],"2": ["Output_3","0","8","34",false,"0034", "",""],"3": ["Output_4","0","8","35",false,"0035", "",""],"4": ["Output_5","0","8","36",false,"0036", "",""],"5": ["Output_6","0","8","37",false,"0037", "",""],"6": ["Output_7","0","8","38",false,"0038", "",""],"7": ["Output_8","0","8","39",false,"0039", "",""],"8": ["Output_9","0","8","40",false,"0040", "",""],"9": ["Output_10","0","8","41",false,"0041", "",""],"10": ["Output_11","0","8","42",false,"0042", "",""],"11": ["Output_12","0","8","43",false,"0043", "",""],"12": ["Output_13","0","8","44",false,"0044", "",""],"13": ["Output_14","0","8","45",false,"0045", "",""],"14": ["Output_15","0","8","46",false,"0046", "",""],"15": ["Output_16","0","8","47",false,"0047", "",""],"16": ["Output_17","0","8","48",false,"0048", "",""],"17": ["Output_18","0","8","49",false,"0049", "",""],"18": ["Output_19","0","8","50",false,"0050", "",""],"19": ["Output_20","0","8","51",false,"0051", "",""],"20": ["Output_21","0","8","52",false,"0052", "",""],"21": ["Output_22","0","8","53",false,"0053", "",""],"22": ["Output_23","0","8","54",false,"0054", "",""],"23": ["Output_24","0","8","55",false,"0055", "",""],"24": ["Output_25","0","8","56",false,"0056", "",""],"25": ["Output_26","0","8","57",false,"0057", "",""],"26": ["Output_27","0","8","58",false,"0058", "",""],"27": ["Output_28","0","8","59",false,"0059", "",""],"28": ["Output_29","0","8","60",false,"0060", "",""],"29": ["Output_30","0","8","61",false,"0061", "",""],"30": ["Output_31","0","8","62",false,"0062", "",""],"31": ["Output_32","0","8","63",false,"0063", "",""]},"mem": {},"extend": {}}],"Connections":[]} \ No newline at end of file diff --git a/tests/common/config_unknown.rsc b/tests/common/config_unknown.rsc new file mode 100644 index 0000000..e315a94 --- /dev/null +++ b/tests/common/config_unknown.rsc @@ -0,0 +1 @@ +{"App":{"name": "RevolutionPi Configurator", "version": "1.0","language": "en","layout": {"north":{"size":50,"initClosed":false,"initHidden":false},"south":{"size":393,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":844,"initClosed":false,"initHidden":false}}}},"east":{"size":200,"initClosed":true,"initHidden":false,"children":{"layout1":{"north":{"size":100,"initClosed":false,"initHidden":false},"south":{"size":98,"initClosed":false,"initHidden":false}}}},"west":{"size":381,"initClosed":false,"initHidden":false,"children":{"layout1":{"south":{"size":53,"initClosed":false,"initHidden":false}}}}}},"Summary":{"inpTotal": 679,"outTotal": 627},"Devices":[{"catalogNr": "RevPiCore","id": "device_RevPiCore_20160818_1_0_001","type": "BASE","productType": "95","position": "0","name": "RevPi Core","bmk": "RevPi Core","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""]},"out": {"0": ["RevPiLED","0","8","1",true,"0001", "",""]},"mem": {}},{"catalogNr": "RevPiDIO","id": "device_RevPiDIO_20160818_1_0_001","type": "LEFT_RIGHT","productType": "96","position": "32","name": "RevPi DIO","bmk": "RevPi DIO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 2,"inp": {"0": ["t_aus","0","1","0",true,"0000", "","0"],"1": ["t_an","0","1","0",true,"0001", "","1"],"2": ["t_links","0","1","0",true,"0002", "","2"],"3": ["t_rechts","0","1","0",true,"0003", "","3"],"4": ["t_hoch","0","1","0",true,"0004", "","4"],"5": ["t_runter","0","1","0",true,"0005", "","5"],"6": ["t_blau","0","1","0",true,"0006", "","6"],"7": ["t_rot","0","1","0",true,"0007", "","7"],"8": ["Input_Pin_9","0","1","0",true,"0008", "","8"],"9": ["Input_Pin_10","0","1","0",true,"0009", "","9"],"10": ["Input_Pin_11","0","1","0",true,"0010", "","10"],"11": ["Input_Pin_12","0","1","0",true,"0011", "","11"],"12": ["Input_Pin_13","0","1","0",true,"0012", "","12"],"13": ["Input_Pin_14","0","1","0",true,"0013", "","13"],"14": ["Input_Pin_15","0","1","0",true,"0014", "","14"],"15": ["Input_Pin_16","0","1","0",true,"0015", "","15"],"16": ["Output_Status","0","16","2",false,"0016", "",""],"17": ["Status","0","16","4",false,"0017", "",""],"18": ["Counter_1","0","32","6",false,"0018", "",""],"19": ["Counter_2","0","32","10",false,"0019", "",""],"20": ["Counter_3","0","32","14",false,"0020", "",""],"21": ["Counter_4","0","32","18",false,"0021", "",""],"22": ["Counter_5","0","32","22",false,"0022", "",""],"23": ["Counter_6","0","32","26",false,"0023", "",""],"24": ["Counter_7","0","32","30",false,"0024", "",""],"25": ["Counter_8","0","32","34",false,"0025", "",""],"26": ["Counter_9","0","32","38",false,"0026", "",""],"27": ["Counter_10","0","32","42",false,"0027", "",""],"28": ["Counter_11","0","32","46",false,"0028", "",""],"29": ["Counter_12","0","32","50",false,"0029", "",""],"30": ["Counter_13","0","32","54",false,"0030", "",""],"31": ["Counter_14","0","32","58",false,"0031", "",""],"32": ["Counter_15","0","32","62",false,"0032", "",""],"33": ["Counter_16","0","32","66",false,"0033", "",""]},"out": {"0": ["O_1","0","1","70",true,"0034", "","0"],"1": ["O_2","0","1","70",true,"0035", "","1"],"2": ["O_3","0","1","70",true,"0036", "","2"],"3": ["O_4","0","1","70",true,"0037", "","3"],"4": ["O_5","0","1","70",true,"0038", "","4"],"5": ["O_6","0","1","70",true,"0039", "","5"],"6": ["O_7","0","1","70",true,"0040", "","6"],"7": ["O_8","0","1","70",true,"0041", "","7"],"8": ["h_an","0","1","70",true,"0042", "","8"],"9": ["h_richtung","0","1","70",true,"0043", "","9"],"10": ["h_hoch","0","1","70",true,"0044", "","10"],"11": ["h_runter","0","1","70",true,"0045", "","11"],"12": ["h_blau","0","1","70",true,"0046", "","12"],"13": ["h_rot","0","1","70",true,"0047", "","13"],"14": ["Output_Pin_15","0","1","70",true,"0048", "","14"],"15": ["Output_Pin_16","0","1","70",true,"0049", "","15"],"16": ["PWM_1","0","8","72",false,"0050", "",""],"17": ["PWM_2","0","8","73",false,"0051", "",""],"18": ["PWM_3","0","8","74",false,"0052", "",""],"19": ["PWM_4","0","8","75",false,"0053", "",""],"20": ["PWM_5","0","8","76",false,"0054", "",""],"21": ["PWM_6","0","8","77",false,"0055", "",""],"22": ["PWM_7","0","8","78",false,"0056", "",""],"23": ["PWM_8","0","8","79",false,"0057", "",""],"24": ["PWM_9","0","8","80",false,"0058", "",""],"25": ["PWM_10","0","8","81",false,"0059", "",""],"26": ["PWM_11","0","8","82",false,"0060", "",""],"27": ["PWM_12","0","8","83",false,"0061", "",""],"28": ["PWM_13","0","8","84",false,"0062", "",""],"29": ["PWM_14","0","8","85",false,"0063", "",""],"30": ["PWM_15","0","8","86",false,"0064", "",""],"31": ["PWM_16","0","8","87",false,"0065", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0066", "",""],"1": ["InputMode_2","0","8","89",false,"0067", "",""],"2": ["InputMode_3","0","8","90",false,"0068", "",""],"3": ["InputMode_4","0","8","91",false,"0069", "",""],"4": ["InputMode_5","0","8","92",false,"0070", "",""],"5": ["InputMode_6","0","8","93",false,"0071", "",""],"6": ["InputMode_7","0","8","94",false,"0072", "",""],"7": ["InputMode_8","0","8","95",false,"0073", "",""],"8": ["InputMode_9","0","8","96",false,"0074", "",""],"9": ["InputMode_10","0","8","97",false,"0075", "",""],"10": ["InputMode_11","0","8","98",false,"0076", "",""],"11": ["InputMode_12","0","8","99",false,"0077", "",""],"12": ["InputMode_13","0","8","100",false,"0078", "",""],"13": ["InputMode_14","0","8","101",false,"0079", "",""],"14": ["InputMode_15","0","8","102",false,"0080", "",""],"15": ["InputMode_16","0","8","103",false,"0081", "",""],"16": ["InputDebounce","0","16","104",false,"0082", "",""],"17": ["OutputPushPull","0","16","106",false,"0083", "",""],"18": ["OutputOpenLoadDetect","0","16","108",false,"0084", "",""],"19": ["OutputPWMActive","0","16","110",false,"0085", "",""],"20": ["OutputPWMFrequency","1","8","112",false,"0086", "",""]}},{"catalogNr": "RevPiGateProfinet","id": "device_RevPiGateProfinet_20160916_1_0_001","type": "EDGE","productType": "79","position": "33","name": "Gateway Profinet IRT","bmk": "Gateway Profinet IRT","inpVariant": 0,"outVariant": 0,"comment": "","offset": 115,"inp": {"0": ["Input_1","0","8","0",false,"0000", "",""],"1": ["Input_2","0","8","1",false,"0001", "",""],"2": ["Input_3","0","8","2",false,"0002", "",""],"3": ["Input_4","0","8","3",false,"0003", "",""],"4": ["Input_5","0","8","4",false,"0004", "",""],"5": ["Input_6","0","8","5",false,"0005", "",""],"6": ["Input_7","0","8","6",false,"0006", "",""],"7": ["Input_8","0","8","7",false,"0007", "",""],"8": ["Input_9","0","8","8",false,"0008", "",""],"9": ["Input_10","0","8","9",false,"0009", "",""],"10": ["Input_11","0","8","10",false,"0010", "",""],"11": ["Input_12","0","8","11",false,"0011", "",""],"12": ["Input_13","0","8","12",false,"0012", "",""],"13": ["Input_14","0","8","13",false,"0013", "",""],"14": ["Input_15","0","8","14",false,"0014", "",""],"15": ["Input_16","0","8","15",false,"0015", "",""],"16": ["Input_17","0","8","16",false,"0016", "",""],"17": ["Input_18","0","8","17",false,"0017", "",""],"18": ["Input_19","0","8","18",false,"0018", "",""],"19": ["Input_20","0","8","19",false,"0019", "",""],"20": ["Dummy_in","not used","3936","20",false,"0040", "",""]},"out": {"0": ["Output_1","0","8","512",false,"0020", "",""],"1": ["Output_2","0","8","513",false,"0021", "",""],"2": ["Output_3","0","8","514",false,"0022", "",""],"3": ["Output_4","0","8","515",false,"0023", "",""],"4": ["Output_5","0","8","516",false,"0024", "",""],"5": ["Output_6","0","8","517",false,"0025", "",""],"6": ["Output_7","0","8","518",false,"0026", "",""],"7": ["Output_8","0","8","519",false,"0027", "",""],"8": ["Output_9","0","8","520",false,"0028", "",""],"9": ["Output_10","0","8","521",false,"0029", "",""],"10": ["Output_11","0","8","522",false,"0030", "",""],"11": ["Output_12","0","8","523",false,"0031", "",""],"12": ["Output_13","0","8","524",false,"0032", "",""],"13": ["Output_14","0","8","525",false,"0033", "",""],"14": ["Output_15","0","8","526",false,"0034", "",""],"15": ["Output_16","0","8","527",false,"0035", "",""],"16": ["Output_17","0","8","528",false,"0036", "",""],"17": ["Output_18","0","8","529",false,"0037", "",""],"18": ["Output_19","0","8","530",false,"0038", "",""],"19": ["Output_20","0","8","531",false,"0039", "",""],"20": ["Dummy_out","not used","3936","532",false,"0041", "",""]},"mem": {}},{"catalogNr": "Virtual01","id": "device_Virtual01_20160818_1_0_001","type": "XXX","productType": "32768","position": "adap.","name": "virt01","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 1139,"inp": {"0": ["Input_1_i04","0","8","0",false,"0000", "",""],"1": ["Input_2_i04","0","8","1",false,"0001", "",""],"2": ["Input_3_i04","0","8","2",false,"0002", "",""],"3": ["Input_4_i04","0","8","3",false,"0003", "",""],"4": ["Input_5_i04","0","8","4",false,"0004", "",""],"5": ["Input_6_i04","0","8","5",false,"0005", "",""],"6": ["Input_7_i04","0","8","6",false,"0006", "",""],"7": ["Input_8_i04","0","8","7",false,"0007", "",""],"8": ["Input_9_i04","0","8","8",false,"0008", "",""],"9": ["Input_10_i04","0","8","9",false,"0009", "",""],"10": ["Input_11_i04","0","8","10",false,"0010", "",""],"11": ["Input_12_i04","0","8","11",false,"0011", "",""],"12": ["Input_13_i04","0","8","12",false,"0012", "",""],"13": ["Input_14_i04","0","8","13",false,"0013", "",""],"14": ["Input_15_i04","0","8","14",false,"0014", "",""],"15": ["Input_16_i04","0","8","15",false,"0015", "",""],"16": ["Input_17_i04","0","8","16",false,"0016", "",""],"17": ["Input_18_i04","0","8","17",false,"0017", "",""],"18": ["Input_19_i04","0","8","18",false,"0018", "",""],"19": ["Input_20_i04","0","8","19",false,"0019", "",""],"20": ["Input_21","0","8","20",false,"0020", "",""],"21": ["Input_22","0","8","21",false,"0021", "",""],"22": ["Input_23","0","8","22",false,"0022", "",""],"23": ["Input_24","0","8","23",false,"0023", "",""],"24": ["Input_25","0","8","24",false,"0024", "",""],"25": ["Input_26","0","8","25",false,"0025", "",""],"26": ["Input_27","0","8","26",false,"0026", "",""],"27": ["Input_28","0","8","27",false,"0027", "",""],"28": ["Input_29","0","8","28",false,"0028", "",""],"29": ["Input_30","0","8","29",false,"0029", "",""],"30": ["Input_31","0","8","30",false,"0030", "",""],"31": ["Input_32","0","8","31",false,"0031", "",""]},"out": {"0": ["Output_1_i04","0","8","32",false,"0032", "",""],"1": ["Output_2_i04","0","8","33",false,"0033", "",""],"2": ["Output_3_i04","0","8","34",false,"0034", "",""],"3": ["Output_4_i04","0","8","35",false,"0035", "",""],"4": ["Output_5_i04","0","8","36",false,"0036", "",""],"5": ["Output_6_i04","0","8","37",false,"0037", "",""],"6": ["Output_7_i04","0","8","38",false,"0038", "",""],"7": ["Output_8_i04","0","8","39",false,"0039", "",""],"8": ["Output_9_i04","0","8","40",false,"0040", "",""],"9": ["Output_10_i04","0","8","41",false,"0041", "",""],"10": ["Output_11_i04","0","8","42",false,"0042", "",""],"11": ["Output_12_i04","0","8","43",false,"0043", "",""],"12": ["Output_13_i04","0","8","44",false,"0044", "",""],"13": ["Output_14_i04","0","8","45",false,"0045", "",""],"14": ["Output_15_i04","0","8","46",false,"0046", "",""],"15": ["Output_16_i04","0","8","47",false,"0047", "",""],"16": ["Output_17_i04","0","8","48",false,"0048", "",""],"17": ["Output_18_i04","0","8","49",false,"0049", "",""],"18": ["Output_19_i04","0","8","50",false,"0050", "",""],"19": ["Output_20_i04","0","8","51",false,"0051", "",""],"20": ["Output_21","0","8","52",false,"0052", "",""],"21": ["Output_22","0","8","53",false,"0053", "",""],"22": ["Output_23","0","8","54",false,"0054", "",""],"23": ["Output_24","0","8","55",false,"0055", "",""],"24": ["Output_25","0","8","56",false,"0056", "",""],"25": ["Output_26","0","8","57",false,"0057", "",""],"26": ["Output_27","0","8","58",false,"0058", "",""],"27": ["Output_28","0","8","59",false,"0059", "",""],"28": ["Output_29","0","8","60",false,"0060", "",""],"29": ["Output_30","0","8","61",false,"0061", "",""],"30": ["Output_31","0","8","62",false,"0062", "",""],"31": ["Output_32","0","8","63",false,"0063", "",""]},"mem": {}},{"catalogNr": "Virtual01","id": "device_Virtual01_20160818_1_0_002","type": "VIRTUAL","productType": "32768","position": "adap.","name": "Virtual Device 32 Byte","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 1203,"inp": {"0": ["Input_1_i05","0","8","0",false,"0000", "",""],"1": ["Input_2_i05","0","8","1",false,"0001", "",""],"2": ["Input_3_i05","0","8","2",false,"0002", "",""],"3": ["Input_4_i05","0","8","3",false,"0003", "",""],"4": ["Input_5_i05","0","8","4",false,"0004", "",""],"5": ["Input_6_i05","0","8","5",false,"0005", "",""],"6": ["Input_7_i05","0","8","6",false,"0006", "",""],"7": ["Input_8_i05","0","8","7",false,"0007", "",""],"8": ["Input_9_i05","0","8","8",false,"0008", "",""],"9": ["Input_10_i05","0","8","9",false,"0009", "",""],"10": ["Input_11_i05","0","8","10",false,"0010", "",""],"11": ["Input_12_i05","0","8","11",false,"0011", "",""],"12": ["Input_13_i05","0","8","12",false,"0012", "",""],"13": ["Input_14_i05","0","8","13",false,"0013", "",""],"14": ["Input_15_i05","0","8","14",false,"0014", "",""],"15": ["Input_16_i05","0","8","15",false,"0015", "",""],"16": ["Input_17_i05","0","8","16",false,"0016", "",""],"17": ["Input_18_i05","0","8","17",false,"0017", "",""],"18": ["Input_19_i05","0","8","18",false,"0018", "",""],"19": ["Input_20_i05","0","8","19",false,"0019", "",""],"20": ["Input_21_i05","0","8","20",false,"0020", "",""],"21": ["Input_22_i05","0","8","21",false,"0021", "",""],"22": ["Input_23_i05","0","8","22",false,"0022", "",""],"23": ["Input_24_i05","0","8","23",false,"0023", "",""],"24": ["Input_25_i05","0","8","24",false,"0024", "",""],"25": ["Input_26_i05","0","8","25",false,"0025", "",""],"26": ["Input_27_i05","0","8","26",false,"0026", "",""],"27": ["Input_28_i05","0","8","27",false,"0027", "",""],"28": ["Input_29_i05","0","8","28",false,"0028", "",""],"29": ["Input_30_i05","0","8","29",false,"0029", "",""],"30": ["Input_31_i05","0","8","30",false,"0030", "",""],"31": ["Input_32_i05","0","8","31",false,"0031", "",""]},"out": {"0": ["Output_1_i05","0","8","32",false,"0032", "",""],"1": ["Output_2_i05","0","8","33",false,"0033", "",""],"2": ["Output_3_i05","0","8","34",false,"0034", "",""],"3": ["Output_4_i05","0","8","35",false,"0035", "",""],"4": ["Output_5_i05","0","8","36",false,"0036", "",""],"5": ["Output_6_i05","0","8","37",false,"0037", "",""],"6": ["Output_7_i05","0","8","38",false,"0038", "",""],"7": ["Output_8_i05","0","8","39",false,"0039", "",""],"8": ["Output_9_i05","0","8","40",false,"0040", "",""],"9": ["Output_10_i05","0","8","41",false,"0041", "",""],"10": ["Output_11_i05","0","8","42",false,"0042", "",""],"11": ["Output_12_i05","0","8","43",false,"0043", "",""],"12": ["Output_13_i05","0","8","44",false,"0044", "",""],"13": ["Output_14_i05","0","8","45",false,"0045", "",""],"14": ["Output_15_i05","0","8","46",false,"0046", "",""],"15": ["Output_16_i05","0","8","47",false,"0047", "",""],"16": ["Output_17_i05","0","8","48",false,"0048", "",""],"17": ["Output_18_i05","0","8","49",false,"0049", "",""],"18": ["Output_19_i05","0","8","50",false,"0050", "",""],"19": ["Output_20_i05","0","8","51",false,"0051", "",""],"20": ["Output_21_i05","0","8","52",false,"0052", "",""],"21": ["Output_22_i05","0","8","53",false,"0053", "",""],"22": ["Output_23_i05","0","8","54",false,"0054", "",""],"23": ["Output_24_i05","0","8","55",false,"0055", "",""],"24": ["Output_25_i05","0","8","56",false,"0056", "",""],"25": ["Output_26_i05","0","8","57",false,"0057", "",""],"26": ["Output_27_i05","0","8","58",false,"0058", "",""],"27": ["Output_28_i05","0","8","59",false,"0059", "",""],"28": ["Output_29_i05","0","8","60",false,"0060", "",""],"29": ["Output_30_i05","0","8","61",false,"0061", "",""],"30": ["Output_31_i05","0","8","62",false,"0062", "",""],"31": ["Output_32_i05","0","8","63",false,"0063", "",""]},"mem": {}},{"catalogNr": "Virtual01","id": "device_Virtual01_20160818_1_0_003","type": "VIRTUAL","productType": "32768","position": "adap.","name": "Virtual Device 32 Byte","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 1267,"inp": {"0": ["Input_1_i06","0","8","0",false,"0000", "",""],"1": ["Input_2_i06","0","8","1",false,"0001", "",""],"2": ["Input_3_i06","0","8","2",false,"0002", "",""],"3": ["Input_4_i06","0","8","3",false,"0003", "",""],"4": ["Input_5_i06","0","8","4",false,"0004", "",""],"5": ["Input_6_i06","0","8","5",false,"0005", "",""],"6": ["Input_7_i06","0","8","6",false,"0006", "",""],"7": ["Input_8_i06","0","8","7",false,"0007", "",""],"8": ["Input_9_i06","0","8","8",false,"0008", "",""],"9": ["Input_10_i06","0","8","9",false,"0009", "",""],"10": ["Input_11_i06","0","8","10",false,"0010", "",""],"11": ["Input_12_i06","0","8","11",false,"0011", "",""],"12": ["Input_13_i06","0","8","12",false,"0012", "",""],"13": ["Input_14_i06","0","8","13",false,"0013", "",""],"14": ["Input_15_i06","0","8","14",false,"0014", "",""],"15": ["Input_16_i06","0","8","15",false,"0015", "",""],"16": ["Input_17_i06","0","8","16",false,"0016", "",""],"17": ["Input_18_i06","0","8","17",false,"0017", "",""],"18": ["Input_19_i06","0","8","18",false,"0018", "",""],"19": ["Input_20_i06","0","8","19",false,"0019", "",""],"20": ["Input_21_i06","0","8","20",false,"0020", "",""],"21": ["Input_22_i06","0","8","21",false,"0021", "",""],"22": ["Input_23_i06","0","8","22",false,"0022", "",""],"23": ["Input_24_i06","0","8","23",false,"0023", "",""],"24": ["Input_25_i06","0","8","24",false,"0024", "",""],"25": ["Input_26_i06","0","8","25",false,"0025", "",""],"26": ["Input_27_i06","0","8","26",false,"0026", "",""],"27": ["Input_28_i06","0","8","27",false,"0027", "",""],"28": ["Input_29_i06","0","8","28",false,"0028", "",""],"29": ["Input_30_i06","0","8","29",false,"0029", "",""],"30": ["Input_31_i06","0","8","30",false,"0030", "",""],"31": ["Input_32_i06","0","8","31",false,"0031", "",""]},"out": {"0": ["Output_1_i06","0","8","32",false,"0032", "",""],"1": ["Output_2_i06","0","8","33",false,"0033", "",""],"2": ["Output_3_i06","0","8","34",false,"0034", "",""],"3": ["Output_4_i06","0","8","35",false,"0035", "",""],"4": ["Output_5_i06","0","8","36",false,"0036", "",""],"5": ["Output_6_i06","0","8","37",false,"0037", "",""],"6": ["Output_7_i06","0","8","38",false,"0038", "",""],"7": ["Output_8_i06","0","8","39",false,"0039", "",""],"8": ["Output_9_i06","0","8","40",false,"0040", "",""],"9": ["Output_10_i06","0","8","41",false,"0041", "",""],"10": ["Output_11_i06","0","8","42",false,"0042", "",""],"11": ["Output_12_i06","0","8","43",false,"0043", "",""],"12": ["Output_13_i06","0","8","44",false,"0044", "",""],"13": ["Output_14_i06","0","8","45",false,"0045", "",""],"14": ["Output_15_i06","0","8","46",false,"0046", "",""],"15": ["Output_16_i06","0","8","47",false,"0047", "",""],"16": ["Output_17_i06","0","8","48",false,"0048", "",""],"17": ["Output_18_i06","0","8","49",false,"0049", "",""],"18": ["Output_19_i06","0","8","50",false,"0050", "",""],"19": ["Output_20_i06","0","8","51",false,"0051", "",""],"20": ["Output_21_i06","0","8","52",false,"0052", "",""],"21": ["Output_22_i06","0","8","53",false,"0053", "",""],"22": ["Output_23_i06","0","8","54",false,"0054", "",""],"23": ["Output_24_i06","0","8","55",false,"0055", "",""],"24": ["Output_25_i06","0","8","56",false,"0056", "",""],"25": ["Output_26_i06","0","8","57",false,"0057", "",""],"26": ["Output_27_i06","0","8","58",false,"0058", "",""],"27": ["Output_28_i06","0","8","59",false,"0059", "",""],"28": ["Output_29_i06","0","8","60",false,"0060", "",""],"29": ["Output_30_i06","0","8","61",false,"0061", "",""],"30": ["Output_31_i06","0","8","62",false,"0062", "",""],"31": ["Output_32_i06","0","8","63",false,"0063", "",""]},"mem": {}}]} \ No newline at end of file diff --git a/tests/common/test_init_modio.py b/tests/common/test_init_modio.py new file mode 100644 index 0000000..a88a6d1 --- /dev/null +++ b/tests/common/test_init_modio.py @@ -0,0 +1,139 @@ +# -*- coding: utf-8 -*- +"""Tests instantiation all local classes.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" + +from os import remove +from os.path import join, dirname +from shutil import copyfile + +import revpimodio2 +from tests import TestRevPiModIO + + +class TestInitModio(TestRevPiModIO): + + data_dir = dirname(__file__) + + def test_init_classes(self): + """Tests instantiation.""" + with self.assertRaises(RuntimeError): + revpimodio2.RevPiModIO( + procimg=self.fh_procimg.name, + configrsc="/opt/KUNBUS/config_lock.rsc", + ) + + # Prepare default args for direct ModIO classes + defaultkwargs = { + "procimg": self.fh_procimg.name, + "configrsc": join(self.data_dir, "config.rsc"), + } + + # Datei an richtigen Ort kopieren und löschen + copyfile(defaultkwargs["configrsc"], "/opt/KUNBUS/config.rsc") + rpi = revpimodio2.RevPiModIO(procimg=self.fh_procimg.name) + del rpi + remove("/opt/KUNBUS/config.rsc") + + # RevPiModIO + rpi = self.modio() + del rpi + rpi = self.modio(autorefresh=True) + rpi.cleanup() + del rpi + rpi = self.modio(monitoring=True) + del rpi + rpi = self.modio(syncoutputs=False) + del rpi + rpi = self.modio(simulator=True) + del rpi + + # Init with old config.rsc and same device names + with self.assertWarnsRegex(Warning, r"equal device name '.*' in pictory configuration."): + rpi = self.modio(configrsc="config_old.rsc") + self.assertEqual(rpi.device.virt01.position, 64) + self.assertEqual(rpi.device["virt01"].position, 64) + self.assertEqual(len(rpi.device), 6) + del rpi + + # Init with unknown DeviceType + with self.assertWarnsRegex(Warning, r"device type 'XXX' on position 64 unknown"): + rpi = self.modio(configrsc="config_unknown.rsc") + self.assertEqual(len(rpi.device), 5) + del rpi + + # Init with empty config + with self.assertRaises(RuntimeError): + self.modio(configrsc="config_empty.rsc") + + # Init with RevPi 1.1 + rpi = self.modio(configrsc="config_rpi11.rsc") + self.assertEqual(len(rpi.device), 4) + del rpi + + # Init with 'null' JSON + rpi = self.modio(configrsc="config_null.rsc") + # notaus_ok null + # motorschutz_ok "null" + self.assertFalse(rpi.io.notaus_ok._defaultvalue) + self.assertFalse(rpi.io.motorschutz_ok._defaultvalue) + # self.assertEqual(len(rpi.device), 4) + del rpi + + # RevPiModIOSelected + rpi = revpimodio2.RevPiModIOSelected([32, 33], **defaultkwargs) + self.assertEqual(2, len(rpi.device)) + del rpi + with self.assertRaises(revpimodio2.errors.DeviceNotFoundError): + # Liste mit einem ungültigen Device als + rpi = revpimodio2.RevPiModIOSelected([32, 10], **defaultkwargs) + with self.assertRaises(revpimodio2.errors.DeviceNotFoundError): + # Ungültiges Device als + rpi = revpimodio2.RevPiModIOSelected(100, **defaultkwargs) + with self.assertRaises(ValueError): + # Ungültiger Devicetype + rpi = revpimodio2.RevPiModIOSelected([True], **defaultkwargs) + + ds = revpimodio2.modio.DevSelect( + "", "productType", (str(revpimodio2.pictory.ProductType.DI),) + ) + rpi = revpimodio2.RevPiModIOSelected(ds, **defaultkwargs) + self.assertEqual(len(rpi.device), 2) + del rpi + + ds = revpimodio2.modio.DevSelect("", "bmk", ("RevPi DO",)) + rpi = revpimodio2.RevPiModIOSelected(ds, **defaultkwargs) + self.assertEqual(len(rpi.device), 2) + del rpi + + # RevPiModIODriver + with self.assertRaises(revpimodio2.errors.DeviceNotFoundError): + # Liste mit einem ungültigen Device als + rpi = revpimodio2.RevPiModIODriver([64, 100], **defaultkwargs) + with self.assertRaises(revpimodio2.errors.DeviceNotFoundError): + # Ungültiges Device als + rpi = revpimodio2.RevPiModIODriver([100], **defaultkwargs) + with self.assertRaises(ValueError): + # Ungültiger Devicetype + rpi = revpimodio2.RevPiModIODriver([True], **defaultkwargs) + + rpi = revpimodio2.RevPiModIODriver(64, **defaultkwargs) + self.assertEqual(1, len(rpi.device)) + del rpi + rpi = revpimodio2.RevPiModIODriver("virt01", **defaultkwargs) + self.assertEqual(1, len(rpi.device)) + del rpi + + # Core ios als bits + rpi = self.modio(configrsc="config_core_bits.json") + del rpi + + # Bad offset + with self.assertWarnsRegex( + Warning, + r"(Device offset ERROR in piCtory configuration!|" + r"is not in the device offset and will be ignored)", + ): + rpi = self.modio(configrsc="config_bad_offset.rsc") + del rpi From 960f21539e8ff835a30cf970b2f4e87fe4b7308a Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Mon, 28 Oct 2024 14:22:37 +0100 Subject: [PATCH 06/26] test: ModIO class basics --- tests/common/config_wrong_tstime.rsc | 1 + tests/common/test_modio_class_basics.py | 92 +++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 tests/common/config_wrong_tstime.rsc create mode 100644 tests/common/test_modio_class_basics.py diff --git a/tests/common/config_wrong_tstime.rsc b/tests/common/config_wrong_tstime.rsc new file mode 100644 index 0000000..3b600d4 --- /dev/null +++ b/tests/common/config_wrong_tstime.rsc @@ -0,0 +1 @@ +{"App":{"name": "PiCtory", "version": "1.3.10","saveTS": "201826","language": "en","layout": {"north":{"size":70,"initClosed":false,"initHidden":false},"south":{"size":420,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":500,"initClosed":false,"initHidden":false}}}},"east":{"size":70,"initClosed":true,"initHidden":false,"children":{}},"west":{"size":200,"initClosed":false,"initHidden":false,"children":{"layout1":{}}}}},"Summary":{"inpTotal": 38,"outTotal": 37},"Devices":[{"GUID": "6ad3c1a4-6870-3bf1-6d55-b9d991ba9dc0","id": "device_RevPiConnect_20171023_1_0_001","type": "BASE","productType": "105","position": "0","name": "RevPi Connect V1.0","bmk": "RevPi Connect V1.0","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPi Connect","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""],"1": ["RevPiIOCycle","0","8","1",true,"0001", "",""],"2": ["RS485ErrorCnt","0","16","2",false,"0002", "",""],"3": ["Core_Temperature","0","8","4",false,"0003", "",""],"4": ["Core_Frequency","0","8","5",false,"0004", "",""]},"out": {"0": ["RevPiLED","0","8","6",true,"0005", "",""],"1": ["RS485ErrorLimit1","10","16","7",false,"0006", "",""],"2": ["RS485ErrorLimit2","1000","16","9",false,"0007", "",""]},"mem": {},"extend": {}},{"GUID": "437fb6d7-6ef6-8fc8-0bf2-f618576e1aca","id": "device_RevPiConBT_20180425_1_0_001","type": "RIGHT","productType": "111","position": "32","name": "Connect Bluetooth","bmk": "Connect Bluetooth","inpVariant": 0,"outVariant": 0,"comment": "","offset": 11,"inp": {},"out": {},"mem": {},"extend": {}},{"GUID": "2e9cd04b-b7e6-715a-4925-82ffbf0ff45e","id": "device_Virtual01_20160818_1_0_001","type": "VIRTUAL","productType": "32768","position": "64","name": "Virtual Device 32 Byte","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 11,"inp": {"0": ["Input_1","0","8","0",false,"0000", "",""],"1": ["Input_2","0","8","1",false,"0001", "",""],"2": ["Input_3","0","8","2",false,"0002", "",""],"3": ["Input_4","0","8","3",false,"0003", "",""],"4": ["Input_5","0","8","4",false,"0004", "",""],"5": ["Input_6","0","8","5",false,"0005", "",""],"6": ["Input_7","0","8","6",false,"0006", "",""],"7": ["Input_8","0","8","7",false,"0007", "",""],"8": ["Input_9","0","8","8",false,"0008", "",""],"9": ["Input_10","0","8","9",false,"0009", "",""],"10": ["Input_11","0","8","10",false,"0010", "",""],"11": ["Input_12","0","8","11",false,"0011", "",""],"12": ["Input_13","0","8","12",false,"0012", "",""],"13": ["Input_14","0","8","13",false,"0013", "",""],"14": ["Input_15","0","8","14",false,"0014", "",""],"15": ["Input_16","0","8","15",false,"0015", "",""],"16": ["Input_17","0","8","16",false,"0016", "",""],"17": ["Input_18","0","8","17",false,"0017", "",""],"18": ["Input_19","0","8","18",false,"0018", "",""],"19": ["Input_20","0","8","19",false,"0019", "",""],"20": ["Input_21","0","8","20",false,"0020", "",""],"21": ["Input_22","0","8","21",false,"0021", "",""],"22": ["Input_23","0","8","22",false,"0022", "",""],"23": ["Input_24","0","8","23",false,"0023", "",""],"24": ["Input_25","0","8","24",false,"0024", "",""],"25": ["Input_26","0","8","25",false,"0025", "",""],"26": ["Input_27","0","8","26",false,"0026", "",""],"27": ["Input_28","0","8","27",false,"0027", "",""],"28": ["Input_29","0","8","28",false,"0028", "",""],"29": ["Input_30","0","8","29",false,"0029", "",""],"30": ["Input_31","0","8","30",false,"0030", "",""],"31": ["Input_32","0","8","31",false,"0031", "",""]},"out": {"0": ["Output_1","0","8","32",false,"0032", "",""],"1": ["Output_2","0","8","33",false,"0033", "",""],"2": ["Output_3","0","8","34",false,"0034", "",""],"3": ["Output_4","0","8","35",false,"0035", "",""],"4": ["Output_5","0","8","36",false,"0036", "",""],"5": ["Output_6","0","8","37",false,"0037", "",""],"6": ["Output_7","0","8","38",false,"0038", "",""],"7": ["Output_8","0","8","39",false,"0039", "",""],"8": ["Output_9","0","8","40",false,"0040", "",""],"9": ["Output_10","0","8","41",false,"0041", "",""],"10": ["Output_11","0","8","42",false,"0042", "",""],"11": ["Output_12","0","8","43",false,"0043", "",""],"12": ["Output_13","0","8","44",false,"0044", "",""],"13": ["Output_14","0","8","45",false,"0045", "",""],"14": ["Output_15","0","8","46",false,"0046", "",""],"15": ["Output_16","0","8","47",false,"0047", "",""],"16": ["Output_17","0","8","48",false,"0048", "",""],"17": ["Output_18","0","8","49",false,"0049", "",""],"18": ["Output_19","0","8","50",false,"0050", "",""],"19": ["Output_20","0","8","51",false,"0051", "",""],"20": ["Output_21","0","8","52",false,"0052", "",""],"21": ["Output_22","0","8","53",false,"0053", "",""],"22": ["Output_23","0","8","54",false,"0054", "",""],"23": ["Output_24","0","8","55",false,"0055", "",""],"24": ["Output_25","0","8","56",false,"0056", "",""],"25": ["Output_26","0","8","57",false,"0057", "",""],"26": ["Output_27","0","8","58",false,"0058", "",""],"27": ["Output_28","0","8","59",false,"0059", "",""],"28": ["Output_29","0","8","60",false,"0060", "",""],"29": ["Output_30","0","8","61",false,"0061", "",""],"30": ["Output_31","0","8","62",false,"0062", "",""],"31": ["Output_32","0","8","63",false,"0063", "",""]},"mem": {},"extend": {}}],"Connections":[]} diff --git a/tests/common/test_modio_class_basics.py b/tests/common/test_modio_class_basics.py new file mode 100644 index 0000000..bbe9811 --- /dev/null +++ b/tests/common/test_modio_class_basics.py @@ -0,0 +1,92 @@ +# -*- coding: utf-8 -*- +"""Tests instantiation all local classes.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" + +import os +from os.path import join, dirname +from signal import SIGINT +from threading import Event + +from tests import TestRevPiModIO + + +class TestModioClassBasics(TestRevPiModIO): + + data_dir = dirname(__file__) + + def test_appclass(self): + """Test the .app class.""" + rpi = self.modio() + self.assertEqual(rpi.app.language, "en") + self.assertEqual(rpi.app.name, "PiCtory") + self.assertEqual(rpi.app.version, "1.2.3") + + self.assertEqual(rpi.app.savets.tm_year, 2017) + self.assertEqual(rpi.app.savets.tm_hour, 12) + del rpi + + # Alte config ohne saveTS + with self.assertWarnsRegex(Warning, r"equal device name '.*' in pictory configuration."): + rpi = self.modio(configrsc="config_old.rsc") + self.assertIsNone(rpi.app.savets) + del rpi + + rpi = self.modio(configrsc="config_wrong_tstime.rsc") + self.assertEqual(rpi.app.savets.tm_year, 1970) + del rpi + + def test_modio_attributes(self): + """Test class attributs of RevPiModIO.""" + rpi = self.modio() + + self.assertEqual(rpi.configrsc, join(self.data_dir, "config.rsc")) + self.assertEqual(rpi.cycletime, 20) + rpi.cycletime = 60 + self.assertEqual(rpi.cycletime, 60) + with self.assertRaises(ValueError): + rpi.cycletime = 4 + with self.assertRaises(ValueError): + rpi.cycletime = 2001 + + self.assertEqual(rpi.ioerrors, 0) + self.assertIs(type(rpi.length), int) + self.assertEqual(rpi.maxioerrors, 0) + rpi.maxioerrors = 200 + self.assertEqual(rpi.maxioerrors, 200) + with self.assertRaises(ValueError): + rpi.maxioerrors = -5 + self.assertEqual(rpi.monitoring, False) + self.assertEqual(rpi.procimg, self.fh_procimg.name) + self.assertEqual(rpi.simulator, False) + self.assertIsNone(rpi.resetioerrors()) + + # Exitevent + with self.assertRaises(RuntimeError): + rpi.handlesignalend(False) + evt_cleanup = Event() + + def test_cleanup_function(): + # Test dummy for cleanup function + evt_cleanup.set() + + rpi.handlesignalend(test_cleanup_function) + os.kill(os.getpid(), SIGINT) + self.assertTrue(evt_cleanup.is_set()) + + def test_procimg(self): + """Test interaction with process image.""" + rpi = self.modio() + + # Procimg IO alle + self.assertIsNone(rpi.setdefaultvalues()) + self.assertEqual(rpi.writeprocimg(), True) + self.assertEqual(rpi.syncoutputs(), True) + self.assertEqual(rpi.readprocimg(), True) + + # Procimg IO device + self.assertIsNone(rpi.device.virt01.setdefaultvalues()) + self.assertEqual(rpi.device.virt01.writeprocimg(), True) + self.assertEqual(rpi.device.virt01.syncoutputs(), True) + self.assertEqual(rpi.device.virt01.readprocimg(), True) From c10f0a2d056f5cc0467b7f739038ff4d8eac7db0 Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Mon, 28 Oct 2024 14:44:55 +0100 Subject: [PATCH 07/26] test: Common device functions --- tests/common/config_new_base.rsc | 1 + tests/common/test_devices.py | 116 +++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 tests/common/config_new_base.rsc create mode 100644 tests/common/test_devices.py diff --git a/tests/common/config_new_base.rsc b/tests/common/config_new_base.rsc new file mode 100644 index 0000000..a7923f3 --- /dev/null +++ b/tests/common/config_new_base.rsc @@ -0,0 +1 @@ +{"App":{"name": "PiCtory", "version": "1.2.5","saveTS": "20171108151243","language": "en","layout": {"north":{"size":70,"initClosed":false,"initHidden":false},"south":{"size":325,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":500,"initClosed":false,"initHidden":false}}}},"east":{"size":0,"initClosed":true,"initHidden":false,"children":{}},"west":{"size":313,"initClosed":false,"initHidden":false,"children":{"layout1":{}}}}},"Summary":{"inpTotal": 618,"outTotal": 567},"Devices":[{"catalogNr": "RevPiCore","GUID": "ae718ac0-90ba-69fb-1a35-06850c1a920e","id": "device_RevPiCore_20170210_1_1_001","type": "BASE","productType": "5","position": "0","name": "revpicore","bmk": "RevPi Core V1.1","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""],"1": ["RevPiIOCycle","0","8","1",true,"0001", "",""],"2": ["RS485ErrorCnt","0","16","2",false,"0002", "",""]},"out": {"0": ["RevPiLED","0","8","4",true,"0003", "",""],"1": ["RS485ErrorLimit1","10","16","5",false,"0004", "",""],"2": ["RS485ErrorLimit2","1000","16","7",false,"0005", "",""]},"mem": {},"extend": {}},{"catalogNr": "RevPiDIO","GUID": "d5f2dbc8-05d9-0a85-4c19-b9cd5d3517a9","id": "device_RevPiDIO_20160818_1_0_001","type": "LEFT_RIGHT","productType": "96","position": "32","name": "dio01","bmk": "RevPi DIO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 9,"inp": {"0": ["t_aus","0","1","0",true,"0000", "","0"],"1": ["t_an","0","1","0",true,"0001", "","1"],"2": ["t_links","0","1","0",true,"0002", "","2"],"3": ["t_rechts","0","1","0",true,"0003", "","3"],"4": ["t_hoch","0","1","0",true,"0004", "","4"],"5": ["t_runter","0","1","0",true,"0005", "","5"],"6": ["t_blau","0","1","0",true,"0006", "","6"],"7": ["t_rot","0","1","0",true,"0007", "","7"],"8": ["I_9","0","1","0",true,"0008", "","8"],"9": ["I_10","0","1","0",true,"0009", "","9"],"10": ["I_11","0","1","0",true,"0010", "","10"],"11": ["I_12","0","1","0",true,"0011", "","11"],"12": ["I_13","0","1","0",true,"0012", "","12"],"13": ["I_14","0","1","0",true,"0013", "","13"],"14": ["I_15","0","1","0",true,"0014", "","14"],"15": ["I_16","0","1","0",true,"0015", "","15"],"16": ["Output_Status","0","16","2",false,"0016", "",""],"17": ["Status","0","16","4",false,"0017", "",""],"18": ["Counter_1","0","32","6",false,"0018", "",""],"19": ["Counter_2","0","32","10",false,"0019", "",""],"20": ["Counter_3","0","32","14",false,"0020", "",""],"21": ["Counter_4","0","32","18",false,"0021", "",""],"22": ["Counter_5","0","32","22",false,"0022", "",""],"23": ["Counter_6","0","32","26",false,"0023", "",""],"24": ["Counter_7","0","32","30",false,"0024", "",""],"25": ["Counter_8","0","32","34",false,"0025", "",""],"26": ["Counter_9","0","32","38",false,"0026", "",""],"27": ["Counter_10","0","32","42",false,"0027", "",""],"28": ["Counter_11","0","32","46",false,"0028", "",""],"29": ["Counter_12","0","32","50",false,"0029", "",""],"30": ["Counter_13","0","32","54",false,"0030", "",""],"31": ["Counter_14","0","32","58",false,"0031", "",""],"32": ["Counter_15","0","32","62",false,"0032", "",""],"33": ["Counter_16","0","32","66",false,"0033", "",""]},"out": {"0": ["h_an","0","1","70",true,"0034", "","0"],"1": ["h_richtung","0","1","70",true,"0035", "","1"],"2": ["h_hoch","0","1","70",true,"0036", "","2"],"3": ["h_runter","0","1","70",true,"0037", "","3"],"4": ["h_blau","0","1","70",true,"0038", "","4"],"5": ["h_rot","0","1","70",true,"0039", "","5"],"6": ["O_7","0","1","70",true,"0040", "","6"],"7": ["O_8","0","1","70",true,"0041", "","7"],"8": ["O_9","0","1","70",true,"0042", "","8"],"9": ["O_10","0","1","70",true,"0043", "","9"],"10": ["O_11","0","1","70",true,"0044", "","10"],"11": ["O_12","0","1","70",true,"0045", "","11"],"12": ["O_13","0","1","70",true,"0046", "","12"],"13": ["O_14","0","1","70",true,"0047", "","13"],"14": ["O_15","0","1","70",true,"0048", "","14"],"15": ["O_16","0","1","70",true,"0049", "","15"],"16": ["PWM_1","0","8","72",false,"0050", "",""],"17": ["PWM_2","0","8","73",false,"0051", "",""],"18": ["PWM_3","0","8","74",false,"0052", "",""],"19": ["PWM_4","0","8","75",false,"0053", "",""],"20": ["PWM_5","0","8","76",false,"0054", "",""],"21": ["PWM_6","0","8","77",false,"0055", "",""],"22": ["PWM_7","0","8","78",false,"0056", "",""],"23": ["PWM_8","0","8","79",false,"0057", "",""],"24": ["PWM_9","0","8","80",false,"0058", "",""],"25": ["PWM_10","0","8","81",false,"0059", "",""],"26": ["PWM_11","0","8","82",false,"0060", "",""],"27": ["PWM_12","0","8","83",false,"0061", "",""],"28": ["PWM_13","0","8","84",false,"0062", "",""],"29": ["PWM_14","0","8","85",false,"0063", "",""],"30": ["PWM_15","0","8","86",false,"0064", "",""],"31": ["PWM_16","0","8","87",false,"0065", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0066", "",""],"1": ["InputMode_2","0","8","89",false,"0067", "",""],"2": ["InputMode_3","0","8","90",false,"0068", "",""],"3": ["InputMode_4","0","8","91",false,"0069", "",""],"4": ["InputMode_5","0","8","92",false,"0070", "",""],"5": ["InputMode_6","0","8","93",false,"0071", "",""],"6": ["InputMode_7","0","8","94",false,"0072", "",""],"7": ["InputMode_8","0","8","95",false,"0073", "",""],"8": ["InputMode_9","0","8","96",false,"0074", "",""],"9": ["InputMode_10","0","8","97",false,"0075", "",""],"10": ["InputMode_11","0","8","98",false,"0076", "",""],"11": ["InputMode_12","0","8","99",false,"0077", "",""],"12": ["InputMode_13","0","8","100",false,"0078", "",""],"13": ["InputMode_14","0","8","101",false,"0079", "",""],"14": ["InputMode_15","0","8","102",false,"0080", "",""],"15": ["InputMode_16","0","8","103",false,"0081", "",""],"16": ["InputDebounce","0","16","104",false,"0082", "",""],"17": ["OutputPushPull","0","16","106",false,"0083", "",""],"18": ["OutputOpenLoadDetect","0","16","108",false,"0084", "",""],"19": ["OutputPWMActive","0","16","110",false,"0085", "",""],"20": ["OutputPWMFrequency","1","8","112",false,"0086", "",""]},"extend": {}},{"catalogNr": "RevPiGateProfinet","GUID": "30558b90-40a4-7eaa-2a50-c7aaa2a8639b","id": "device_RevPiGateProfinet_20160916_1_0_001","type": "EDGE","productType": "79","position": "33","name": "profinet01","bmk": "Gateway Profinet IRT","inpVariant": 0,"outVariant": 0,"comment": "","offset": 122,"inp": {"0": ["Input_1_i06","0","8","0",false,"0000", "",""],"1": ["Input_2_i06","0","8","1",false,"0001", "",""],"2": ["Input_3_i06","0","8","2",false,"0002", "",""],"3": ["Input_4_i06","0","8","3",false,"0003", "",""],"4": ["Input_5_i06","0","8","4",false,"0004", "",""],"5": ["Input_6_i06","0","8","5",false,"0005", "",""],"6": ["Input_7_i06","0","8","6",false,"0006", "",""],"7": ["Input_8_i06","0","8","7",false,"0007", "",""],"8": ["Input_9_i06","0","8","8",false,"0008", "",""],"9": ["Input_10_i06","0","8","9",false,"0009", "",""],"10": ["Input_11_i06","0","8","10",false,"0010", "",""],"11": ["Input_12_i06","0","8","11",false,"0011", "",""],"12": ["Input_13_i06","0","8","12",false,"0012", "",""],"13": ["Input_14_i06","0","8","13",false,"0013", "",""],"14": ["Input_15_i06","0","8","14",false,"0014", "",""],"15": ["Input_16_i06","0","8","15",false,"0015", "",""],"16": ["Input_17_i06","0","8","16",false,"0016", "",""],"17": ["Input_18_i06","0","8","17",false,"0017", "",""],"18": ["Input_19_i06","0","8","18",false,"0018", "",""],"19": ["Input_20_i06","0","8","19",false,"0019", "",""],"20": ["Dummy_in","not used","3936","20",false,"0040", "",""]},"out": {"0": ["Output_1_i06","0","8","512",false,"0020", "",""],"1": ["Output_2_i06","0","8","513",false,"0021", "",""],"2": ["Output_3_i06","0","8","514",false,"0022", "",""],"3": ["Output_4_i06","0","8","515",false,"0023", "",""],"4": ["Output_5_i06","0","8","516",false,"0024", "",""],"5": ["Output_6_i06","0","8","517",false,"0025", "",""],"6": ["Output_7_i06","0","8","518",false,"0026", "",""],"7": ["Output_8_i06","0","8","519",false,"0027", "",""],"8": ["Output_9_i06","0","8","520",false,"0028", "",""],"9": ["Output_10_i06","0","8","521",false,"0029", "",""],"10": ["Output_11_i06","0","8","522",false,"0030", "",""],"11": ["Output_12_i06","0","8","523",false,"0031", "",""],"12": ["Output_13_i06","0","8","524",false,"0032", "",""],"13": ["Output_14_i06","0","8","525",false,"0033", "",""],"14": ["Output_15_i06","0","8","526",false,"0034", "",""],"15": ["Output_16_i06","0","8","527",false,"0035", "",""],"16": ["Output_17_i06","0","8","528",false,"0036", "",""],"17": ["Output_18_i06","0","8","529",false,"0037", "",""],"18": ["Output_19_i06","0","8","530",false,"0038", "",""],"19": ["Output_20_i06","0","8","531",false,"0039", "",""],"20": ["Dummy_out","not used","3936","532",false,"0041", "",""]},"mem": {},"extend": {}},{"catalogNr": "Virtual01","GUID": "18c193b5-b10c-cb9a-39f6-2ae74e294501","id": "device_Virtual01_20160818_1_0_001","type": "VIRTUAL","productType": "32768","position": "64","name": "virt01","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 1146,"inp": {"0": ["Input_1","0","8","0",false,"0000", "",""],"1": ["Input_2","0","8","1",false,"0001", "",""],"2": ["Input_3","0","8","2",false,"0002", "",""],"3": ["Input_4","0","8","3",false,"0003", "",""],"4": ["Input_5","0","8","4",false,"0004", "",""],"5": ["Input_6","0","8","5",false,"0005", "",""],"6": ["Input_7","0","8","6",false,"0006", "",""],"7": ["Input_8","0","8","7",false,"0007", "",""],"8": ["Input_9","0","8","8",false,"0008", "",""],"9": ["Input_10","0","8","9",false,"0009", "",""],"10": ["Input_11","0","8","10",false,"0010", "",""],"11": ["Input_12","0","8","11",false,"0011", "",""],"12": ["Input_13","0","8","12",false,"0012", "",""],"13": ["Input_14","0","8","13",false,"0013", "",""],"14": ["Input_15","0","8","14",false,"0014", "",""],"15": ["Input_16","0","8","15",false,"0015", "",""],"16": ["Input_17","0","8","16",false,"0016", "",""],"17": ["Input_18","0","8","17",false,"0017", "",""],"18": ["Input_19","0","8","18",false,"0018", "",""],"19": ["Input_20","0","8","19",false,"0019", "",""],"20": ["Input_21","0","8","20",false,"0020", "",""],"21": ["Input_22","0","8","21",false,"0021", "",""],"22": ["Input_23","0","8","22",false,"0022", "",""],"23": ["Input_24","0","8","23",false,"0023", "",""],"24": ["Input_25","0","8","24",false,"0024", "",""],"25": ["Input_26","0","8","25",false,"0025", "",""],"26": ["Input_27","0","8","26",false,"0026", "",""],"27": ["Input_28","0","8","27",false,"0027", "",""],"28": ["Input_29","0","8","28",false,"0028", "",""],"29": ["Input_30","0","8","29",false,"0029", "",""],"30": ["Input_31","0","8","30",false,"0030", "",""],"31": ["Input_32","0","8","31",false,"0031", "",""]},"out": {"0": ["Output_1","0","8","32",false,"0032", "",""],"1": ["Output_2","0","8","33",false,"0033", "",""],"2": ["Output_3","0","8","34",false,"0034", "",""],"3": ["Output_4","0","8","35",false,"0035", "",""],"4": ["Output_5","0","8","36",false,"0036", "",""],"5": ["Output_6","0","8","37",false,"0037", "",""],"6": ["Output_7","0","8","38",false,"0038", "",""],"7": ["Output_8","0","8","39",false,"0039", "",""],"8": ["Output_9","0","8","40",false,"0040", "",""],"9": ["Output_10","0","8","41",false,"0041", "",""],"10": ["Output_11","0","8","42",false,"0042", "",""],"11": ["Output_12","0","8","43",false,"0043", "",""],"12": ["Output_13","0","8","44",false,"0044", "",""],"13": ["Output_14","0","8","45",false,"0045", "",""],"14": ["Output_15","0","8","46",false,"0046", "",""],"15": ["Output_16","0","8","47",false,"0047", "",""],"16": ["Output_17","0","8","48",false,"0048", "",""],"17": ["Output_18","0","8","49",false,"0049", "",""],"18": ["Output_19","0","8","50",false,"0050", "",""],"19": ["Output_20","0","8","51",false,"0051", "",""],"20": ["Output_21","0","8","52",false,"0052", "",""],"21": ["Output_22","0","8","53",false,"0053", "",""],"22": ["Output_23","0","8","54",false,"0054", "",""],"23": ["Output_24","0","8","55",false,"0055", "",""],"24": ["Output_25","0","8","56",false,"0056", "",""],"25": ["Output_26","0","8","57",false,"0057", "",""],"26": ["Output_27","0","8","58",false,"0058", "",""],"27": ["Output_28","0","8","59",false,"0059", "",""],"28": ["Output_29","0","8","60",false,"0060", "",""],"29": ["Output_30","0","8","61",false,"0061", "",""],"30": ["Output_31","0","8","62",false,"0062", "",""],"31": ["Output_32","0","8","63",false,"0063", "",""]},"mem": {},"extend": {}}],"Connections":[]} diff --git a/tests/common/test_devices.py b/tests/common/test_devices.py new file mode 100644 index 0000000..9bcccc9 --- /dev/null +++ b/tests/common/test_devices.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +"""Tests instantiation all local classes.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" + +from os.path import dirname + +from revpimodio2 import OUT, MEM, INP +from revpimodio2.device import Virtual, Base +from tests import TestRevPiModIO + + +class TestDevicesModule(TestRevPiModIO): + data_dir = dirname(__file__) + + def test_device(self): + """Test device attributes.""" + rpi = self.modio() + + self.assertEqual(rpi.device[64].name, "virt01") + self.assertEqual(rpi.device.virt01.length, 64) + self.assertEqual(rpi.device.virt01.name, "virt01") + self.assertIsInstance(rpi.device.virt01.offset, int) + self.assertEqual(rpi.device.virt01.position, 64) + self.assertEqual(rpi.device.virt01.producttype, 32768) + + # Magic + self.assertEqual("virt01" in rpi.device, True) + self.assertEqual("nixnix" in rpi.device, False) + self.assertEqual(64 in rpi.device, True) + self.assertEqual(128 in rpi.device, False) + self.assertEqual(rpi.device.virt01 in rpi.device, True) + self.assertIsInstance(bytes(rpi.device.virt01), bytes) + + # We have 7 devices in config.rsc file + self.assertEqual(len(rpi.device), 7) + + def test_devs_and_ios(self): + """Test IO grouping of devices.""" + rpi = self.modio() + + self.assertEqual(len(rpi.device.virt01), 64) + + # getIOs + self.assertIsInstance(rpi.device.aio01.get_inputs(), list) + self.assertIsInstance(rpi.device.aio01.get_outputs(), list) + self.assertIsInstance(rpi.device.aio01.get_memories(), list) + int_inputs = len(rpi.device.aio01.get_inputs()) + int_output = len(rpi.device.aio01.get_outputs()) + + self.assertIsInstance(rpi.device.aio01.get_allios(), list) + self.assertEqual(len(rpi.device.aio01.get_allios()), int_inputs + int_output) + + # IO Byte vergleichen + int_byte = 0 + for devio in [rpi.device.aio01.get_allios(), rpi.device.aio01.get_memories()]: + for io in devio: + int_byte += io.length + self.assertEqual(len(rpi.device.aio01), int_byte) + + # Test the types of IOs + len_end = 0 + len_start = len_end + for io in rpi.device.aio01.get_inputs(): + self.assertEqual(io.type, INP) + len_end += io.length + self.assertEqual(len_start, rpi.device.aio01._slc_inp.start) + self.assertEqual(len_end, rpi.device.aio01._slc_inp.stop) + + len_start = len_end + for io in rpi.device.aio01.get_outputs(): + self.assertEqual(io.type, OUT) + len_end += io.length + self.assertEqual(len_start, rpi.device.aio01._slc_out.start) + self.assertEqual(len_end, rpi.device.aio01._slc_out.stop) + + len_start = len_end + for io in rpi.device.aio01.get_memories(): + self.assertEqual(io.type, MEM) + len_end += io.length + self.assertEqual(len_start, rpi.device.aio01._slc_mem.start) + self.assertEqual(len_end, rpi.device.aio01._slc_mem.stop) + + def test_device_modifications(self): + """Test device modifications.""" + rpi = self.modio() + + # Zugriffe + self.assertIsInstance(rpi.device.virt01, Virtual) + self.assertIsInstance(rpi.device["virt01"], Virtual) + + # IO-Abfragen + self.assertEqual("pbit0_7" in rpi.device.virt01, True) + self.assertEqual(rpi.io.pbit0_7 in rpi.device.virt01, True) + self.assertEqual(33 in rpi.device.virt01, False) + self.assertEqual(552 in rpi.device.virt01, True) + + # Löschen + del rpi.device.virt01 + with self.assertRaises(AttributeError): + rpi.device.virt01 + self.assertEqual(rpi.device[0].name, "picore01") + del rpi.device[0] + with self.assertRaises(IndexError): + rpi.device[0] + with self.assertRaises(AttributeError): + rpi.device.picore01 + + del rpi.device[rpi.device.di01] + + def test_new_basedevice(self): + """Test unknown (new) base device.""" + rpi = self.modio(configrsc="config_new_base.rsc") + self.assertEqual(type(rpi.device[0]), Base) + del rpi From 4c643876492a7b406fe9b9aa114ee741d371332a Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Mon, 28 Oct 2024 15:02:04 +0100 Subject: [PATCH 08/26] test: Replace io function --- tests/replace_io/test_replace_io.py | 104 +++++++++++++++++++++++++++- 1 file changed, 103 insertions(+), 1 deletion(-) diff --git a/tests/replace_io/test_replace_io.py b/tests/replace_io/test_replace_io.py index 2919cb1..0b7ca65 100644 --- a/tests/replace_io/test_replace_io.py +++ b/tests/replace_io/test_replace_io.py @@ -6,6 +6,7 @@ __license__ = "GPLv2" from os.path import join, dirname +from revpimodio2.io import IntIOReplaceable from tests import TestRevPiModIO @@ -13,6 +14,107 @@ class TestReplaceIO(TestRevPiModIO): data_dir = dirname(__file__) + def test_replacing(self): + """Test replacing IOs.""" + rpi = self.modio() + + # Test type of IOs on an virtual device + for io in rpi.device.virt01: + self.assertIsInstance(io, IntIOReplaceable) + + # Try to replace hardware IO + with self.assertRaises(AttributeError): + rpi.io.v_druck.replace_io("test2", frm="?") + + rpi.io.pbit0_7.replace_io("test4", frm="?", bit=4) + rpi.io.pbit0_7.replace_io("test5", frm="?", bit=5, byteorder="big") + self.assertFalse(rpi.io.test4()) + self.assertFalse(rpi.io.test4.value) + with self.assertRaises(MemoryError): + rpi.io.pbit0_7.replace_io("test4_2", frm="?", bit=4) + + with self.assertRaises(ValueError): + rpi.io.meldung0_7.replace_io("outtest", "?", bit=100) + with self.assertRaises(ValueError): + rpi.io.meldung0_7.replace_io("outtest", "?", byteorder="test") + + # Work with default values + rpi.io.meldung0_7.replace_io("outtest", "?", defaultvalue=True) + self.assertTrue(rpi.io.outtest.defaultvalue) + self.assertFalse(rpi.io.outtest.value) + rpi.io.outtest.value = True + self.assertTrue(rpi.io.outtest.value) + rpi.io.outtest.value = False + + # Apply given default values + rpi.setdefaultvalues() + self.assertTrue(rpi.io.outtest.value) + + with self.assertRaises(ValueError): + rpi.io.pbit8_15.replace_io("test2", frm="hf") + + rpi.io.pbit8_15.replace_io("test2", frm="h") + rpi.io.meldung8_15.replace_io( + "testmeldung1", + frm="h", + byteorder="big", + event=lambda io_name, io_value: None, + ) + with self.assertRaises(MemoryError): + rpi.io.meldung0_7.replace_io("testmeldung2", frm="h", byteorder="big") + with self.assertRaises(TypeError): + rpi.io._private_register_new_io_object(None) + with self.assertRaises(AttributeError): + rpi.io.testmeldung1.replace_io("testx", frm="?") + + self.assertEqual(rpi.io.testmeldung1.defaultvalue, 0) + self.assertEqual(rpi.io.testmeldung1.frm, "h") + self.assertTrue(rpi.io.testmeldung1.signed) + self.assertEqual(rpi.io.testmeldung1.value, 0) + + # Set value + rpi.io.testmeldung1.value = 200 + self.assertEqual(rpi.io.testmeldung1(), 200) + rpi.io.testmeldung1(100) + self.assertEqual(rpi.io.testmeldung1.value, 100) + + with self.assertRaises(BufferError): + rpi.io.Output_32.replace_io("test", "h") + + # Byte value with default value + with self.assertRaises(ValueError): + rpi.io.Output_9.replace_io("drehzahl", "H", defaultvalue=b"\x00\x00\x00") + with self.assertRaises(ValueError): + rpi.io.Output_9.replace_io("drehzahl", "H", defaultvalue=b"\x00") + rpi.io.Output_9.replace_io("drehzahl", "H", defaultvalue=b"\xff\xff") + self.assertEqual(rpi.io.drehzahl.frm, "H") + self.assertFalse(rpi.io.drehzahl.signed) + self.assertEqual(rpi.io.drehzahl.defaultvalue, 65535) + self.assertEqual(rpi.io.drehzahl.value, 0) + rpi.setdefaultvalues() + self.assertEqual(rpi.io.drehzahl.value, 65535) + + # Bit value with defaultvalue + rpi.io.Output_11._defaultvalue = b"\x02" + rpi.io.Output_11.replace_io("bitwert0", "?", bit=0) + rpi.io.Output_11.replace_io("bitwert1", "?", bit=1) + self.assertFalse(rpi.io.bitwert0.defaultvalue) + self.assertTrue(rpi.io.bitwert1.defaultvalue) + + # Multi bytes + with self.assertRaises(ValueError): + rpi.io.Output_11.replace_io("mehrbyte", "ss") + rpi.io.Output_11.replace_io("mehrbyte", "4s") + self.assertEqual(rpi.io.mehrbyte.length, 4) + self.assertEqual(rpi.io.mehrbyte.frm, "4s") + self.assertEqual(rpi.io.mehrbyte.value, b"\x00\x00\x00\x00") + rpi.io.mehrbyte.value = b"\xff\xff\xff\xff" + self.assertEqual(rpi.io.mehrbyte.value, b"\xff\xff\xff\xff") + + # String defaultvalue (Encoding erros are filled with \x00) + rpi.io.Output_15.replace_io("string", "4s", defaultvalue="t\xffst") + self.assertEqual(rpi.io.string.value, b"\x00\x00\x00\x00") + def test_replace_io_file(self): replace_io_file = join(self.data_dir, "replace_io.conf") rpi = self.modio(replace_io_file=replace_io_file) @@ -44,7 +146,7 @@ class TestReplaceIO(TestRevPiModIO): self.assertTrue(rpi.io.byte_test.export) self.assertEqual(rpi.io.byte_test.defaultvalue, b"\xff\x00\x80") - def test_fb_replace_io_fail(self): + def test_replace_io_file_fail(self): with self.assertRaises(RuntimeError): rpi = self.modio(replace_io_file=join(self.data_dir, "replace_io_fail.conf")) with self.assertRaises(RuntimeError): From f95b2d6c497d1e9d335bbf27b2d792c031777d5b Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Mon, 28 Oct 2024 15:01:10 +0100 Subject: [PATCH 09/26] test: Basic IO functions --- tests/io_tests/config.rsc | 1 + tests/io_tests/test_io_functions.py | 97 +++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 tests/io_tests/config.rsc create mode 100644 tests/io_tests/test_io_functions.py diff --git a/tests/io_tests/config.rsc b/tests/io_tests/config.rsc new file mode 100644 index 0000000..de4cbbc --- /dev/null +++ b/tests/io_tests/config.rsc @@ -0,0 +1 @@ +{"App":{"name": "PiCtory", "version": "1.2.3","saveTS": "20170826120906","language": "en","layout": {"north":{"size":70,"initClosed":false,"initHidden":false},"south":{"size":480,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":500,"initClosed":false,"initHidden":false}}}},"east":{"size":70,"initClosed":true,"initHidden":false,"children":{"layout1":{"north":{"size":100,"initClosed":false,"initHidden":false},"south":{"size":98,"initClosed":false,"initHidden":false}}}},"west":{"size":200,"initClosed":false,"initHidden":false,"children":{"layout1":{}}}}},"Summary":{"inpTotal": 338,"outTotal": 113},"Devices":[{"catalogNr": "RevPiCore","GUID": "4ebb85e8-92ea-415d-b191-cc58c2857c0a","id": "device_RevPiCore_20170404_1_2_001","type": "BASE","productType": "95","position": "0","name": "picore01","bmk": "RevPi Core V1.2","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""],"1": ["RevPiIOCycle","0","8","1",true,"0001", "",""],"2": ["RS485ErrorCnt","0","16","2",false,"0002", "",""],"3": ["Core_Temperatur","0","8","4",false,"0003", "",""],"4": ["Core_Frequency","0","8","5",false,"0004", "",""]},"out": {"0": ["RevPiLED","0","8","6",true,"0005", "",""],"1": ["RS485ErrorLimit1","10","16","7",false,"0006", "",""],"2": ["RS485ErrorLimit2","1000","16","9",false,"0007", "",""]},"mem": {},"extend": {}},{"catalogNr": "RevPiDI","GUID": "2e2c089e-6bef-14c0-852b-41b7cf48d846","id": "device_RevPiDI_20160818_1_0_001","type": "LEFT_RIGHT","productType": "97","position": "32","name": "di01","bmk": "RevPi DI","inpVariant": 0,"outVariant": 0,"comment": "","offset": 11,"inp": {"0": ["notaus_ok","0","1","0",true,"0000", "","0"],"1": ["motorschutz_ok","0","1","0",true,"0001", "","1"],"2": ["fu_ok","0","1","0",true,"0002", "","2"],"3": ["fu_motoran","0","1","0",true,"0003", "","3"],"4": ["I_5","0","1","0",true,"0004", "","4"],"5": ["I_6","0","1","0",true,"0005", "","5"],"6": ["I_7","0","1","0",true,"0006", "","6"],"7": ["I_8","0","1","0",true,"0007", "","7"],"8": ["t_automatik","0","1","0",true,"0008", "","8"],"9": ["t_start","0","1","0",true,"0009", "","9"],"10": ["t_stop","0","1","0",true,"0010", "","10"],"11": ["t_quit","0","1","0",true,"0011", "","11"],"12": ["t_notaus","0","1","0",true,"0012", "","12"],"13": ["I_14","0","1","0",true,"0013", "","13"],"14": ["I_15","0","1","0",true,"0014", "","14"],"15": ["I_16","0","1","0",true,"0015", "","15"],"16": ["Status","0","16","4",false,"0016", "",""],"17": ["Counter_1","0","32","6",false,"0017", "",""],"18": ["Counter_2","0","32","10",false,"0018", "",""],"19": ["Counter_3","0","32","14",false,"0019", "",""],"20": ["Counter_4","0","32","18",false,"0020", "",""],"21": ["Counter_5","0","32","22",false,"0021", "",""],"22": ["Counter_6","0","32","26",false,"0022", "",""],"23": ["Counter_7","0","32","30",false,"0023", "",""],"24": ["Counter_8","0","32","34",false,"0024", "",""],"25": ["Counter_9","0","32","38",false,"0025", "",""],"26": ["Counter_10","0","32","42",false,"0026", "",""],"27": ["Counter_11","0","32","46",false,"0027", "",""],"28": ["Counter_12","0","32","50",false,"0028", "",""],"29": ["Counter_13","0","32","54",false,"0029", "",""],"30": ["Counter_14","0","32","58",false,"0030", "",""],"31": ["Counter_15","0","32","62",false,"0031", "",""],"32": ["Counter_16","0","32","66",false,"0032", "",""],"33": ["Output_Status","0","16","2",false,"0050", "",""]},"out": {"0": ["Output","0","16","70",false,"0051", "",""],"1": ["PWM_1","0","8","72",false,"0052", "",""],"2": ["PWM_2","0","8","73",false,"0053", "",""],"3": ["PWM_3","0","8","74",false,"0054", "",""],"4": ["PWM_4","0","8","75",false,"0055", "",""],"5": ["PWM_5","0","8","76",false,"0056", "",""],"6": ["PWM_6","0","8","77",false,"0057", "",""],"7": ["PWM_7","0","8","78",false,"0058", "",""],"8": ["PWM_8","0","8","79",false,"0059", "",""],"9": ["PWM_9","0","8","80",false,"0060", "",""],"10": ["PWM_10","0","8","81",false,"0061", "",""],"11": ["PWM_11","0","8","82",false,"0062", "",""],"12": ["PWM_12","0","8","83",false,"0063", "",""],"13": ["PWM_13","0","8","84",false,"0064", "",""],"14": ["PWM_14","0","8","85",false,"0065", "",""],"15": ["PWM_15","0","8","86",false,"0066", "",""],"16": ["PWM_16","0","8","87",false,"0067", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0033", "",""],"1": ["InputMode_2","0","8","89",false,"0034", "",""],"2": ["InputMode_3","0","8","90",false,"0035", "",""],"3": ["InputMode_4","0","8","91",false,"0036", "",""],"4": ["InputMode_5","0","8","92",false,"0037", "",""],"5": ["InputMode_6","0","8","93",false,"0038", "",""],"6": ["InputMode_7","0","8","94",false,"0039", "",""],"7": ["InputMode_8","0","8","95",false,"0040", "",""],"8": ["InputMode_9","0","8","96",false,"0041", "",""],"9": ["InputMode_10","0","8","97",false,"0042", "",""],"10": ["InputMode_11","0","8","98",false,"0043", "",""],"11": ["InputMode_12","0","8","99",false,"0044", "",""],"12": ["InputMode_13","0","8","100",false,"0045", "",""],"13": ["InputMode_14","0","8","101",false,"0046", "",""],"14": ["InputMode_15","0","8","102",false,"0047", "",""],"15": ["InputMode_16","0","8","103",false,"0048", "",""],"16": ["InputDebounce","0","16","104",false,"0049", "",""],"17": ["OutputPushPull","0","16","106",false,"0068", "",""],"18": ["OutputOpenLoadDetect","0","16","108",false,"0069", "",""],"19": ["OutputPWMActive","0","16","110",false,"0070", "",""],"20": ["OutputPWMFrequency","2","8","112",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDI","GUID": "81e6c459-0398-a7c4-4954-d793ee9a5b89","id": "device_RevPiDI_20160818_1_0_002","type": "LEFT_RIGHT","productType": "97","position": "33","name": "di02","bmk": "RevPi DI","inpVariant": 0,"outVariant": 0,"comment": "","offset": 124,"inp": {"0": ["m_druck_ok","0","1","0",true,"0000", "","0"],"1": ["m_m1_eingefahren","0","1","0",true,"0001", "","1"],"2": ["m_m1_ausgefahren","0","1","0",true,"0002", "","2"],"3": ["m_m2_eingefahren","0","1","0",true,"0003", "","3"],"4": ["m_m2_ausgefahren","0","1","0",true,"0004", "","4"],"5": ["m_m3_eingefahren","0","1","0",true,"0005", "","5"],"6": ["m_m3_ausgefahren","0","1","0",true,"0006", "","6"],"7": ["s_rutsche","0","1","0",true,"0007", "","7"],"8": ["s_metall","0","1","0",true,"0008", "","8"],"9": ["s_magazin1","0","1","0",true,"0009", "","9"],"10": ["s_magazin2","0","1","0",true,"0010", "","10"],"11": ["I_12_i03","0","1","0",true,"0011", "","11"],"12": ["I_13_i03","0","1","0",true,"0012", "","12"],"13": ["I_14_i03","0","1","0",true,"0013", "","13"],"14": ["I_15_i03","0","1","0",true,"0014", "","14"],"15": ["mb_status","0","1","0",true,"0015", "","15"],"16": ["Status_i03","0","16","4",false,"0016", "",""],"17": ["Counter_1_i03","0","32","6",false,"0017", "",""],"18": ["Counter_2_i03","0","32","10",false,"0018", "",""],"19": ["Counter_3_i03","0","32","14",false,"0019", "",""],"20": ["Counter_4_i03","0","32","18",false,"0020", "",""],"21": ["Counter_5_i03","0","32","22",false,"0021", "",""],"22": ["Counter_6_i03","0","32","26",false,"0022", "",""],"23": ["Counter_7_i03","0","32","30",false,"0023", "",""],"24": ["Counter_8_i03","0","32","34",false,"0024", "",""],"25": ["Counter_9_i03","0","32","38",false,"0025", "",""],"26": ["Counter_10_i03","0","32","42",false,"0026", "",""],"27": ["Counter_11_i03","0","32","46",false,"0027", "",""],"28": ["Counter_12_i03","0","32","50",false,"0028", "",""],"29": ["Counter_13_i03","0","32","54",false,"0029", "",""],"30": ["Counter_14_i03","0","32","58",false,"0030", "",""],"31": ["Counter_15_i03","0","32","62",false,"0031", "",""],"32": ["Counter_16_i03","0","32","66",false,"0032", "",""],"33": ["Output_Status_i03","0","16","2",false,"0050", "",""]},"out": {"0": ["Output_i03","0","16","70",false,"0051", "",""],"1": ["PWM_1_i03","0","8","72",false,"0052", "",""],"2": ["PWM_2_i03","0","8","73",false,"0053", "",""],"3": ["PWM_3_i03","0","8","74",false,"0054", "",""],"4": ["PWM_4_i03","0","8","75",false,"0055", "",""],"5": ["PWM_5_i03","0","8","76",false,"0056", "",""],"6": ["PWM_6_i03","0","8","77",false,"0057", "",""],"7": ["PWM_7_i03","0","8","78",false,"0058", "",""],"8": ["PWM_8_i03","0","8","79",false,"0059", "",""],"9": ["PWM_9_i03","0","8","80",false,"0060", "",""],"10": ["PWM_10_i03","0","8","81",false,"0061", "",""],"11": ["PWM_11_i03","0","8","82",false,"0062", "",""],"12": ["PWM_12_i03","0","8","83",false,"0063", "",""],"13": ["PWM_13_i03","0","8","84",false,"0064", "",""],"14": ["PWM_14_i03","0","8","85",false,"0065", "",""],"15": ["PWM_15_i03","0","8","86",false,"0066", "",""],"16": ["PWM_16_i03","0","8","87",false,"0067", "",""]},"mem": {"0": ["InputMode_1_i03","0","8","88",false,"0033", "",""],"1": ["InputMode_2_i03","0","8","89",false,"0034", "",""],"2": ["InputMode_3_i03","0","8","90",false,"0035", "",""],"3": ["InputMode_4_i03","0","8","91",false,"0036", "",""],"4": ["InputMode_5_i03","0","8","92",false,"0037", "",""],"5": ["InputMode_6_i03","0","8","93",false,"0038", "",""],"6": ["InputMode_7_i03","0","8","94",false,"0039", "",""],"7": ["InputMode_8_i03","0","8","95",false,"0040", "",""],"8": ["InputMode_9_i03","0","8","96",false,"0041", "",""],"9": ["InputMode_10_i03","0","8","97",false,"0042", "",""],"10": ["InputMode_11_i03","0","8","98",false,"0043", "",""],"11": ["InputMode_12_i03","0","8","99",false,"0044", "",""],"12": ["InputMode_13_i03","0","8","100",false,"0045", "",""],"13": ["InputMode_14_i03","0","8","101",false,"0046", "",""],"14": ["InputMode_15_i03","0","8","102",false,"0047", "",""],"15": ["InputMode_16_i03","0","8","103",false,"0048", "",""],"16": ["InputDebounce_i03","0","16","104",false,"0049", "",""],"17": ["OutputPushPull_i03","0","16","106",false,"0068", "",""],"18": ["OutputOpenLoadDetect_i03","0","16","108",false,"0069", "",""],"19": ["OutputPWMActive_i03","0","16","110",false,"0070", "",""],"20": ["OutputPWMFrequency_i03","2","8","112",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDO","GUID": "4f8da9ea-91b2-d028-c60d-4476096a9dc2","id": "device_RevPiDO_20160818_1_0_001","type": "LEFT_RIGHT","productType": "98","position": "34","name": "do01","bmk": "RevPi DO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 237,"inp": {"0": ["Output_Status_i04","0","16","2",false,"0000", "",""],"1": ["Status_i04","0","16","4",false,"0001", "",""],"2": ["Input","0","16","0",false,"0038", "",""],"3": ["Counter_1_i04","0","32","6",false,"0039", "",""],"4": ["Counter_2_i04","0","32","10",false,"0040", "",""],"5": ["Counter_3_i04","0","32","14",false,"0041", "",""],"6": ["Counter_4_i04","0","32","18",false,"0042", "",""],"7": ["Counter_5_i04","0","32","22",false,"0043", "",""],"8": ["Counter_6_i04","0","32","26",false,"0044", "",""],"9": ["Counter_7_i04","0","32","30",false,"0045", "",""],"10": ["Counter_8_i04","0","32","34",false,"0046", "",""],"11": ["Counter_9_i04","0","32","38",false,"0047", "",""],"12": ["Counter_10_i04","0","32","42",false,"0048", "",""],"13": ["Counter_11_i04","0","32","46",false,"0049", "",""],"14": ["Counter_12_i04","0","32","50",false,"0050", "",""],"15": ["Counter_13_i04","0","32","54",false,"0051", "",""],"16": ["Counter_14_i04","0","32","58",false,"0052", "",""],"17": ["Counter_15_i04","0","32","62",false,"0053", "",""],"18": ["Counter_16_i04","0","32","66",false,"0054", "",""]},"out": {"0": ["fu_rechts","0","1","70",true,"0002", "","0"],"1": ["fu_links","0","1","70",true,"0003", "","1"],"2": ["fu_schnell","0","1","70",true,"0004", "","2"],"3": ["fu_lahm","0","1","70",true,"0005", "","3"],"4": ["v_druck","0","1","70",true,"0006", "","4"],"5": ["v_m1_einfahren","0","1","70",true,"0007", "","5"],"6": ["v_m1_ausfahren","0","1","70",true,"0008", "","6"],"7": ["v_m2_einfahren","0","1","70",true,"0009", "","7"],"8": ["v_m2_ausfahren","0","1","70",true,"0010", "","8"],"9": ["v_m3_einfahren","0","1","70",true,"0011", "","9"],"10": ["v_m3_ausfahren","0","1","70",true,"0012", "","10"],"11": ["O_12","0","1","70",true,"0013", "","11"],"12": ["O_13","0","1","70",true,"0014", "","12"],"13": ["O_14","0","1","70",true,"0015", "","13"],"14": ["O_15","0","1","70",true,"0016", "","14"],"15": ["fu_frei","0","1","70",true,"0017", "","15"],"16": ["PWM_1_i04","0","8","72",false,"0018", "",""],"17": ["PWM_2_i04","0","8","73",false,"0019", "",""],"18": ["PWM_3_i04","0","8","74",false,"0020", "",""],"19": ["PWM_4_i04","0","8","75",false,"0021", "",""],"20": ["PWM_5_i04","0","8","76",false,"0022", "",""],"21": ["PWM_6_i04","0","8","77",false,"0023", "",""],"22": ["PWM_7_i04","0","8","78",false,"0024", "",""],"23": ["PWM_8_i04","0","8","79",false,"0025", "",""],"24": ["PWM_9_i04","0","8","80",false,"0026", "",""],"25": ["PWM_10_i04","0","8","81",false,"0027", "",""],"26": ["PWM_11_i04","0","8","82",false,"0028", "",""],"27": ["PWM_12_i04","0","8","83",false,"0029", "",""],"28": ["PWM_13_i04","0","8","84",false,"0030", "",""],"29": ["PWM_14_i04","0","8","85",false,"0031", "",""],"30": ["PWM_15_i04","0","8","86",false,"0032", "",""],"31": ["PWM_16_i04","0","8","87",false,"0033", "",""]},"mem": {"0": ["OutputPushPull_i04","0","16","106",false,"0034", "",""],"1": ["OutputOpenLoadDetect_i04","0","16","108",false,"0035", "",""],"2": ["OutputPWMActive_i04","0","16","110",false,"0036", "",""],"3": ["OutputPWMFrequency_i04","1","8","112",false,"0037", "",""],"4": ["InputMode_1_i04","0","8","88",false,"0055", "",""],"5": ["InputMode_2_i04","0","8","89",false,"0056", "",""],"6": ["InputMode_3_i04","0","8","90",false,"0057", "",""],"7": ["InputMode_4_i04","0","8","91",false,"0058", "",""],"8": ["InputMode_5_i04","0","8","92",false,"0059", "",""],"9": ["InputMode_6_i04","0","8","93",false,"0060", "",""],"10": ["InputMode_7_i04","0","8","94",false,"0061", "",""],"11": ["InputMode_8_i04","0","8","95",false,"0062", "",""],"12": ["InputMode_9_i04","0","8","96",false,"0063", "",""],"13": ["InputMode_10_i04","0","8","97",false,"0064", "",""],"14": ["InputMode_11_i04","0","8","98",false,"0065", "",""],"15": ["InputMode_12_i04","0","8","99",false,"0066", "",""],"16": ["InputMode_13_i04","0","8","100",false,"0067", "",""],"17": ["InputMode_14_i04","0","8","101",false,"0068", "",""],"18": ["InputMode_15_i04","0","8","102",false,"0069", "",""],"19": ["InputMode_16_i04","0","8","103",false,"0070", "",""],"20": ["InputDebounce_i04","0","16","104",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDO","GUID": "b8a70c62-9b91-9e1a-af2a-37f74b16aca2","id": "device_RevPiDO_20160818_1_0_002","type": "LEFT_RIGHT","productType": "98","position": "35","name": "do02","bmk": "RevPi DO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 350,"inp": {"0": ["Output_Status_i05","0","16","2",false,"0000", "",""],"1": ["Status_i05","0","16","4",false,"0001", "",""],"2": ["Input_i05","0","16","0",false,"0038", "",""],"3": ["Counter_1_i05","0","32","6",false,"0039", "",""],"4": ["Counter_2_i05","0","32","10",false,"0040", "",""],"5": ["Counter_3_i05","0","32","14",false,"0041", "",""],"6": ["Counter_4_i05","0","32","18",false,"0042", "",""],"7": ["Counter_5_i05","0","32","22",false,"0043", "",""],"8": ["Counter_6_i05","0","32","26",false,"0044", "",""],"9": ["Counter_7_i05","0","32","30",false,"0045", "",""],"10": ["Counter_8_i05","0","32","34",false,"0046", "",""],"11": ["Counter_9_i05","0","32","38",false,"0047", "",""],"12": ["Counter_10_i05","0","32","42",false,"0048", "",""],"13": ["Counter_11_i05","0","32","46",false,"0049", "",""],"14": ["Counter_12_i05","0","32","50",false,"0050", "",""],"15": ["Counter_13_i05","0","32","54",false,"0051", "",""],"16": ["Counter_14_i05","0","32","58",false,"0052", "",""],"17": ["Counter_15_i05","0","32","62",false,"0053", "",""],"18": ["Counter_16_i05","0","32","66",false,"0054", "",""]},"out": {"0": ["fu_reset","0","1","70",true,"0002", "","0"],"1": ["h_start","0","1","70",true,"0003", "","1"],"2": ["h_fehler","0","1","70",true,"0004", "","2"],"3": ["O_04_i05","0","1","70",true,"0005", "","3"],"4": ["O_05_i05","0","1","70",true,"0006", "","4"],"5": ["O_06_i05","0","1","70",true,"0007", "","5"],"6": ["O_07_i05","0","1","70",true,"0008", "","6"],"7": ["O_08_i05","0","1","70",true,"0009", "","7"],"8": ["O_09_i05","0","1","70",true,"0010", "","8"],"9": ["O_10_i05","0","1","70",true,"0011", "","9"],"10": ["O_11_i05","0","1","70",true,"0012", "","10"],"11": ["O_12_i05","0","1","70",true,"0013", "","11"],"12": ["O_13_i05","0","1","70",true,"0014", "","12"],"13": ["O_14_i05","0","1","70",true,"0015", "","13"],"14": ["O_15_i05","0","1","70",true,"0016", "","14"],"15": ["mb_connect","0","1","70",true,"0017", "","15"],"16": ["PWM_1_i05","0","8","72",false,"0018", "",""],"17": ["PWM_2_i05","0","8","73",false,"0019", "",""],"18": ["PWM_3_i05","0","8","74",false,"0020", "",""],"19": ["PWM_4_i05","0","8","75",false,"0021", "",""],"20": ["PWM_5_i05","0","8","76",false,"0022", "",""],"21": ["PWM_6_i05","0","8","77",false,"0023", "",""],"22": ["PWM_7_i05","0","8","78",false,"0024", "",""],"23": ["PWM_8_i05","0","8","79",false,"0025", "",""],"24": ["PWM_9_i05","0","8","80",false,"0026", "",""],"25": ["PWM_10_i05","0","8","81",false,"0027", "",""],"26": ["PWM_11_i05","0","8","82",false,"0028", "",""],"27": ["PWM_12_i05","0","8","83",false,"0029", "",""],"28": ["PWM_13_i05","0","8","84",false,"0030", "",""],"29": ["PWM_14_i05","0","8","85",false,"0031", "",""],"30": ["PWM_15_i05","0","8","86",false,"0032", "",""],"31": ["PWM_16_i05","0","8","87",false,"0033", "",""]},"mem": {"0": ["OutputPushPull_i05","0","16","106",false,"0034", "",""],"1": ["OutputOpenLoadDetect_i05","0","16","108",false,"0035", "",""],"2": ["OutputPWMActive_i05","0","16","110",false,"0036", "",""],"3": ["OutputPWMFrequency_i05","1","8","112",false,"0037", "",""],"4": ["InputMode_1_i05","0","8","88",false,"0055", "",""],"5": ["InputMode_2_i05","0","8","89",false,"0056", "",""],"6": ["InputMode_3_i05","0","8","90",false,"0057", "",""],"7": ["InputMode_4_i05","0","8","91",false,"0058", "",""],"8": ["InputMode_5_i05","0","8","92",false,"0059", "",""],"9": ["InputMode_6_i05","0","8","93",false,"0060", "",""],"10": ["InputMode_7_i05","0","8","94",false,"0061", "",""],"11": ["InputMode_8_i05","0","8","95",false,"0062", "",""],"12": ["InputMode_9_i05","0","8","96",false,"0063", "",""],"13": ["InputMode_10_i05","0","8","97",false,"0064", "",""],"14": ["InputMode_11_i05","0","8","98",false,"0065", "",""],"15": ["InputMode_12_i05","0","8","99",false,"0066", "",""],"16": ["InputMode_13_i05","0","8","100",false,"0067", "",""],"17": ["InputMode_14_i05","0","8","101",false,"0068", "",""],"18": ["InputMode_15_i05","0","8","102",false,"0069", "",""],"19": ["InputMode_16_i05","0","8","103",false,"0070", "",""],"20": ["InputDebounce_i05","0","16","104",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiAIO","GUID": "76f10e57-ecaf-2a45-f4df-b9a66e3f40db","id": "device_RevPiAIO_20170301_1_0_001","type": "LEFT_RIGHT","productType": "103","position": "36","name": "aio01","bmk": "RevPi AIO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 463,"inp": {"0": ["fu_ist","0","16","0",false,"0000", "",""],"1": ["InputValue_2","0","16","2",false,"0001", "",""],"2": ["InputValue_3","0","16","4",false,"0002", "",""],"3": ["InputValue_4","0","16","6",false,"0003", "",""],"4": ["InputStatus_1","0","8","8",false,"0004", "",""],"5": ["InputStatus_2","0","8","9",false,"0005", "",""],"6": ["InputStatus_3","0","8","10",false,"0006", "",""],"7": ["InputStatus_4","0","8","11",false,"0007", "",""],"8": ["tmp_schrank","0","16","12",false,"0008", "",""],"9": ["RTDValue_2","0","16","14",false,"0009", "",""],"10": ["RTDStatus_1","0","8","16",false,"0010", "",""],"11": ["RTDStatus_2","0","8","17",false,"0011", "",""],"12": ["OutputStatus_1","0","8","18",false,"0012", "",""],"13": ["OutputStatus_2","0","8","19",false,"0013", "",""]},"out": {"0": ["OutputValue_1","0","16","20",false,"0014", "",""],"1": ["fu_soll","0","16","22",false,"0015", "",""]},"mem": {"0": ["Input1Range","1","8","24",false,"0016", "You must use wire bridges for current measurement!",""],"1": ["Input1Multiplier","1","16","25",false,"0017", "",""],"2": ["Input1Divisor","1","16","27",false,"0018", "",""],"3": ["Input1Offset","0","16","29",false,"0019", "",""],"4": ["Input2Range","1","8","31",false,"0020", "You must use wire bridges for current measurement!",""],"5": ["Input2Multiplier","1","16","32",false,"0021", "",""],"6": ["Input2Divisor","1","16","34",false,"0022", "",""],"7": ["Input2Offset","0","16","36",false,"0023", "",""],"8": ["Input3Range","1","8","38",false,"0024", "You must use wire bridges for current measurement!",""],"9": ["Input3Multiplier","1","16","39",false,"0025", "",""],"10": ["Input3Divisor","1","16","41",false,"0026", "",""],"11": ["Input3Offset","0","16","43",false,"0027", "",""],"12": ["Input4Range","1","8","45",false,"0028", "You must use wire bridges for current measurement!",""],"13": ["Input4Multiplier","1","16","46",false,"0029", "",""],"14": ["Input4Divisor","1","16","48",false,"0030", "",""],"15": ["Input4Offset","0","16","50",false,"0031", "",""],"16": ["ADC_DataRate","0","8","52",false,"0032", "Use lowest value for highest precision and a maximum 50 Hz suppression",""],"17": ["RTD1Type","0","8","53",false,"0033", "",""],"18": ["RTD1Wiring","0","8","54",false,"0034", "You must use wire bridges for 2-wire sensors!",""],"19": ["RTD1Multiplier","1","16","55",false,"0035", "",""],"20": ["RTD1Divisor","1","16","57",false,"0036", "",""],"21": ["RTD1Offset","0","16","59",false,"0037", "",""],"22": ["RTD2Type","0","8","61",false,"0038", "",""],"23": ["RTD2Wiring","0","8","62",false,"0039", "You must use wire bridges for 2-wire sensors!",""],"24": ["RTD2Multiplier","1","16","63",false,"0040", "",""],"25": ["RTD2Divisor","1","16","65",false,"0041", "",""],"26": ["RTD2Offset","0","16","67",false,"0042", "",""],"27": ["Output1Range","0","8","69",false,"0043", "",""],"28": ["Output1EnableSlew","0","8","70",false,"0044", "Enable slew rate deceleration",""],"29": ["Output1SlewStepSize","0","8","71",false,"0045", "Slew rate step size",""],"30": ["Output1SlewClock","0","8","72",false,"0046", "lock rate of slew rate deceleration in kHz",""],"31": ["Output1Multiplier","1","16","73",false,"0047", "",""],"32": ["Output1Divisor","1","16","75",false,"0048", "",""],"33": ["Output1Offset","0","16","77",false,"0049", "",""],"34": ["Output2Range","2","8","79",false,"0050", "",""],"35": ["Output2EnableSlew","0","8","80",false,"0051", "Enable slew rate deceleration",""],"36": ["Output2SlewStepSize","0","8","81",false,"0052", "Slew rate step size",""],"37": ["Output2SlewClock","0","8","82",false,"0053", "lock rate of slew rate deceleration in kHz",""],"38": ["Output2Multiplier","1","16","83",false,"0054", "",""],"39": ["Output2Divisor","1","16","85",false,"0055", "",""],"40": ["Output2Offset","0","16","87",false,"0056", "",""]},"extend": {}},{"catalogNr": "Virtual01","GUID": "c3bf8705-d96a-6452-2566-40c5d86a5061","id": "device_Virtual01_20160818_1_0_001","type": "VIRTUAL","productType": "32768","position": "64","name": "virt01","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 552,"inp": {"0": ["pbit0_7","0","8","0",false,"0000", "",""],"1": ["pbit8_15","0","8","1",false,"0001", "",""],"2": ["pbit16_23","0","8","2",false,"0002", "",""],"3": ["pbit24_31","0","8","3",false,"0003", "",""],"4": ["magazin1_max","4","8","4",false,"0004", "",""],"5": ["magazin2_max","4","8","5",false,"0005", "",""],"6": ["p_drehzahl1","136","8","6",false,"0006", "",""],"7": ["p_drehzahl2","19","8","7",false,"0007", "",""],"8": ["Input_9","0","8","8",false,"0008", "",""],"9": ["Input_10","0","8","9",false,"0009", "",""],"10": ["Input_11","0","8","10",false,"0010", "",""],"11": ["Input_12","0","8","11",false,"0011", "",""],"12": ["Input_13","0","8","12",false,"0012", "",""],"13": ["Input_14","0","8","13",false,"0013", "",""],"14": ["Input_15","0","8","14",false,"0014", "",""],"15": ["Input_16","0","8","15",false,"0015", "",""],"16": ["Input_17","0","8","16",false,"0016", "",""],"17": ["Input_18","0","8","17",false,"0017", "",""],"18": ["Input_19","0","8","18",false,"0018", "",""],"19": ["Input_20","0","8","19",false,"0019", "",""],"20": ["Input_21","0","8","20",false,"0020", "",""],"21": ["Input_22","0","8","21",false,"0021", "",""],"22": ["Input_23","0","8","22",false,"0022", "",""],"23": ["Input_24","0","8","23",false,"0023", "",""],"24": ["Input_25","0","8","24",false,"0024", "",""],"25": ["Input_26","0","8","25",false,"0025", "",""],"26": ["Input_27","0","8","26",false,"0026", "",""],"27": ["Input_28","0","8","27",false,"0027", "",""],"28": ["Input_29","0","8","28",false,"0028", "",""],"29": ["Input_30","0","8","29",false,"0029", "",""],"30": ["Input_31","0","8","30",false,"0030", "",""],"31": ["Input_32","0","8","31",false,"0031", "",""]},"out": {"0": ["meldung0_7","0","8","32",false,"0032", "",""],"1": ["meldung8_15","0","8","33",false,"0033", "",""],"2": ["meldung16_23","0","8","34",false,"0034", "",""],"3": ["meldung24_31","0","8","35",false,"0035", "",""],"4": ["magazin1","0","8","36",false,"0036", "",""],"5": ["magazin2","0","8","37",false,"0037", "",""],"6": ["Output_7","0","8","38",false,"0038", "",""],"7": ["Output_8","0","8","39",false,"0039", "",""],"8": ["Output_9","0","8","40",false,"0040", "",""],"9": ["Output_10","0","8","41",false,"0041", "",""],"10": ["Output_11","0","8","42",false,"0042", "",""],"11": ["Output_12","0","8","43",false,"0043", "",""],"12": ["Output_13","0","8","44",false,"0044", "",""],"13": ["Output_14","0","8","45",false,"0045", "",""],"14": ["Output_15","0","8","46",false,"0046", "",""],"15": ["Output_16","0","8","47",false,"0047", "",""],"16": ["Output_17","0","8","48",false,"0048", "",""],"17": ["Output_18","0","8","49",false,"0049", "",""],"18": ["Output_19","0","8","50",false,"0050", "",""],"19": ["Output_20","0","8","51",false,"0051", "",""],"20": ["Output_21","0","8","52",false,"0052", "",""],"21": ["Output_22","0","8","53",false,"0053", "",""],"22": ["Output_23","0","8","54",false,"0054", "",""],"23": ["Output_24","0","8","55",false,"0055", "",""],"24": ["Output_25","0","8","56",false,"0056", "",""],"25": ["Output_26","0","8","57",false,"0057", "",""],"26": ["Output_27","0","8","58",false,"0058", "",""],"27": ["Output_28","0","8","59",false,"0059", "",""],"28": ["Output_29","0","8","60",false,"0060", "",""],"29": ["Output_30","0","8","61",false,"0061", "",""],"30": ["Output_31","0","8","62",false,"0062", "",""],"31": ["Output_32","0","8","63",false,"0063", "",""]},"mem": {},"extend": {}}],"Connections":[]} \ No newline at end of file diff --git a/tests/io_tests/test_io_functions.py b/tests/io_tests/test_io_functions.py new file mode 100644 index 0000000..38e96fb --- /dev/null +++ b/tests/io_tests/test_io_functions.py @@ -0,0 +1,97 @@ +# -*- coding: utf-8 -*- +"""Tests instantiation all local classes.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" + +from os.path import dirname + +from revpimodio2 import OUT +from tests import TestRevPiModIO + + +class TestIoFunctions(TestRevPiModIO): + data_dir = dirname(__file__) + + def test_io_base(self): + """Test io attributes.""" + rpi = self.modio() + + # Transformations + self.assertEqual(rpi.io.v_druck.address, 307) + with self.assertRaises(AttributeError): + rpi.io.v_druck.address = 10 + self.assertEqual(rpi.io.v_druck.byteorder, "little") + with self.assertRaises(AttributeError): + rpi.io.v_druck.byteorder = "big" + self.assertIsInstance(rpi.io.v_druck.defaultvalue, bool) + self.assertEqual(rpi.io.v_druck.defaultvalue, 0) + with self.assertRaises(AttributeError): + rpi.io.v_druck.defaultvalue = 255 + self.assertEqual(rpi.io.v_druck.length, 0) + with self.assertRaises(AttributeError): + rpi.io.v_druck.length = 2 + self.assertEqual(rpi.io.v_druck.name, "v_druck") + with self.assertRaises(AttributeError): + rpi.io.v_druck.name = "test" + self.assertEqual(rpi.io.v_druck.type, OUT) + with self.assertRaises(AttributeError): + rpi.io.v_druck.type = 399 + self.assertFalse(rpi.io.v_druck.value) + + self.assertFalse(rpi.io.v_druck._read_only_io) + self.assertTrue(rpi.io.t_stop._read_only_io) + + rpi.io.v_druck(True) + self.assertTrue(rpi.io.v_druck.value) + rpi.io.v_druck.value = False + self.assertFalse(rpi.io.v_druck()) + + # Magic-function __call__ + self.assertEqual(rpi.io.pbit0_7(), 0) + self.assertFalse(bool(rpi.io.v_druck)) + self.assertFalse(bool(rpi.io.magazin1)) + rpi.io.magazin1(129) + self.assertEqual(int(rpi.io.magazin1), 129) + self.assertEqual(rpi.io.magazin1(), 129) + rpi.io.magazin1.value = 128 + self.assertTrue(bool(rpi.io.magazin1)) + self.assertEqual(int(rpi.io.magazin1), 128) + self.assertEqual(rpi.io.magazin1(), 128) + with self.assertRaises(TypeError): + rpi.io.magazin1(b"\x00") + + rpi.io.meldung0_7.replace_io("test4", frm="?", bit=4) + rpi.io.test4(True) + rpi.io.test4(False) + + with self.assertRaises(ValueError): + rpi.io.magazin1.byteorder = 0 + rpi.io.magazin1.byteorder = "big" + self.assertIsInstance(rpi.io.magazin1.defaultvalue, int) + + # Signed and unsigned change + self.assertEqual(rpi.io.magazin1.value, 128) + self.assertEqual(rpi.io.magazin1.signed, False) + with self.assertRaises(TypeError): + rpi.io.magazin1.signed = 0 + rpi.io.magazin1.signed = True + self.assertEqual(rpi.io.magazin1.signed, True) + self.assertEqual(rpi.io.magazin1.value, -128) + + with self.assertRaises(TypeError): + rpi.io.magazin1.value = "test" + + # Cound IOs + int_len = len(rpi.io) + int_iter = 0 + for myio in rpi.io: + int_iter += 1 + self.assertEqual(int_len, int_iter) + + self.assertEqual(rpi.io["v_druck"].name, "v_druck") + with self.assertRaises(IndexError): + rpi.io[8192] + with self.assertRaises(AttributeError): + # Prevent input assignment + rpi.io.v_druck = True From e876c97c30759d2af0dd98ea8bee3249542303bf Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Tue, 29 Oct 2024 08:24:10 +0100 Subject: [PATCH 10/26] test: Core devices --- tests/revpi3/config_core.rsc | 4378 ++++++++++++++++++++++++++++++++++ tests/revpi3/test_core.py | 93 + 2 files changed, 4471 insertions(+) create mode 100644 tests/revpi3/config_core.rsc create mode 100644 tests/revpi3/test_core.py diff --git a/tests/revpi3/config_core.rsc b/tests/revpi3/config_core.rsc new file mode 100644 index 0000000..37f128c --- /dev/null +++ b/tests/revpi3/config_core.rsc @@ -0,0 +1,4378 @@ +{ + "App": { + "name": "PiCtory", + "version": "1.2.3", + "saveTS": "20170826120906", + "language": "en", + "layout": { + "north": { + "size": 70, + "initClosed": false, + "initHidden": false + }, + "south": { + "size": 480, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": { + "east": { + "size": 500, + "initClosed": false, + "initHidden": false + } + } + } + }, + "east": { + "size": 70, + "initClosed": true, + "initHidden": false, + "children": { + "layout1": { + "north": { + "size": 100, + "initClosed": false, + "initHidden": false + }, + "south": { + "size": 98, + "initClosed": false, + "initHidden": false + } + } + } + }, + "west": { + "size": 200, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": {} + } + } + } + }, + "Summary": { + "inpTotal": 338, + "outTotal": 113 + }, + "Devices": [ + { + "catalogNr": "RevPiCore", + "GUID": "4ebb85e8-92ea-415d-b191-cc58c2857c0a", + "id": "device_RevPiCore_20170404_1_2_001", + "type": "BASE", + "productType": "95", + "position": "0", + "name": "picore01", + "bmk": "RevPi Core V1.2", + "inpVariant": 0, + "outVariant": 0, + "comment": "This is a RevPiCore Device", + "offset": 0, + "inp": { + "0": [ + "RevPiStatus", + "0", + "8", + "0", + true, + "0000", + "", + "" + ], + "1": [ + "RevPiIOCycle", + "0", + "8", + "1", + true, + "0001", + "", + "" + ], + "2": [ + "RS485ErrorCnt", + "0", + "16", + "2", + false, + "0002", + "", + "" + ], + "3": [ + "Core_Temperatur", + "0", + "8", + "4", + false, + "0003", + "", + "" + ], + "4": [ + "Core_Frequency", + "0", + "8", + "5", + false, + "0004", + "", + "" + ] + }, + "out": { + "0": [ + "RevPiLED", + "0", + "8", + "6", + true, + "0005", + "", + "" + ], + "1": [ + "RS485ErrorLimit1", + "10", + "16", + "7", + false, + "0006", + "", + "" + ], + "2": [ + "RS485ErrorLimit2", + "1000", + "16", + "9", + false, + "0007", + "", + "" + ] + }, + "mem": {}, + "extend": {} + }, + { + "catalogNr": "RevPiDI", + "GUID": "2e2c089e-6bef-14c0-852b-41b7cf48d846", + "id": "device_RevPiDI_20160818_1_0_001", + "type": "LEFT_RIGHT", + "productType": "97", + "position": "32", + "name": "di01", + "bmk": "RevPi DI", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 11, + "inp": { + "0": [ + "notaus_ok", + "0", + "1", + "0", + true, + "0000", + "", + "0" + ], + "1": [ + "motorschutz_ok", + "0", + "1", + "0", + true, + "0001", + "", + "1" + ], + "2": [ + "fu_ok", + "0", + "1", + "0", + true, + "0002", + "", + "2" + ], + "3": [ + "fu_motoran", + "0", + "1", + "0", + true, + "0003", + "", + "3" + ], + "4": [ + "I_5", + "0", + "1", + "0", + true, + "0004", + "", + "4" + ], + "5": [ + "I_6", + "0", + "1", + "0", + true, + "0005", + "", + "5" + ], + "6": [ + "I_7", + "0", + "1", + "0", + true, + "0006", + "", + "6" + ], + "7": [ + "I_8", + "0", + "1", + "0", + true, + "0007", + "", + "7" + ], + "8": [ + "t_automatik", + "0", + "1", + "0", + true, + "0008", + "", + "8" + ], + "9": [ + "t_start", + "0", + "1", + "0", + true, + "0009", + "", + "9" + ], + "10": [ + "t_stop", + "0", + "1", + "0", + true, + "0010", + "", + "10" + ], + "11": [ + "t_quit", + "0", + "1", + "0", + true, + "0011", + "", + "11" + ], + "12": [ + "t_notaus", + "0", + "1", + "0", + true, + "0012", + "", + "12" + ], + "13": [ + "I_14", + "0", + "1", + "0", + true, + "0013", + "", + "13" + ], + "14": [ + "I_15", + "0", + "1", + "0", + true, + "0014", + "", + "14" + ], + "15": [ + "I_16", + "0", + "1", + "0", + true, + "0015", + "", + "15" + ], + "16": [ + "Status", + "0", + "16", + "4", + false, + "0016", + "", + "" + ], + "17": [ + "Counter_1", + "0", + "32", + "6", + false, + "0017", + "", + "" + ], + "18": [ + "Counter_2", + "0", + "32", + "10", + false, + "0018", + "", + "" + ], + "19": [ + "Counter_3", + "0", + "32", + "14", + false, + "0019", + "", + "" + ], + "20": [ + "Counter_4", + "0", + "32", + "18", + false, + "0020", + "", + "" + ], + "21": [ + "Counter_5", + "0", + "32", + "22", + false, + "0021", + "", + "" + ], + "22": [ + "Counter_6", + "0", + "32", + "26", + false, + "0022", + "", + "" + ], + "23": [ + "Counter_7", + "0", + "32", + "30", + false, + "0023", + "", + "" + ], + "24": [ + "Counter_8", + "0", + "32", + "34", + false, + "0024", + "", + "" + ], + "25": [ + "Counter_9", + "0", + "32", + "38", + false, + "0025", + "", + "" + ], + "26": [ + "Counter_10", + "0", + "32", + "42", + false, + "0026", + "", + "" + ], + "27": [ + "Counter_11", + "0", + "32", + "46", + false, + "0027", + "", + "" + ], + "28": [ + "Counter_12", + "0", + "32", + "50", + false, + "0028", + "", + "" + ], + "29": [ + "Counter_13", + "0", + "32", + "54", + false, + "0029", + "", + "" + ], + "30": [ + "Counter_14", + "0", + "32", + "58", + false, + "0030", + "", + "" + ], + "31": [ + "Counter_15", + "0", + "32", + "62", + false, + "0031", + "", + "" + ], + "32": [ + "Counter_16", + "0", + "32", + "66", + false, + "0032", + "", + "" + ], + "33": [ + "Output_Status", + "0", + "16", + "2", + false, + "0050", + "", + "" + ] + }, + "out": { + "0": [ + "Output", + "0", + "16", + "70", + false, + "0051", + "", + "" + ], + "1": [ + "PWM_1", + "0", + "8", + "72", + false, + "0052", + "", + "" + ], + "2": [ + "PWM_2", + "0", + "8", + "73", + false, + "0053", + "", + "" + ], + "3": [ + "PWM_3", + "0", + "8", + "74", + false, + "0054", + "", + "" + ], + "4": [ + "PWM_4", + "0", + "8", + "75", + false, + "0055", + "", + "" + ], + "5": [ + "PWM_5", + "0", + "8", + "76", + false, + "0056", + "", + "" + ], + "6": [ + "PWM_6", + "0", + "8", + "77", + false, + "0057", + "", + "" + ], + "7": [ + "PWM_7", + "0", + "8", + "78", + false, + "0058", + "", + "" + ], + "8": [ + "PWM_8", + "0", + "8", + "79", + false, + "0059", + "", + "" + ], + "9": [ + "PWM_9", + "0", + "8", + "80", + false, + "0060", + "", + "" + ], + "10": [ + "PWM_10", + "0", + "8", + "81", + false, + "0061", + "", + "" + ], + "11": [ + "PWM_11", + "0", + "8", + "82", + false, + "0062", + "", + "" + ], + "12": [ + "PWM_12", + "0", + "8", + "83", + false, + "0063", + "", + "" + ], + "13": [ + "PWM_13", + "0", + "8", + "84", + false, + "0064", + "", + "" + ], + "14": [ + "PWM_14", + "0", + "8", + "85", + false, + "0065", + "", + "" + ], + "15": [ + "PWM_15", + "0", + "8", + "86", + false, + "0066", + "", + "" + ], + "16": [ + "PWM_16", + "0", + "8", + "87", + false, + "0067", + "", + "" + ] + }, + "mem": { + "0": [ + "InputMode_1", + "0", + "8", + "88", + false, + "0033", + "", + "" + ], + "1": [ + "InputMode_2", + "0", + "8", + "89", + false, + "0034", + "", + "" + ], + "2": [ + "InputMode_3", + "0", + "8", + "90", + false, + "0035", + "", + "" + ], + "3": [ + "InputMode_4", + "0", + "8", + "91", + false, + "0036", + "", + "" + ], + "4": [ + "InputMode_5", + "0", + "8", + "92", + false, + "0037", + "", + "" + ], + "5": [ + "InputMode_6", + "0", + "8", + "93", + false, + "0038", + "", + "" + ], + "6": [ + "InputMode_7", + "0", + "8", + "94", + false, + "0039", + "", + "" + ], + "7": [ + "InputMode_8", + "0", + "8", + "95", + false, + "0040", + "", + "" + ], + "8": [ + "InputMode_9", + "0", + "8", + "96", + false, + "0041", + "", + "" + ], + "9": [ + "InputMode_10", + "0", + "8", + "97", + false, + "0042", + "", + "" + ], + "10": [ + "InputMode_11", + "0", + "8", + "98", + false, + "0043", + "", + "" + ], + "11": [ + "InputMode_12", + "0", + "8", + "99", + false, + "0044", + "", + "" + ], + "12": [ + "InputMode_13", + "0", + "8", + "100", + false, + "0045", + "", + "" + ], + "13": [ + "InputMode_14", + "0", + "8", + "101", + false, + "0046", + "", + "" + ], + "14": [ + "InputMode_15", + "0", + "8", + "102", + false, + "0047", + "", + "" + ], + "15": [ + "InputMode_16", + "0", + "8", + "103", + false, + "0048", + "", + "" + ], + "16": [ + "InputDebounce", + "0", + "16", + "104", + false, + "0049", + "", + "" + ], + "17": [ + "OutputPushPull", + "0", + "16", + "106", + false, + "0068", + "", + "" + ], + "18": [ + "OutputOpenLoadDetect", + "0", + "16", + "108", + false, + "0069", + "", + "" + ], + "19": [ + "OutputPWMActive", + "0", + "16", + "110", + false, + "0070", + "", + "" + ], + "20": [ + "OutputPWMFrequency", + "2", + "8", + "112", + false, + "0071", + "", + "" + ] + }, + "extend": {} + }, + { + "catalogNr": "RevPiDI", + "GUID": "81e6c459-0398-a7c4-4954-d793ee9a5b89", + "id": "device_RevPiDI_20160818_1_0_002", + "type": "LEFT_RIGHT", + "productType": "97", + "position": "33", + "name": "di02", + "bmk": "RevPi DI", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 124, + "inp": { + "0": [ + "m_druck_ok", + "0", + "1", + "0", + true, + "0000", + "", + "0" + ], + "1": [ + "m_m1_eingefahren", + "0", + "1", + "0", + true, + "0001", + "", + "1" + ], + "2": [ + "m_m1_ausgefahren", + "0", + "1", + "0", + true, + "0002", + "", + "2" + ], + "3": [ + "m_m2_eingefahren", + "0", + "1", + "0", + true, + "0003", + "", + "3" + ], + "4": [ + "m_m2_ausgefahren", + "0", + "1", + "0", + true, + "0004", + "", + "4" + ], + "5": [ + "m_m3_eingefahren", + "0", + "1", + "0", + true, + "0005", + "", + "5" + ], + "6": [ + "m_m3_ausgefahren", + "0", + "1", + "0", + true, + "0006", + "", + "6" + ], + "7": [ + "s_rutsche", + "0", + "1", + "0", + true, + "0007", + "", + "7" + ], + "8": [ + "s_metall", + "0", + "1", + "0", + true, + "0008", + "", + "8" + ], + "9": [ + "s_magazin1", + "0", + "1", + "0", + true, + "0009", + "", + "9" + ], + "10": [ + "s_magazin2", + "0", + "1", + "0", + true, + "0010", + "", + "10" + ], + "11": [ + "I_12_i03", + "0", + "1", + "0", + true, + "0011", + "", + "11" + ], + "12": [ + "I_13_i03", + "0", + "1", + "0", + true, + "0012", + "", + "12" + ], + "13": [ + "I_14_i03", + "0", + "1", + "0", + true, + "0013", + "", + "13" + ], + "14": [ + "I_15_i03", + "0", + "1", + "0", + true, + "0014", + "", + "14" + ], + "15": [ + "mb_status", + "0", + "1", + "0", + true, + "0015", + "", + "15" + ], + "16": [ + "Status_i03", + "0", + "16", + "4", + false, + "0016", + "", + "" + ], + "17": [ + "Counter_1_i03", + "0", + "32", + "6", + false, + "0017", + "", + "" + ], + "18": [ + "Counter_2_i03", + "0", + "32", + "10", + false, + "0018", + "", + "" + ], + "19": [ + "Counter_3_i03", + "0", + "32", + "14", + false, + "0019", + "", + "" + ], + "20": [ + "Counter_4_i03", + "0", + "32", + "18", + false, + "0020", + "", + "" + ], + "21": [ + "Counter_5_i03", + "0", + "32", + "22", + false, + "0021", + "", + "" + ], + "22": [ + "Counter_6_i03", + "0", + "32", + "26", + false, + "0022", + "", + "" + ], + "23": [ + "Counter_7_i03", + "0", + "32", + "30", + false, + "0023", + "", + "" + ], + "24": [ + "Counter_8_i03", + "0", + "32", + "34", + false, + "0024", + "", + "" + ], + "25": [ + "Counter_9_i03", + "0", + "32", + "38", + false, + "0025", + "", + "" + ], + "26": [ + "Counter_10_i03", + "0", + "32", + "42", + false, + "0026", + "", + "" + ], + "27": [ + "Counter_11_i03", + "0", + "32", + "46", + false, + "0027", + "", + "" + ], + "28": [ + "Counter_12_i03", + "0", + "32", + "50", + false, + "0028", + "", + "" + ], + "29": [ + "Counter_13_i03", + "0", + "32", + "54", + false, + "0029", + "", + "" + ], + "30": [ + "Counter_14_i03", + "0", + "32", + "58", + false, + "0030", + "", + "" + ], + "31": [ + "Counter_15_i03", + "0", + "32", + "62", + false, + "0031", + "", + "" + ], + "32": [ + "Counter_16_i03", + "0", + "32", + "66", + false, + "0032", + "", + "" + ], + "33": [ + "Output_Status_i03", + "0", + "16", + "2", + false, + "0050", + "", + "" + ] + }, + "out": { + "0": [ + "Output_i03", + "0", + "16", + "70", + false, + "0051", + "", + "" + ], + "1": [ + "PWM_1_i03", + "0", + "8", + "72", + false, + "0052", + "", + "" + ], + "2": [ + "PWM_2_i03", + "0", + "8", + "73", + false, + "0053", + "", + "" + ], + "3": [ + "PWM_3_i03", + "0", + "8", + "74", + false, + "0054", + "", + "" + ], + "4": [ + "PWM_4_i03", + "0", + "8", + "75", + false, + "0055", + "", + "" + ], + "5": [ + "PWM_5_i03", + "0", + "8", + "76", + false, + "0056", + "", + "" + ], + "6": [ + "PWM_6_i03", + "0", + "8", + "77", + false, + "0057", + "", + "" + ], + "7": [ + "PWM_7_i03", + "0", + "8", + "78", + false, + "0058", + "", + "" + ], + "8": [ + "PWM_8_i03", + "0", + "8", + "79", + false, + "0059", + "", + "" + ], + "9": [ + "PWM_9_i03", + "0", + "8", + "80", + false, + "0060", + "", + "" + ], + "10": [ + "PWM_10_i03", + "0", + "8", + "81", + false, + "0061", + "", + "" + ], + "11": [ + "PWM_11_i03", + "0", + "8", + "82", + false, + "0062", + "", + "" + ], + "12": [ + "PWM_12_i03", + "0", + "8", + "83", + false, + "0063", + "", + "" + ], + "13": [ + "PWM_13_i03", + "0", + "8", + "84", + false, + "0064", + "", + "" + ], + "14": [ + "PWM_14_i03", + "0", + "8", + "85", + false, + "0065", + "", + "" + ], + "15": [ + "PWM_15_i03", + "0", + "8", + "86", + false, + "0066", + "", + "" + ], + "16": [ + "PWM_16_i03", + "0", + "8", + "87", + false, + "0067", + "", + "" + ] + }, + "mem": { + "0": [ + "InputMode_1_i03", + "0", + "8", + "88", + false, + "0033", + "", + "" + ], + "1": [ + "InputMode_2_i03", + "0", + "8", + "89", + false, + "0034", + "", + "" + ], + "2": [ + "InputMode_3_i03", + "0", + "8", + "90", + false, + "0035", + "", + "" + ], + "3": [ + "InputMode_4_i03", + "0", + "8", + "91", + false, + "0036", + "", + "" + ], + "4": [ + "InputMode_5_i03", + "0", + "8", + "92", + false, + "0037", + "", + "" + ], + "5": [ + "InputMode_6_i03", + "0", + "8", + "93", + false, + "0038", + "", + "" + ], + "6": [ + "InputMode_7_i03", + "0", + "8", + "94", + false, + "0039", + "", + "" + ], + "7": [ + "InputMode_8_i03", + "0", + "8", + "95", + false, + "0040", + "", + "" + ], + "8": [ + "InputMode_9_i03", + "0", + "8", + "96", + false, + "0041", + "", + "" + ], + "9": [ + "InputMode_10_i03", + "0", + "8", + "97", + false, + "0042", + "", + "" + ], + "10": [ + "InputMode_11_i03", + "0", + "8", + "98", + false, + "0043", + "", + "" + ], + "11": [ + "InputMode_12_i03", + "0", + "8", + "99", + false, + "0044", + "", + "" + ], + "12": [ + "InputMode_13_i03", + "0", + "8", + "100", + false, + "0045", + "", + "" + ], + "13": [ + "InputMode_14_i03", + "0", + "8", + "101", + false, + "0046", + "", + "" + ], + "14": [ + "InputMode_15_i03", + "0", + "8", + "102", + false, + "0047", + "", + "" + ], + "15": [ + "InputMode_16_i03", + "0", + "8", + "103", + false, + "0048", + "", + "" + ], + "16": [ + "InputDebounce_i03", + "0", + "16", + "104", + false, + "0049", + "", + "" + ], + "17": [ + "OutputPushPull_i03", + "0", + "16", + "106", + false, + "0068", + "", + "" + ], + "18": [ + "OutputOpenLoadDetect_i03", + "0", + "16", + "108", + false, + "0069", + "", + "" + ], + "19": [ + "OutputPWMActive_i03", + "0", + "16", + "110", + false, + "0070", + "", + "" + ], + "20": [ + "OutputPWMFrequency_i03", + "2", + "8", + "112", + false, + "0071", + "", + "" + ] + }, + "extend": {} + }, + { + "catalogNr": "RevPiDO", + "GUID": "4f8da9ea-91b2-d028-c60d-4476096a9dc2", + "id": "device_RevPiDO_20160818_1_0_001", + "type": "LEFT_RIGHT", + "productType": "98", + "position": "34", + "name": "do01", + "bmk": "RevPi DO", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 237, + "inp": { + "0": [ + "Output_Status_i04", + "0", + "16", + "2", + false, + "0000", + "", + "" + ], + "1": [ + "Status_i04", + "0", + "16", + "4", + false, + "0001", + "", + "" + ], + "2": [ + "Input", + "0", + "16", + "0", + false, + "0038", + "", + "" + ], + "3": [ + "Counter_1_i04", + "0", + "32", + "6", + false, + "0039", + "", + "" + ], + "4": [ + "Counter_2_i04", + "0", + "32", + "10", + false, + "0040", + "", + "" + ], + "5": [ + "Counter_3_i04", + "0", + "32", + "14", + false, + "0041", + "", + "" + ], + "6": [ + "Counter_4_i04", + "0", + "32", + "18", + false, + "0042", + "", + "" + ], + "7": [ + "Counter_5_i04", + "0", + "32", + "22", + false, + "0043", + "", + "" + ], + "8": [ + "Counter_6_i04", + "0", + "32", + "26", + false, + "0044", + "", + "" + ], + "9": [ + "Counter_7_i04", + "0", + "32", + "30", + false, + "0045", + "", + "" + ], + "10": [ + "Counter_8_i04", + "0", + "32", + "34", + false, + "0046", + "", + "" + ], + "11": [ + "Counter_9_i04", + "0", + "32", + "38", + false, + "0047", + "", + "" + ], + "12": [ + "Counter_10_i04", + "0", + "32", + "42", + false, + "0048", + "", + "" + ], + "13": [ + "Counter_11_i04", + "0", + "32", + "46", + false, + "0049", + "", + "" + ], + "14": [ + "Counter_12_i04", + "0", + "32", + "50", + false, + "0050", + "", + "" + ], + "15": [ + "Counter_13_i04", + "0", + "32", + "54", + false, + "0051", + "", + "" + ], + "16": [ + "Counter_14_i04", + "0", + "32", + "58", + false, + "0052", + "", + "" + ], + "17": [ + "Counter_15_i04", + "0", + "32", + "62", + false, + "0053", + "", + "" + ], + "18": [ + "Counter_16_i04", + "0", + "32", + "66", + false, + "0054", + "", + "" + ] + }, + "out": { + "0": [ + "fu_rechts", + "0", + "1", + "70", + true, + "0002", + "", + "0" + ], + "1": [ + "fu_links", + "0", + "1", + "70", + true, + "0003", + "", + "1" + ], + "2": [ + "fu_schnell", + "0", + "1", + "70", + true, + "0004", + "", + "2" + ], + "3": [ + "fu_lahm", + "0", + "1", + "70", + true, + "0005", + "", + "3" + ], + "4": [ + "v_druck", + "0", + "1", + "70", + true, + "0006", + "", + "4" + ], + "5": [ + "v_m1_einfahren", + "0", + "1", + "70", + true, + "0007", + "", + "5" + ], + "6": [ + "v_m1_ausfahren", + "0", + "1", + "70", + true, + "0008", + "", + "6" + ], + "7": [ + "v_m2_einfahren", + "0", + "1", + "70", + true, + "0009", + "", + "7" + ], + "8": [ + "v_m2_ausfahren", + "0", + "1", + "70", + true, + "0010", + "", + "8" + ], + "9": [ + "v_m3_einfahren", + "0", + "1", + "70", + true, + "0011", + "", + "9" + ], + "10": [ + "v_m3_ausfahren", + "0", + "1", + "70", + true, + "0012", + "", + "10" + ], + "11": [ + "O_12", + "0", + "1", + "70", + true, + "0013", + "", + "11" + ], + "12": [ + "O_13", + "0", + "1", + "70", + true, + "0014", + "", + "12" + ], + "13": [ + "O_14", + "0", + "1", + "70", + true, + "0015", + "", + "13" + ], + "14": [ + "O_15", + "0", + "1", + "70", + true, + "0016", + "", + "14" + ], + "15": [ + "fu_frei", + "0", + "1", + "70", + true, + "0017", + "", + "15" + ], + "16": [ + "PWM_1_i04", + "0", + "8", + "72", + false, + "0018", + "", + "" + ], + "17": [ + "PWM_2_i04", + "0", + "8", + "73", + false, + "0019", + "", + "" + ], + "18": [ + "PWM_3_i04", + "0", + "8", + "74", + false, + "0020", + "", + "" + ], + "19": [ + "PWM_4_i04", + "0", + "8", + "75", + false, + "0021", + "", + "" + ], + "20": [ + "PWM_5_i04", + "0", + "8", + "76", + false, + "0022", + "", + "" + ], + "21": [ + "PWM_6_i04", + "0", + "8", + "77", + false, + "0023", + "", + "" + ], + "22": [ + "PWM_7_i04", + "0", + "8", + "78", + false, + "0024", + "", + "" + ], + "23": [ + "PWM_8_i04", + "0", + "8", + "79", + false, + "0025", + "", + "" + ], + "24": [ + "PWM_9_i04", + "0", + "8", + "80", + false, + "0026", + "", + "" + ], + "25": [ + "PWM_10_i04", + "0", + "8", + "81", + false, + "0027", + "", + "" + ], + "26": [ + "PWM_11_i04", + "0", + "8", + "82", + false, + "0028", + "", + "" + ], + "27": [ + "PWM_12_i04", + "0", + "8", + "83", + false, + "0029", + "", + "" + ], + "28": [ + "PWM_13_i04", + "0", + "8", + "84", + false, + "0030", + "", + "" + ], + "29": [ + "PWM_14_i04", + "0", + "8", + "85", + false, + "0031", + "", + "" + ], + "30": [ + "PWM_15_i04", + "0", + "8", + "86", + false, + "0032", + "", + "" + ], + "31": [ + "PWM_16_i04", + "0", + "8", + "87", + false, + "0033", + "", + "" + ] + }, + "mem": { + "0": [ + "OutputPushPull_i04", + "0", + "16", + "106", + false, + "0034", + "", + "" + ], + "1": [ + "OutputOpenLoadDetect_i04", + "0", + "16", + "108", + false, + "0035", + "", + "" + ], + "2": [ + "OutputPWMActive_i04", + "0", + "16", + "110", + false, + "0036", + "", + "" + ], + "3": [ + "OutputPWMFrequency_i04", + "1", + "8", + "112", + false, + "0037", + "", + "" + ], + "4": [ + "InputMode_1_i04", + "0", + "8", + "88", + false, + "0055", + "", + "" + ], + "5": [ + "InputMode_2_i04", + "0", + "8", + "89", + false, + "0056", + "", + "" + ], + "6": [ + "InputMode_3_i04", + "0", + "8", + "90", + false, + "0057", + "", + "" + ], + "7": [ + "InputMode_4_i04", + "0", + "8", + "91", + false, + "0058", + "", + "" + ], + "8": [ + "InputMode_5_i04", + "0", + "8", + "92", + false, + "0059", + "", + "" + ], + "9": [ + "InputMode_6_i04", + "0", + "8", + "93", + false, + "0060", + "", + "" + ], + "10": [ + "InputMode_7_i04", + "0", + "8", + "94", + false, + "0061", + "", + "" + ], + "11": [ + "InputMode_8_i04", + "0", + "8", + "95", + false, + "0062", + "", + "" + ], + "12": [ + "InputMode_9_i04", + "0", + "8", + "96", + false, + "0063", + "", + "" + ], + "13": [ + "InputMode_10_i04", + "0", + "8", + "97", + false, + "0064", + "", + "" + ], + "14": [ + "InputMode_11_i04", + "0", + "8", + "98", + false, + "0065", + "", + "" + ], + "15": [ + "InputMode_12_i04", + "0", + "8", + "99", + false, + "0066", + "", + "" + ], + "16": [ + "InputMode_13_i04", + "0", + "8", + "100", + false, + "0067", + "", + "" + ], + "17": [ + "InputMode_14_i04", + "0", + "8", + "101", + false, + "0068", + "", + "" + ], + "18": [ + "InputMode_15_i04", + "0", + "8", + "102", + false, + "0069", + "", + "" + ], + "19": [ + "InputMode_16_i04", + "0", + "8", + "103", + false, + "0070", + "", + "" + ], + "20": [ + "InputDebounce_i04", + "0", + "16", + "104", + false, + "0071", + "", + "" + ] + }, + "extend": {} + }, + { + "catalogNr": "RevPiDO", + "GUID": "b8a70c62-9b91-9e1a-af2a-37f74b16aca2", + "id": "device_RevPiDO_20160818_1_0_002", + "type": "LEFT_RIGHT", + "productType": "98", + "position": "35", + "name": "do02", + "bmk": "RevPi DO", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 350, + "inp": { + "0": [ + "Output_Status_i05", + "0", + "16", + "2", + false, + "0000", + "", + "" + ], + "1": [ + "Status_i05", + "0", + "16", + "4", + false, + "0001", + "", + "" + ], + "2": [ + "Input_i05", + "0", + "16", + "0", + false, + "0038", + "", + "" + ], + "3": [ + "Counter_1_i05", + "0", + "32", + "6", + false, + "0039", + "", + "" + ], + "4": [ + "Counter_2_i05", + "0", + "32", + "10", + false, + "0040", + "", + "" + ], + "5": [ + "Counter_3_i05", + "0", + "32", + "14", + false, + "0041", + "", + "" + ], + "6": [ + "Counter_4_i05", + "0", + "32", + "18", + false, + "0042", + "", + "" + ], + "7": [ + "Counter_5_i05", + "0", + "32", + "22", + false, + "0043", + "", + "" + ], + "8": [ + "Counter_6_i05", + "0", + "32", + "26", + false, + "0044", + "", + "" + ], + "9": [ + "Counter_7_i05", + "0", + "32", + "30", + false, + "0045", + "", + "" + ], + "10": [ + "Counter_8_i05", + "0", + "32", + "34", + false, + "0046", + "", + "" + ], + "11": [ + "Counter_9_i05", + "0", + "32", + "38", + false, + "0047", + "", + "" + ], + "12": [ + "Counter_10_i05", + "0", + "32", + "42", + false, + "0048", + "", + "" + ], + "13": [ + "Counter_11_i05", + "0", + "32", + "46", + false, + "0049", + "", + "" + ], + "14": [ + "Counter_12_i05", + "0", + "32", + "50", + false, + "0050", + "", + "" + ], + "15": [ + "Counter_13_i05", + "0", + "32", + "54", + false, + "0051", + "", + "" + ], + "16": [ + "Counter_14_i05", + "0", + "32", + "58", + false, + "0052", + "", + "" + ], + "17": [ + "Counter_15_i05", + "0", + "32", + "62", + false, + "0053", + "", + "" + ], + "18": [ + "Counter_16_i05", + "0", + "32", + "66", + false, + "0054", + "", + "" + ] + }, + "out": { + "0": [ + "fu_reset", + "0", + "1", + "70", + true, + "0002", + "", + "0" + ], + "1": [ + "h_start", + "0", + "1", + "70", + true, + "0003", + "", + "1" + ], + "2": [ + "h_fehler", + "0", + "1", + "70", + true, + "0004", + "", + "2" + ], + "3": [ + "O_04_i05", + "0", + "1", + "70", + true, + "0005", + "", + "3" + ], + "4": [ + "O_05_i05", + "0", + "1", + "70", + true, + "0006", + "", + "4" + ], + "5": [ + "O_06_i05", + "0", + "1", + "70", + true, + "0007", + "", + "5" + ], + "6": [ + "O_07_i05", + "0", + "1", + "70", + true, + "0008", + "", + "6" + ], + "7": [ + "O_08_i05", + "0", + "1", + "70", + true, + "0009", + "", + "7" + ], + "8": [ + "O_09_i05", + "0", + "1", + "70", + true, + "0010", + "", + "8" + ], + "9": [ + "O_10_i05", + "0", + "1", + "70", + true, + "0011", + "", + "9" + ], + "10": [ + "O_11_i05", + "0", + "1", + "70", + true, + "0012", + "", + "10" + ], + "11": [ + "O_12_i05", + "0", + "1", + "70", + true, + "0013", + "", + "11" + ], + "12": [ + "O_13_i05", + "0", + "1", + "70", + true, + "0014", + "", + "12" + ], + "13": [ + "O_14_i05", + "0", + "1", + "70", + true, + "0015", + "", + "13" + ], + "14": [ + "O_15_i05", + "0", + "1", + "70", + true, + "0016", + "", + "14" + ], + "15": [ + "mb_connect", + "0", + "1", + "70", + true, + "0017", + "", + "15" + ], + "16": [ + "PWM_1_i05", + "0", + "8", + "72", + false, + "0018", + "", + "" + ], + "17": [ + "PWM_2_i05", + "0", + "8", + "73", + false, + "0019", + "", + "" + ], + "18": [ + "PWM_3_i05", + "0", + "8", + "74", + false, + "0020", + "", + "" + ], + "19": [ + "PWM_4_i05", + "0", + "8", + "75", + false, + "0021", + "", + "" + ], + "20": [ + "PWM_5_i05", + "0", + "8", + "76", + false, + "0022", + "", + "" + ], + "21": [ + "PWM_6_i05", + "0", + "8", + "77", + false, + "0023", + "", + "" + ], + "22": [ + "PWM_7_i05", + "0", + "8", + "78", + false, + "0024", + "", + "" + ], + "23": [ + "PWM_8_i05", + "0", + "8", + "79", + false, + "0025", + "", + "" + ], + "24": [ + "PWM_9_i05", + "0", + "8", + "80", + false, + "0026", + "", + "" + ], + "25": [ + "PWM_10_i05", + "0", + "8", + "81", + false, + "0027", + "", + "" + ], + "26": [ + "PWM_11_i05", + "0", + "8", + "82", + false, + "0028", + "", + "" + ], + "27": [ + "PWM_12_i05", + "0", + "8", + "83", + false, + "0029", + "", + "" + ], + "28": [ + "PWM_13_i05", + "0", + "8", + "84", + false, + "0030", + "", + "" + ], + "29": [ + "PWM_14_i05", + "0", + "8", + "85", + false, + "0031", + "", + "" + ], + "30": [ + "PWM_15_i05", + "0", + "8", + "86", + false, + "0032", + "", + "" + ], + "31": [ + "PWM_16_i05", + "0", + "8", + "87", + false, + "0033", + "", + "" + ] + }, + "mem": { + "0": [ + "OutputPushPull_i05", + "0", + "16", + "106", + false, + "0034", + "", + "" + ], + "1": [ + "OutputOpenLoadDetect_i05", + "0", + "16", + "108", + false, + "0035", + "", + "" + ], + "2": [ + "OutputPWMActive_i05", + "0", + "16", + "110", + false, + "0036", + "", + "" + ], + "3": [ + "OutputPWMFrequency_i05", + "1", + "8", + "112", + false, + "0037", + "", + "" + ], + "4": [ + "InputMode_1_i05", + "0", + "8", + "88", + false, + "0055", + "", + "" + ], + "5": [ + "InputMode_2_i05", + "0", + "8", + "89", + false, + "0056", + "", + "" + ], + "6": [ + "InputMode_3_i05", + "0", + "8", + "90", + false, + "0057", + "", + "" + ], + "7": [ + "InputMode_4_i05", + "0", + "8", + "91", + false, + "0058", + "", + "" + ], + "8": [ + "InputMode_5_i05", + "0", + "8", + "92", + false, + "0059", + "", + "" + ], + "9": [ + "InputMode_6_i05", + "0", + "8", + "93", + false, + "0060", + "", + "" + ], + "10": [ + "InputMode_7_i05", + "0", + "8", + "94", + false, + "0061", + "", + "" + ], + "11": [ + "InputMode_8_i05", + "0", + "8", + "95", + false, + "0062", + "", + "" + ], + "12": [ + "InputMode_9_i05", + "0", + "8", + "96", + false, + "0063", + "", + "" + ], + "13": [ + "InputMode_10_i05", + "0", + "8", + "97", + false, + "0064", + "", + "" + ], + "14": [ + "InputMode_11_i05", + "0", + "8", + "98", + false, + "0065", + "", + "" + ], + "15": [ + "InputMode_12_i05", + "0", + "8", + "99", + false, + "0066", + "", + "" + ], + "16": [ + "InputMode_13_i05", + "0", + "8", + "100", + false, + "0067", + "", + "" + ], + "17": [ + "InputMode_14_i05", + "0", + "8", + "101", + false, + "0068", + "", + "" + ], + "18": [ + "InputMode_15_i05", + "0", + "8", + "102", + false, + "0069", + "", + "" + ], + "19": [ + "InputMode_16_i05", + "0", + "8", + "103", + false, + "0070", + "", + "" + ], + "20": [ + "InputDebounce_i05", + "0", + "16", + "104", + false, + "0071", + "", + "" + ] + }, + "extend": {} + }, + { + "catalogNr": "RevPiAIO", + "GUID": "76f10e57-ecaf-2a45-f4df-b9a66e3f40db", + "id": "device_RevPiAIO_20170301_1_0_001", + "type": "LEFT_RIGHT", + "productType": "103", + "position": "36", + "name": "aio01", + "bmk": "RevPi AIO", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 463, + "inp": { + "0": [ + "fu_ist", + "0", + "16", + "0", + false, + "0000", + "", + "" + ], + "1": [ + "InputValue_2", + "0", + "16", + "2", + false, + "0001", + "", + "" + ], + "2": [ + "InputValue_3", + "0", + "16", + "4", + false, + "0002", + "", + "" + ], + "3": [ + "InputValue_4", + "0", + "16", + "6", + false, + "0003", + "", + "" + ], + "4": [ + "InputStatus_1", + "0", + "8", + "8", + false, + "0004", + "", + "" + ], + "5": [ + "InputStatus_2", + "0", + "8", + "9", + false, + "0005", + "", + "" + ], + "6": [ + "InputStatus_3", + "0", + "8", + "10", + false, + "0006", + "", + "" + ], + "7": [ + "InputStatus_4", + "0", + "8", + "11", + false, + "0007", + "", + "" + ], + "8": [ + "tmp_schrank", + "0", + "16", + "12", + false, + "0008", + "", + "" + ], + "9": [ + "RTDValue_2", + "0", + "16", + "14", + false, + "0009", + "", + "" + ], + "10": [ + "RTDStatus_1", + "0", + "8", + "16", + false, + "0010", + "", + "" + ], + "11": [ + "RTDStatus_2", + "0", + "8", + "17", + false, + "0011", + "", + "" + ], + "12": [ + "OutputStatus_1", + "0", + "8", + "18", + false, + "0012", + "", + "" + ], + "13": [ + "OutputStatus_2", + "0", + "8", + "19", + false, + "0013", + "", + "" + ] + }, + "out": { + "0": [ + "OutputValue_1", + "0", + "16", + "20", + false, + "0014", + "", + "" + ], + "1": [ + "fu_soll", + "0", + "16", + "22", + false, + "0015", + "", + "" + ] + }, + "mem": { + "0": [ + "Input1Range", + "1", + "8", + "24", + false, + "0016", + "You must use wire bridges for current measurement!", + "" + ], + "1": [ + "Input1Multiplier", + "1", + "16", + "25", + false, + "0017", + "", + "" + ], + "2": [ + "Input1Divisor", + "1", + "16", + "27", + false, + "0018", + "", + "" + ], + "3": [ + "Input1Offset", + "0", + "16", + "29", + false, + "0019", + "", + "" + ], + "4": [ + "Input2Range", + "1", + "8", + "31", + false, + "0020", + "You must use wire bridges for current measurement!", + "" + ], + "5": [ + "Input2Multiplier", + "1", + "16", + "32", + false, + "0021", + "", + "" + ], + "6": [ + "Input2Divisor", + "1", + "16", + "34", + false, + "0022", + "", + "" + ], + "7": [ + "Input2Offset", + "0", + "16", + "36", + false, + "0023", + "", + "" + ], + "8": [ + "Input3Range", + "1", + "8", + "38", + false, + "0024", + "You must use wire bridges for current measurement!", + "" + ], + "9": [ + "Input3Multiplier", + "1", + "16", + "39", + false, + "0025", + "", + "" + ], + "10": [ + "Input3Divisor", + "1", + "16", + "41", + false, + "0026", + "", + "" + ], + "11": [ + "Input3Offset", + "0", + "16", + "43", + false, + "0027", + "", + "" + ], + "12": [ + "Input4Range", + "1", + "8", + "45", + false, + "0028", + "You must use wire bridges for current measurement!", + "" + ], + "13": [ + "Input4Multiplier", + "1", + "16", + "46", + false, + "0029", + "", + "" + ], + "14": [ + "Input4Divisor", + "1", + "16", + "48", + false, + "0030", + "", + "" + ], + "15": [ + "Input4Offset", + "0", + "16", + "50", + false, + "0031", + "", + "" + ], + "16": [ + "ADC_DataRate", + "0", + "8", + "52", + false, + "0032", + "Use lowest value for highest precision and a maximum 50 Hz suppression", + "" + ], + "17": [ + "RTD1Type", + "0", + "8", + "53", + false, + "0033", + "", + "" + ], + "18": [ + "RTD1Wiring", + "0", + "8", + "54", + false, + "0034", + "You must use wire bridges for 2-wire sensors!", + "" + ], + "19": [ + "RTD1Multiplier", + "1", + "16", + "55", + false, + "0035", + "", + "" + ], + "20": [ + "RTD1Divisor", + "1", + "16", + "57", + false, + "0036", + "", + "" + ], + "21": [ + "RTD1Offset", + "0", + "16", + "59", + false, + "0037", + "", + "" + ], + "22": [ + "RTD2Type", + "0", + "8", + "61", + false, + "0038", + "", + "" + ], + "23": [ + "RTD2Wiring", + "0", + "8", + "62", + false, + "0039", + "You must use wire bridges for 2-wire sensors!", + "" + ], + "24": [ + "RTD2Multiplier", + "1", + "16", + "63", + false, + "0040", + "", + "" + ], + "25": [ + "RTD2Divisor", + "1", + "16", + "65", + false, + "0041", + "", + "" + ], + "26": [ + "RTD2Offset", + "0", + "16", + "67", + false, + "0042", + "", + "" + ], + "27": [ + "Output1Range", + "0", + "8", + "69", + false, + "0043", + "", + "" + ], + "28": [ + "Output1EnableSlew", + "0", + "8", + "70", + false, + "0044", + "Enable slew rate deceleration", + "" + ], + "29": [ + "Output1SlewStepSize", + "0", + "8", + "71", + false, + "0045", + "Slew rate step size", + "" + ], + "30": [ + "Output1SlewClock", + "0", + "8", + "72", + false, + "0046", + "lock rate of slew rate deceleration in kHz", + "" + ], + "31": [ + "Output1Multiplier", + "1", + "16", + "73", + false, + "0047", + "", + "" + ], + "32": [ + "Output1Divisor", + "1", + "16", + "75", + false, + "0048", + "", + "" + ], + "33": [ + "Output1Offset", + "0", + "16", + "77", + false, + "0049", + "", + "" + ], + "34": [ + "Output2Range", + "2", + "8", + "79", + false, + "0050", + "", + "" + ], + "35": [ + "Output2EnableSlew", + "0", + "8", + "80", + false, + "0051", + "Enable slew rate deceleration", + "" + ], + "36": [ + "Output2SlewStepSize", + "0", + "8", + "81", + false, + "0052", + "Slew rate step size", + "" + ], + "37": [ + "Output2SlewClock", + "0", + "8", + "82", + false, + "0053", + "lock rate of slew rate deceleration in kHz", + "" + ], + "38": [ + "Output2Multiplier", + "1", + "16", + "83", + false, + "0054", + "", + "" + ], + "39": [ + "Output2Divisor", + "1", + "16", + "85", + false, + "0055", + "", + "" + ], + "40": [ + "Output2Offset", + "0", + "16", + "87", + false, + "0056", + "", + "" + ] + }, + "extend": {} + }, + { + "catalogNr": "Virtual01", + "GUID": "c3bf8705-d96a-6452-2566-40c5d86a5061", + "id": "device_Virtual01_20160818_1_0_001", + "type": "VIRTUAL", + "productType": "32768", + "position": "64", + "name": "virt01", + "bmk": "Virtual Device 32 Byte", + "inpVariant": 0, + "outVariant": 0, + "comment": "Virtual Device to reserve space in process image for user applications", + "offset": 552, + "inp": { + "0": [ + "pbit0_7", + "0", + "8", + "0", + false, + "0000", + "", + "" + ], + "1": [ + "pbit8_15", + "0", + "8", + "1", + false, + "0001", + "", + "" + ], + "2": [ + "pbit16_23", + "0", + "8", + "2", + false, + "0002", + "", + "" + ], + "3": [ + "pbit24_31", + "0", + "8", + "3", + false, + "0003", + "", + "" + ], + "4": [ + "magazin1_max", + "4", + "8", + "4", + false, + "0004", + "", + "" + ], + "5": [ + "magazin2_max", + "4", + "8", + "5", + false, + "0005", + "", + "" + ], + "6": [ + "p_drehzahl1", + "136", + "8", + "6", + false, + "0006", + "", + "" + ], + "7": [ + "p_drehzahl2", + "19", + "8", + "7", + false, + "0007", + "", + "" + ], + "8": [ + "Input_9", + "0", + "8", + "8", + false, + "0008", + "", + "" + ], + "9": [ + "Input_10", + "0", + "8", + "9", + false, + "0009", + "", + "" + ], + "10": [ + "Input_11", + "0", + "8", + "10", + false, + "0010", + "", + "" + ], + "11": [ + "Input_12", + "0", + "8", + "11", + false, + "0011", + "", + "" + ], + "12": [ + "Input_13", + "0", + "8", + "12", + false, + "0012", + "", + "" + ], + "13": [ + "Input_14", + "0", + "8", + "13", + false, + "0013", + "", + "" + ], + "14": [ + "Input_15", + "0", + "8", + "14", + false, + "0014", + "", + "" + ], + "15": [ + "Input_16", + "0", + "8", + "15", + false, + "0015", + "", + "" + ], + "16": [ + "Input_17", + "0", + "8", + "16", + false, + "0016", + "", + "" + ], + "17": [ + "Input_18", + "0", + "8", + "17", + false, + "0017", + "", + "" + ], + "18": [ + "Input_19", + "0", + "8", + "18", + false, + "0018", + "", + "" + ], + "19": [ + "Input_20", + "0", + "8", + "19", + false, + "0019", + "", + "" + ], + "20": [ + "Input_21", + "0", + "8", + "20", + false, + "0020", + "", + "" + ], + "21": [ + "Input_22", + "0", + "8", + "21", + false, + "0021", + "", + "" + ], + "22": [ + "Input_23", + "0", + "8", + "22", + false, + "0022", + "", + "" + ], + "23": [ + "Input_24", + "0", + "8", + "23", + false, + "0023", + "", + "" + ], + "24": [ + "Input_25", + "0", + "8", + "24", + false, + "0024", + "", + "" + ], + "25": [ + "Input_26", + "0", + "8", + "25", + false, + "0025", + "", + "" + ], + "26": [ + "Input_27", + "0", + "8", + "26", + false, + "0026", + "", + "" + ], + "27": [ + "Input_28", + "0", + "8", + "27", + false, + "0027", + "", + "" + ], + "28": [ + "Input_29", + "0", + "8", + "28", + false, + "0028", + "", + "" + ], + "29": [ + "Input_30", + "0", + "8", + "29", + false, + "0029", + "", + "" + ], + "30": [ + "Input_31", + "0", + "8", + "30", + false, + "0030", + "", + "" + ], + "31": [ + "Input_32", + "0", + "8", + "31", + false, + "0031", + "", + "" + ] + }, + "out": { + "0": [ + "meldung0_7", + "0", + "8", + "32", + false, + "0032", + "", + "" + ], + "1": [ + "meldung8_15", + "0", + "8", + "33", + false, + "0033", + "", + "" + ], + "2": [ + "meldung16_23", + "0", + "8", + "34", + false, + "0034", + "", + "" + ], + "3": [ + "meldung24_31", + "0", + "8", + "35", + false, + "0035", + "", + "" + ], + "4": [ + "magazin1", + "0", + "8", + "36", + false, + "0036", + "", + "" + ], + "5": [ + "magazin2", + "0", + "8", + "37", + false, + "0037", + "", + "" + ], + "6": [ + "Output_7", + "0", + "8", + "38", + false, + "0038", + "", + "" + ], + "7": [ + "Output_8", + "0", + "8", + "39", + false, + "0039", + "", + "" + ], + "8": [ + "Output_9", + "0", + "8", + "40", + false, + "0040", + "", + "" + ], + "9": [ + "Output_10", + "0", + "8", + "41", + false, + "0041", + "", + "" + ], + "10": [ + "Output_11", + "0", + "8", + "42", + false, + "0042", + "", + "" + ], + "11": [ + "Output_12", + "0", + "8", + "43", + false, + "0043", + "", + "" + ], + "12": [ + "Output_13", + "0", + "8", + "44", + false, + "0044", + "", + "" + ], + "13": [ + "Output_14", + "0", + "8", + "45", + false, + "0045", + "", + "" + ], + "14": [ + "Output_15", + "0", + "8", + "46", + false, + "0046", + "", + "" + ], + "15": [ + "Output_16", + "0", + "8", + "47", + false, + "0047", + "", + "" + ], + "16": [ + "Output_17", + "0", + "8", + "48", + false, + "0048", + "", + "" + ], + "17": [ + "Output_18", + "0", + "8", + "49", + false, + "0049", + "", + "" + ], + "18": [ + "Output_19", + "0", + "8", + "50", + false, + "0050", + "", + "" + ], + "19": [ + "Output_20", + "0", + "8", + "51", + false, + "0051", + "", + "" + ], + "20": [ + "Output_21", + "0", + "8", + "52", + false, + "0052", + "", + "" + ], + "21": [ + "Output_22", + "0", + "8", + "53", + false, + "0053", + "", + "" + ], + "22": [ + "Output_23", + "0", + "8", + "54", + false, + "0054", + "", + "" + ], + "23": [ + "Output_24", + "0", + "8", + "55", + false, + "0055", + "", + "" + ], + "24": [ + "Output_25", + "0", + "8", + "56", + false, + "0056", + "", + "" + ], + "25": [ + "Output_26", + "0", + "8", + "57", + false, + "0057", + "", + "" + ], + "26": [ + "Output_27", + "0", + "8", + "58", + false, + "0058", + "", + "" + ], + "27": [ + "Output_28", + "0", + "8", + "59", + false, + "0059", + "", + "" + ], + "28": [ + "Output_29", + "0", + "8", + "60", + false, + "0060", + "", + "" + ], + "29": [ + "Output_30", + "0", + "8", + "61", + false, + "0061", + "", + "" + ], + "30": [ + "Output_31", + "0", + "8", + "62", + false, + "0062", + "", + "" + ], + "31": [ + "Output_32", + "0", + "8", + "63", + false, + "0063", + "", + "" + ] + }, + "mem": {}, + "extend": {} + } + ], + "Connections": [] +} diff --git a/tests/revpi3/test_core.py b/tests/revpi3/test_core.py new file mode 100644 index 0000000..de52730 --- /dev/null +++ b/tests/revpi3/test_core.py @@ -0,0 +1,93 @@ +# -*- coding: utf-8 -*- +"""Tests for RevPi Core 1/3 devices.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" + +from os.path import dirname + +from revpimodio2 import RED, GREEN, OFF, BLUE +from revpimodio2.io import IOBase, IntIO +from tests import TestRevPiModIO + + +class TestRevPiCore(TestRevPiModIO): + + data_dir = dirname(__file__) + + def test_core(self): + """Test Core device.""" + rpi = self.modio(configrsc="config_core.rsc") + + # Test IOs of core device + for io in rpi.core: + self.assertIsInstance(io, IntIO) + self.assertEqual(type(io.value), int) + + # Test CORE LEDs + def get_led_byte(): + self.fh_procimg.seek(6) + return self.fh_procimg.read(1) + + lst_test_led = [ + (rpi.core._get_leda1, rpi.core._set_leda1, GREEN, b"\x01"), + (rpi.core._get_leda1, rpi.core._set_leda1, OFF, b"\x00"), + (rpi.core._get_leda1, rpi.core._set_leda1, RED, b"\x02"), + (rpi.core._get_leda2, rpi.core._set_leda2, GREEN, b"\x06"), + (rpi.core._get_leda2, rpi.core._set_leda2, OFF, b"\x02"), + (rpi.core._get_leda2, rpi.core._set_leda2, RED, b"\x0a"), + ] + for get_led, set_led, value, expected in lst_test_led: + with rpi.io: + set_led(value) + self.assertEqual(rpi.io.RevPiLED.get_value(), expected) + self.assertEqual(get_led_byte(), expected) + self.assertEqual(get_led(), value) + with self.assertRaises(ValueError): + set_led(BLUE) + + # LED IOs after previews tests both read leds are on + self.assertIsInstance(rpi.core.a1green, IOBase) + self.assertIsInstance(rpi.core.a1red, IOBase) + self.assertIsInstance(rpi.core.a2green, IOBase) + self.assertIsInstance(rpi.core.a1red, IOBase) + with self.assertRaises(AttributeError): + rpi.core.a1green = True + with self.assertRaises(AttributeError): + rpi.core.a1red = True + with self.assertRaises(AttributeError): + rpi.core.a2green = True + with self.assertRaises(AttributeError): + rpi.core.a2red = True + with rpi.io: + self.assertTrue(rpi.core.a1red()) + self.assertFalse(rpi.core.a1green()) + self.assertTrue(rpi.core.a2red()) + self.assertFalse(rpi.core.a2green()) + + # Software watchdog (same bit as hardware watchdog on connect 3) + self.assertFalse(rpi.core.wd.value) + rpi.core.wd_toggle() + self.assertTrue(rpi.core.wd.value) + + self.assertIsInstance(rpi.core.status, int) + self.assertIsInstance(rpi.core.picontrolrunning, bool) + self.assertIsInstance(rpi.core.unconfdevice, bool) + self.assertIsInstance(rpi.core.missingdeviceorgate, bool) + self.assertIsInstance(rpi.core.overunderflow, bool) + self.assertIsInstance(rpi.core.leftgate, bool) + self.assertIsInstance(rpi.core.rightgate, bool) + self.assertIsInstance(rpi.core.iocycle, int) + self.assertIsInstance(rpi.core.temperature, int) + self.assertIsInstance(rpi.core.frequency, int) + self.assertIsInstance(rpi.core.ioerrorcount, int) + self.assertIsInstance(rpi.core.errorlimit1, int) + rpi.core.errorlimit1 = 10 + self.assertEqual(rpi.core.errorlimit1, 10) + with self.assertRaises(ValueError): + rpi.core.errorlimit1 = -1 + self.assertIsInstance(rpi.core.errorlimit2, int) + rpi.core.errorlimit2 = 1100 + self.assertEqual(rpi.core.errorlimit2, 1100) + with self.assertRaises(ValueError): + rpi.core.errorlimit2 = 65999 From 43d2b12413b333e65ae88e65a7f7316c061fcb05 Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Tue, 29 Oct 2024 08:43:55 +0100 Subject: [PATCH 11/26] test: Connect devices --- tests/revpi3/config_connect.rsc | 825 +++++++++++++ tests/revpi3/config_connect_left.rsc | 1698 ++++++++++++++++++++++++++ tests/revpi3/test_connect.py | 83 ++ 3 files changed, 2606 insertions(+) create mode 100644 tests/revpi3/config_connect.rsc create mode 100644 tests/revpi3/config_connect_left.rsc create mode 100644 tests/revpi3/test_connect.py diff --git a/tests/revpi3/config_connect.rsc b/tests/revpi3/config_connect.rsc new file mode 100644 index 0000000..7f01bce --- /dev/null +++ b/tests/revpi3/config_connect.rsc @@ -0,0 +1,825 @@ +{ + "App": { + "name": "PiCtory", + "version": "1.3.10", + "saveTS": "20180731225026", + "language": "en", + "layout": { + "north": { + "size": 70, + "initClosed": false, + "initHidden": false + }, + "south": { + "size": 420, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": { + "east": { + "size": 500, + "initClosed": false, + "initHidden": false + } + } + } + }, + "east": { + "size": 70, + "initClosed": true, + "initHidden": false, + "children": {} + }, + "west": { + "size": 200, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": {} + } + } + } + }, + "Summary": { + "inpTotal": 38, + "outTotal": 37 + }, + "Devices": [ + { + "GUID": "6ad3c1a4-6870-3bf1-6d55-b9d991ba9dc0", + "id": "device_RevPiConnect_20171023_1_0_001", + "type": "BASE", + "productType": "105", + "position": "0", + "name": "RevPi Connect V1.0", + "bmk": "RevPi Connect V1.0", + "inpVariant": 0, + "outVariant": 0, + "comment": "This is a RevPi Connect", + "offset": 0, + "inp": { + "0": [ + "RevPiStatus", + "0", + "8", + "0", + true, + "0000", + "", + "" + ], + "1": [ + "RevPiIOCycle", + "0", + "8", + "1", + true, + "0001", + "", + "" + ], + "2": [ + "RS485ErrorCnt", + "0", + "16", + "2", + false, + "0002", + "", + "" + ], + "3": [ + "Core_Temperature", + "0", + "8", + "4", + false, + "0003", + "", + "" + ], + "4": [ + "Core_Frequency", + "0", + "8", + "5", + false, + "0004", + "", + "" + ] + }, + "out": { + "0": [ + "RevPiLED", + "0", + "8", + "6", + true, + "0005", + "", + "" + ], + "1": [ + "RS485ErrorLimit1", + "10", + "16", + "7", + false, + "0006", + "", + "" + ], + "2": [ + "RS485ErrorLimit2", + "1000", + "16", + "9", + false, + "0007", + "", + "" + ] + }, + "mem": {}, + "extend": {} + }, + { + "GUID": "437fb6d7-6ef6-8fc8-0bf2-f618576e1aca", + "id": "device_RevPiConBT_20180425_1_0_001", + "type": "RIGHT", + "productType": "111", + "position": "32", + "name": "Connect Bluetooth", + "bmk": "Connect Bluetooth", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 11, + "inp": {}, + "out": {}, + "mem": {}, + "extend": {} + }, + { + "GUID": "2e9cd04b-b7e6-715a-4925-82ffbf0ff45e", + "id": "device_Virtual01_20160818_1_0_001", + "type": "VIRTUAL", + "productType": "32768", + "position": "64", + "name": "Virtual Device 32 Byte", + "bmk": "Virtual Device 32 Byte", + "inpVariant": 0, + "outVariant": 0, + "comment": "Virtual Device to reserve space in process image for user applications", + "offset": 11, + "inp": { + "0": [ + "Input_1", + "0", + "8", + "0", + false, + "0000", + "", + "" + ], + "1": [ + "Input_2", + "0", + "8", + "1", + false, + "0001", + "", + "" + ], + "2": [ + "Input_3", + "0", + "8", + "2", + false, + "0002", + "", + "" + ], + "3": [ + "Input_4", + "0", + "8", + "3", + false, + "0003", + "", + "" + ], + "4": [ + "Input_5", + "0", + "8", + "4", + false, + "0004", + "", + "" + ], + "5": [ + "Input_6", + "0", + "8", + "5", + false, + "0005", + "", + "" + ], + "6": [ + "Input_7", + "0", + "8", + "6", + false, + "0006", + "", + "" + ], + "7": [ + "Input_8", + "0", + "8", + "7", + false, + "0007", + "", + "" + ], + "8": [ + "Input_9", + "0", + "8", + "8", + false, + "0008", + "", + "" + ], + "9": [ + "Input_10", + "0", + "8", + "9", + false, + "0009", + "", + "" + ], + "10": [ + "Input_11", + "0", + "8", + "10", + false, + "0010", + "", + "" + ], + "11": [ + "Input_12", + "0", + "8", + "11", + false, + "0011", + "", + "" + ], + "12": [ + "Input_13", + "0", + "8", + "12", + false, + "0012", + "", + "" + ], + "13": [ + "Input_14", + "0", + "8", + "13", + false, + "0013", + "", + "" + ], + "14": [ + "Input_15", + "0", + "8", + "14", + false, + "0014", + "", + "" + ], + "15": [ + "Input_16", + "0", + "8", + "15", + false, + "0015", + "", + "" + ], + "16": [ + "Input_17", + "0", + "8", + "16", + false, + "0016", + "", + "" + ], + "17": [ + "Input_18", + "0", + "8", + "17", + false, + "0017", + "", + "" + ], + "18": [ + "Input_19", + "0", + "8", + "18", + false, + "0018", + "", + "" + ], + "19": [ + "Input_20", + "0", + "8", + "19", + false, + "0019", + "", + "" + ], + "20": [ + "Input_21", + "0", + "8", + "20", + false, + "0020", + "", + "" + ], + "21": [ + "Input_22", + "0", + "8", + "21", + false, + "0021", + "", + "" + ], + "22": [ + "Input_23", + "0", + "8", + "22", + false, + "0022", + "", + "" + ], + "23": [ + "Input_24", + "0", + "8", + "23", + false, + "0023", + "", + "" + ], + "24": [ + "Input_25", + "0", + "8", + "24", + false, + "0024", + "", + "" + ], + "25": [ + "Input_26", + "0", + "8", + "25", + false, + "0025", + "", + "" + ], + "26": [ + "Input_27", + "0", + "8", + "26", + false, + "0026", + "", + "" + ], + "27": [ + "Input_28", + "0", + "8", + "27", + false, + "0027", + "", + "" + ], + "28": [ + "Input_29", + "0", + "8", + "28", + false, + "0028", + "", + "" + ], + "29": [ + "Input_30", + "0", + "8", + "29", + false, + "0029", + "", + "" + ], + "30": [ + "Input_31", + "0", + "8", + "30", + false, + "0030", + "", + "" + ], + "31": [ + "Input_32", + "0", + "8", + "31", + false, + "0031", + "", + "" + ] + }, + "out": { + "0": [ + "Output_1", + "0", + "8", + "32", + false, + "0032", + "", + "" + ], + "1": [ + "Output_2", + "0", + "8", + "33", + false, + "0033", + "", + "" + ], + "2": [ + "Output_3", + "0", + "8", + "34", + false, + "0034", + "", + "" + ], + "3": [ + "Output_4", + "0", + "8", + "35", + false, + "0035", + "", + "" + ], + "4": [ + "Output_5", + "0", + "8", + "36", + false, + "0036", + "", + "" + ], + "5": [ + "Output_6", + "0", + "8", + "37", + false, + "0037", + "", + "" + ], + "6": [ + "Output_7", + "0", + "8", + "38", + false, + "0038", + "", + "" + ], + "7": [ + "Output_8", + "0", + "8", + "39", + false, + "0039", + "", + "" + ], + "8": [ + "Output_9", + "0", + "8", + "40", + false, + "0040", + "", + "" + ], + "9": [ + "Output_10", + "0", + "8", + "41", + false, + "0041", + "", + "" + ], + "10": [ + "Output_11", + "0", + "8", + "42", + false, + "0042", + "", + "" + ], + "11": [ + "Output_12", + "0", + "8", + "43", + false, + "0043", + "", + "" + ], + "12": [ + "Output_13", + "0", + "8", + "44", + false, + "0044", + "", + "" + ], + "13": [ + "Output_14", + "0", + "8", + "45", + false, + "0045", + "", + "" + ], + "14": [ + "Output_15", + "0", + "8", + "46", + false, + "0046", + "", + "" + ], + "15": [ + "Output_16", + "0", + "8", + "47", + false, + "0047", + "", + "" + ], + "16": [ + "Output_17", + "0", + "8", + "48", + false, + "0048", + "", + "" + ], + "17": [ + "Output_18", + "0", + "8", + "49", + false, + "0049", + "", + "" + ], + "18": [ + "Output_19", + "0", + "8", + "50", + false, + "0050", + "", + "" + ], + "19": [ + "Output_20", + "0", + "8", + "51", + false, + "0051", + "", + "" + ], + "20": [ + "Output_21", + "0", + "8", + "52", + false, + "0052", + "", + "" + ], + "21": [ + "Output_22", + "0", + "8", + "53", + false, + "0053", + "", + "" + ], + "22": [ + "Output_23", + "0", + "8", + "54", + false, + "0054", + "", + "" + ], + "23": [ + "Output_24", + "0", + "8", + "55", + false, + "0055", + "", + "" + ], + "24": [ + "Output_25", + "0", + "8", + "56", + false, + "0056", + "", + "" + ], + "25": [ + "Output_26", + "0", + "8", + "57", + false, + "0057", + "", + "" + ], + "26": [ + "Output_27", + "0", + "8", + "58", + false, + "0058", + "", + "" + ], + "27": [ + "Output_28", + "0", + "8", + "59", + false, + "0059", + "", + "" + ], + "28": [ + "Output_29", + "0", + "8", + "60", + false, + "0060", + "", + "" + ], + "29": [ + "Output_30", + "0", + "8", + "61", + false, + "0061", + "", + "" + ], + "30": [ + "Output_31", + "0", + "8", + "62", + false, + "0062", + "", + "" + ], + "31": [ + "Output_32", + "0", + "8", + "63", + false, + "0063", + "", + "" + ] + }, + "mem": {}, + "extend": {} + } + ], + "Connections": [] +} diff --git a/tests/revpi3/config_connect_left.rsc b/tests/revpi3/config_connect_left.rsc new file mode 100644 index 0000000..3b2e2be --- /dev/null +++ b/tests/revpi3/config_connect_left.rsc @@ -0,0 +1,1698 @@ +{ + "App": { + "name": "PiCtory", + "version": "1.3.10", + "saveTS": "20180801144100", + "language": "en", + "layout": { + "north": { + "size": 70, + "initClosed": false, + "initHidden": false + }, + "south": { + "size": 420, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": { + "east": { + "size": 500, + "initClosed": false, + "initHidden": false + } + } + } + }, + "east": { + "size": 70, + "initClosed": true, + "initHidden": false, + "children": {} + }, + "west": { + "size": 200, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": {} + } + } + } + }, + "Summary": { + "inpTotal": 108, + "outTotal": 55 + }, + "Devices": [ + { + "GUID": "9e33e8d2-3775-0c8e-14f1-85bf5d05a514", + "id": "device_RevPiDIO_20160818_1_0_001", + "type": "LEFT_RIGHT", + "productType": "96", + "position": "31", + "name": "RevPi DIO", + "bmk": "RevPi DIO", + "inpVariant": 0, + "outVariant": 0, + "comment": "", + "offset": 0, + "inp": { + "0": [ + "I_1", + "0", + "1", + "0", + true, + "0000", + "", + "0" + ], + "1": [ + "I_2", + "0", + "1", + "0", + true, + "0001", + "", + "1" + ], + "2": [ + "I_3", + "0", + "1", + "0", + true, + "0002", + "", + "2" + ], + "3": [ + "I_4", + "0", + "1", + "0", + true, + "0003", + "", + "3" + ], + "4": [ + "I_5", + "0", + "1", + "0", + true, + "0004", + "", + "4" + ], + "5": [ + "I_6", + "0", + "1", + "0", + true, + "0005", + "", + "5" + ], + "6": [ + "I_7", + "0", + "1", + "0", + true, + "0006", + "", + "6" + ], + "7": [ + "I_8", + "0", + "1", + "0", + true, + "0007", + "", + "7" + ], + "8": [ + "I_9", + "0", + "1", + "0", + true, + "0008", + "", + "8" + ], + "9": [ + "I_10", + "0", + "1", + "0", + true, + "0009", + "", + "9" + ], + "10": [ + "I_11", + "0", + "1", + "0", + true, + "0010", + "", + "10" + ], + "11": [ + "I_12", + "0", + "1", + "0", + true, + "0011", + "", + "11" + ], + "12": [ + "I_13", + "0", + "1", + "0", + true, + "0012", + "", + "12" + ], + "13": [ + "I_14", + "0", + "1", + "0", + true, + "0013", + "", + "13" + ], + "14": [ + "I_15", + "0", + "1", + "0", + true, + "0014", + "", + "14" + ], + "15": [ + "I_16", + "0", + "1", + "0", + true, + "0015", + "", + "15" + ], + "16": [ + "Output_Status", + "0", + "16", + "2", + false, + "0016", + "", + "" + ], + "17": [ + "Status", + "0", + "16", + "4", + false, + "0017", + "", + "" + ], + "18": [ + "Counter_1", + "0", + "32", + "6", + false, + "0018", + "", + "" + ], + "19": [ + "Counter_2", + "0", + "32", + "10", + false, + "0019", + "", + "" + ], + "20": [ + "Counter_3", + "0", + "32", + "14", + false, + "0020", + "", + "" + ], + "21": [ + "Counter_4", + "0", + "32", + "18", + false, + "0021", + "", + "" + ], + "22": [ + "Counter_5", + "0", + "32", + "22", + false, + "0022", + "", + "" + ], + "23": [ + "Counter_6", + "0", + "32", + "26", + false, + "0023", + "", + "" + ], + "24": [ + "Counter_7", + "0", + "32", + "30", + false, + "0024", + "", + "" + ], + "25": [ + "Counter_8", + "0", + "32", + "34", + false, + "0025", + "", + "" + ], + "26": [ + "Counter_9", + "0", + "32", + "38", + false, + "0026", + "", + "" + ], + "27": [ + "Counter_10", + "0", + "32", + "42", + false, + "0027", + "", + "" + ], + "28": [ + "Counter_11", + "0", + "32", + "46", + false, + "0028", + "", + "" + ], + "29": [ + "Counter_12", + "0", + "32", + "50", + false, + "0029", + "", + "" + ], + "30": [ + "Counter_13", + "0", + "32", + "54", + false, + "0030", + "", + "" + ], + "31": [ + "Counter_14", + "0", + "32", + "58", + false, + "0031", + "", + "" + ], + "32": [ + "Counter_15", + "0", + "32", + "62", + false, + "0032", + "", + "" + ], + "33": [ + "Counter_16", + "0", + "32", + "66", + false, + "0033", + "", + "" + ] + }, + "out": { + "0": [ + "O_1", + "0", + "1", + "70", + true, + "0034", + "", + "0" + ], + "1": [ + "O_2", + "0", + "1", + "70", + true, + "0035", + "", + "1" + ], + "2": [ + "O_3", + "0", + "1", + "70", + true, + "0036", + "", + "2" + ], + "3": [ + "O_4", + "0", + "1", + "70", + true, + "0037", + "", + "3" + ], + "4": [ + "O_5", + "0", + "1", + "70", + true, + "0038", + "", + "4" + ], + "5": [ + "O_6", + "0", + "1", + "70", + true, + "0039", + "", + "5" + ], + "6": [ + "O_7", + "0", + "1", + "70", + true, + "0040", + "", + "6" + ], + "7": [ + "O_8", + "0", + "1", + "70", + true, + "0041", + "", + "7" + ], + "8": [ + "O_9", + "0", + "1", + "70", + true, + "0042", + "", + "8" + ], + "9": [ + "O_10", + "0", + "1", + "70", + true, + "0043", + "", + "9" + ], + "10": [ + "O_11", + "0", + "1", + "70", + true, + "0044", + "", + "10" + ], + "11": [ + "O_12", + "0", + "1", + "70", + true, + "0045", + "", + "11" + ], + "12": [ + "O_13", + "0", + "1", + "70", + true, + "0046", + "", + "12" + ], + "13": [ + "O_14", + "0", + "1", + "70", + true, + "0047", + "", + "13" + ], + "14": [ + "O_15", + "0", + "1", + "70", + true, + "0048", + "", + "14" + ], + "15": [ + "O_16", + "0", + "1", + "70", + true, + "0049", + "", + "15" + ], + "16": [ + "PWM_1", + "0", + "8", + "72", + false, + "0050", + "", + "" + ], + "17": [ + "PWM_2", + "0", + "8", + "73", + false, + "0051", + "", + "" + ], + "18": [ + "PWM_3", + "0", + "8", + "74", + false, + "0052", + "", + "" + ], + "19": [ + "PWM_4", + "0", + "8", + "75", + false, + "0053", + "", + "" + ], + "20": [ + "PWM_5", + "0", + "8", + "76", + false, + "0054", + "", + "" + ], + "21": [ + "PWM_6", + "0", + "8", + "77", + false, + "0055", + "", + "" + ], + "22": [ + "PWM_7", + "0", + "8", + "78", + false, + "0056", + "", + "" + ], + "23": [ + "PWM_8", + "0", + "8", + "79", + false, + "0057", + "", + "" + ], + "24": [ + "PWM_9", + "0", + "8", + "80", + false, + "0058", + "", + "" + ], + "25": [ + "PWM_10", + "0", + "8", + "81", + false, + "0059", + "", + "" + ], + "26": [ + "PWM_11", + "0", + "8", + "82", + false, + "0060", + "", + "" + ], + "27": [ + "PWM_12", + "0", + "8", + "83", + false, + "0061", + "", + "" + ], + "28": [ + "PWM_13", + "0", + "8", + "84", + false, + "0062", + "", + "" + ], + "29": [ + "PWM_14", + "0", + "8", + "85", + false, + "0063", + "", + "" + ], + "30": [ + "PWM_15", + "0", + "8", + "86", + false, + "0064", + "", + "" + ], + "31": [ + "PWM_16", + "0", + "8", + "87", + false, + "0065", + "", + "" + ] + }, + "mem": { + "0": [ + "InputMode_1", + "0", + "8", + "88", + false, + "0066", + "", + "" + ], + "1": [ + "InputMode_2", + "0", + "8", + "89", + false, + "0067", + "", + "" + ], + "2": [ + "InputMode_3", + "0", + "8", + "90", + false, + "0068", + "", + "" + ], + "3": [ + "InputMode_4", + "0", + "8", + "91", + false, + "0069", + "", + "" + ], + "4": [ + "InputMode_5", + "0", + "8", + "92", + false, + "0070", + "", + "" + ], + "5": [ + "InputMode_6", + "0", + "8", + "93", + false, + "0071", + "", + "" + ], + "6": [ + "InputMode_7", + "0", + "8", + "94", + false, + "0072", + "", + "" + ], + "7": [ + "InputMode_8", + "0", + "8", + "95", + false, + "0073", + "", + "" + ], + "8": [ + "InputMode_9", + "0", + "8", + "96", + false, + "0074", + "", + "" + ], + "9": [ + "InputMode_10", + "0", + "8", + "97", + false, + "0075", + "", + "" + ], + "10": [ + "InputMode_11", + "0", + "8", + "98", + false, + "0076", + "", + "" + ], + "11": [ + "InputMode_12", + "0", + "8", + "99", + false, + "0077", + "", + "" + ], + "12": [ + "InputMode_13", + "0", + "8", + "100", + false, + "0078", + "", + "" + ], + "13": [ + "InputMode_14", + "0", + "8", + "101", + false, + "0079", + "", + "" + ], + "14": [ + "InputMode_15", + "0", + "8", + "102", + false, + "0080", + "", + "" + ], + "15": [ + "InputMode_16", + "0", + "8", + "103", + false, + "0081", + "", + "" + ], + "16": [ + "InputDebounce", + "0", + "16", + "104", + false, + "0082", + "", + "" + ], + "17": [ + "OutputPushPull", + "0", + "16", + "106", + false, + "0083", + "", + "" + ], + "18": [ + "OutputOpenLoadDetect", + "0", + "16", + "108", + false, + "0084", + "", + "" + ], + "19": [ + "OutputPWMActive", + "0", + "16", + "110", + false, + "0085", + "", + "" + ], + "20": [ + "OutputPWMFrequency", + "1", + "8", + "112", + false, + "0086", + "", + "" + ] + }, + "extend": {} + }, + { + "GUID": "6ad3c1a4-6870-3bf1-6d55-b9d991ba9dc0", + "id": "device_RevPiConnect_20171023_1_0_001", + "type": "BASE", + "productType": "105", + "position": "0", + "name": "RevPi Connect V1.0", + "bmk": "RevPi Connect V1.0", + "inpVariant": 0, + "outVariant": 0, + "comment": "This is a RevPi Connect", + "offset": 113, + "inp": { + "0": [ + "RevPiStatus", + "0", + "8", + "0", + true, + "0000", + "", + "" + ], + "1": [ + "RevPiIOCycle", + "0", + "8", + "1", + true, + "0001", + "", + "" + ], + "2": [ + "RS485ErrorCnt", + "0", + "16", + "2", + false, + "0002", + "", + "" + ], + "3": [ + "Core_Temperature", + "0", + "8", + "4", + false, + "0003", + "", + "" + ], + "4": [ + "Core_Frequency", + "0", + "8", + "5", + false, + "0004", + "", + "" + ] + }, + "out": { + "0": [ + "RevPiLED", + "0", + "8", + "6", + true, + "0005", + "", + "" + ], + "1": [ + "RS485ErrorLimit1", + "10", + "16", + "7", + false, + "0006", + "", + "" + ], + "2": [ + "RS485ErrorLimit2", + "1000", + "16", + "9", + false, + "0007", + "", + "" + ] + }, + "mem": {}, + "extend": {} + }, + { + "GUID": "2e9cd04b-b7e6-715a-4925-82ffbf0ff45e", + "id": "device_Virtual01_20160818_1_0_001", + "type": "VIRTUAL", + "productType": "32768", + "position": "64", + "name": "Virtual Device 32 Byte", + "bmk": "Virtual Device 32 Byte", + "inpVariant": 0, + "outVariant": 0, + "comment": "Virtual Device to reserve space in process image for user applications", + "offset": 124, + "inp": { + "0": [ + "Input_1", + "0", + "8", + "0", + false, + "0000", + "", + "" + ], + "1": [ + "Input_2", + "0", + "8", + "1", + false, + "0001", + "", + "" + ], + "2": [ + "Input_3", + "0", + "8", + "2", + false, + "0002", + "", + "" + ], + "3": [ + "Input_4", + "0", + "8", + "3", + false, + "0003", + "", + "" + ], + "4": [ + "Input_5", + "0", + "8", + "4", + false, + "0004", + "", + "" + ], + "5": [ + "Input_6", + "0", + "8", + "5", + false, + "0005", + "", + "" + ], + "6": [ + "Input_7", + "0", + "8", + "6", + false, + "0006", + "", + "" + ], + "7": [ + "Input_8", + "0", + "8", + "7", + false, + "0007", + "", + "" + ], + "8": [ + "Input_9", + "0", + "8", + "8", + false, + "0008", + "", + "" + ], + "9": [ + "Input_10", + "0", + "8", + "9", + false, + "0009", + "", + "" + ], + "10": [ + "Input_11", + "0", + "8", + "10", + false, + "0010", + "", + "" + ], + "11": [ + "Input_12", + "0", + "8", + "11", + false, + "0011", + "", + "" + ], + "12": [ + "Input_13", + "0", + "8", + "12", + false, + "0012", + "", + "" + ], + "13": [ + "Input_14", + "0", + "8", + "13", + false, + "0013", + "", + "" + ], + "14": [ + "Input_15", + "0", + "8", + "14", + false, + "0014", + "", + "" + ], + "15": [ + "Input_16", + "0", + "8", + "15", + false, + "0015", + "", + "" + ], + "16": [ + "Input_17", + "0", + "8", + "16", + false, + "0016", + "", + "" + ], + "17": [ + "Input_18", + "0", + "8", + "17", + false, + "0017", + "", + "" + ], + "18": [ + "Input_19", + "0", + "8", + "18", + false, + "0018", + "", + "" + ], + "19": [ + "Input_20", + "0", + "8", + "19", + false, + "0019", + "", + "" + ], + "20": [ + "Input_21", + "0", + "8", + "20", + false, + "0020", + "", + "" + ], + "21": [ + "Input_22", + "0", + "8", + "21", + false, + "0021", + "", + "" + ], + "22": [ + "Input_23", + "0", + "8", + "22", + false, + "0022", + "", + "" + ], + "23": [ + "Input_24", + "0", + "8", + "23", + false, + "0023", + "", + "" + ], + "24": [ + "Input_25", + "0", + "8", + "24", + false, + "0024", + "", + "" + ], + "25": [ + "Input_26", + "0", + "8", + "25", + false, + "0025", + "", + "" + ], + "26": [ + "Input_27", + "0", + "8", + "26", + false, + "0026", + "", + "" + ], + "27": [ + "Input_28", + "0", + "8", + "27", + false, + "0027", + "", + "" + ], + "28": [ + "Input_29", + "0", + "8", + "28", + false, + "0028", + "", + "" + ], + "29": [ + "Input_30", + "0", + "8", + "29", + false, + "0029", + "", + "" + ], + "30": [ + "Input_31", + "0", + "8", + "30", + false, + "0030", + "", + "" + ], + "31": [ + "Input_32", + "0", + "8", + "31", + false, + "0031", + "", + "" + ] + }, + "out": { + "0": [ + "Output_1", + "0", + "8", + "32", + false, + "0032", + "", + "" + ], + "1": [ + "Output_2", + "0", + "8", + "33", + false, + "0033", + "", + "" + ], + "2": [ + "Output_3", + "0", + "8", + "34", + false, + "0034", + "", + "" + ], + "3": [ + "Output_4", + "0", + "8", + "35", + false, + "0035", + "", + "" + ], + "4": [ + "Output_5", + "0", + "8", + "36", + false, + "0036", + "", + "" + ], + "5": [ + "Output_6", + "0", + "8", + "37", + false, + "0037", + "", + "" + ], + "6": [ + "Output_7", + "0", + "8", + "38", + false, + "0038", + "", + "" + ], + "7": [ + "Output_8", + "0", + "8", + "39", + false, + "0039", + "", + "" + ], + "8": [ + "Output_9", + "0", + "8", + "40", + false, + "0040", + "", + "" + ], + "9": [ + "Output_10", + "0", + "8", + "41", + false, + "0041", + "", + "" + ], + "10": [ + "Output_11", + "0", + "8", + "42", + false, + "0042", + "", + "" + ], + "11": [ + "Output_12", + "0", + "8", + "43", + false, + "0043", + "", + "" + ], + "12": [ + "Output_13", + "0", + "8", + "44", + false, + "0044", + "", + "" + ], + "13": [ + "Output_14", + "0", + "8", + "45", + false, + "0045", + "", + "" + ], + "14": [ + "Output_15", + "0", + "8", + "46", + false, + "0046", + "", + "" + ], + "15": [ + "Output_16", + "0", + "8", + "47", + false, + "0047", + "", + "" + ], + "16": [ + "Output_17", + "0", + "8", + "48", + false, + "0048", + "", + "" + ], + "17": [ + "Output_18", + "0", + "8", + "49", + false, + "0049", + "", + "" + ], + "18": [ + "Output_19", + "0", + "8", + "50", + false, + "0050", + "", + "" + ], + "19": [ + "Output_20", + "0", + "8", + "51", + false, + "0051", + "", + "" + ], + "20": [ + "Output_21", + "0", + "8", + "52", + false, + "0052", + "", + "" + ], + "21": [ + "Output_22", + "0", + "8", + "53", + false, + "0053", + "", + "" + ], + "22": [ + "Output_23", + "0", + "8", + "54", + false, + "0054", + "", + "" + ], + "23": [ + "Output_24", + "0", + "8", + "55", + false, + "0055", + "", + "" + ], + "24": [ + "Output_25", + "0", + "8", + "56", + false, + "0056", + "", + "" + ], + "25": [ + "Output_26", + "0", + "8", + "57", + false, + "0057", + "", + "" + ], + "26": [ + "Output_27", + "0", + "8", + "58", + false, + "0058", + "", + "" + ], + "27": [ + "Output_28", + "0", + "8", + "59", + false, + "0059", + "", + "" + ], + "28": [ + "Output_29", + "0", + "8", + "60", + false, + "0060", + "", + "" + ], + "29": [ + "Output_30", + "0", + "8", + "61", + false, + "0061", + "", + "" + ], + "30": [ + "Output_31", + "0", + "8", + "62", + false, + "0062", + "", + "" + ], + "31": [ + "Output_32", + "0", + "8", + "63", + false, + "0063", + "", + "" + ] + }, + "mem": {}, + "extend": {} + } + ], + "Connections": [] +} diff --git a/tests/revpi3/test_connect.py b/tests/revpi3/test_connect.py new file mode 100644 index 0000000..d269e1c --- /dev/null +++ b/tests/revpi3/test_connect.py @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- +"""Tests for RevPi 4 devices.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" + +from os.path import dirname + +from revpimodio2 import BLUE +from tests import TestRevPiModIO + + +class TestRevPiConnect(TestRevPiModIO): + + data_dir = dirname(__file__) + + def test_connect(self): + """Test Connect functions.""" + for conf in ["config_connect.rsc", "config_connect_left.rsc"]: + rpi = self.modio(configrsc=conf) + + def get_led_byte(): + self.fh_procimg.seek(6 if conf == "config_connect.rsc" else 119) + return self.fh_procimg.read(1) + + # A3 am Connect testen + rpi.core.A3 = 0 + self.assertEqual(rpi.core.A3, 0) + rpi.core.A3 = 1 + self.assertEqual(rpi.io.RevPiLED.get_value(), b"\x10") + self.assertEqual(rpi.core.A3, 1) + rpi.writeprocimg() + self.assertEqual(get_led_byte(), b"\x10") + + rpi.core.A2 = 0 + rpi.core.A2 = 1 + rpi.core.A3 = 2 + self.assertEqual(rpi.io.RevPiLED.get_value(), b"\x24") + self.assertEqual(rpi.core.A3, 2) + rpi.writeprocimg() + self.assertEqual(get_led_byte(), b"\x24") + + rpi.core.A1 = 0 + rpi.core.A1 = 2 + self.assertEqual(rpi.io.RevPiLED.get_value(), b"\x26") + rpi.writeprocimg() + self.assertEqual(get_led_byte(), b"\x26") + with self.assertRaises(ValueError): + rpi.core.A3 = BLUE + + # Direkte Zuweisung darf nicht funktionieren + with self.assertRaises(AttributeError): + rpi.core.a3green = True + with self.assertRaises(AttributeError): + rpi.core.a3green = True + with self.assertRaises(AttributeError): + rpi.core.wd = True + with self.assertRaises(AttributeError): + rpi.core.x2out = True + with self.assertRaises(AttributeError): + rpi.core.x2in = True + + # Test Hardware watchdog + rpi.core.wd.value = True + # Value: A1 = RED, A2 = GREEN, A3=RED + Bit 7 + self.assertEqual(rpi.io.RevPiLED.get_value(), b"\xa6") + + # Test output on connector X2 (Bit 6 on RevPiLED) + self.assertFalse(rpi.core.x2out.value) + rpi.core.x2out.value = True + # Value: A1 = RED, A2 = GREEN, A3=RED + WD=True + Bit 6 + self.assertEqual(rpi.io.RevPiLED.get_value(), b"\xe6") + rpi.writeprocimg() + self.assertEqual(get_led_byte(), b"\xe6") + self.assertTrue(rpi.core.x2out.value) + + # Test Input on connector X2 (Bit 6 on RevPiStatus) + rpi.readprocimg() + self.assertFalse(rpi.core.x2in.value) + self.fh_procimg.seek(0 if conf == "config_connect.rsc" else 113) + self.fh_procimg.write(b"\x40") + rpi.readprocimg() + self.assertTrue(rpi.core.x2in.value) From 601d018ebaed34dd8e9d2ca9a5bba519ada5386c Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Tue, 29 Oct 2024 09:36:23 +0100 Subject: [PATCH 12/26] test: Old core rap file without error limits --- tests/revpi3/config_old.rsc | 1 + tests/revpi3/test_core.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 tests/revpi3/config_old.rsc diff --git a/tests/revpi3/config_old.rsc b/tests/revpi3/config_old.rsc new file mode 100644 index 0000000..0547787 --- /dev/null +++ b/tests/revpi3/config_old.rsc @@ -0,0 +1 @@ +{"App":{"name": "RevolutionPi Configurator", "version": "1.0","language": "en","layout": {"north":{"size":50,"initClosed":false,"initHidden":false},"south":{"size":393,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":844,"initClosed":false,"initHidden":false}}}},"east":{"size":200,"initClosed":true,"initHidden":false,"children":{"layout1":{"north":{"size":100,"initClosed":false,"initHidden":false},"south":{"size":98,"initClosed":false,"initHidden":false}}}},"west":{"size":381,"initClosed":false,"initHidden":false,"children":{"layout1":{"south":{"size":53,"initClosed":false,"initHidden":false}}}}}},"Summary":{"inpTotal": 679,"outTotal": 627},"Devices":[{"catalogNr": "RevPiCore","id": "device_RevPiCore_20160818_1_0_001","type": "BASE","productType": "95","position": "0","name": "RevPi Core","bmk": "RevPi Core","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""]},"out": {"0": ["RevPiLED","0","8","1",true,"0001", "",""]},"mem": {}},{"catalogNr": "RevPiDIO","id": "device_RevPiDIO_20160818_1_0_001","type": "LEFT_RIGHT","productType": "96","position": "32","name": "RevPi DIO","bmk": "RevPi DIO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 2,"inp": {"0": ["t_aus","0","1","0",true,"0000", "","0"],"1": ["t_an","0","1","0",true,"0001", "","1"],"2": ["t_links","0","1","0",true,"0002", "","2"],"3": ["t_rechts","0","1","0",true,"0003", "","3"],"4": ["t_hoch","0","1","0",true,"0004", "","4"],"5": ["t_runter","0","1","0",true,"0005", "","5"],"6": ["t_blau","0","1","0",true,"0006", "","6"],"7": ["t_rot","0","1","0",true,"0007", "","7"],"8": ["Input_Pin_9","0","1","0",true,"0008", "","8"],"9": ["Input_Pin_10","0","1","0",true,"0009", "","9"],"10": ["Input_Pin_11","0","1","0",true,"0010", "","10"],"11": ["Input_Pin_12","0","1","0",true,"0011", "","11"],"12": ["Input_Pin_13","0","1","0",true,"0012", "","12"],"13": ["Input_Pin_14","0","1","0",true,"0013", "","13"],"14": ["Input_Pin_15","0","1","0",true,"0014", "","14"],"15": ["Input_Pin_16","0","1","0",true,"0015", "","15"],"16": ["Output_Status","0","16","2",false,"0016", "",""],"17": ["Status","0","16","4",false,"0017", "",""],"18": ["Counter_1","0","32","6",false,"0018", "",""],"19": ["Counter_2","0","32","10",false,"0019", "",""],"20": ["Counter_3","0","32","14",false,"0020", "",""],"21": ["Counter_4","0","32","18",false,"0021", "",""],"22": ["Counter_5","0","32","22",false,"0022", "",""],"23": ["Counter_6","0","32","26",false,"0023", "",""],"24": ["Counter_7","0","32","30",false,"0024", "",""],"25": ["Counter_8","0","32","34",false,"0025", "",""],"26": ["Counter_9","0","32","38",false,"0026", "",""],"27": ["Counter_10","0","32","42",false,"0027", "",""],"28": ["Counter_11","0","32","46",false,"0028", "",""],"29": ["Counter_12","0","32","50",false,"0029", "",""],"30": ["Counter_13","0","32","54",false,"0030", "",""],"31": ["Counter_14","0","32","58",false,"0031", "",""],"32": ["Counter_15","0","32","62",false,"0032", "",""],"33": ["Counter_16","0","32","66",false,"0033", "",""]},"out": {"0": ["O_1","0","1","70",true,"0034", "","0"],"1": ["O_2","0","1","70",true,"0035", "","1"],"2": ["O_3","0","1","70",true,"0036", "","2"],"3": ["O_4","0","1","70",true,"0037", "","3"],"4": ["O_5","0","1","70",true,"0038", "","4"],"5": ["O_6","0","1","70",true,"0039", "","5"],"6": ["O_7","0","1","70",true,"0040", "","6"],"7": ["O_8","0","1","70",true,"0041", "","7"],"8": ["h_an","0","1","70",true,"0042", "","8"],"9": ["h_richtung","0","1","70",true,"0043", "","9"],"10": ["h_hoch","0","1","70",true,"0044", "","10"],"11": ["h_runter","0","1","70",true,"0045", "","11"],"12": ["h_blau","0","1","70",true,"0046", "","12"],"13": ["h_rot","0","1","70",true,"0047", "","13"],"14": ["Output_Pin_15","0","1","70",true,"0048", "","14"],"15": ["Output_Pin_16","0","1","70",true,"0049", "","15"],"16": ["PWM_1","0","8","72",false,"0050", "",""],"17": ["PWM_2","0","8","73",false,"0051", "",""],"18": ["PWM_3","0","8","74",false,"0052", "",""],"19": ["PWM_4","0","8","75",false,"0053", "",""],"20": ["PWM_5","0","8","76",false,"0054", "",""],"21": ["PWM_6","0","8","77",false,"0055", "",""],"22": ["PWM_7","0","8","78",false,"0056", "",""],"23": ["PWM_8","0","8","79",false,"0057", "",""],"24": ["PWM_9","0","8","80",false,"0058", "",""],"25": ["PWM_10","0","8","81",false,"0059", "",""],"26": ["PWM_11","0","8","82",false,"0060", "",""],"27": ["PWM_12","0","8","83",false,"0061", "",""],"28": ["PWM_13","0","8","84",false,"0062", "",""],"29": ["PWM_14","0","8","85",false,"0063", "",""],"30": ["PWM_15","0","8","86",false,"0064", "",""],"31": ["PWM_16","0","8","87",false,"0065", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0066", "",""],"1": ["InputMode_2","0","8","89",false,"0067", "",""],"2": ["InputMode_3","0","8","90",false,"0068", "",""],"3": ["InputMode_4","0","8","91",false,"0069", "",""],"4": ["InputMode_5","0","8","92",false,"0070", "",""],"5": ["InputMode_6","0","8","93",false,"0071", "",""],"6": ["InputMode_7","0","8","94",false,"0072", "",""],"7": ["InputMode_8","0","8","95",false,"0073", "",""],"8": ["InputMode_9","0","8","96",false,"0074", "",""],"9": ["InputMode_10","0","8","97",false,"0075", "",""],"10": ["InputMode_11","0","8","98",false,"0076", "",""],"11": ["InputMode_12","0","8","99",false,"0077", "",""],"12": ["InputMode_13","0","8","100",false,"0078", "",""],"13": ["InputMode_14","0","8","101",false,"0079", "",""],"14": ["InputMode_15","0","8","102",false,"0080", "",""],"15": ["InputMode_16","0","8","103",false,"0081", "",""],"16": ["InputDebounce","0","16","104",false,"0082", "",""],"17": ["OutputPushPull","0","16","106",false,"0083", "",""],"18": ["OutputOpenLoadDetect","0","16","108",false,"0084", "",""],"19": ["OutputPWMActive","0","16","110",false,"0085", "",""],"20": ["OutputPWMFrequency","1","8","112",false,"0086", "",""]}},{"catalogNr": "RevPiGateProfinet","id": "device_RevPiGateProfinet_20160916_1_0_001","type": "EDGE","productType": "79","position": "33","name": "Gateway Profinet IRT","bmk": "Gateway Profinet IRT","inpVariant": 0,"outVariant": 0,"comment": "","offset": 115,"inp": {"0": ["Input_1","0","8","0",false,"0000", "",""],"1": ["Input_2","0","8","1",false,"0001", "",""],"2": ["Input_3","0","8","2",false,"0002", "",""],"3": ["Input_4","0","8","3",false,"0003", "",""],"4": ["Input_5","0","8","4",false,"0004", "",""],"5": ["Input_6","0","8","5",false,"0005", "",""],"6": ["Input_7","0","8","6",false,"0006", "",""],"7": ["Input_8","0","8","7",false,"0007", "",""],"8": ["Input_9","0","8","8",false,"0008", "",""],"9": ["Input_10","0","8","9",false,"0009", "",""],"10": ["Input_11","0","8","10",false,"0010", "",""],"11": ["Input_12","0","8","11",false,"0011", "",""],"12": ["Input_13","0","8","12",false,"0012", "",""],"13": ["Input_14","0","8","13",false,"0013", "",""],"14": ["Input_15","0","8","14",false,"0014", "",""],"15": ["Input_16","0","8","15",false,"0015", "",""],"16": ["Input_17","0","8","16",false,"0016", "",""],"17": ["Input_18","0","8","17",false,"0017", "",""],"18": ["Input_19","0","8","18",false,"0018", "",""],"19": ["Input_20","0","8","19",false,"0019", "",""],"20": ["Dummy_in","not used","3936","20",false,"0040", "",""]},"out": {"0": ["Output_1","0","8","512",false,"0020", "",""],"1": ["Output_2","0","8","513",false,"0021", "",""],"2": ["Output_3","0","8","514",false,"0022", "",""],"3": ["Output_4","0","8","515",false,"0023", "",""],"4": ["Output_5","0","8","516",false,"0024", "",""],"5": ["Output_6","0","8","517",false,"0025", "",""],"6": ["Output_7","0","8","518",false,"0026", "",""],"7": ["Output_8","0","8","519",false,"0027", "",""],"8": ["Output_9","0","8","520",false,"0028", "",""],"9": ["Output_10","0","8","521",false,"0029", "",""],"10": ["Output_11","0","8","522",false,"0030", "",""],"11": ["Output_12","0","8","523",false,"0031", "",""],"12": ["Output_13","0","8","524",false,"0032", "",""],"13": ["Output_14","0","8","525",false,"0033", "",""],"14": ["Output_15","0","8","526",false,"0034", "",""],"15": ["Output_16","0","8","527",false,"0035", "",""],"16": ["Output_17","0","8","528",false,"0036", "",""],"17": ["Output_18","0","8","529",false,"0037", "",""],"18": ["Output_19","0","8","530",false,"0038", "",""],"19": ["Output_20","0","8","531",false,"0039", "",""],"20": ["Dummy_out","not used","3936","532",false,"0041", "",""]},"mem": {}},{"catalogNr": "Virtual01","id": "device_Virtual01_20160818_1_0_001","type": "VIRTUAL","productType": "32768","position": "adap.","name": "virt01","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 1139,"inp": {"0": ["Input_1_i04","0","8","0",false,"0000", "",""],"1": ["Input_2_i04","0","8","1",false,"0001", "",""],"2": ["Input_3_i04","0","8","2",false,"0002", "",""],"3": ["Input_4_i04","0","8","3",false,"0003", "",""],"4": ["Input_5_i04","0","8","4",false,"0004", "",""],"5": ["Input_6_i04","0","8","5",false,"0005", "",""],"6": ["Input_7_i04","0","8","6",false,"0006", "",""],"7": ["Input_8_i04","0","8","7",false,"0007", "",""],"8": ["Input_9_i04","0","8","8",false,"0008", "",""],"9": ["Input_10_i04","0","8","9",false,"0009", "",""],"10": ["Input_11_i04","0","8","10",false,"0010", "",""],"11": ["Input_12_i04","0","8","11",false,"0011", "",""],"12": ["Input_13_i04","0","8","12",false,"0012", "",""],"13": ["Input_14_i04","0","8","13",false,"0013", "",""],"14": ["Input_15_i04","0","8","14",false,"0014", "",""],"15": ["Input_16_i04","0","8","15",false,"0015", "",""],"16": ["Input_17_i04","0","8","16",false,"0016", "",""],"17": ["Input_18_i04","0","8","17",false,"0017", "",""],"18": ["Input_19_i04","0","8","18",false,"0018", "",""],"19": ["Input_20_i04","0","8","19",false,"0019", "",""],"20": ["Input_21","0","8","20",false,"0020", "",""],"21": ["Input_22","0","8","21",false,"0021", "",""],"22": ["Input_23","0","8","22",false,"0022", "",""],"23": ["Input_24","0","8","23",false,"0023", "",""],"24": ["Input_25","0","8","24",false,"0024", "",""],"25": ["Input_26","0","8","25",false,"0025", "",""],"26": ["Input_27","0","8","26",false,"0026", "",""],"27": ["Input_28","0","8","27",false,"0027", "",""],"28": ["Input_29","0","8","28",false,"0028", "",""],"29": ["Input_30","0","8","29",false,"0029", "",""],"30": ["Input_31","0","8","30",false,"0030", "",""],"31": ["Input_32","0","8","31",false,"0031", "",""]},"out": {"0": ["Output_1_i04","0","8","32",false,"0032", "",""],"1": ["Output_2_i04","0","8","33",false,"0033", "",""],"2": ["Output_3_i04","0","8","34",false,"0034", "",""],"3": ["Output_4_i04","0","8","35",false,"0035", "",""],"4": ["Output_5_i04","0","8","36",false,"0036", "",""],"5": ["Output_6_i04","0","8","37",false,"0037", "",""],"6": ["Output_7_i04","0","8","38",false,"0038", "",""],"7": ["Output_8_i04","0","8","39",false,"0039", "",""],"8": ["Output_9_i04","0","8","40",false,"0040", "",""],"9": ["Output_10_i04","0","8","41",false,"0041", "",""],"10": ["Output_11_i04","0","8","42",false,"0042", "",""],"11": ["Output_12_i04","0","8","43",false,"0043", "",""],"12": ["Output_13_i04","0","8","44",false,"0044", "",""],"13": ["Output_14_i04","0","8","45",false,"0045", "",""],"14": ["Output_15_i04","0","8","46",false,"0046", "",""],"15": ["Output_16_i04","0","8","47",false,"0047", "",""],"16": ["Output_17_i04","0","8","48",false,"0048", "",""],"17": ["Output_18_i04","0","8","49",false,"0049", "",""],"18": ["Output_19_i04","0","8","50",false,"0050", "",""],"19": ["Output_20_i04","0","8","51",false,"0051", "",""],"20": ["Output_21","0","8","52",false,"0052", "",""],"21": ["Output_22","0","8","53",false,"0053", "",""],"22": ["Output_23","0","8","54",false,"0054", "",""],"23": ["Output_24","0","8","55",false,"0055", "",""],"24": ["Output_25","0","8","56",false,"0056", "",""],"25": ["Output_26","0","8","57",false,"0057", "",""],"26": ["Output_27","0","8","58",false,"0058", "",""],"27": ["Output_28","0","8","59",false,"0059", "",""],"28": ["Output_29","0","8","60",false,"0060", "",""],"29": ["Output_30","0","8","61",false,"0061", "",""],"30": ["Output_31","0","8","62",false,"0062", "",""],"31": ["Output_32","0","8","63",false,"0063", "",""]},"mem": {}},{"catalogNr": "Virtual01","id": "device_Virtual01_20160818_1_0_002","type": "VIRTUAL","productType": "32768","position": "adap.","name": "Virtual Device 32 Byte","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 1203,"inp": {"0": ["Input_1_i05","0","8","0",false,"0000", "",""],"1": ["Input_2_i05","0","8","1",false,"0001", "",""],"2": ["Input_3_i05","0","8","2",false,"0002", "",""],"3": ["Input_4_i05","0","8","3",false,"0003", "",""],"4": ["Input_5_i05","0","8","4",false,"0004", "",""],"5": ["Input_6_i05","0","8","5",false,"0005", "",""],"6": ["Input_7_i05","0","8","6",false,"0006", "",""],"7": ["Input_8_i05","0","8","7",false,"0007", "",""],"8": ["Input_9_i05","0","8","8",false,"0008", "",""],"9": ["Input_10_i05","0","8","9",false,"0009", "",""],"10": ["Input_11_i05","0","8","10",false,"0010", "",""],"11": ["Input_12_i05","0","8","11",false,"0011", "",""],"12": ["Input_13_i05","0","8","12",false,"0012", "",""],"13": ["Input_14_i05","0","8","13",false,"0013", "",""],"14": ["Input_15_i05","0","8","14",false,"0014", "",""],"15": ["Input_16_i05","0","8","15",false,"0015", "",""],"16": ["Input_17_i05","0","8","16",false,"0016", "",""],"17": ["Input_18_i05","0","8","17",false,"0017", "",""],"18": ["Input_19_i05","0","8","18",false,"0018", "",""],"19": ["Input_20_i05","0","8","19",false,"0019", "",""],"20": ["Input_21_i05","0","8","20",false,"0020", "",""],"21": ["Input_22_i05","0","8","21",false,"0021", "",""],"22": ["Input_23_i05","0","8","22",false,"0022", "",""],"23": ["Input_24_i05","0","8","23",false,"0023", "",""],"24": ["Input_25_i05","0","8","24",false,"0024", "",""],"25": ["Input_26_i05","0","8","25",false,"0025", "",""],"26": ["Input_27_i05","0","8","26",false,"0026", "",""],"27": ["Input_28_i05","0","8","27",false,"0027", "",""],"28": ["Input_29_i05","0","8","28",false,"0028", "",""],"29": ["Input_30_i05","0","8","29",false,"0029", "",""],"30": ["Input_31_i05","0","8","30",false,"0030", "",""],"31": ["Input_32_i05","0","8","31",false,"0031", "",""]},"out": {"0": ["Output_1_i05","0","8","32",false,"0032", "",""],"1": ["Output_2_i05","0","8","33",false,"0033", "",""],"2": ["Output_3_i05","0","8","34",false,"0034", "",""],"3": ["Output_4_i05","0","8","35",false,"0035", "",""],"4": ["Output_5_i05","0","8","36",false,"0036", "",""],"5": ["Output_6_i05","0","8","37",false,"0037", "",""],"6": ["Output_7_i05","0","8","38",false,"0038", "",""],"7": ["Output_8_i05","0","8","39",false,"0039", "",""],"8": ["Output_9_i05","0","8","40",false,"0040", "",""],"9": ["Output_10_i05","0","8","41",false,"0041", "",""],"10": ["Output_11_i05","0","8","42",false,"0042", "",""],"11": ["Output_12_i05","0","8","43",false,"0043", "",""],"12": ["Output_13_i05","0","8","44",false,"0044", "",""],"13": ["Output_14_i05","0","8","45",false,"0045", "",""],"14": ["Output_15_i05","0","8","46",false,"0046", "",""],"15": ["Output_16_i05","0","8","47",false,"0047", "",""],"16": ["Output_17_i05","0","8","48",false,"0048", "",""],"17": ["Output_18_i05","0","8","49",false,"0049", "",""],"18": ["Output_19_i05","0","8","50",false,"0050", "",""],"19": ["Output_20_i05","0","8","51",false,"0051", "",""],"20": ["Output_21_i05","0","8","52",false,"0052", "",""],"21": ["Output_22_i05","0","8","53",false,"0053", "",""],"22": ["Output_23_i05","0","8","54",false,"0054", "",""],"23": ["Output_24_i05","0","8","55",false,"0055", "",""],"24": ["Output_25_i05","0","8","56",false,"0056", "",""],"25": ["Output_26_i05","0","8","57",false,"0057", "",""],"26": ["Output_27_i05","0","8","58",false,"0058", "",""],"27": ["Output_28_i05","0","8","59",false,"0059", "",""],"28": ["Output_29_i05","0","8","60",false,"0060", "",""],"29": ["Output_30_i05","0","8","61",false,"0061", "",""],"30": ["Output_31_i05","0","8","62",false,"0062", "",""],"31": ["Output_32_i05","0","8","63",false,"0063", "",""]},"mem": {}},{"catalogNr": "Virtual01","id": "device_Virtual01_20160818_1_0_003","type": "VIRTUAL","productType": "32768","position": "adap.","name": "Virtual Device 32 Byte","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 1267,"inp": {"0": ["Input_1_i06","0","8","0",false,"0000", "",""],"1": ["Input_2_i06","0","8","1",false,"0001", "",""],"2": ["Input_3_i06","0","8","2",false,"0002", "",""],"3": ["Input_4_i06","0","8","3",false,"0003", "",""],"4": ["Input_5_i06","0","8","4",false,"0004", "",""],"5": ["Input_6_i06","0","8","5",false,"0005", "",""],"6": ["Input_7_i06","0","8","6",false,"0006", "",""],"7": ["Input_8_i06","0","8","7",false,"0007", "",""],"8": ["Input_9_i06","0","8","8",false,"0008", "",""],"9": ["Input_10_i06","0","8","9",false,"0009", "",""],"10": ["Input_11_i06","0","8","10",false,"0010", "",""],"11": ["Input_12_i06","0","8","11",false,"0011", "",""],"12": ["Input_13_i06","0","8","12",false,"0012", "",""],"13": ["Input_14_i06","0","8","13",false,"0013", "",""],"14": ["Input_15_i06","0","8","14",false,"0014", "",""],"15": ["Input_16_i06","0","8","15",false,"0015", "",""],"16": ["Input_17_i06","0","8","16",false,"0016", "",""],"17": ["Input_18_i06","0","8","17",false,"0017", "",""],"18": ["Input_19_i06","0","8","18",false,"0018", "",""],"19": ["Input_20_i06","0","8","19",false,"0019", "",""],"20": ["Input_21_i06","0","8","20",false,"0020", "",""],"21": ["Input_22_i06","0","8","21",false,"0021", "",""],"22": ["Input_23_i06","0","8","22",false,"0022", "",""],"23": ["Input_24_i06","0","8","23",false,"0023", "",""],"24": ["Input_25_i06","0","8","24",false,"0024", "",""],"25": ["Input_26_i06","0","8","25",false,"0025", "",""],"26": ["Input_27_i06","0","8","26",false,"0026", "",""],"27": ["Input_28_i06","0","8","27",false,"0027", "",""],"28": ["Input_29_i06","0","8","28",false,"0028", "",""],"29": ["Input_30_i06","0","8","29",false,"0029", "",""],"30": ["Input_31_i06","0","8","30",false,"0030", "",""],"31": ["Input_32_i06","0","8","31",false,"0031", "",""]},"out": {"0": ["Output_1_i06","0","8","32",false,"0032", "",""],"1": ["Output_2_i06","0","8","33",false,"0033", "",""],"2": ["Output_3_i06","0","8","34",false,"0034", "",""],"3": ["Output_4_i06","0","8","35",false,"0035", "",""],"4": ["Output_5_i06","0","8","36",false,"0036", "",""],"5": ["Output_6_i06","0","8","37",false,"0037", "",""],"6": ["Output_7_i06","0","8","38",false,"0038", "",""],"7": ["Output_8_i06","0","8","39",false,"0039", "",""],"8": ["Output_9_i06","0","8","40",false,"0040", "",""],"9": ["Output_10_i06","0","8","41",false,"0041", "",""],"10": ["Output_11_i06","0","8","42",false,"0042", "",""],"11": ["Output_12_i06","0","8","43",false,"0043", "",""],"12": ["Output_13_i06","0","8","44",false,"0044", "",""],"13": ["Output_14_i06","0","8","45",false,"0045", "",""],"14": ["Output_15_i06","0","8","46",false,"0046", "",""],"15": ["Output_16_i06","0","8","47",false,"0047", "",""],"16": ["Output_17_i06","0","8","48",false,"0048", "",""],"17": ["Output_18_i06","0","8","49",false,"0049", "",""],"18": ["Output_19_i06","0","8","50",false,"0050", "",""],"19": ["Output_20_i06","0","8","51",false,"0051", "",""],"20": ["Output_21_i06","0","8","52",false,"0052", "",""],"21": ["Output_22_i06","0","8","53",false,"0053", "",""],"22": ["Output_23_i06","0","8","54",false,"0054", "",""],"23": ["Output_24_i06","0","8","55",false,"0055", "",""],"24": ["Output_25_i06","0","8","56",false,"0056", "",""],"25": ["Output_26_i06","0","8","57",false,"0057", "",""],"26": ["Output_27_i06","0","8","58",false,"0058", "",""],"27": ["Output_28_i06","0","8","59",false,"0059", "",""],"28": ["Output_29_i06","0","8","60",false,"0060", "",""],"29": ["Output_30_i06","0","8","61",false,"0061", "",""],"30": ["Output_31_i06","0","8","62",false,"0062", "",""],"31": ["Output_32_i06","0","8","63",false,"0063", "",""]},"mem": {}}]} \ No newline at end of file diff --git a/tests/revpi3/test_core.py b/tests/revpi3/test_core.py index de52730..c8106ec 100644 --- a/tests/revpi3/test_core.py +++ b/tests/revpi3/test_core.py @@ -91,3 +91,19 @@ class TestRevPiCore(TestRevPiModIO): self.assertEqual(rpi.core.errorlimit2, 1100) with self.assertRaises(ValueError): rpi.core.errorlimit2 = 65999 + + def test_core_old_errorlimits(self): + """Test non-existing error limits of first core rap file.""" + with self.assertWarnsRegex(Warning, r"equal device name '.*' in pictory configuration."): + rpi = self.modio(configrsc="config_old.rsc") + + # Errorlimits testen, die es nicht gibt (damals None, jetzt -1) + self.assertEqual(rpi.core.errorlimit1, -1) + self.assertEqual(rpi.core.errorlimit2, -1) + + with self.assertRaises(RuntimeError): + rpi.core.errorlimit1 = 100 + with self.assertRaises(RuntimeError): + rpi.core.errorlimit2 = 100 + + del rpi From d7a185451a7d9ddb98325851b5d958e8dc8ddb0c Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Tue, 29 Oct 2024 09:36:51 +0100 Subject: [PATCH 13/26] test: IO values and counter --- tests/io_tests/config_supervirt.rsc | 2107 +++++++++++++++++++++++++++ tests/io_tests/test_ios.py | 107 ++ 2 files changed, 2214 insertions(+) create mode 100644 tests/io_tests/config_supervirt.rsc create mode 100644 tests/io_tests/test_ios.py diff --git a/tests/io_tests/config_supervirt.rsc b/tests/io_tests/config_supervirt.rsc new file mode 100644 index 0000000..37cc3d6 --- /dev/null +++ b/tests/io_tests/config_supervirt.rsc @@ -0,0 +1,2107 @@ +{ + "App": { + "name": "PiCtory", + "version": "1.3.10", + "saveTS": "20180731113226", + "language": "en", + "layout": { + "north": { + "size": 70, + "initClosed": false, + "initHidden": false + }, + "south": { + "size": 358, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": { + "east": { + "size": 500, + "initClosed": false, + "initHidden": false + } + } + } + }, + "east": { + "size": 70, + "initClosed": true, + "initHidden": false, + "children": {} + }, + "west": { + "size": 200, + "initClosed": false, + "initHidden": false, + "children": { + "layout1": {} + } + } + } + }, + "Summary": { + "inpTotal": 70, + "outTotal": 69 + }, + "Devices": [ + { + "GUID": "54047c39-c817-5a63-e0fe-cfcc3acb1db1", + "id": "device_RevPiCore_20170404_1_2_001", + "type": "BASE", + "productType": "95", + "position": "0", + "name": "core01", + "bmk": "RevPi Core V1.2", + "inpVariant": 0, + "outVariant": 0, + "comment": "This is a RevPiCore Device", + "offset": 0, + "inp": { + "0": [ + "RevPiStatus", + "0", + "8", + "0", + true, + "0000", + "", + "" + ], + "1": [ + "RevPiIOCycle", + "0", + "8", + "1", + true, + "0001", + "", + "" + ], + "2": [ + "RS485ErrorCnt", + "0", + "16", + "2", + false, + "0002", + "", + "" + ], + "3": [ + "Core_Temperature", + "0", + "8", + "4", + false, + "0003", + "", + "" + ], + "4": [ + "Core_Frequency", + "0", + "8", + "5", + false, + "0004", + "", + "" + ] + }, + "out": { + "0": [ + "RevPiLED", + "0", + "8", + "6", + true, + "0005", + "", + "" + ], + "1": [ + "RS485ErrorLimit1", + "10", + "16", + "7", + false, + "0006", + "", + "" + ], + "2": [ + "RS485ErrorLimit2", + "1000", + "16", + "9", + false, + "0007", + "", + "" + ] + }, + "mem": {}, + "extend": {} + }, + { + "GUID": "5aef8ad8-2966-f37c-cdb7-e2d241add484", + "id": "device_Virtual01_20160818_1_0_001", + "type": "VIRTUAL", + "productType": "32768", + "position": "64", + "name": "virt01", + "bmk": "Virtual Device 32 Byte", + "inpVariant": 0, + "outVariant": 0, + "comment": "Virtual Device to reserve space in process image for user applications", + "offset": 11, + "inp": { + "0": [ + "in_status01", + "0", + "8", + "0", + false, + "0000", + "", + "" + ], + "1": [ + "in_status02", + "0", + "8", + "1", + false, + "0001", + "", + "" + ], + "2": [ + "in_blinkspeed", + "0", + "8", + "2", + false, + "0002", + "", + "" + ], + "3": [ + "in_blink_activated", + "0", + "8", + "3", + false, + "0003", + "", + "" + ], + "4": [ + "Input_5", + "0", + "8", + "4", + false, + "0004", + "", + "" + ], + "5": [ + "Input_6", + "0", + "8", + "5", + false, + "0005", + "", + "" + ], + "6": [ + "Input_7", + "0", + "8", + "6", + false, + "0006", + "", + "" + ], + "7": [ + "Input_8", + "0", + "8", + "7", + false, + "0007", + "", + "" + ], + "8": [ + "Input_9", + "0", + "8", + "8", + false, + "0008", + "", + "" + ], + "9": [ + "Input_10", + "0", + "8", + "9", + false, + "0009", + "", + "" + ], + "10": [ + "Input_11", + "0", + "8", + "10", + false, + "0010", + "", + "" + ], + "11": [ + "Input_12", + "0", + "8", + "11", + false, + "0011", + "", + "" + ], + "12": [ + "Input_13", + "0", + "8", + "12", + false, + "0012", + "", + "" + ], + "13": [ + "Input_14", + "0", + "8", + "13", + false, + "0013", + "", + "" + ], + "14": [ + "Input_15", + "0", + "8", + "14", + false, + "0014", + "", + "" + ], + "15": [ + "Input_16", + "0", + "8", + "15", + false, + "0015", + "", + "" + ], + "16": [ + "Input_17", + "0", + "8", + "16", + false, + "0016", + "", + "" + ], + "17": [ + "Input_18", + "0", + "8", + "17", + false, + "0017", + "", + "" + ], + "18": [ + "Input_19", + "0", + "8", + "18", + false, + "0018", + "", + "" + ], + "19": [ + "Input_20", + "0", + "8", + "19", + false, + "0019", + "", + "" + ], + "20": [ + "Input_21", + "0", + "8", + "20", + false, + "0020", + "", + "" + ], + "21": [ + "Input_22", + "0", + "8", + "21", + false, + "0021", + "", + "" + ], + "22": [ + "Input_23", + "0", + "8", + "22", + false, + "0022", + "", + "" + ], + "23": [ + "Input_24", + "0", + "8", + "23", + false, + "0023", + "", + "" + ], + "24": [ + "Input_25", + "0", + "8", + "24", + false, + "0024", + "", + "" + ], + "25": [ + "Input_26", + "0", + "8", + "25", + false, + "0025", + "", + "" + ], + "26": [ + "Input_27", + "0", + "8", + "26", + false, + "0026", + "", + "" + ], + "27": [ + "Input_28", + "0", + "8", + "27", + false, + "0027", + "", + "" + ], + "28": [ + "Input_29", + "0", + "8", + "28", + false, + "0028", + "", + "" + ], + "29": [ + "Input_30", + "0", + "8", + "29", + false, + "0029", + "", + "" + ], + "30": [ + "Input_31", + "0", + "8", + "30", + false, + "0030", + "", + "" + ], + "31": [ + "Input_32", + "0", + "8", + "31", + false, + "0031", + "", + "" + ] + }, + "out": { + "0": [ + "Output_1", + "0", + "8", + "32", + false, + "0032", + "", + "" + ], + "1": [ + "Output_2", + "0", + "8", + "33", + false, + "0033", + "", + "" + ], + "2": [ + "out_blinkcounter01", + "0", + "8", + "34", + false, + "0034", + "", + "" + ], + "3": [ + "out_blinkcounter02", + "0", + "8", + "35", + false, + "0035", + "", + "" + ], + "4": [ + "out_blinkcounter03", + "0", + "8", + "36", + false, + "0036", + "", + "" + ], + "5": [ + "out_blinkcounter04", + "0", + "8", + "37", + false, + "0037", + "", + "" + ], + "6": [ + "out_blinkcounter05", + "0", + "8", + "38", + false, + "0038", + "", + "" + ], + "7": [ + "out_blinkcounter06", + "0", + "8", + "39", + false, + "0039", + "", + "" + ], + "8": [ + "out_blinkcounter07", + "0", + "8", + "40", + false, + "0040", + "", + "" + ], + "9": [ + "out_blinkcounter08", + "0", + "8", + "41", + false, + "0041", + "", + "" + ], + "10": [ + "Output_11", + "0", + "8", + "42", + false, + "0042", + "", + "" + ], + "11": [ + "Output_12", + "0", + "8", + "43", + false, + "0043", + "", + "" + ], + "12": [ + "Output_13", + "0", + "8", + "44", + false, + "0044", + "", + "" + ], + "13": [ + "Output_14", + "0", + "8", + "45", + false, + "0045", + "", + "" + ], + "14": [ + "Output_15", + "0", + "8", + "46", + false, + "0046", + "", + "" + ], + "15": [ + "Output_16", + "0", + "8", + "47", + false, + "0047", + "", + "" + ], + "16": [ + "Output_17", + "0", + "8", + "48", + false, + "0048", + "", + "" + ], + "17": [ + "Output_18", + "0", + "8", + "49", + false, + "0049", + "", + "" + ], + "18": [ + "Output_19", + "0", + "8", + "50", + false, + "0050", + "", + "" + ], + "19": [ + "Output_20", + "0", + "8", + "51", + false, + "0051", + "", + "" + ], + "20": [ + "Output_21", + "0", + "8", + "52", + false, + "0052", + "", + "" + ], + "21": [ + "Output_22", + "0", + "8", + "53", + false, + "0053", + "", + "" + ], + "22": [ + "Output_23", + "0", + "8", + "54", + false, + "0054", + "", + "" + ], + "23": [ + "Output_24", + "0", + "8", + "55", + false, + "0055", + "", + "" + ], + "24": [ + "Output_25", + "0", + "8", + "56", + false, + "0056", + "", + "" + ], + "25": [ + "Output_26", + "0", + "8", + "57", + false, + "0057", + "", + "" + ], + "26": [ + "Output_27", + "0", + "8", + "58", + false, + "0058", + "", + "" + ], + "27": [ + "Output_28", + "0", + "8", + "59", + false, + "0059", + "", + "" + ], + "28": [ + "Output_29", + "0", + "8", + "60", + false, + "0060", + "", + "" + ], + "29": [ + "Output_30", + "0", + "8", + "61", + false, + "0061", + "", + "" + ], + "30": [ + "Output_31", + "0", + "8", + "62", + false, + "0062", + "", + "" + ], + "31": [ + "Output_32", + "0", + "8", + "63", + false, + "0063", + "", + "" + ] + }, + "mem": {}, + "extend": {} + }, + { + "GUID": "2c70e67f-a024-794b-953d-2ec7508ddea9", + "id": "device_Virtual01_20160818_1_0_002", + "type": "VIRTUAL", + "productType": "32768", + "position": "65", + "name": "Virtual Device 32 Byte", + "bmk": "Virtual Device 32 Byte", + "inpVariant": 2, + "outVariant": 2, + "comment": "Virtual Device to reserve space in process image for user applications", + "offset": 75, + "inp": { + "0": [ + "InBit_1", + "0", + "1", + "0", + false, + "0000", + "", + "0" + ], + "1": [ + "InBit_2", + "0", + "1", + "0", + false, + "0001", + "", + "1" + ], + "2": [ + "InBit_3", + "0", + "1", + "0", + false, + "0002", + "", + "2" + ], + "3": [ + "InBit_4", + "0", + "1", + "0", + false, + "0003", + "", + "3" + ], + "4": [ + "InBit_5", + "0", + "1", + "0", + false, + "0004", + "", + "4" + ], + "5": [ + "InBit_6", + "0", + "1", + "0", + false, + "0005", + "", + "5" + ], + "6": [ + "InBit_7", + "0", + "1", + "0", + false, + "0006", + "", + "6" + ], + "7": [ + "InBit_8", + "0", + "1", + "0", + false, + "0007", + "", + "7" + ], + "8": [ + "InBit_9", + "0", + "1", + "0", + false, + "0008", + "", + "8" + ], + "9": [ + "InBit_10", + "0", + "1", + "0", + false, + "0009", + "", + "9" + ], + "10": [ + "InBit_11", + "0", + "1", + "0", + false, + "0010", + "", + "10" + ], + "11": [ + "InBit_12", + "0", + "1", + "0", + false, + "0011", + "", + "11" + ], + "12": [ + "InBit_13", + "0", + "1", + "0", + false, + "0012", + "", + "12" + ], + "13": [ + "InBit_14", + "0", + "1", + "0", + false, + "0013", + "", + "13" + ], + "14": [ + "InBit_15", + "0", + "1", + "0", + false, + "0014", + "", + "14" + ], + "15": [ + "InBit_16", + "0", + "1", + "0", + false, + "0015", + "", + "15" + ], + "16": [ + "InBit_17", + "0", + "1", + "0", + false, + "0016", + "", + "16" + ], + "17": [ + "InBit_18", + "0", + "1", + "0", + false, + "0017", + "", + "17" + ], + "18": [ + "InBit_19", + "0", + "1", + "0", + false, + "0018", + "", + "18" + ], + "19": [ + "InBit_20", + "0", + "1", + "0", + false, + "0019", + "", + "19" + ], + "20": [ + "InBit_21", + "0", + "1", + "0", + false, + "0020", + "", + "20" + ], + "21": [ + "InBit_22", + "0", + "1", + "0", + false, + "0021", + "", + "21" + ], + "22": [ + "InBit_23", + "0", + "1", + "0", + false, + "0022", + "", + "22" + ], + "23": [ + "InBit_24", + "0", + "1", + "0", + false, + "0023", + "", + "23" + ], + "24": [ + "InBit_25", + "0", + "1", + "0", + false, + "0024", + "", + "24" + ], + "25": [ + "InBit_26", + "0", + "1", + "0", + false, + "0025", + "", + "25" + ], + "26": [ + "InBit_27", + "0", + "1", + "0", + false, + "0026", + "", + "26" + ], + "27": [ + "InBit_28", + "0", + "1", + "0", + false, + "0027", + "", + "27" + ], + "28": [ + "InBit_29", + "0", + "1", + "0", + false, + "0028", + "", + "28" + ], + "29": [ + "InBit_30", + "0", + "1", + "0", + false, + "0029", + "", + "29" + ], + "30": [ + "InBit_31", + "0", + "1", + "0", + false, + "0030", + "", + "30" + ], + "31": [ + "InBit_32", + "0", + "1", + "0", + false, + "0031", + "", + "31" + ], + "32": [ + "InBit_33", + "0", + "1", + "0", + false, + "0032", + "", + "32" + ], + "33": [ + "InBit_34", + "0", + "1", + "0", + false, + "0033", + "", + "33" + ], + "34": [ + "InBit_35", + "0", + "1", + "0", + false, + "0034", + "", + "34" + ], + "35": [ + "InBit_36", + "0", + "1", + "0", + false, + "0035", + "", + "35" + ], + "36": [ + "InBit_37", + "0", + "1", + "0", + false, + "0036", + "", + "36" + ], + "37": [ + "InBit_38", + "0", + "1", + "0", + false, + "0037", + "", + "37" + ], + "38": [ + "InBit_39", + "0", + "1", + "0", + false, + "0038", + "", + "38" + ], + "39": [ + "InBit_40", + "0", + "1", + "0", + false, + "0039", + "", + "39" + ], + "40": [ + "InBit_41", + "0", + "1", + "0", + false, + "0040", + "", + "40" + ], + "41": [ + "InBit_42", + "0", + "1", + "0", + false, + "0041", + "", + "41" + ], + "42": [ + "InBit_43", + "0", + "1", + "0", + false, + "0042", + "", + "42" + ], + "43": [ + "InBit_44", + "0", + "1", + "0", + false, + "0043", + "", + "43" + ], + "44": [ + "InBit_45", + "0", + "1", + "0", + false, + "0044", + "", + "44" + ], + "45": [ + "InBit_46", + "0", + "1", + "0", + false, + "0045", + "", + "45" + ], + "46": [ + "InBit_47", + "0", + "1", + "0", + false, + "0046", + "", + "46" + ], + "47": [ + "InBit_48", + "0", + "1", + "0", + false, + "0047", + "", + "47" + ], + "48": [ + "InByte_1", + "0", + "8", + "6", + false, + "0048", + "", + "" + ], + "49": [ + "InByte_2", + "0", + "8", + "7", + false, + "0049", + "", + "" + ], + "50": [ + "InByte_3", + "0", + "8", + "8", + false, + "0050", + "", + "" + ], + "51": [ + "InByte_4", + "0", + "8", + "9", + false, + "0051", + "", + "" + ], + "52": [ + "InByte_5", + "0", + "8", + "10", + false, + "0052", + "", + "" + ], + "53": [ + "InByte_6", + "0", + "8", + "11", + false, + "0053", + "", + "" + ], + "54": [ + "InByte_7", + "0", + "8", + "12", + false, + "0054", + "", + "" + ], + "55": [ + "InByte_8", + "0", + "8", + "13", + false, + "0055", + "", + "" + ], + "56": [ + "InByte_9", + "0", + "8", + "14", + false, + "0056", + "", + "" + ], + "57": [ + "InByte_10", + "0", + "8", + "15", + false, + "0057", + "", + "" + ], + "58": [ + "InWord_1", + "0", + "16", + "16", + false, + "0058", + "", + "" + ], + "59": [ + "InWord_2", + "0", + "16", + "18", + false, + "0059", + "", + "" + ], + "60": [ + "InWord_3", + "0", + "16", + "20", + false, + "0060", + "", + "" + ], + "61": [ + "InWord_4", + "0", + "16", + "22", + false, + "0061", + "", + "" + ], + "62": [ + "InDword_1", + "0", + "32", + "24", + false, + "0062", + "", + "" + ], + "63": [ + "InDword_2", + "0", + "32", + "28", + false, + "0063", + "", + "" + ] + }, + "out": { + "0": [ + "OutBit_1", + "0", + "1", + "32", + false, + "0064", + "", + "0" + ], + "1": [ + "OutBit_2", + "0", + "1", + "32", + false, + "0065", + "", + "1" + ], + "2": [ + "OutBit_3", + "0", + "1", + "32", + false, + "0066", + "", + "2" + ], + "3": [ + "OutBit_4", + "0", + "1", + "32", + false, + "0067", + "", + "3" + ], + "4": [ + "OutBit_5", + "0", + "1", + "32", + false, + "0068", + "", + "4" + ], + "5": [ + "OutBit_6", + "0", + "1", + "32", + false, + "0069", + "", + "5" + ], + "6": [ + "OutBit_7", + "0", + "1", + "32", + false, + "0070", + "", + "6" + ], + "7": [ + "OutBit_8", + "0", + "1", + "32", + false, + "0071", + "", + "7" + ], + "8": [ + "OutBit_9", + "0", + "1", + "32", + false, + "0072", + "", + "8" + ], + "9": [ + "OutBit_10", + "0", + "1", + "32", + false, + "0073", + "", + "9" + ], + "10": [ + "OutBit_11", + "0", + "1", + "32", + false, + "0074", + "", + "10" + ], + "11": [ + "OutBit_12", + "0", + "1", + "32", + false, + "0075", + "", + "11" + ], + "12": [ + "OutBit_13", + "0", + "1", + "32", + false, + "0076", + "", + "12" + ], + "13": [ + "OutBit_14", + "0", + "1", + "32", + false, + "0077", + "", + "13" + ], + "14": [ + "OutBit_15", + "0", + "1", + "32", + false, + "0078", + "", + "14" + ], + "15": [ + "OutBit_16", + "0", + "1", + "32", + false, + "0079", + "", + "15" + ], + "16": [ + "OutBit_17", + "0", + "1", + "32", + false, + "0080", + "", + "16" + ], + "17": [ + "OutBit_18", + "0", + "1", + "32", + false, + "0081", + "", + "17" + ], + "18": [ + "OutBit_19", + "0", + "1", + "32", + false, + "0082", + "", + "18" + ], + "19": [ + "OutBit_20", + "0", + "1", + "32", + false, + "0083", + "", + "19" + ], + "20": [ + "OutBit_21", + "0", + "1", + "32", + false, + "0084", + "", + "20" + ], + "21": [ + "OutBit_22", + "0", + "1", + "32", + false, + "0085", + "", + "21" + ], + "22": [ + "OutBit_23", + "0", + "1", + "32", + false, + "0086", + "", + "22" + ], + "23": [ + "OutBit_24", + "0", + "1", + "32", + false, + "0087", + "", + "23" + ], + "24": [ + "OutBit_25", + "0", + "1", + "32", + false, + "0088", + "", + "24" + ], + "25": [ + "OutBit_26", + "0", + "1", + "32", + false, + "0089", + "", + "25" + ], + "26": [ + "OutBit_27", + "0", + "1", + "32", + false, + "0090", + "", + "26" + ], + "27": [ + "OutBit_28", + "0", + "1", + "32", + false, + "0091", + "", + "27" + ], + "28": [ + "OutBit_29", + "0", + "1", + "32", + false, + "0092", + "", + "28" + ], + "29": [ + "OutBit_30", + "0", + "1", + "32", + false, + "0093", + "", + "29" + ], + "30": [ + "OutBit_31", + "0", + "1", + "32", + false, + "0094", + "", + "30" + ], + "31": [ + "OutBit_32", + "0", + "1", + "32", + false, + "0095", + "", + "31" + ], + "32": [ + "OutBit_33", + "0", + "1", + "32", + false, + "0096", + "", + "32" + ], + "33": [ + "OutBit_34", + "0", + "1", + "32", + false, + "0097", + "", + "33" + ], + "34": [ + "OutBit_35", + "0", + "1", + "32", + false, + "0098", + "", + "34" + ], + "35": [ + "OutBit_36", + "0", + "1", + "32", + false, + "0099", + "", + "35" + ], + "36": [ + "OutBit_37", + "0", + "1", + "32", + false, + "0100", + "", + "36" + ], + "37": [ + "OutBit_38", + "0", + "1", + "32", + false, + "0101", + "", + "37" + ], + "38": [ + "OutBit_39", + "0", + "1", + "32", + false, + "0102", + "", + "38" + ], + "39": [ + "OutBit_40", + "0", + "1", + "32", + false, + "0103", + "", + "39" + ], + "40": [ + "OutBit_41", + "0", + "1", + "32", + false, + "0104", + "", + "40" + ], + "41": [ + "OutBit_42", + "0", + "1", + "32", + false, + "0105", + "", + "41" + ], + "42": [ + "OutBit_43", + "0", + "1", + "32", + false, + "0106", + "", + "42" + ], + "43": [ + "OutBit_44", + "0", + "1", + "32", + false, + "0107", + "", + "43" + ], + "44": [ + "OutBit_45", + "0", + "1", + "32", + false, + "0108", + "", + "44" + ], + "45": [ + "OutBit_46", + "0", + "1", + "32", + false, + "0109", + "", + "45" + ], + "46": [ + "OutBit_47", + "0", + "1", + "32", + false, + "0110", + "", + "46" + ], + "47": [ + "OutBit_48", + "0", + "1", + "32", + false, + "0111", + "", + "47" + ], + "48": [ + "OutByte_1", + "0", + "8", + "38", + false, + "0112", + "", + "" + ], + "49": [ + "OutByte_2", + "0", + "8", + "39", + false, + "0113", + "", + "" + ], + "50": [ + "OutByte_3", + "0", + "8", + "40", + false, + "0114", + "", + "" + ], + "51": [ + "OutByte_4", + "0", + "8", + "41", + false, + "0115", + "", + "" + ], + "52": [ + "OutByte_5", + "0", + "8", + "42", + false, + "0116", + "", + "" + ], + "53": [ + "OutByte_6", + "0", + "8", + "43", + false, + "0117", + "", + "" + ], + "54": [ + "OutByte_7", + "0", + "8", + "44", + false, + "0118", + "", + "" + ], + "55": [ + "OutByte_8", + "0", + "8", + "45", + false, + "0119", + "", + "" + ], + "56": [ + "OutByte_9", + "0", + "8", + "46", + false, + "0120", + "", + "" + ], + "57": [ + "OutByte_10", + "0", + "8", + "47", + false, + "0121", + "", + "" + ], + "58": [ + "OutWord_1", + "0", + "16", + "48", + false, + "0122", + "", + "" + ], + "59": [ + "OutWord_2", + "0", + "16", + "50", + false, + "0123", + "", + "" + ], + "60": [ + "OutWord_3", + "0", + "16", + "52", + false, + "0124", + "", + "" + ], + "61": [ + "OutWord_4", + "0", + "16", + "54", + false, + "0125", + "", + "" + ], + "62": [ + "OutDWord_1", + "0", + "32", + "56", + false, + "0126", + "", + "" + ], + "63": [ + "OutDWord_2", + "0", + "32", + "60", + false, + "0127", + "", + "" + ] + }, + "mem": {}, + "extend": {} + } + ], + "Connections": [] +} diff --git a/tests/io_tests/test_ios.py b/tests/io_tests/test_ios.py new file mode 100644 index 0000000..83c6b73 --- /dev/null +++ b/tests/io_tests/test_ios.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- +"""Tests instantiation all local classes.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" + +from os.path import dirname + +from revpimodio2.io import IntIOCounter +from tests import TestRevPiModIO + + +class TestIos(TestRevPiModIO): + data_dir = dirname(__file__) + + def test_ios(self): + """Test values of IOs.""" + rpi = self.modio() + + # Change values + rpi.io.magazin1.value = 255 + self.assertEqual(rpi.io.magazin1.value, 255) + rpi.device.virt01.setdefaultvalues() + self.assertEqual(rpi.io.magazin1.value, 0) + + # Use __call__ function + with self.assertRaises(TypeError): + rpi.io.magazin1.set_value(44) + with self.assertRaises(ValueError): + rpi.io.magazin1.set_value(b"\x01\x01") + rpi.io.magazin1.set_value(b"\x01") + self.assertEqual(rpi.io.magazin1.value, 1) + + # Inputs and Mems + with self.assertRaises(RuntimeError): + rpi.io.magazin1_max.set_value(b"\x01") + with self.assertRaises(RuntimeError): + rpi.io.InputMode_1.set_value(b"\x01") + + rpi.io.magazin1_max._iotype = 303 + with self.assertRaises(RuntimeError): + rpi.io.magazin1_max.set_value(b"\x01") + + def test_counter_io(self): + """Test counter inputs.""" + rpi = self.modio() + + # Just for testing buffered mode + rpi._buffedwrite = True + + # Counter vorbereiten + self.fh_procimg.seek(rpi.io.Counter_1.address) + self.fh_procimg.write(b"\x00\x01") + rpi.readprocimg() + + self.assertEqual(type(rpi.io.Counter_1), IntIOCounter) + self.assertEqual(rpi.io.Counter_1.value, 256) + rpi.io.Counter_1.reset() + rpi.readprocimg() + self.assertEqual(rpi.io.Counter_1.value, 0) + + # This will use ioctl calls + rpi._run_on_pi = True + + with self.assertWarnsRegex(RuntimeWarning, r"'iorst' and count \d"): + rpi.io.Counter_1.reset() + self.assertEqual(rpi.ioerrors, 1) + + del rpi + + rpi = self.modio(monitoring=True) + self.assertEqual(type(rpi.io.Counter_2), IntIOCounter) + with self.assertRaises(RuntimeError): + rpi.io.Counter_2.reset() + del rpi + + rpi = self.modio(simulator=True) + self.assertEqual(type(rpi.io.Counter_3), IntIOCounter) + with self.assertRaises(RuntimeError): + rpi.io.Counter_3.reset() + del rpi + + def test_superio(self): + """Testet mehrbittige IOs.""" + rpi = self.modio(configrsc="config_supervirt.rsc") + + # Adressen und Längen prüfen + self.assertEqual(rpi.device[65]._offset, 75) + + self.assertEqual(rpi.io.InBit_1.length, 1) + self.assertEqual(rpi.io.InBit_2.length, 0) + self.assertEqual(rpi.io.InBit_6.address, 75) + self.assertEqual(rpi.io.InBit_48.address, 80) + self.assertEqual(rpi.io.InDword_1.address, 99) + self.assertEqual(rpi.io.OutBit_1.length, 1) + self.assertEqual(rpi.io.OutBit_2.length, 0) + self.assertEqual(rpi.io.OutBit_8.address, 107) + self.assertEqual(rpi.io.OutBit_9.address, 108) + + self.assertEqual(len(rpi.device[65]._ba_devdata), 64) + + # Inputs setzen + rpi.io.OutBit_6.value = True + self.assertTrue(rpi.io.OutBit_6.value) + self.assertEqual(rpi.device[65]._ba_devdata[32:38], b"\x20\x00\x00\x00\x00\x00") + rpi.io.OutBit_48.value = True + self.assertEqual(rpi.device[65]._ba_devdata[32:38], b"\x20\x00\x00\x00\x00\x80") From 32d113540c54392b21bc6b93fde383fc63fe40da Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Tue, 29 Oct 2024 13:53:37 +0100 Subject: [PATCH 14/26] test: Test mainloop functions --- tests/helper.py | 41 ++++++ tests/mainloop/config.rsc | 1 + tests/mainloop/test_mainloop.py | 228 ++++++++++++++++++++++++++++++++ 3 files changed, 270 insertions(+) create mode 100644 tests/helper.py create mode 100644 tests/mainloop/config.rsc create mode 100644 tests/mainloop/test_mainloop.py diff --git a/tests/helper.py b/tests/helper.py new file mode 100644 index 0000000..2064b37 --- /dev/null +++ b/tests/helper.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +"""Helper functions for all tests.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" + +import os +from signal import SIGINT +from threading import Thread +from time import sleep + + +class ChangeThread(Thread): + """Thread to change IO values in background.""" + + def __init__(self, revpi, ioname, iovalue, time): + """Init ChangeThread-class.""" + super().__init__() + self.revpi = revpi + self.ioname = ioname + self.time = time + self.iovalue = iovalue + + def run(self): + """Thread starten.""" + sleep(self.time) + self.revpi.io[self.ioname].value = self.iovalue + + +class ExitThread(Thread): + """Call .exit() of ModIO after given time.""" + + def __init__(self, revpi, time): + """""" + super().__init__() + self.revpi = revpi + self.time = time + + def run(self): + sleep(self.time) + self.revpi.exit() diff --git a/tests/mainloop/config.rsc b/tests/mainloop/config.rsc new file mode 100644 index 0000000..de4cbbc --- /dev/null +++ b/tests/mainloop/config.rsc @@ -0,0 +1 @@ +{"App":{"name": "PiCtory", "version": "1.2.3","saveTS": "20170826120906","language": "en","layout": {"north":{"size":70,"initClosed":false,"initHidden":false},"south":{"size":480,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":500,"initClosed":false,"initHidden":false}}}},"east":{"size":70,"initClosed":true,"initHidden":false,"children":{"layout1":{"north":{"size":100,"initClosed":false,"initHidden":false},"south":{"size":98,"initClosed":false,"initHidden":false}}}},"west":{"size":200,"initClosed":false,"initHidden":false,"children":{"layout1":{}}}}},"Summary":{"inpTotal": 338,"outTotal": 113},"Devices":[{"catalogNr": "RevPiCore","GUID": "4ebb85e8-92ea-415d-b191-cc58c2857c0a","id": "device_RevPiCore_20170404_1_2_001","type": "BASE","productType": "95","position": "0","name": "picore01","bmk": "RevPi Core V1.2","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""],"1": ["RevPiIOCycle","0","8","1",true,"0001", "",""],"2": ["RS485ErrorCnt","0","16","2",false,"0002", "",""],"3": ["Core_Temperatur","0","8","4",false,"0003", "",""],"4": ["Core_Frequency","0","8","5",false,"0004", "",""]},"out": {"0": ["RevPiLED","0","8","6",true,"0005", "",""],"1": ["RS485ErrorLimit1","10","16","7",false,"0006", "",""],"2": ["RS485ErrorLimit2","1000","16","9",false,"0007", "",""]},"mem": {},"extend": {}},{"catalogNr": "RevPiDI","GUID": "2e2c089e-6bef-14c0-852b-41b7cf48d846","id": "device_RevPiDI_20160818_1_0_001","type": "LEFT_RIGHT","productType": "97","position": "32","name": "di01","bmk": "RevPi DI","inpVariant": 0,"outVariant": 0,"comment": "","offset": 11,"inp": {"0": ["notaus_ok","0","1","0",true,"0000", "","0"],"1": ["motorschutz_ok","0","1","0",true,"0001", "","1"],"2": ["fu_ok","0","1","0",true,"0002", "","2"],"3": ["fu_motoran","0","1","0",true,"0003", "","3"],"4": ["I_5","0","1","0",true,"0004", "","4"],"5": ["I_6","0","1","0",true,"0005", "","5"],"6": ["I_7","0","1","0",true,"0006", "","6"],"7": ["I_8","0","1","0",true,"0007", "","7"],"8": ["t_automatik","0","1","0",true,"0008", "","8"],"9": ["t_start","0","1","0",true,"0009", "","9"],"10": ["t_stop","0","1","0",true,"0010", "","10"],"11": ["t_quit","0","1","0",true,"0011", "","11"],"12": ["t_notaus","0","1","0",true,"0012", "","12"],"13": ["I_14","0","1","0",true,"0013", "","13"],"14": ["I_15","0","1","0",true,"0014", "","14"],"15": ["I_16","0","1","0",true,"0015", "","15"],"16": ["Status","0","16","4",false,"0016", "",""],"17": ["Counter_1","0","32","6",false,"0017", "",""],"18": ["Counter_2","0","32","10",false,"0018", "",""],"19": ["Counter_3","0","32","14",false,"0019", "",""],"20": ["Counter_4","0","32","18",false,"0020", "",""],"21": ["Counter_5","0","32","22",false,"0021", "",""],"22": ["Counter_6","0","32","26",false,"0022", "",""],"23": ["Counter_7","0","32","30",false,"0023", "",""],"24": ["Counter_8","0","32","34",false,"0024", "",""],"25": ["Counter_9","0","32","38",false,"0025", "",""],"26": ["Counter_10","0","32","42",false,"0026", "",""],"27": ["Counter_11","0","32","46",false,"0027", "",""],"28": ["Counter_12","0","32","50",false,"0028", "",""],"29": ["Counter_13","0","32","54",false,"0029", "",""],"30": ["Counter_14","0","32","58",false,"0030", "",""],"31": ["Counter_15","0","32","62",false,"0031", "",""],"32": ["Counter_16","0","32","66",false,"0032", "",""],"33": ["Output_Status","0","16","2",false,"0050", "",""]},"out": {"0": ["Output","0","16","70",false,"0051", "",""],"1": ["PWM_1","0","8","72",false,"0052", "",""],"2": ["PWM_2","0","8","73",false,"0053", "",""],"3": ["PWM_3","0","8","74",false,"0054", "",""],"4": ["PWM_4","0","8","75",false,"0055", "",""],"5": ["PWM_5","0","8","76",false,"0056", "",""],"6": ["PWM_6","0","8","77",false,"0057", "",""],"7": ["PWM_7","0","8","78",false,"0058", "",""],"8": ["PWM_8","0","8","79",false,"0059", "",""],"9": ["PWM_9","0","8","80",false,"0060", "",""],"10": ["PWM_10","0","8","81",false,"0061", "",""],"11": ["PWM_11","0","8","82",false,"0062", "",""],"12": ["PWM_12","0","8","83",false,"0063", "",""],"13": ["PWM_13","0","8","84",false,"0064", "",""],"14": ["PWM_14","0","8","85",false,"0065", "",""],"15": ["PWM_15","0","8","86",false,"0066", "",""],"16": ["PWM_16","0","8","87",false,"0067", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0033", "",""],"1": ["InputMode_2","0","8","89",false,"0034", "",""],"2": ["InputMode_3","0","8","90",false,"0035", "",""],"3": ["InputMode_4","0","8","91",false,"0036", "",""],"4": ["InputMode_5","0","8","92",false,"0037", "",""],"5": ["InputMode_6","0","8","93",false,"0038", "",""],"6": ["InputMode_7","0","8","94",false,"0039", "",""],"7": ["InputMode_8","0","8","95",false,"0040", "",""],"8": ["InputMode_9","0","8","96",false,"0041", "",""],"9": ["InputMode_10","0","8","97",false,"0042", "",""],"10": ["InputMode_11","0","8","98",false,"0043", "",""],"11": ["InputMode_12","0","8","99",false,"0044", "",""],"12": ["InputMode_13","0","8","100",false,"0045", "",""],"13": ["InputMode_14","0","8","101",false,"0046", "",""],"14": ["InputMode_15","0","8","102",false,"0047", "",""],"15": ["InputMode_16","0","8","103",false,"0048", "",""],"16": ["InputDebounce","0","16","104",false,"0049", "",""],"17": ["OutputPushPull","0","16","106",false,"0068", "",""],"18": ["OutputOpenLoadDetect","0","16","108",false,"0069", "",""],"19": ["OutputPWMActive","0","16","110",false,"0070", "",""],"20": ["OutputPWMFrequency","2","8","112",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDI","GUID": "81e6c459-0398-a7c4-4954-d793ee9a5b89","id": "device_RevPiDI_20160818_1_0_002","type": "LEFT_RIGHT","productType": "97","position": "33","name": "di02","bmk": "RevPi DI","inpVariant": 0,"outVariant": 0,"comment": "","offset": 124,"inp": {"0": ["m_druck_ok","0","1","0",true,"0000", "","0"],"1": ["m_m1_eingefahren","0","1","0",true,"0001", "","1"],"2": ["m_m1_ausgefahren","0","1","0",true,"0002", "","2"],"3": ["m_m2_eingefahren","0","1","0",true,"0003", "","3"],"4": ["m_m2_ausgefahren","0","1","0",true,"0004", "","4"],"5": ["m_m3_eingefahren","0","1","0",true,"0005", "","5"],"6": ["m_m3_ausgefahren","0","1","0",true,"0006", "","6"],"7": ["s_rutsche","0","1","0",true,"0007", "","7"],"8": ["s_metall","0","1","0",true,"0008", "","8"],"9": ["s_magazin1","0","1","0",true,"0009", "","9"],"10": ["s_magazin2","0","1","0",true,"0010", "","10"],"11": ["I_12_i03","0","1","0",true,"0011", "","11"],"12": ["I_13_i03","0","1","0",true,"0012", "","12"],"13": ["I_14_i03","0","1","0",true,"0013", "","13"],"14": ["I_15_i03","0","1","0",true,"0014", "","14"],"15": ["mb_status","0","1","0",true,"0015", "","15"],"16": ["Status_i03","0","16","4",false,"0016", "",""],"17": ["Counter_1_i03","0","32","6",false,"0017", "",""],"18": ["Counter_2_i03","0","32","10",false,"0018", "",""],"19": ["Counter_3_i03","0","32","14",false,"0019", "",""],"20": ["Counter_4_i03","0","32","18",false,"0020", "",""],"21": ["Counter_5_i03","0","32","22",false,"0021", "",""],"22": ["Counter_6_i03","0","32","26",false,"0022", "",""],"23": ["Counter_7_i03","0","32","30",false,"0023", "",""],"24": ["Counter_8_i03","0","32","34",false,"0024", "",""],"25": ["Counter_9_i03","0","32","38",false,"0025", "",""],"26": ["Counter_10_i03","0","32","42",false,"0026", "",""],"27": ["Counter_11_i03","0","32","46",false,"0027", "",""],"28": ["Counter_12_i03","0","32","50",false,"0028", "",""],"29": ["Counter_13_i03","0","32","54",false,"0029", "",""],"30": ["Counter_14_i03","0","32","58",false,"0030", "",""],"31": ["Counter_15_i03","0","32","62",false,"0031", "",""],"32": ["Counter_16_i03","0","32","66",false,"0032", "",""],"33": ["Output_Status_i03","0","16","2",false,"0050", "",""]},"out": {"0": ["Output_i03","0","16","70",false,"0051", "",""],"1": ["PWM_1_i03","0","8","72",false,"0052", "",""],"2": ["PWM_2_i03","0","8","73",false,"0053", "",""],"3": ["PWM_3_i03","0","8","74",false,"0054", "",""],"4": ["PWM_4_i03","0","8","75",false,"0055", "",""],"5": ["PWM_5_i03","0","8","76",false,"0056", "",""],"6": ["PWM_6_i03","0","8","77",false,"0057", "",""],"7": ["PWM_7_i03","0","8","78",false,"0058", "",""],"8": ["PWM_8_i03","0","8","79",false,"0059", "",""],"9": ["PWM_9_i03","0","8","80",false,"0060", "",""],"10": ["PWM_10_i03","0","8","81",false,"0061", "",""],"11": ["PWM_11_i03","0","8","82",false,"0062", "",""],"12": ["PWM_12_i03","0","8","83",false,"0063", "",""],"13": ["PWM_13_i03","0","8","84",false,"0064", "",""],"14": ["PWM_14_i03","0","8","85",false,"0065", "",""],"15": ["PWM_15_i03","0","8","86",false,"0066", "",""],"16": ["PWM_16_i03","0","8","87",false,"0067", "",""]},"mem": {"0": ["InputMode_1_i03","0","8","88",false,"0033", "",""],"1": ["InputMode_2_i03","0","8","89",false,"0034", "",""],"2": ["InputMode_3_i03","0","8","90",false,"0035", "",""],"3": ["InputMode_4_i03","0","8","91",false,"0036", "",""],"4": ["InputMode_5_i03","0","8","92",false,"0037", "",""],"5": ["InputMode_6_i03","0","8","93",false,"0038", "",""],"6": ["InputMode_7_i03","0","8","94",false,"0039", "",""],"7": ["InputMode_8_i03","0","8","95",false,"0040", "",""],"8": ["InputMode_9_i03","0","8","96",false,"0041", "",""],"9": ["InputMode_10_i03","0","8","97",false,"0042", "",""],"10": ["InputMode_11_i03","0","8","98",false,"0043", "",""],"11": ["InputMode_12_i03","0","8","99",false,"0044", "",""],"12": ["InputMode_13_i03","0","8","100",false,"0045", "",""],"13": ["InputMode_14_i03","0","8","101",false,"0046", "",""],"14": ["InputMode_15_i03","0","8","102",false,"0047", "",""],"15": ["InputMode_16_i03","0","8","103",false,"0048", "",""],"16": ["InputDebounce_i03","0","16","104",false,"0049", "",""],"17": ["OutputPushPull_i03","0","16","106",false,"0068", "",""],"18": ["OutputOpenLoadDetect_i03","0","16","108",false,"0069", "",""],"19": ["OutputPWMActive_i03","0","16","110",false,"0070", "",""],"20": ["OutputPWMFrequency_i03","2","8","112",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDO","GUID": "4f8da9ea-91b2-d028-c60d-4476096a9dc2","id": "device_RevPiDO_20160818_1_0_001","type": "LEFT_RIGHT","productType": "98","position": "34","name": "do01","bmk": "RevPi DO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 237,"inp": {"0": ["Output_Status_i04","0","16","2",false,"0000", "",""],"1": ["Status_i04","0","16","4",false,"0001", "",""],"2": ["Input","0","16","0",false,"0038", "",""],"3": ["Counter_1_i04","0","32","6",false,"0039", "",""],"4": ["Counter_2_i04","0","32","10",false,"0040", "",""],"5": ["Counter_3_i04","0","32","14",false,"0041", "",""],"6": ["Counter_4_i04","0","32","18",false,"0042", "",""],"7": ["Counter_5_i04","0","32","22",false,"0043", "",""],"8": ["Counter_6_i04","0","32","26",false,"0044", "",""],"9": ["Counter_7_i04","0","32","30",false,"0045", "",""],"10": ["Counter_8_i04","0","32","34",false,"0046", "",""],"11": ["Counter_9_i04","0","32","38",false,"0047", "",""],"12": ["Counter_10_i04","0","32","42",false,"0048", "",""],"13": ["Counter_11_i04","0","32","46",false,"0049", "",""],"14": ["Counter_12_i04","0","32","50",false,"0050", "",""],"15": ["Counter_13_i04","0","32","54",false,"0051", "",""],"16": ["Counter_14_i04","0","32","58",false,"0052", "",""],"17": ["Counter_15_i04","0","32","62",false,"0053", "",""],"18": ["Counter_16_i04","0","32","66",false,"0054", "",""]},"out": {"0": ["fu_rechts","0","1","70",true,"0002", "","0"],"1": ["fu_links","0","1","70",true,"0003", "","1"],"2": ["fu_schnell","0","1","70",true,"0004", "","2"],"3": ["fu_lahm","0","1","70",true,"0005", "","3"],"4": ["v_druck","0","1","70",true,"0006", "","4"],"5": ["v_m1_einfahren","0","1","70",true,"0007", "","5"],"6": ["v_m1_ausfahren","0","1","70",true,"0008", "","6"],"7": ["v_m2_einfahren","0","1","70",true,"0009", "","7"],"8": ["v_m2_ausfahren","0","1","70",true,"0010", "","8"],"9": ["v_m3_einfahren","0","1","70",true,"0011", "","9"],"10": ["v_m3_ausfahren","0","1","70",true,"0012", "","10"],"11": ["O_12","0","1","70",true,"0013", "","11"],"12": ["O_13","0","1","70",true,"0014", "","12"],"13": ["O_14","0","1","70",true,"0015", "","13"],"14": ["O_15","0","1","70",true,"0016", "","14"],"15": ["fu_frei","0","1","70",true,"0017", "","15"],"16": ["PWM_1_i04","0","8","72",false,"0018", "",""],"17": ["PWM_2_i04","0","8","73",false,"0019", "",""],"18": ["PWM_3_i04","0","8","74",false,"0020", "",""],"19": ["PWM_4_i04","0","8","75",false,"0021", "",""],"20": ["PWM_5_i04","0","8","76",false,"0022", "",""],"21": ["PWM_6_i04","0","8","77",false,"0023", "",""],"22": ["PWM_7_i04","0","8","78",false,"0024", "",""],"23": ["PWM_8_i04","0","8","79",false,"0025", "",""],"24": ["PWM_9_i04","0","8","80",false,"0026", "",""],"25": ["PWM_10_i04","0","8","81",false,"0027", "",""],"26": ["PWM_11_i04","0","8","82",false,"0028", "",""],"27": ["PWM_12_i04","0","8","83",false,"0029", "",""],"28": ["PWM_13_i04","0","8","84",false,"0030", "",""],"29": ["PWM_14_i04","0","8","85",false,"0031", "",""],"30": ["PWM_15_i04","0","8","86",false,"0032", "",""],"31": ["PWM_16_i04","0","8","87",false,"0033", "",""]},"mem": {"0": ["OutputPushPull_i04","0","16","106",false,"0034", "",""],"1": ["OutputOpenLoadDetect_i04","0","16","108",false,"0035", "",""],"2": ["OutputPWMActive_i04","0","16","110",false,"0036", "",""],"3": ["OutputPWMFrequency_i04","1","8","112",false,"0037", "",""],"4": ["InputMode_1_i04","0","8","88",false,"0055", "",""],"5": ["InputMode_2_i04","0","8","89",false,"0056", "",""],"6": ["InputMode_3_i04","0","8","90",false,"0057", "",""],"7": ["InputMode_4_i04","0","8","91",false,"0058", "",""],"8": ["InputMode_5_i04","0","8","92",false,"0059", "",""],"9": ["InputMode_6_i04","0","8","93",false,"0060", "",""],"10": ["InputMode_7_i04","0","8","94",false,"0061", "",""],"11": ["InputMode_8_i04","0","8","95",false,"0062", "",""],"12": ["InputMode_9_i04","0","8","96",false,"0063", "",""],"13": ["InputMode_10_i04","0","8","97",false,"0064", "",""],"14": ["InputMode_11_i04","0","8","98",false,"0065", "",""],"15": ["InputMode_12_i04","0","8","99",false,"0066", "",""],"16": ["InputMode_13_i04","0","8","100",false,"0067", "",""],"17": ["InputMode_14_i04","0","8","101",false,"0068", "",""],"18": ["InputMode_15_i04","0","8","102",false,"0069", "",""],"19": ["InputMode_16_i04","0","8","103",false,"0070", "",""],"20": ["InputDebounce_i04","0","16","104",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDO","GUID": "b8a70c62-9b91-9e1a-af2a-37f74b16aca2","id": "device_RevPiDO_20160818_1_0_002","type": "LEFT_RIGHT","productType": "98","position": "35","name": "do02","bmk": "RevPi DO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 350,"inp": {"0": ["Output_Status_i05","0","16","2",false,"0000", "",""],"1": ["Status_i05","0","16","4",false,"0001", "",""],"2": ["Input_i05","0","16","0",false,"0038", "",""],"3": ["Counter_1_i05","0","32","6",false,"0039", "",""],"4": ["Counter_2_i05","0","32","10",false,"0040", "",""],"5": ["Counter_3_i05","0","32","14",false,"0041", "",""],"6": ["Counter_4_i05","0","32","18",false,"0042", "",""],"7": ["Counter_5_i05","0","32","22",false,"0043", "",""],"8": ["Counter_6_i05","0","32","26",false,"0044", "",""],"9": ["Counter_7_i05","0","32","30",false,"0045", "",""],"10": ["Counter_8_i05","0","32","34",false,"0046", "",""],"11": ["Counter_9_i05","0","32","38",false,"0047", "",""],"12": ["Counter_10_i05","0","32","42",false,"0048", "",""],"13": ["Counter_11_i05","0","32","46",false,"0049", "",""],"14": ["Counter_12_i05","0","32","50",false,"0050", "",""],"15": ["Counter_13_i05","0","32","54",false,"0051", "",""],"16": ["Counter_14_i05","0","32","58",false,"0052", "",""],"17": ["Counter_15_i05","0","32","62",false,"0053", "",""],"18": ["Counter_16_i05","0","32","66",false,"0054", "",""]},"out": {"0": ["fu_reset","0","1","70",true,"0002", "","0"],"1": ["h_start","0","1","70",true,"0003", "","1"],"2": ["h_fehler","0","1","70",true,"0004", "","2"],"3": ["O_04_i05","0","1","70",true,"0005", "","3"],"4": ["O_05_i05","0","1","70",true,"0006", "","4"],"5": ["O_06_i05","0","1","70",true,"0007", "","5"],"6": ["O_07_i05","0","1","70",true,"0008", "","6"],"7": ["O_08_i05","0","1","70",true,"0009", "","7"],"8": ["O_09_i05","0","1","70",true,"0010", "","8"],"9": ["O_10_i05","0","1","70",true,"0011", "","9"],"10": ["O_11_i05","0","1","70",true,"0012", "","10"],"11": ["O_12_i05","0","1","70",true,"0013", "","11"],"12": ["O_13_i05","0","1","70",true,"0014", "","12"],"13": ["O_14_i05","0","1","70",true,"0015", "","13"],"14": ["O_15_i05","0","1","70",true,"0016", "","14"],"15": ["mb_connect","0","1","70",true,"0017", "","15"],"16": ["PWM_1_i05","0","8","72",false,"0018", "",""],"17": ["PWM_2_i05","0","8","73",false,"0019", "",""],"18": ["PWM_3_i05","0","8","74",false,"0020", "",""],"19": ["PWM_4_i05","0","8","75",false,"0021", "",""],"20": ["PWM_5_i05","0","8","76",false,"0022", "",""],"21": ["PWM_6_i05","0","8","77",false,"0023", "",""],"22": ["PWM_7_i05","0","8","78",false,"0024", "",""],"23": ["PWM_8_i05","0","8","79",false,"0025", "",""],"24": ["PWM_9_i05","0","8","80",false,"0026", "",""],"25": ["PWM_10_i05","0","8","81",false,"0027", "",""],"26": ["PWM_11_i05","0","8","82",false,"0028", "",""],"27": ["PWM_12_i05","0","8","83",false,"0029", "",""],"28": ["PWM_13_i05","0","8","84",false,"0030", "",""],"29": ["PWM_14_i05","0","8","85",false,"0031", "",""],"30": ["PWM_15_i05","0","8","86",false,"0032", "",""],"31": ["PWM_16_i05","0","8","87",false,"0033", "",""]},"mem": {"0": ["OutputPushPull_i05","0","16","106",false,"0034", "",""],"1": ["OutputOpenLoadDetect_i05","0","16","108",false,"0035", "",""],"2": ["OutputPWMActive_i05","0","16","110",false,"0036", "",""],"3": ["OutputPWMFrequency_i05","1","8","112",false,"0037", "",""],"4": ["InputMode_1_i05","0","8","88",false,"0055", "",""],"5": ["InputMode_2_i05","0","8","89",false,"0056", "",""],"6": ["InputMode_3_i05","0","8","90",false,"0057", "",""],"7": ["InputMode_4_i05","0","8","91",false,"0058", "",""],"8": ["InputMode_5_i05","0","8","92",false,"0059", "",""],"9": ["InputMode_6_i05","0","8","93",false,"0060", "",""],"10": ["InputMode_7_i05","0","8","94",false,"0061", "",""],"11": ["InputMode_8_i05","0","8","95",false,"0062", "",""],"12": ["InputMode_9_i05","0","8","96",false,"0063", "",""],"13": ["InputMode_10_i05","0","8","97",false,"0064", "",""],"14": ["InputMode_11_i05","0","8","98",false,"0065", "",""],"15": ["InputMode_12_i05","0","8","99",false,"0066", "",""],"16": ["InputMode_13_i05","0","8","100",false,"0067", "",""],"17": ["InputMode_14_i05","0","8","101",false,"0068", "",""],"18": ["InputMode_15_i05","0","8","102",false,"0069", "",""],"19": ["InputMode_16_i05","0","8","103",false,"0070", "",""],"20": ["InputDebounce_i05","0","16","104",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiAIO","GUID": "76f10e57-ecaf-2a45-f4df-b9a66e3f40db","id": "device_RevPiAIO_20170301_1_0_001","type": "LEFT_RIGHT","productType": "103","position": "36","name": "aio01","bmk": "RevPi AIO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 463,"inp": {"0": ["fu_ist","0","16","0",false,"0000", "",""],"1": ["InputValue_2","0","16","2",false,"0001", "",""],"2": ["InputValue_3","0","16","4",false,"0002", "",""],"3": ["InputValue_4","0","16","6",false,"0003", "",""],"4": ["InputStatus_1","0","8","8",false,"0004", "",""],"5": ["InputStatus_2","0","8","9",false,"0005", "",""],"6": ["InputStatus_3","0","8","10",false,"0006", "",""],"7": ["InputStatus_4","0","8","11",false,"0007", "",""],"8": ["tmp_schrank","0","16","12",false,"0008", "",""],"9": ["RTDValue_2","0","16","14",false,"0009", "",""],"10": ["RTDStatus_1","0","8","16",false,"0010", "",""],"11": ["RTDStatus_2","0","8","17",false,"0011", "",""],"12": ["OutputStatus_1","0","8","18",false,"0012", "",""],"13": ["OutputStatus_2","0","8","19",false,"0013", "",""]},"out": {"0": ["OutputValue_1","0","16","20",false,"0014", "",""],"1": ["fu_soll","0","16","22",false,"0015", "",""]},"mem": {"0": ["Input1Range","1","8","24",false,"0016", "You must use wire bridges for current measurement!",""],"1": ["Input1Multiplier","1","16","25",false,"0017", "",""],"2": ["Input1Divisor","1","16","27",false,"0018", "",""],"3": ["Input1Offset","0","16","29",false,"0019", "",""],"4": ["Input2Range","1","8","31",false,"0020", "You must use wire bridges for current measurement!",""],"5": ["Input2Multiplier","1","16","32",false,"0021", "",""],"6": ["Input2Divisor","1","16","34",false,"0022", "",""],"7": ["Input2Offset","0","16","36",false,"0023", "",""],"8": ["Input3Range","1","8","38",false,"0024", "You must use wire bridges for current measurement!",""],"9": ["Input3Multiplier","1","16","39",false,"0025", "",""],"10": ["Input3Divisor","1","16","41",false,"0026", "",""],"11": ["Input3Offset","0","16","43",false,"0027", "",""],"12": ["Input4Range","1","8","45",false,"0028", "You must use wire bridges for current measurement!",""],"13": ["Input4Multiplier","1","16","46",false,"0029", "",""],"14": ["Input4Divisor","1","16","48",false,"0030", "",""],"15": ["Input4Offset","0","16","50",false,"0031", "",""],"16": ["ADC_DataRate","0","8","52",false,"0032", "Use lowest value for highest precision and a maximum 50 Hz suppression",""],"17": ["RTD1Type","0","8","53",false,"0033", "",""],"18": ["RTD1Wiring","0","8","54",false,"0034", "You must use wire bridges for 2-wire sensors!",""],"19": ["RTD1Multiplier","1","16","55",false,"0035", "",""],"20": ["RTD1Divisor","1","16","57",false,"0036", "",""],"21": ["RTD1Offset","0","16","59",false,"0037", "",""],"22": ["RTD2Type","0","8","61",false,"0038", "",""],"23": ["RTD2Wiring","0","8","62",false,"0039", "You must use wire bridges for 2-wire sensors!",""],"24": ["RTD2Multiplier","1","16","63",false,"0040", "",""],"25": ["RTD2Divisor","1","16","65",false,"0041", "",""],"26": ["RTD2Offset","0","16","67",false,"0042", "",""],"27": ["Output1Range","0","8","69",false,"0043", "",""],"28": ["Output1EnableSlew","0","8","70",false,"0044", "Enable slew rate deceleration",""],"29": ["Output1SlewStepSize","0","8","71",false,"0045", "Slew rate step size",""],"30": ["Output1SlewClock","0","8","72",false,"0046", "lock rate of slew rate deceleration in kHz",""],"31": ["Output1Multiplier","1","16","73",false,"0047", "",""],"32": ["Output1Divisor","1","16","75",false,"0048", "",""],"33": ["Output1Offset","0","16","77",false,"0049", "",""],"34": ["Output2Range","2","8","79",false,"0050", "",""],"35": ["Output2EnableSlew","0","8","80",false,"0051", "Enable slew rate deceleration",""],"36": ["Output2SlewStepSize","0","8","81",false,"0052", "Slew rate step size",""],"37": ["Output2SlewClock","0","8","82",false,"0053", "lock rate of slew rate deceleration in kHz",""],"38": ["Output2Multiplier","1","16","83",false,"0054", "",""],"39": ["Output2Divisor","1","16","85",false,"0055", "",""],"40": ["Output2Offset","0","16","87",false,"0056", "",""]},"extend": {}},{"catalogNr": "Virtual01","GUID": "c3bf8705-d96a-6452-2566-40c5d86a5061","id": "device_Virtual01_20160818_1_0_001","type": "VIRTUAL","productType": "32768","position": "64","name": "virt01","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 552,"inp": {"0": ["pbit0_7","0","8","0",false,"0000", "",""],"1": ["pbit8_15","0","8","1",false,"0001", "",""],"2": ["pbit16_23","0","8","2",false,"0002", "",""],"3": ["pbit24_31","0","8","3",false,"0003", "",""],"4": ["magazin1_max","4","8","4",false,"0004", "",""],"5": ["magazin2_max","4","8","5",false,"0005", "",""],"6": ["p_drehzahl1","136","8","6",false,"0006", "",""],"7": ["p_drehzahl2","19","8","7",false,"0007", "",""],"8": ["Input_9","0","8","8",false,"0008", "",""],"9": ["Input_10","0","8","9",false,"0009", "",""],"10": ["Input_11","0","8","10",false,"0010", "",""],"11": ["Input_12","0","8","11",false,"0011", "",""],"12": ["Input_13","0","8","12",false,"0012", "",""],"13": ["Input_14","0","8","13",false,"0013", "",""],"14": ["Input_15","0","8","14",false,"0014", "",""],"15": ["Input_16","0","8","15",false,"0015", "",""],"16": ["Input_17","0","8","16",false,"0016", "",""],"17": ["Input_18","0","8","17",false,"0017", "",""],"18": ["Input_19","0","8","18",false,"0018", "",""],"19": ["Input_20","0","8","19",false,"0019", "",""],"20": ["Input_21","0","8","20",false,"0020", "",""],"21": ["Input_22","0","8","21",false,"0021", "",""],"22": ["Input_23","0","8","22",false,"0022", "",""],"23": ["Input_24","0","8","23",false,"0023", "",""],"24": ["Input_25","0","8","24",false,"0024", "",""],"25": ["Input_26","0","8","25",false,"0025", "",""],"26": ["Input_27","0","8","26",false,"0026", "",""],"27": ["Input_28","0","8","27",false,"0027", "",""],"28": ["Input_29","0","8","28",false,"0028", "",""],"29": ["Input_30","0","8","29",false,"0029", "",""],"30": ["Input_31","0","8","30",false,"0030", "",""],"31": ["Input_32","0","8","31",false,"0031", "",""]},"out": {"0": ["meldung0_7","0","8","32",false,"0032", "",""],"1": ["meldung8_15","0","8","33",false,"0033", "",""],"2": ["meldung16_23","0","8","34",false,"0034", "",""],"3": ["meldung24_31","0","8","35",false,"0035", "",""],"4": ["magazin1","0","8","36",false,"0036", "",""],"5": ["magazin2","0","8","37",false,"0037", "",""],"6": ["Output_7","0","8","38",false,"0038", "",""],"7": ["Output_8","0","8","39",false,"0039", "",""],"8": ["Output_9","0","8","40",false,"0040", "",""],"9": ["Output_10","0","8","41",false,"0041", "",""],"10": ["Output_11","0","8","42",false,"0042", "",""],"11": ["Output_12","0","8","43",false,"0043", "",""],"12": ["Output_13","0","8","44",false,"0044", "",""],"13": ["Output_14","0","8","45",false,"0045", "",""],"14": ["Output_15","0","8","46",false,"0046", "",""],"15": ["Output_16","0","8","47",false,"0047", "",""],"16": ["Output_17","0","8","48",false,"0048", "",""],"17": ["Output_18","0","8","49",false,"0049", "",""],"18": ["Output_19","0","8","50",false,"0050", "",""],"19": ["Output_20","0","8","51",false,"0051", "",""],"20": ["Output_21","0","8","52",false,"0052", "",""],"21": ["Output_22","0","8","53",false,"0053", "",""],"22": ["Output_23","0","8","54",false,"0054", "",""],"23": ["Output_24","0","8","55",false,"0055", "",""],"24": ["Output_25","0","8","56",false,"0056", "",""],"25": ["Output_26","0","8","57",false,"0057", "",""],"26": ["Output_27","0","8","58",false,"0058", "",""],"27": ["Output_28","0","8","59",false,"0059", "",""],"28": ["Output_29","0","8","60",false,"0060", "",""],"29": ["Output_30","0","8","61",false,"0061", "",""],"30": ["Output_31","0","8","62",false,"0062", "",""],"31": ["Output_32","0","8","63",false,"0063", "",""]},"mem": {},"extend": {}}],"Connections":[]} \ No newline at end of file diff --git a/tests/mainloop/test_mainloop.py b/tests/mainloop/test_mainloop.py new file mode 100644 index 0000000..23b604c --- /dev/null +++ b/tests/mainloop/test_mainloop.py @@ -0,0 +1,228 @@ +# -*- coding: utf-8 -*- +"""Test mainloop functions.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" + +from os.path import dirname +from time import sleep + +import revpimodio2 +from tests import TestRevPiModIO +from tests.helper import ExitThread, ChangeThread + +event_data = (None, None) + + +def xxx(name, value): + """Test event function.""" + global event_data + event_data = (name, value) + + +def xxx_thread(th): + """Test event function with thread.""" + global event_data + event_data = (th.ioname, th.iovalue) + th.stop() + + +def xxx_timeout(name, value): + """Test event with long timeout.""" + sleep(0.1) + + +class TestMainloop(TestRevPiModIO): + + data_dir = dirname(__file__) + + def setUp(self): + global event_data + event_data = (None, None) + super().setUp() + + def test_mainloop(self): + """Test basic mainloop functions.""" + rpi = self.modio(debug=False) + + with self.assertRaises(RuntimeError): + # Auto refresh not running + rpi.mainloop() + + # Too long refresh time + with self.assertRaises(ValueError): + rpi._imgwriter.refresh = 4 + + # Create events + rpi.io.meldung0_7.reg_event(xxx) + rpi.io.meldung8_15.reg_event(xxx_thread, as_thread=True) + + # Start mainloop + rpi.autorefresh_all() + rpi.mainloop(blocking=False) + + sleep(0.1) + rpi.io.meldung0_7.value = 100 + sleep(0.06) + self.assertEqual(event_data, ("meldung0_7", 100)) + rpi.io.meldung8_15.value = 200 + sleep(0.06) + self.assertEqual(event_data, ("meldung8_15", 200)) + + self.assertEqual(rpi.ioerrors, 0) + + rpi.exit() + rpi.setdefaultvalues() + sleep(0.05) + + # Remember old IO before replacing things for tests + io_old = rpi.io.meldung0_7 + self.assertTrue(io_old in io_old._parentdevice._dict_events) + self.assertTrue(io_old in rpi.device.virt01) + + rpi.io.meldung0_7.replace_io("test1", "?", event=xxx) + rpi.io.meldung0_7.replace_io("test2", "?", bit=1, event=xxx) + rpi.io.meldung0_7.replace_io("test3", "?", bit=2) + rpi.io.meldung0_7.replace_io("test4", "?", bit=3, event=xxx, delay=300) + rpi.io.meldung0_7.replace_io("test5", "?", bit=4, event=xxx_thread, as_thread=True) + rpi.io.meldung0_7.replace_io( + "test6", "?", bit=5, event=xxx_thread, as_thread=True, delay=200 + ) + + rpi.io.magazin1.reg_timerevent(xxx, 200) + rpi.io.test3.reg_timerevent(xxx, 200, edge=revpimodio2._internal.RISING) + + self.assertFalse(io_old in io_old._parentdevice._dict_events) + self.assertFalse(io_old in rpi.device.virt01) + + rpi.autorefresh_all() + rpi.mainloop(blocking=False) + sleep(0.1) + + # Direct events + rpi.io.test1.value = True + sleep(0.06) + self.assertEqual(event_data, ("test1", True)) + rpi.io.test2.value = True + sleep(0.06) + self.assertEqual(event_data, ("test2", True)) + + # Timer events + rpi.io.test3.value = True + sleep(0.1) + self.assertEqual(event_data, ("test2", True)) + rpi.io.test3.value = False + sleep(0.15) + self.assertEqual(event_data, ("test3", True)) + + rpi.io.magazin1.value = 1 + rpi.io.test4.value = True + sleep(0.1) + self.assertEqual(event_data, ("test3", True)) + rpi.io.test4.value = False + sleep(0.15) + self.assertEqual(event_data, ("magazin1", 1)) + rpi.io.test4.value = True + sleep(1) + self.assertEqual(event_data, ("test4", True)) + + rpi.io.test5.value = True + rpi.io.test6.value = True + sleep(0.1) + self.assertEqual(event_data, ("test5", True)) + sleep(0.15) + self.assertEqual(event_data, ("test6", True)) + + self.assertFalse(rpi.exitsignal.is_set()) + + rpi.exit(full=False) + + self.assertTrue(rpi.exitsignal.is_set()) + + rpi.io.test1.unreg_event() + rpi.io.test1.reg_event(xxx_timeout) + + sleep(0.3) + + # Exceed cylcle time in main loop + with self.assertWarnsRegex(RuntimeWarning, r"io refresh time of 0 ms exceeded!"): + rpi._imgwriter._refresh = 0.0001 + sleep(0.1) + rpi.exit() + + del rpi + + def test_mainloop_bad_things(self): + """Tests incorrect use of the mainloop.""" + rpi = self.modio(autorefresh=True) + + with self.assertRaises(TypeError): + rpi._imgwriter._collect_events(1) + + # Bad event function without needed arguments + rpi.io.meldung0_7.replace_io("test5", "?", bit=4, event=lambda: None) + + th = ChangeThread(rpi, "test5", True, 0.3) + th.start() + with self.assertRaises(TypeError): + rpi.mainloop() + + sleep(0.1) + + rpi.io.meldung0_7.replace_io("test1", "?", event=xxx_timeout) + th_ende = ExitThread(rpi, 1) + th = ChangeThread(rpi, "test1", True, 0.3) + th_ende.start() + th.start() + with self.assertWarnsRegex( + RuntimeWarning, r"can not execute all event functions in one cycle" + ): + rpi.mainloop() + + rpi.autorefresh_all() + rpi.mainloop(blocking=False) + # Change cycletime while running a loop + with self.assertRaisesRegex( + RuntimeError, r"can not change cycletime when cycleloop or mainloop is" + ): + rpi.cycletime = 60 + + # Start second loop + with self.assertRaisesRegex(RuntimeError, r"can not start multiple loops mainloop"): + rpi.cycleloop(lambda x: None) + rpi.exit() + + # Test imgwriter monitoring + rpi.autorefresh_all() + sleep(0.2) + rpi._imgwriter.stop() + sleep(0.1) + with self.assertRaisesRegex(RuntimeError, r"autorefresh thread not running"): + rpi.mainloop() + + rpi.exit() + + def test_prefire(self): + """Test reg_event with prefire parameter.""" + rpi = self.modio(autorefresh=True) + + rpi.io.fu_lahm.reg_event(xxx, prefire=True) + self.assertFalse(rpi.io.fu_lahm.value) + rpi.mainloop(blocking=False) + sleep(0.1) + + # Registration without prefire is allowed while running mainloop + rpi.io.fu_schnell.reg_event(xxx) + with self.assertRaises(RuntimeError): + # Registration with prefire ist not allowed while running mainloop + rpi.io.Counter_1.reg_event(xxx, prefire=True) + + self.assertEqual(event_data, ("fu_lahm", False)) + rpi.cleanup() + + rpi = self.modio(autorefresh=True) + rpi.io.Input_32.reg_event(xxx_thread, as_thread=True, prefire=True) + rpi.mainloop(blocking=False) + sleep(0.1) + self.assertEqual(event_data, ("Input_32", False)) + rpi.cleanup() From 1de230c1e2baa175b89692aa4944c23db8a39237 Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Tue, 29 Oct 2024 13:56:29 +0100 Subject: [PATCH 15/26] test: Events and signals --- tests/events_and_signals/config.rsc | 1 + tests/events_and_signals/test_events.py | 135 +++++++++++++++++++++++ tests/events_and_signals/test_signals.py | 29 +++++ tests/helper.py | 13 +++ 4 files changed, 178 insertions(+) create mode 100644 tests/events_and_signals/config.rsc create mode 100644 tests/events_and_signals/test_events.py create mode 100644 tests/events_and_signals/test_signals.py diff --git a/tests/events_and_signals/config.rsc b/tests/events_and_signals/config.rsc new file mode 100644 index 0000000..de4cbbc --- /dev/null +++ b/tests/events_and_signals/config.rsc @@ -0,0 +1 @@ +{"App":{"name": "PiCtory", "version": "1.2.3","saveTS": "20170826120906","language": "en","layout": {"north":{"size":70,"initClosed":false,"initHidden":false},"south":{"size":480,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":500,"initClosed":false,"initHidden":false}}}},"east":{"size":70,"initClosed":true,"initHidden":false,"children":{"layout1":{"north":{"size":100,"initClosed":false,"initHidden":false},"south":{"size":98,"initClosed":false,"initHidden":false}}}},"west":{"size":200,"initClosed":false,"initHidden":false,"children":{"layout1":{}}}}},"Summary":{"inpTotal": 338,"outTotal": 113},"Devices":[{"catalogNr": "RevPiCore","GUID": "4ebb85e8-92ea-415d-b191-cc58c2857c0a","id": "device_RevPiCore_20170404_1_2_001","type": "BASE","productType": "95","position": "0","name": "picore01","bmk": "RevPi Core V1.2","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""],"1": ["RevPiIOCycle","0","8","1",true,"0001", "",""],"2": ["RS485ErrorCnt","0","16","2",false,"0002", "",""],"3": ["Core_Temperatur","0","8","4",false,"0003", "",""],"4": ["Core_Frequency","0","8","5",false,"0004", "",""]},"out": {"0": ["RevPiLED","0","8","6",true,"0005", "",""],"1": ["RS485ErrorLimit1","10","16","7",false,"0006", "",""],"2": ["RS485ErrorLimit2","1000","16","9",false,"0007", "",""]},"mem": {},"extend": {}},{"catalogNr": "RevPiDI","GUID": "2e2c089e-6bef-14c0-852b-41b7cf48d846","id": "device_RevPiDI_20160818_1_0_001","type": "LEFT_RIGHT","productType": "97","position": "32","name": "di01","bmk": "RevPi DI","inpVariant": 0,"outVariant": 0,"comment": "","offset": 11,"inp": {"0": ["notaus_ok","0","1","0",true,"0000", "","0"],"1": ["motorschutz_ok","0","1","0",true,"0001", "","1"],"2": ["fu_ok","0","1","0",true,"0002", "","2"],"3": ["fu_motoran","0","1","0",true,"0003", "","3"],"4": ["I_5","0","1","0",true,"0004", "","4"],"5": ["I_6","0","1","0",true,"0005", "","5"],"6": ["I_7","0","1","0",true,"0006", "","6"],"7": ["I_8","0","1","0",true,"0007", "","7"],"8": ["t_automatik","0","1","0",true,"0008", "","8"],"9": ["t_start","0","1","0",true,"0009", "","9"],"10": ["t_stop","0","1","0",true,"0010", "","10"],"11": ["t_quit","0","1","0",true,"0011", "","11"],"12": ["t_notaus","0","1","0",true,"0012", "","12"],"13": ["I_14","0","1","0",true,"0013", "","13"],"14": ["I_15","0","1","0",true,"0014", "","14"],"15": ["I_16","0","1","0",true,"0015", "","15"],"16": ["Status","0","16","4",false,"0016", "",""],"17": ["Counter_1","0","32","6",false,"0017", "",""],"18": ["Counter_2","0","32","10",false,"0018", "",""],"19": ["Counter_3","0","32","14",false,"0019", "",""],"20": ["Counter_4","0","32","18",false,"0020", "",""],"21": ["Counter_5","0","32","22",false,"0021", "",""],"22": ["Counter_6","0","32","26",false,"0022", "",""],"23": ["Counter_7","0","32","30",false,"0023", "",""],"24": ["Counter_8","0","32","34",false,"0024", "",""],"25": ["Counter_9","0","32","38",false,"0025", "",""],"26": ["Counter_10","0","32","42",false,"0026", "",""],"27": ["Counter_11","0","32","46",false,"0027", "",""],"28": ["Counter_12","0","32","50",false,"0028", "",""],"29": ["Counter_13","0","32","54",false,"0029", "",""],"30": ["Counter_14","0","32","58",false,"0030", "",""],"31": ["Counter_15","0","32","62",false,"0031", "",""],"32": ["Counter_16","0","32","66",false,"0032", "",""],"33": ["Output_Status","0","16","2",false,"0050", "",""]},"out": {"0": ["Output","0","16","70",false,"0051", "",""],"1": ["PWM_1","0","8","72",false,"0052", "",""],"2": ["PWM_2","0","8","73",false,"0053", "",""],"3": ["PWM_3","0","8","74",false,"0054", "",""],"4": ["PWM_4","0","8","75",false,"0055", "",""],"5": ["PWM_5","0","8","76",false,"0056", "",""],"6": ["PWM_6","0","8","77",false,"0057", "",""],"7": ["PWM_7","0","8","78",false,"0058", "",""],"8": ["PWM_8","0","8","79",false,"0059", "",""],"9": ["PWM_9","0","8","80",false,"0060", "",""],"10": ["PWM_10","0","8","81",false,"0061", "",""],"11": ["PWM_11","0","8","82",false,"0062", "",""],"12": ["PWM_12","0","8","83",false,"0063", "",""],"13": ["PWM_13","0","8","84",false,"0064", "",""],"14": ["PWM_14","0","8","85",false,"0065", "",""],"15": ["PWM_15","0","8","86",false,"0066", "",""],"16": ["PWM_16","0","8","87",false,"0067", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0033", "",""],"1": ["InputMode_2","0","8","89",false,"0034", "",""],"2": ["InputMode_3","0","8","90",false,"0035", "",""],"3": ["InputMode_4","0","8","91",false,"0036", "",""],"4": ["InputMode_5","0","8","92",false,"0037", "",""],"5": ["InputMode_6","0","8","93",false,"0038", "",""],"6": ["InputMode_7","0","8","94",false,"0039", "",""],"7": ["InputMode_8","0","8","95",false,"0040", "",""],"8": ["InputMode_9","0","8","96",false,"0041", "",""],"9": ["InputMode_10","0","8","97",false,"0042", "",""],"10": ["InputMode_11","0","8","98",false,"0043", "",""],"11": ["InputMode_12","0","8","99",false,"0044", "",""],"12": ["InputMode_13","0","8","100",false,"0045", "",""],"13": ["InputMode_14","0","8","101",false,"0046", "",""],"14": ["InputMode_15","0","8","102",false,"0047", "",""],"15": ["InputMode_16","0","8","103",false,"0048", "",""],"16": ["InputDebounce","0","16","104",false,"0049", "",""],"17": ["OutputPushPull","0","16","106",false,"0068", "",""],"18": ["OutputOpenLoadDetect","0","16","108",false,"0069", "",""],"19": ["OutputPWMActive","0","16","110",false,"0070", "",""],"20": ["OutputPWMFrequency","2","8","112",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDI","GUID": "81e6c459-0398-a7c4-4954-d793ee9a5b89","id": "device_RevPiDI_20160818_1_0_002","type": "LEFT_RIGHT","productType": "97","position": "33","name": "di02","bmk": "RevPi DI","inpVariant": 0,"outVariant": 0,"comment": "","offset": 124,"inp": {"0": ["m_druck_ok","0","1","0",true,"0000", "","0"],"1": ["m_m1_eingefahren","0","1","0",true,"0001", "","1"],"2": ["m_m1_ausgefahren","0","1","0",true,"0002", "","2"],"3": ["m_m2_eingefahren","0","1","0",true,"0003", "","3"],"4": ["m_m2_ausgefahren","0","1","0",true,"0004", "","4"],"5": ["m_m3_eingefahren","0","1","0",true,"0005", "","5"],"6": ["m_m3_ausgefahren","0","1","0",true,"0006", "","6"],"7": ["s_rutsche","0","1","0",true,"0007", "","7"],"8": ["s_metall","0","1","0",true,"0008", "","8"],"9": ["s_magazin1","0","1","0",true,"0009", "","9"],"10": ["s_magazin2","0","1","0",true,"0010", "","10"],"11": ["I_12_i03","0","1","0",true,"0011", "","11"],"12": ["I_13_i03","0","1","0",true,"0012", "","12"],"13": ["I_14_i03","0","1","0",true,"0013", "","13"],"14": ["I_15_i03","0","1","0",true,"0014", "","14"],"15": ["mb_status","0","1","0",true,"0015", "","15"],"16": ["Status_i03","0","16","4",false,"0016", "",""],"17": ["Counter_1_i03","0","32","6",false,"0017", "",""],"18": ["Counter_2_i03","0","32","10",false,"0018", "",""],"19": ["Counter_3_i03","0","32","14",false,"0019", "",""],"20": ["Counter_4_i03","0","32","18",false,"0020", "",""],"21": ["Counter_5_i03","0","32","22",false,"0021", "",""],"22": ["Counter_6_i03","0","32","26",false,"0022", "",""],"23": ["Counter_7_i03","0","32","30",false,"0023", "",""],"24": ["Counter_8_i03","0","32","34",false,"0024", "",""],"25": ["Counter_9_i03","0","32","38",false,"0025", "",""],"26": ["Counter_10_i03","0","32","42",false,"0026", "",""],"27": ["Counter_11_i03","0","32","46",false,"0027", "",""],"28": ["Counter_12_i03","0","32","50",false,"0028", "",""],"29": ["Counter_13_i03","0","32","54",false,"0029", "",""],"30": ["Counter_14_i03","0","32","58",false,"0030", "",""],"31": ["Counter_15_i03","0","32","62",false,"0031", "",""],"32": ["Counter_16_i03","0","32","66",false,"0032", "",""],"33": ["Output_Status_i03","0","16","2",false,"0050", "",""]},"out": {"0": ["Output_i03","0","16","70",false,"0051", "",""],"1": ["PWM_1_i03","0","8","72",false,"0052", "",""],"2": ["PWM_2_i03","0","8","73",false,"0053", "",""],"3": ["PWM_3_i03","0","8","74",false,"0054", "",""],"4": ["PWM_4_i03","0","8","75",false,"0055", "",""],"5": ["PWM_5_i03","0","8","76",false,"0056", "",""],"6": ["PWM_6_i03","0","8","77",false,"0057", "",""],"7": ["PWM_7_i03","0","8","78",false,"0058", "",""],"8": ["PWM_8_i03","0","8","79",false,"0059", "",""],"9": ["PWM_9_i03","0","8","80",false,"0060", "",""],"10": ["PWM_10_i03","0","8","81",false,"0061", "",""],"11": ["PWM_11_i03","0","8","82",false,"0062", "",""],"12": ["PWM_12_i03","0","8","83",false,"0063", "",""],"13": ["PWM_13_i03","0","8","84",false,"0064", "",""],"14": ["PWM_14_i03","0","8","85",false,"0065", "",""],"15": ["PWM_15_i03","0","8","86",false,"0066", "",""],"16": ["PWM_16_i03","0","8","87",false,"0067", "",""]},"mem": {"0": ["InputMode_1_i03","0","8","88",false,"0033", "",""],"1": ["InputMode_2_i03","0","8","89",false,"0034", "",""],"2": ["InputMode_3_i03","0","8","90",false,"0035", "",""],"3": ["InputMode_4_i03","0","8","91",false,"0036", "",""],"4": ["InputMode_5_i03","0","8","92",false,"0037", "",""],"5": ["InputMode_6_i03","0","8","93",false,"0038", "",""],"6": ["InputMode_7_i03","0","8","94",false,"0039", "",""],"7": ["InputMode_8_i03","0","8","95",false,"0040", "",""],"8": ["InputMode_9_i03","0","8","96",false,"0041", "",""],"9": ["InputMode_10_i03","0","8","97",false,"0042", "",""],"10": ["InputMode_11_i03","0","8","98",false,"0043", "",""],"11": ["InputMode_12_i03","0","8","99",false,"0044", "",""],"12": ["InputMode_13_i03","0","8","100",false,"0045", "",""],"13": ["InputMode_14_i03","0","8","101",false,"0046", "",""],"14": ["InputMode_15_i03","0","8","102",false,"0047", "",""],"15": ["InputMode_16_i03","0","8","103",false,"0048", "",""],"16": ["InputDebounce_i03","0","16","104",false,"0049", "",""],"17": ["OutputPushPull_i03","0","16","106",false,"0068", "",""],"18": ["OutputOpenLoadDetect_i03","0","16","108",false,"0069", "",""],"19": ["OutputPWMActive_i03","0","16","110",false,"0070", "",""],"20": ["OutputPWMFrequency_i03","2","8","112",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDO","GUID": "4f8da9ea-91b2-d028-c60d-4476096a9dc2","id": "device_RevPiDO_20160818_1_0_001","type": "LEFT_RIGHT","productType": "98","position": "34","name": "do01","bmk": "RevPi DO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 237,"inp": {"0": ["Output_Status_i04","0","16","2",false,"0000", "",""],"1": ["Status_i04","0","16","4",false,"0001", "",""],"2": ["Input","0","16","0",false,"0038", "",""],"3": ["Counter_1_i04","0","32","6",false,"0039", "",""],"4": ["Counter_2_i04","0","32","10",false,"0040", "",""],"5": ["Counter_3_i04","0","32","14",false,"0041", "",""],"6": ["Counter_4_i04","0","32","18",false,"0042", "",""],"7": ["Counter_5_i04","0","32","22",false,"0043", "",""],"8": ["Counter_6_i04","0","32","26",false,"0044", "",""],"9": ["Counter_7_i04","0","32","30",false,"0045", "",""],"10": ["Counter_8_i04","0","32","34",false,"0046", "",""],"11": ["Counter_9_i04","0","32","38",false,"0047", "",""],"12": ["Counter_10_i04","0","32","42",false,"0048", "",""],"13": ["Counter_11_i04","0","32","46",false,"0049", "",""],"14": ["Counter_12_i04","0","32","50",false,"0050", "",""],"15": ["Counter_13_i04","0","32","54",false,"0051", "",""],"16": ["Counter_14_i04","0","32","58",false,"0052", "",""],"17": ["Counter_15_i04","0","32","62",false,"0053", "",""],"18": ["Counter_16_i04","0","32","66",false,"0054", "",""]},"out": {"0": ["fu_rechts","0","1","70",true,"0002", "","0"],"1": ["fu_links","0","1","70",true,"0003", "","1"],"2": ["fu_schnell","0","1","70",true,"0004", "","2"],"3": ["fu_lahm","0","1","70",true,"0005", "","3"],"4": ["v_druck","0","1","70",true,"0006", "","4"],"5": ["v_m1_einfahren","0","1","70",true,"0007", "","5"],"6": ["v_m1_ausfahren","0","1","70",true,"0008", "","6"],"7": ["v_m2_einfahren","0","1","70",true,"0009", "","7"],"8": ["v_m2_ausfahren","0","1","70",true,"0010", "","8"],"9": ["v_m3_einfahren","0","1","70",true,"0011", "","9"],"10": ["v_m3_ausfahren","0","1","70",true,"0012", "","10"],"11": ["O_12","0","1","70",true,"0013", "","11"],"12": ["O_13","0","1","70",true,"0014", "","12"],"13": ["O_14","0","1","70",true,"0015", "","13"],"14": ["O_15","0","1","70",true,"0016", "","14"],"15": ["fu_frei","0","1","70",true,"0017", "","15"],"16": ["PWM_1_i04","0","8","72",false,"0018", "",""],"17": ["PWM_2_i04","0","8","73",false,"0019", "",""],"18": ["PWM_3_i04","0","8","74",false,"0020", "",""],"19": ["PWM_4_i04","0","8","75",false,"0021", "",""],"20": ["PWM_5_i04","0","8","76",false,"0022", "",""],"21": ["PWM_6_i04","0","8","77",false,"0023", "",""],"22": ["PWM_7_i04","0","8","78",false,"0024", "",""],"23": ["PWM_8_i04","0","8","79",false,"0025", "",""],"24": ["PWM_9_i04","0","8","80",false,"0026", "",""],"25": ["PWM_10_i04","0","8","81",false,"0027", "",""],"26": ["PWM_11_i04","0","8","82",false,"0028", "",""],"27": ["PWM_12_i04","0","8","83",false,"0029", "",""],"28": ["PWM_13_i04","0","8","84",false,"0030", "",""],"29": ["PWM_14_i04","0","8","85",false,"0031", "",""],"30": ["PWM_15_i04","0","8","86",false,"0032", "",""],"31": ["PWM_16_i04","0","8","87",false,"0033", "",""]},"mem": {"0": ["OutputPushPull_i04","0","16","106",false,"0034", "",""],"1": ["OutputOpenLoadDetect_i04","0","16","108",false,"0035", "",""],"2": ["OutputPWMActive_i04","0","16","110",false,"0036", "",""],"3": ["OutputPWMFrequency_i04","1","8","112",false,"0037", "",""],"4": ["InputMode_1_i04","0","8","88",false,"0055", "",""],"5": ["InputMode_2_i04","0","8","89",false,"0056", "",""],"6": ["InputMode_3_i04","0","8","90",false,"0057", "",""],"7": ["InputMode_4_i04","0","8","91",false,"0058", "",""],"8": ["InputMode_5_i04","0","8","92",false,"0059", "",""],"9": ["InputMode_6_i04","0","8","93",false,"0060", "",""],"10": ["InputMode_7_i04","0","8","94",false,"0061", "",""],"11": ["InputMode_8_i04","0","8","95",false,"0062", "",""],"12": ["InputMode_9_i04","0","8","96",false,"0063", "",""],"13": ["InputMode_10_i04","0","8","97",false,"0064", "",""],"14": ["InputMode_11_i04","0","8","98",false,"0065", "",""],"15": ["InputMode_12_i04","0","8","99",false,"0066", "",""],"16": ["InputMode_13_i04","0","8","100",false,"0067", "",""],"17": ["InputMode_14_i04","0","8","101",false,"0068", "",""],"18": ["InputMode_15_i04","0","8","102",false,"0069", "",""],"19": ["InputMode_16_i04","0","8","103",false,"0070", "",""],"20": ["InputDebounce_i04","0","16","104",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDO","GUID": "b8a70c62-9b91-9e1a-af2a-37f74b16aca2","id": "device_RevPiDO_20160818_1_0_002","type": "LEFT_RIGHT","productType": "98","position": "35","name": "do02","bmk": "RevPi DO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 350,"inp": {"0": ["Output_Status_i05","0","16","2",false,"0000", "",""],"1": ["Status_i05","0","16","4",false,"0001", "",""],"2": ["Input_i05","0","16","0",false,"0038", "",""],"3": ["Counter_1_i05","0","32","6",false,"0039", "",""],"4": ["Counter_2_i05","0","32","10",false,"0040", "",""],"5": ["Counter_3_i05","0","32","14",false,"0041", "",""],"6": ["Counter_4_i05","0","32","18",false,"0042", "",""],"7": ["Counter_5_i05","0","32","22",false,"0043", "",""],"8": ["Counter_6_i05","0","32","26",false,"0044", "",""],"9": ["Counter_7_i05","0","32","30",false,"0045", "",""],"10": ["Counter_8_i05","0","32","34",false,"0046", "",""],"11": ["Counter_9_i05","0","32","38",false,"0047", "",""],"12": ["Counter_10_i05","0","32","42",false,"0048", "",""],"13": ["Counter_11_i05","0","32","46",false,"0049", "",""],"14": ["Counter_12_i05","0","32","50",false,"0050", "",""],"15": ["Counter_13_i05","0","32","54",false,"0051", "",""],"16": ["Counter_14_i05","0","32","58",false,"0052", "",""],"17": ["Counter_15_i05","0","32","62",false,"0053", "",""],"18": ["Counter_16_i05","0","32","66",false,"0054", "",""]},"out": {"0": ["fu_reset","0","1","70",true,"0002", "","0"],"1": ["h_start","0","1","70",true,"0003", "","1"],"2": ["h_fehler","0","1","70",true,"0004", "","2"],"3": ["O_04_i05","0","1","70",true,"0005", "","3"],"4": ["O_05_i05","0","1","70",true,"0006", "","4"],"5": ["O_06_i05","0","1","70",true,"0007", "","5"],"6": ["O_07_i05","0","1","70",true,"0008", "","6"],"7": ["O_08_i05","0","1","70",true,"0009", "","7"],"8": ["O_09_i05","0","1","70",true,"0010", "","8"],"9": ["O_10_i05","0","1","70",true,"0011", "","9"],"10": ["O_11_i05","0","1","70",true,"0012", "","10"],"11": ["O_12_i05","0","1","70",true,"0013", "","11"],"12": ["O_13_i05","0","1","70",true,"0014", "","12"],"13": ["O_14_i05","0","1","70",true,"0015", "","13"],"14": ["O_15_i05","0","1","70",true,"0016", "","14"],"15": ["mb_connect","0","1","70",true,"0017", "","15"],"16": ["PWM_1_i05","0","8","72",false,"0018", "",""],"17": ["PWM_2_i05","0","8","73",false,"0019", "",""],"18": ["PWM_3_i05","0","8","74",false,"0020", "",""],"19": ["PWM_4_i05","0","8","75",false,"0021", "",""],"20": ["PWM_5_i05","0","8","76",false,"0022", "",""],"21": ["PWM_6_i05","0","8","77",false,"0023", "",""],"22": ["PWM_7_i05","0","8","78",false,"0024", "",""],"23": ["PWM_8_i05","0","8","79",false,"0025", "",""],"24": ["PWM_9_i05","0","8","80",false,"0026", "",""],"25": ["PWM_10_i05","0","8","81",false,"0027", "",""],"26": ["PWM_11_i05","0","8","82",false,"0028", "",""],"27": ["PWM_12_i05","0","8","83",false,"0029", "",""],"28": ["PWM_13_i05","0","8","84",false,"0030", "",""],"29": ["PWM_14_i05","0","8","85",false,"0031", "",""],"30": ["PWM_15_i05","0","8","86",false,"0032", "",""],"31": ["PWM_16_i05","0","8","87",false,"0033", "",""]},"mem": {"0": ["OutputPushPull_i05","0","16","106",false,"0034", "",""],"1": ["OutputOpenLoadDetect_i05","0","16","108",false,"0035", "",""],"2": ["OutputPWMActive_i05","0","16","110",false,"0036", "",""],"3": ["OutputPWMFrequency_i05","1","8","112",false,"0037", "",""],"4": ["InputMode_1_i05","0","8","88",false,"0055", "",""],"5": ["InputMode_2_i05","0","8","89",false,"0056", "",""],"6": ["InputMode_3_i05","0","8","90",false,"0057", "",""],"7": ["InputMode_4_i05","0","8","91",false,"0058", "",""],"8": ["InputMode_5_i05","0","8","92",false,"0059", "",""],"9": ["InputMode_6_i05","0","8","93",false,"0060", "",""],"10": ["InputMode_7_i05","0","8","94",false,"0061", "",""],"11": ["InputMode_8_i05","0","8","95",false,"0062", "",""],"12": ["InputMode_9_i05","0","8","96",false,"0063", "",""],"13": ["InputMode_10_i05","0","8","97",false,"0064", "",""],"14": ["InputMode_11_i05","0","8","98",false,"0065", "",""],"15": ["InputMode_12_i05","0","8","99",false,"0066", "",""],"16": ["InputMode_13_i05","0","8","100",false,"0067", "",""],"17": ["InputMode_14_i05","0","8","101",false,"0068", "",""],"18": ["InputMode_15_i05","0","8","102",false,"0069", "",""],"19": ["InputMode_16_i05","0","8","103",false,"0070", "",""],"20": ["InputDebounce_i05","0","16","104",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiAIO","GUID": "76f10e57-ecaf-2a45-f4df-b9a66e3f40db","id": "device_RevPiAIO_20170301_1_0_001","type": "LEFT_RIGHT","productType": "103","position": "36","name": "aio01","bmk": "RevPi AIO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 463,"inp": {"0": ["fu_ist","0","16","0",false,"0000", "",""],"1": ["InputValue_2","0","16","2",false,"0001", "",""],"2": ["InputValue_3","0","16","4",false,"0002", "",""],"3": ["InputValue_4","0","16","6",false,"0003", "",""],"4": ["InputStatus_1","0","8","8",false,"0004", "",""],"5": ["InputStatus_2","0","8","9",false,"0005", "",""],"6": ["InputStatus_3","0","8","10",false,"0006", "",""],"7": ["InputStatus_4","0","8","11",false,"0007", "",""],"8": ["tmp_schrank","0","16","12",false,"0008", "",""],"9": ["RTDValue_2","0","16","14",false,"0009", "",""],"10": ["RTDStatus_1","0","8","16",false,"0010", "",""],"11": ["RTDStatus_2","0","8","17",false,"0011", "",""],"12": ["OutputStatus_1","0","8","18",false,"0012", "",""],"13": ["OutputStatus_2","0","8","19",false,"0013", "",""]},"out": {"0": ["OutputValue_1","0","16","20",false,"0014", "",""],"1": ["fu_soll","0","16","22",false,"0015", "",""]},"mem": {"0": ["Input1Range","1","8","24",false,"0016", "You must use wire bridges for current measurement!",""],"1": ["Input1Multiplier","1","16","25",false,"0017", "",""],"2": ["Input1Divisor","1","16","27",false,"0018", "",""],"3": ["Input1Offset","0","16","29",false,"0019", "",""],"4": ["Input2Range","1","8","31",false,"0020", "You must use wire bridges for current measurement!",""],"5": ["Input2Multiplier","1","16","32",false,"0021", "",""],"6": ["Input2Divisor","1","16","34",false,"0022", "",""],"7": ["Input2Offset","0","16","36",false,"0023", "",""],"8": ["Input3Range","1","8","38",false,"0024", "You must use wire bridges for current measurement!",""],"9": ["Input3Multiplier","1","16","39",false,"0025", "",""],"10": ["Input3Divisor","1","16","41",false,"0026", "",""],"11": ["Input3Offset","0","16","43",false,"0027", "",""],"12": ["Input4Range","1","8","45",false,"0028", "You must use wire bridges for current measurement!",""],"13": ["Input4Multiplier","1","16","46",false,"0029", "",""],"14": ["Input4Divisor","1","16","48",false,"0030", "",""],"15": ["Input4Offset","0","16","50",false,"0031", "",""],"16": ["ADC_DataRate","0","8","52",false,"0032", "Use lowest value for highest precision and a maximum 50 Hz suppression",""],"17": ["RTD1Type","0","8","53",false,"0033", "",""],"18": ["RTD1Wiring","0","8","54",false,"0034", "You must use wire bridges for 2-wire sensors!",""],"19": ["RTD1Multiplier","1","16","55",false,"0035", "",""],"20": ["RTD1Divisor","1","16","57",false,"0036", "",""],"21": ["RTD1Offset","0","16","59",false,"0037", "",""],"22": ["RTD2Type","0","8","61",false,"0038", "",""],"23": ["RTD2Wiring","0","8","62",false,"0039", "You must use wire bridges for 2-wire sensors!",""],"24": ["RTD2Multiplier","1","16","63",false,"0040", "",""],"25": ["RTD2Divisor","1","16","65",false,"0041", "",""],"26": ["RTD2Offset","0","16","67",false,"0042", "",""],"27": ["Output1Range","0","8","69",false,"0043", "",""],"28": ["Output1EnableSlew","0","8","70",false,"0044", "Enable slew rate deceleration",""],"29": ["Output1SlewStepSize","0","8","71",false,"0045", "Slew rate step size",""],"30": ["Output1SlewClock","0","8","72",false,"0046", "lock rate of slew rate deceleration in kHz",""],"31": ["Output1Multiplier","1","16","73",false,"0047", "",""],"32": ["Output1Divisor","1","16","75",false,"0048", "",""],"33": ["Output1Offset","0","16","77",false,"0049", "",""],"34": ["Output2Range","2","8","79",false,"0050", "",""],"35": ["Output2EnableSlew","0","8","80",false,"0051", "Enable slew rate deceleration",""],"36": ["Output2SlewStepSize","0","8","81",false,"0052", "Slew rate step size",""],"37": ["Output2SlewClock","0","8","82",false,"0053", "lock rate of slew rate deceleration in kHz",""],"38": ["Output2Multiplier","1","16","83",false,"0054", "",""],"39": ["Output2Divisor","1","16","85",false,"0055", "",""],"40": ["Output2Offset","0","16","87",false,"0056", "",""]},"extend": {}},{"catalogNr": "Virtual01","GUID": "c3bf8705-d96a-6452-2566-40c5d86a5061","id": "device_Virtual01_20160818_1_0_001","type": "VIRTUAL","productType": "32768","position": "64","name": "virt01","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 552,"inp": {"0": ["pbit0_7","0","8","0",false,"0000", "",""],"1": ["pbit8_15","0","8","1",false,"0001", "",""],"2": ["pbit16_23","0","8","2",false,"0002", "",""],"3": ["pbit24_31","0","8","3",false,"0003", "",""],"4": ["magazin1_max","4","8","4",false,"0004", "",""],"5": ["magazin2_max","4","8","5",false,"0005", "",""],"6": ["p_drehzahl1","136","8","6",false,"0006", "",""],"7": ["p_drehzahl2","19","8","7",false,"0007", "",""],"8": ["Input_9","0","8","8",false,"0008", "",""],"9": ["Input_10","0","8","9",false,"0009", "",""],"10": ["Input_11","0","8","10",false,"0010", "",""],"11": ["Input_12","0","8","11",false,"0011", "",""],"12": ["Input_13","0","8","12",false,"0012", "",""],"13": ["Input_14","0","8","13",false,"0013", "",""],"14": ["Input_15","0","8","14",false,"0014", "",""],"15": ["Input_16","0","8","15",false,"0015", "",""],"16": ["Input_17","0","8","16",false,"0016", "",""],"17": ["Input_18","0","8","17",false,"0017", "",""],"18": ["Input_19","0","8","18",false,"0018", "",""],"19": ["Input_20","0","8","19",false,"0019", "",""],"20": ["Input_21","0","8","20",false,"0020", "",""],"21": ["Input_22","0","8","21",false,"0021", "",""],"22": ["Input_23","0","8","22",false,"0022", "",""],"23": ["Input_24","0","8","23",false,"0023", "",""],"24": ["Input_25","0","8","24",false,"0024", "",""],"25": ["Input_26","0","8","25",false,"0025", "",""],"26": ["Input_27","0","8","26",false,"0026", "",""],"27": ["Input_28","0","8","27",false,"0027", "",""],"28": ["Input_29","0","8","28",false,"0028", "",""],"29": ["Input_30","0","8","29",false,"0029", "",""],"30": ["Input_31","0","8","30",false,"0030", "",""],"31": ["Input_32","0","8","31",false,"0031", "",""]},"out": {"0": ["meldung0_7","0","8","32",false,"0032", "",""],"1": ["meldung8_15","0","8","33",false,"0033", "",""],"2": ["meldung16_23","0","8","34",false,"0034", "",""],"3": ["meldung24_31","0","8","35",false,"0035", "",""],"4": ["magazin1","0","8","36",false,"0036", "",""],"5": ["magazin2","0","8","37",false,"0037", "",""],"6": ["Output_7","0","8","38",false,"0038", "",""],"7": ["Output_8","0","8","39",false,"0039", "",""],"8": ["Output_9","0","8","40",false,"0040", "",""],"9": ["Output_10","0","8","41",false,"0041", "",""],"10": ["Output_11","0","8","42",false,"0042", "",""],"11": ["Output_12","0","8","43",false,"0043", "",""],"12": ["Output_13","0","8","44",false,"0044", "",""],"13": ["Output_14","0","8","45",false,"0045", "",""],"14": ["Output_15","0","8","46",false,"0046", "",""],"15": ["Output_16","0","8","47",false,"0047", "",""],"16": ["Output_17","0","8","48",false,"0048", "",""],"17": ["Output_18","0","8","49",false,"0049", "",""],"18": ["Output_19","0","8","50",false,"0050", "",""],"19": ["Output_20","0","8","51",false,"0051", "",""],"20": ["Output_21","0","8","52",false,"0052", "",""],"21": ["Output_22","0","8","53",false,"0053", "",""],"22": ["Output_23","0","8","54",false,"0054", "",""],"23": ["Output_24","0","8","55",false,"0055", "",""],"24": ["Output_25","0","8","56",false,"0056", "",""],"25": ["Output_26","0","8","57",false,"0057", "",""],"26": ["Output_27","0","8","58",false,"0058", "",""],"27": ["Output_28","0","8","59",false,"0059", "",""],"28": ["Output_29","0","8","60",false,"0060", "",""],"29": ["Output_30","0","8","61",false,"0061", "",""],"30": ["Output_31","0","8","62",false,"0062", "",""],"31": ["Output_32","0","8","63",false,"0063", "",""]},"mem": {},"extend": {}}],"Connections":[]} \ No newline at end of file diff --git a/tests/events_and_signals/test_events.py b/tests/events_and_signals/test_events.py new file mode 100644 index 0000000..f1dc009 --- /dev/null +++ b/tests/events_and_signals/test_events.py @@ -0,0 +1,135 @@ +# -*- coding: utf-8 -*- +"""Test events.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" + +from os.path import dirname +from threading import Event +from time import sleep + +from revpimodio2 import RISING, FALLING +from tests import TestRevPiModIO +from tests.helper import ChangeThread + +event_data = (None, None) + + +def xxx(name, value): + """Test event function.""" + global event_data + event_data = (name, value) + + +class TestEvents(TestRevPiModIO): + data_dir = dirname(__file__) + + def setUp(self): + global event_data + event_data = (None, None) + super().setUp() + + def test_events(self): + """Test event functions.""" + rpi = self.modio() + + with self.assertRaises(ValueError): + rpi.io.magazin1.reg_event(xxx, edge=RISING) + rpi.io.magazin1.reg_event(xxx) + with self.assertRaises(RuntimeError): + rpi.io.magazin1.reg_event(xxx) + self.assertTrue(rpi.io.magazin1 in rpi.device.virt01._dict_events) + rpi.io.magazin1.unreg_event() + self.assertFalse(rpi.io.magazin1 in rpi.device.virt01._dict_events) + + with self.assertRaises(ValueError): + rpi.io.v_druck.reg_event(None) + with self.assertRaises(ValueError): + rpi.io.v_druck.reg_event(xxx, delay=-100) + rpi.io.v_druck.reg_event(xxx, delay=100, edge=RISING) + with self.assertRaises(RuntimeError): + rpi.io.v_druck.reg_event(xxx) + with self.assertRaises(RuntimeError): + rpi.io.v_druck.reg_event(xxx, edge=RISING) + rpi.io.v_druck.reg_event(xxx, edge=FALLING, as_thread=True) + rpi.io.v_druck.reg_event(lambda name, value: None, edge=FALLING, as_thread=True) + self.assertEqual(len(rpi.device.do01._dict_events[rpi.io.v_druck]), 3) + + rpi.io.v_druck.unreg_event(xxx, RISING) + + def test_dd_timer_events(self): + """Testet timer events.""" + rpi = self.modio() + + with self.assertRaises(ValueError): + rpi.io.magazin1.reg_timerevent(xxx, 200, edge=RISING) + rpi.io.magazin1.reg_timerevent(xxx, 200) + with self.assertRaises(RuntimeError): + rpi.io.magazin1.reg_timerevent(xxx, 200) + rpi.io.magazin1.reg_timerevent(lambda name, value: None, 200) + + with self.assertRaises(ValueError): + rpi.io.v_druck.reg_timerevent(None, 200) + with self.assertRaises(ValueError): + rpi.io.v_druck.reg_timerevent(xxx, -100) + rpi.io.v_druck.reg_timerevent(xxx, 100, edge=RISING) + with self.assertRaises(RuntimeError): + rpi.io.v_druck.reg_timerevent(xxx, 200) + with self.assertRaises(RuntimeError): + rpi.io.v_druck.reg_timerevent(xxx, 200, edge=RISING) + rpi.io.v_druck.reg_timerevent(xxx, 200, edge=FALLING, as_thread=True) + + self.assertEqual(len(rpi.device.do01._dict_events[rpi.io.v_druck]), 2) + rpi.io.v_druck.unreg_event(xxx, RISING) + self.assertEqual(len(rpi.device.do01._dict_events[rpi.io.v_druck]), 1) + rpi.io.v_druck.unreg_event(xxx, FALLING) + self.assertFalse(rpi.io.v_druck in rpi.device.do01._dict_events) + rpi.io.magazin1.unreg_event() + + def test_dh_wait(self): + """Test .wait functions of IOs.""" + rpi = self.modio() + with self.assertRaises(RuntimeError): + rpi.io.v_druck.wait() + + rpi.autorefresh_all() + with self.assertRaises(ValueError): + rpi.io.v_druck.wait(edge=30) + with self.assertRaises(ValueError): + rpi.io.v_druck.wait(edge=34) + with self.assertRaises(TypeError): + rpi.io.v_druck.wait(exitevent=True) + with self.assertRaises(ValueError): + rpi.io.v_druck.wait(timeout=-1) + with self.assertRaises(ValueError): + rpi.io.meldung0_7.wait(edge=RISING) + + self.assertEqual(rpi.io.v_druck.wait(okvalue=False), -1) + self.assertEqual(rpi.io.v_druck.wait(timeout=100), 2) + self.assertEqual(rpi.io.v_druck.wait(edge=RISING, timeout=100), 2) + + # Exit event caught + x = Event() + x.set() + self.assertEqual(rpi.io.v_druck.wait(exitevent=x), 1) + + # Successful waiting + th = ChangeThread(rpi, "fu_lahm", True, 0.5) + th.start() + + self.assertEqual(rpi.io.fu_lahm.wait(), 0) + + th = ChangeThread(rpi, "fu_lahm", False, 0.3) + th.start() + th = ChangeThread(rpi, "fu_lahm", True, 0.6) + th.start() + + self.assertEqual(rpi.io.fu_lahm.wait(edge=RISING), 0) + + # Error while refreshing IO data + rpi._imgwriter.stop() + self.assertEqual(rpi.io.v_druck.wait(timeout=100), 2) + + rpi.io.fu_lahm.value = False + sleep(0.1) + rpi.exit() diff --git a/tests/events_and_signals/test_signals.py b/tests/events_and_signals/test_signals.py new file mode 100644 index 0000000..802897b --- /dev/null +++ b/tests/events_and_signals/test_signals.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +"""Test signals.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" + +from os.path import dirname + +from tests import TestRevPiModIO +from tests.helper import ExitSignal + + +class TestSignals(TestRevPiModIO): + data_dir = dirname(__file__) + + def test_handle_signal_end(self): + rpi = self.modio(autorefresh=True) + rpi.io.v_druck.value = True + + def ende(): + rpi.io.v_druck.value = False + + rpi.handlesignalend(ende) + + th_ende = ExitSignal(1) + th_ende.start() + rpi.mainloop() + + self.assertFalse(rpi.io.v_druck.value) diff --git a/tests/helper.py b/tests/helper.py index 2064b37..c042277 100644 --- a/tests/helper.py +++ b/tests/helper.py @@ -27,6 +27,19 @@ class ChangeThread(Thread): self.revpi.io[self.ioname].value = self.iovalue +class ExitSignal(Thread): + """Call SIGINT after given time.""" + + def __init__(self, time): + """Signal SIGINT after given time.""" + super().__init__() + self.time = time + + def run(self): + sleep(self.time) + os.kill(os.getpid(), SIGINT) + + class ExitThread(Thread): """Call .exit() of ModIO after given time.""" From dc5906288c64aa3e227adc3174ed25cf970295ce Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Tue, 29 Oct 2024 14:10:03 +0100 Subject: [PATCH 16/26] test: Cycle loop functions --- tests/cycleloop/config.rsc | 1 + tests/cycleloop/test_cycleloop.py | 129 ++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 tests/cycleloop/config.rsc create mode 100644 tests/cycleloop/test_cycleloop.py diff --git a/tests/cycleloop/config.rsc b/tests/cycleloop/config.rsc new file mode 100644 index 0000000..de4cbbc --- /dev/null +++ b/tests/cycleloop/config.rsc @@ -0,0 +1 @@ +{"App":{"name": "PiCtory", "version": "1.2.3","saveTS": "20170826120906","language": "en","layout": {"north":{"size":70,"initClosed":false,"initHidden":false},"south":{"size":480,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":500,"initClosed":false,"initHidden":false}}}},"east":{"size":70,"initClosed":true,"initHidden":false,"children":{"layout1":{"north":{"size":100,"initClosed":false,"initHidden":false},"south":{"size":98,"initClosed":false,"initHidden":false}}}},"west":{"size":200,"initClosed":false,"initHidden":false,"children":{"layout1":{}}}}},"Summary":{"inpTotal": 338,"outTotal": 113},"Devices":[{"catalogNr": "RevPiCore","GUID": "4ebb85e8-92ea-415d-b191-cc58c2857c0a","id": "device_RevPiCore_20170404_1_2_001","type": "BASE","productType": "95","position": "0","name": "picore01","bmk": "RevPi Core V1.2","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPiCore Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""],"1": ["RevPiIOCycle","0","8","1",true,"0001", "",""],"2": ["RS485ErrorCnt","0","16","2",false,"0002", "",""],"3": ["Core_Temperatur","0","8","4",false,"0003", "",""],"4": ["Core_Frequency","0","8","5",false,"0004", "",""]},"out": {"0": ["RevPiLED","0","8","6",true,"0005", "",""],"1": ["RS485ErrorLimit1","10","16","7",false,"0006", "",""],"2": ["RS485ErrorLimit2","1000","16","9",false,"0007", "",""]},"mem": {},"extend": {}},{"catalogNr": "RevPiDI","GUID": "2e2c089e-6bef-14c0-852b-41b7cf48d846","id": "device_RevPiDI_20160818_1_0_001","type": "LEFT_RIGHT","productType": "97","position": "32","name": "di01","bmk": "RevPi DI","inpVariant": 0,"outVariant": 0,"comment": "","offset": 11,"inp": {"0": ["notaus_ok","0","1","0",true,"0000", "","0"],"1": ["motorschutz_ok","0","1","0",true,"0001", "","1"],"2": ["fu_ok","0","1","0",true,"0002", "","2"],"3": ["fu_motoran","0","1","0",true,"0003", "","3"],"4": ["I_5","0","1","0",true,"0004", "","4"],"5": ["I_6","0","1","0",true,"0005", "","5"],"6": ["I_7","0","1","0",true,"0006", "","6"],"7": ["I_8","0","1","0",true,"0007", "","7"],"8": ["t_automatik","0","1","0",true,"0008", "","8"],"9": ["t_start","0","1","0",true,"0009", "","9"],"10": ["t_stop","0","1","0",true,"0010", "","10"],"11": ["t_quit","0","1","0",true,"0011", "","11"],"12": ["t_notaus","0","1","0",true,"0012", "","12"],"13": ["I_14","0","1","0",true,"0013", "","13"],"14": ["I_15","0","1","0",true,"0014", "","14"],"15": ["I_16","0","1","0",true,"0015", "","15"],"16": ["Status","0","16","4",false,"0016", "",""],"17": ["Counter_1","0","32","6",false,"0017", "",""],"18": ["Counter_2","0","32","10",false,"0018", "",""],"19": ["Counter_3","0","32","14",false,"0019", "",""],"20": ["Counter_4","0","32","18",false,"0020", "",""],"21": ["Counter_5","0","32","22",false,"0021", "",""],"22": ["Counter_6","0","32","26",false,"0022", "",""],"23": ["Counter_7","0","32","30",false,"0023", "",""],"24": ["Counter_8","0","32","34",false,"0024", "",""],"25": ["Counter_9","0","32","38",false,"0025", "",""],"26": ["Counter_10","0","32","42",false,"0026", "",""],"27": ["Counter_11","0","32","46",false,"0027", "",""],"28": ["Counter_12","0","32","50",false,"0028", "",""],"29": ["Counter_13","0","32","54",false,"0029", "",""],"30": ["Counter_14","0","32","58",false,"0030", "",""],"31": ["Counter_15","0","32","62",false,"0031", "",""],"32": ["Counter_16","0","32","66",false,"0032", "",""],"33": ["Output_Status","0","16","2",false,"0050", "",""]},"out": {"0": ["Output","0","16","70",false,"0051", "",""],"1": ["PWM_1","0","8","72",false,"0052", "",""],"2": ["PWM_2","0","8","73",false,"0053", "",""],"3": ["PWM_3","0","8","74",false,"0054", "",""],"4": ["PWM_4","0","8","75",false,"0055", "",""],"5": ["PWM_5","0","8","76",false,"0056", "",""],"6": ["PWM_6","0","8","77",false,"0057", "",""],"7": ["PWM_7","0","8","78",false,"0058", "",""],"8": ["PWM_8","0","8","79",false,"0059", "",""],"9": ["PWM_9","0","8","80",false,"0060", "",""],"10": ["PWM_10","0","8","81",false,"0061", "",""],"11": ["PWM_11","0","8","82",false,"0062", "",""],"12": ["PWM_12","0","8","83",false,"0063", "",""],"13": ["PWM_13","0","8","84",false,"0064", "",""],"14": ["PWM_14","0","8","85",false,"0065", "",""],"15": ["PWM_15","0","8","86",false,"0066", "",""],"16": ["PWM_16","0","8","87",false,"0067", "",""]},"mem": {"0": ["InputMode_1","0","8","88",false,"0033", "",""],"1": ["InputMode_2","0","8","89",false,"0034", "",""],"2": ["InputMode_3","0","8","90",false,"0035", "",""],"3": ["InputMode_4","0","8","91",false,"0036", "",""],"4": ["InputMode_5","0","8","92",false,"0037", "",""],"5": ["InputMode_6","0","8","93",false,"0038", "",""],"6": ["InputMode_7","0","8","94",false,"0039", "",""],"7": ["InputMode_8","0","8","95",false,"0040", "",""],"8": ["InputMode_9","0","8","96",false,"0041", "",""],"9": ["InputMode_10","0","8","97",false,"0042", "",""],"10": ["InputMode_11","0","8","98",false,"0043", "",""],"11": ["InputMode_12","0","8","99",false,"0044", "",""],"12": ["InputMode_13","0","8","100",false,"0045", "",""],"13": ["InputMode_14","0","8","101",false,"0046", "",""],"14": ["InputMode_15","0","8","102",false,"0047", "",""],"15": ["InputMode_16","0","8","103",false,"0048", "",""],"16": ["InputDebounce","0","16","104",false,"0049", "",""],"17": ["OutputPushPull","0","16","106",false,"0068", "",""],"18": ["OutputOpenLoadDetect","0","16","108",false,"0069", "",""],"19": ["OutputPWMActive","0","16","110",false,"0070", "",""],"20": ["OutputPWMFrequency","2","8","112",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDI","GUID": "81e6c459-0398-a7c4-4954-d793ee9a5b89","id": "device_RevPiDI_20160818_1_0_002","type": "LEFT_RIGHT","productType": "97","position": "33","name": "di02","bmk": "RevPi DI","inpVariant": 0,"outVariant": 0,"comment": "","offset": 124,"inp": {"0": ["m_druck_ok","0","1","0",true,"0000", "","0"],"1": ["m_m1_eingefahren","0","1","0",true,"0001", "","1"],"2": ["m_m1_ausgefahren","0","1","0",true,"0002", "","2"],"3": ["m_m2_eingefahren","0","1","0",true,"0003", "","3"],"4": ["m_m2_ausgefahren","0","1","0",true,"0004", "","4"],"5": ["m_m3_eingefahren","0","1","0",true,"0005", "","5"],"6": ["m_m3_ausgefahren","0","1","0",true,"0006", "","6"],"7": ["s_rutsche","0","1","0",true,"0007", "","7"],"8": ["s_metall","0","1","0",true,"0008", "","8"],"9": ["s_magazin1","0","1","0",true,"0009", "","9"],"10": ["s_magazin2","0","1","0",true,"0010", "","10"],"11": ["I_12_i03","0","1","0",true,"0011", "","11"],"12": ["I_13_i03","0","1","0",true,"0012", "","12"],"13": ["I_14_i03","0","1","0",true,"0013", "","13"],"14": ["I_15_i03","0","1","0",true,"0014", "","14"],"15": ["mb_status","0","1","0",true,"0015", "","15"],"16": ["Status_i03","0","16","4",false,"0016", "",""],"17": ["Counter_1_i03","0","32","6",false,"0017", "",""],"18": ["Counter_2_i03","0","32","10",false,"0018", "",""],"19": ["Counter_3_i03","0","32","14",false,"0019", "",""],"20": ["Counter_4_i03","0","32","18",false,"0020", "",""],"21": ["Counter_5_i03","0","32","22",false,"0021", "",""],"22": ["Counter_6_i03","0","32","26",false,"0022", "",""],"23": ["Counter_7_i03","0","32","30",false,"0023", "",""],"24": ["Counter_8_i03","0","32","34",false,"0024", "",""],"25": ["Counter_9_i03","0","32","38",false,"0025", "",""],"26": ["Counter_10_i03","0","32","42",false,"0026", "",""],"27": ["Counter_11_i03","0","32","46",false,"0027", "",""],"28": ["Counter_12_i03","0","32","50",false,"0028", "",""],"29": ["Counter_13_i03","0","32","54",false,"0029", "",""],"30": ["Counter_14_i03","0","32","58",false,"0030", "",""],"31": ["Counter_15_i03","0","32","62",false,"0031", "",""],"32": ["Counter_16_i03","0","32","66",false,"0032", "",""],"33": ["Output_Status_i03","0","16","2",false,"0050", "",""]},"out": {"0": ["Output_i03","0","16","70",false,"0051", "",""],"1": ["PWM_1_i03","0","8","72",false,"0052", "",""],"2": ["PWM_2_i03","0","8","73",false,"0053", "",""],"3": ["PWM_3_i03","0","8","74",false,"0054", "",""],"4": ["PWM_4_i03","0","8","75",false,"0055", "",""],"5": ["PWM_5_i03","0","8","76",false,"0056", "",""],"6": ["PWM_6_i03","0","8","77",false,"0057", "",""],"7": ["PWM_7_i03","0","8","78",false,"0058", "",""],"8": ["PWM_8_i03","0","8","79",false,"0059", "",""],"9": ["PWM_9_i03","0","8","80",false,"0060", "",""],"10": ["PWM_10_i03","0","8","81",false,"0061", "",""],"11": ["PWM_11_i03","0","8","82",false,"0062", "",""],"12": ["PWM_12_i03","0","8","83",false,"0063", "",""],"13": ["PWM_13_i03","0","8","84",false,"0064", "",""],"14": ["PWM_14_i03","0","8","85",false,"0065", "",""],"15": ["PWM_15_i03","0","8","86",false,"0066", "",""],"16": ["PWM_16_i03","0","8","87",false,"0067", "",""]},"mem": {"0": ["InputMode_1_i03","0","8","88",false,"0033", "",""],"1": ["InputMode_2_i03","0","8","89",false,"0034", "",""],"2": ["InputMode_3_i03","0","8","90",false,"0035", "",""],"3": ["InputMode_4_i03","0","8","91",false,"0036", "",""],"4": ["InputMode_5_i03","0","8","92",false,"0037", "",""],"5": ["InputMode_6_i03","0","8","93",false,"0038", "",""],"6": ["InputMode_7_i03","0","8","94",false,"0039", "",""],"7": ["InputMode_8_i03","0","8","95",false,"0040", "",""],"8": ["InputMode_9_i03","0","8","96",false,"0041", "",""],"9": ["InputMode_10_i03","0","8","97",false,"0042", "",""],"10": ["InputMode_11_i03","0","8","98",false,"0043", "",""],"11": ["InputMode_12_i03","0","8","99",false,"0044", "",""],"12": ["InputMode_13_i03","0","8","100",false,"0045", "",""],"13": ["InputMode_14_i03","0","8","101",false,"0046", "",""],"14": ["InputMode_15_i03","0","8","102",false,"0047", "",""],"15": ["InputMode_16_i03","0","8","103",false,"0048", "",""],"16": ["InputDebounce_i03","0","16","104",false,"0049", "",""],"17": ["OutputPushPull_i03","0","16","106",false,"0068", "",""],"18": ["OutputOpenLoadDetect_i03","0","16","108",false,"0069", "",""],"19": ["OutputPWMActive_i03","0","16","110",false,"0070", "",""],"20": ["OutputPWMFrequency_i03","2","8","112",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDO","GUID": "4f8da9ea-91b2-d028-c60d-4476096a9dc2","id": "device_RevPiDO_20160818_1_0_001","type": "LEFT_RIGHT","productType": "98","position": "34","name": "do01","bmk": "RevPi DO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 237,"inp": {"0": ["Output_Status_i04","0","16","2",false,"0000", "",""],"1": ["Status_i04","0","16","4",false,"0001", "",""],"2": ["Input","0","16","0",false,"0038", "",""],"3": ["Counter_1_i04","0","32","6",false,"0039", "",""],"4": ["Counter_2_i04","0","32","10",false,"0040", "",""],"5": ["Counter_3_i04","0","32","14",false,"0041", "",""],"6": ["Counter_4_i04","0","32","18",false,"0042", "",""],"7": ["Counter_5_i04","0","32","22",false,"0043", "",""],"8": ["Counter_6_i04","0","32","26",false,"0044", "",""],"9": ["Counter_7_i04","0","32","30",false,"0045", "",""],"10": ["Counter_8_i04","0","32","34",false,"0046", "",""],"11": ["Counter_9_i04","0","32","38",false,"0047", "",""],"12": ["Counter_10_i04","0","32","42",false,"0048", "",""],"13": ["Counter_11_i04","0","32","46",false,"0049", "",""],"14": ["Counter_12_i04","0","32","50",false,"0050", "",""],"15": ["Counter_13_i04","0","32","54",false,"0051", "",""],"16": ["Counter_14_i04","0","32","58",false,"0052", "",""],"17": ["Counter_15_i04","0","32","62",false,"0053", "",""],"18": ["Counter_16_i04","0","32","66",false,"0054", "",""]},"out": {"0": ["fu_rechts","0","1","70",true,"0002", "","0"],"1": ["fu_links","0","1","70",true,"0003", "","1"],"2": ["fu_schnell","0","1","70",true,"0004", "","2"],"3": ["fu_lahm","0","1","70",true,"0005", "","3"],"4": ["v_druck","0","1","70",true,"0006", "","4"],"5": ["v_m1_einfahren","0","1","70",true,"0007", "","5"],"6": ["v_m1_ausfahren","0","1","70",true,"0008", "","6"],"7": ["v_m2_einfahren","0","1","70",true,"0009", "","7"],"8": ["v_m2_ausfahren","0","1","70",true,"0010", "","8"],"9": ["v_m3_einfahren","0","1","70",true,"0011", "","9"],"10": ["v_m3_ausfahren","0","1","70",true,"0012", "","10"],"11": ["O_12","0","1","70",true,"0013", "","11"],"12": ["O_13","0","1","70",true,"0014", "","12"],"13": ["O_14","0","1","70",true,"0015", "","13"],"14": ["O_15","0","1","70",true,"0016", "","14"],"15": ["fu_frei","0","1","70",true,"0017", "","15"],"16": ["PWM_1_i04","0","8","72",false,"0018", "",""],"17": ["PWM_2_i04","0","8","73",false,"0019", "",""],"18": ["PWM_3_i04","0","8","74",false,"0020", "",""],"19": ["PWM_4_i04","0","8","75",false,"0021", "",""],"20": ["PWM_5_i04","0","8","76",false,"0022", "",""],"21": ["PWM_6_i04","0","8","77",false,"0023", "",""],"22": ["PWM_7_i04","0","8","78",false,"0024", "",""],"23": ["PWM_8_i04","0","8","79",false,"0025", "",""],"24": ["PWM_9_i04","0","8","80",false,"0026", "",""],"25": ["PWM_10_i04","0","8","81",false,"0027", "",""],"26": ["PWM_11_i04","0","8","82",false,"0028", "",""],"27": ["PWM_12_i04","0","8","83",false,"0029", "",""],"28": ["PWM_13_i04","0","8","84",false,"0030", "",""],"29": ["PWM_14_i04","0","8","85",false,"0031", "",""],"30": ["PWM_15_i04","0","8","86",false,"0032", "",""],"31": ["PWM_16_i04","0","8","87",false,"0033", "",""]},"mem": {"0": ["OutputPushPull_i04","0","16","106",false,"0034", "",""],"1": ["OutputOpenLoadDetect_i04","0","16","108",false,"0035", "",""],"2": ["OutputPWMActive_i04","0","16","110",false,"0036", "",""],"3": ["OutputPWMFrequency_i04","1","8","112",false,"0037", "",""],"4": ["InputMode_1_i04","0","8","88",false,"0055", "",""],"5": ["InputMode_2_i04","0","8","89",false,"0056", "",""],"6": ["InputMode_3_i04","0","8","90",false,"0057", "",""],"7": ["InputMode_4_i04","0","8","91",false,"0058", "",""],"8": ["InputMode_5_i04","0","8","92",false,"0059", "",""],"9": ["InputMode_6_i04","0","8","93",false,"0060", "",""],"10": ["InputMode_7_i04","0","8","94",false,"0061", "",""],"11": ["InputMode_8_i04","0","8","95",false,"0062", "",""],"12": ["InputMode_9_i04","0","8","96",false,"0063", "",""],"13": ["InputMode_10_i04","0","8","97",false,"0064", "",""],"14": ["InputMode_11_i04","0","8","98",false,"0065", "",""],"15": ["InputMode_12_i04","0","8","99",false,"0066", "",""],"16": ["InputMode_13_i04","0","8","100",false,"0067", "",""],"17": ["InputMode_14_i04","0","8","101",false,"0068", "",""],"18": ["InputMode_15_i04","0","8","102",false,"0069", "",""],"19": ["InputMode_16_i04","0","8","103",false,"0070", "",""],"20": ["InputDebounce_i04","0","16","104",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiDO","GUID": "b8a70c62-9b91-9e1a-af2a-37f74b16aca2","id": "device_RevPiDO_20160818_1_0_002","type": "LEFT_RIGHT","productType": "98","position": "35","name": "do02","bmk": "RevPi DO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 350,"inp": {"0": ["Output_Status_i05","0","16","2",false,"0000", "",""],"1": ["Status_i05","0","16","4",false,"0001", "",""],"2": ["Input_i05","0","16","0",false,"0038", "",""],"3": ["Counter_1_i05","0","32","6",false,"0039", "",""],"4": ["Counter_2_i05","0","32","10",false,"0040", "",""],"5": ["Counter_3_i05","0","32","14",false,"0041", "",""],"6": ["Counter_4_i05","0","32","18",false,"0042", "",""],"7": ["Counter_5_i05","0","32","22",false,"0043", "",""],"8": ["Counter_6_i05","0","32","26",false,"0044", "",""],"9": ["Counter_7_i05","0","32","30",false,"0045", "",""],"10": ["Counter_8_i05","0","32","34",false,"0046", "",""],"11": ["Counter_9_i05","0","32","38",false,"0047", "",""],"12": ["Counter_10_i05","0","32","42",false,"0048", "",""],"13": ["Counter_11_i05","0","32","46",false,"0049", "",""],"14": ["Counter_12_i05","0","32","50",false,"0050", "",""],"15": ["Counter_13_i05","0","32","54",false,"0051", "",""],"16": ["Counter_14_i05","0","32","58",false,"0052", "",""],"17": ["Counter_15_i05","0","32","62",false,"0053", "",""],"18": ["Counter_16_i05","0","32","66",false,"0054", "",""]},"out": {"0": ["fu_reset","0","1","70",true,"0002", "","0"],"1": ["h_start","0","1","70",true,"0003", "","1"],"2": ["h_fehler","0","1","70",true,"0004", "","2"],"3": ["O_04_i05","0","1","70",true,"0005", "","3"],"4": ["O_05_i05","0","1","70",true,"0006", "","4"],"5": ["O_06_i05","0","1","70",true,"0007", "","5"],"6": ["O_07_i05","0","1","70",true,"0008", "","6"],"7": ["O_08_i05","0","1","70",true,"0009", "","7"],"8": ["O_09_i05","0","1","70",true,"0010", "","8"],"9": ["O_10_i05","0","1","70",true,"0011", "","9"],"10": ["O_11_i05","0","1","70",true,"0012", "","10"],"11": ["O_12_i05","0","1","70",true,"0013", "","11"],"12": ["O_13_i05","0","1","70",true,"0014", "","12"],"13": ["O_14_i05","0","1","70",true,"0015", "","13"],"14": ["O_15_i05","0","1","70",true,"0016", "","14"],"15": ["mb_connect","0","1","70",true,"0017", "","15"],"16": ["PWM_1_i05","0","8","72",false,"0018", "",""],"17": ["PWM_2_i05","0","8","73",false,"0019", "",""],"18": ["PWM_3_i05","0","8","74",false,"0020", "",""],"19": ["PWM_4_i05","0","8","75",false,"0021", "",""],"20": ["PWM_5_i05","0","8","76",false,"0022", "",""],"21": ["PWM_6_i05","0","8","77",false,"0023", "",""],"22": ["PWM_7_i05","0","8","78",false,"0024", "",""],"23": ["PWM_8_i05","0","8","79",false,"0025", "",""],"24": ["PWM_9_i05","0","8","80",false,"0026", "",""],"25": ["PWM_10_i05","0","8","81",false,"0027", "",""],"26": ["PWM_11_i05","0","8","82",false,"0028", "",""],"27": ["PWM_12_i05","0","8","83",false,"0029", "",""],"28": ["PWM_13_i05","0","8","84",false,"0030", "",""],"29": ["PWM_14_i05","0","8","85",false,"0031", "",""],"30": ["PWM_15_i05","0","8","86",false,"0032", "",""],"31": ["PWM_16_i05","0","8","87",false,"0033", "",""]},"mem": {"0": ["OutputPushPull_i05","0","16","106",false,"0034", "",""],"1": ["OutputOpenLoadDetect_i05","0","16","108",false,"0035", "",""],"2": ["OutputPWMActive_i05","0","16","110",false,"0036", "",""],"3": ["OutputPWMFrequency_i05","1","8","112",false,"0037", "",""],"4": ["InputMode_1_i05","0","8","88",false,"0055", "",""],"5": ["InputMode_2_i05","0","8","89",false,"0056", "",""],"6": ["InputMode_3_i05","0","8","90",false,"0057", "",""],"7": ["InputMode_4_i05","0","8","91",false,"0058", "",""],"8": ["InputMode_5_i05","0","8","92",false,"0059", "",""],"9": ["InputMode_6_i05","0","8","93",false,"0060", "",""],"10": ["InputMode_7_i05","0","8","94",false,"0061", "",""],"11": ["InputMode_8_i05","0","8","95",false,"0062", "",""],"12": ["InputMode_9_i05","0","8","96",false,"0063", "",""],"13": ["InputMode_10_i05","0","8","97",false,"0064", "",""],"14": ["InputMode_11_i05","0","8","98",false,"0065", "",""],"15": ["InputMode_12_i05","0","8","99",false,"0066", "",""],"16": ["InputMode_13_i05","0","8","100",false,"0067", "",""],"17": ["InputMode_14_i05","0","8","101",false,"0068", "",""],"18": ["InputMode_15_i05","0","8","102",false,"0069", "",""],"19": ["InputMode_16_i05","0","8","103",false,"0070", "",""],"20": ["InputDebounce_i05","0","16","104",false,"0071", "",""]},"extend": {}},{"catalogNr": "RevPiAIO","GUID": "76f10e57-ecaf-2a45-f4df-b9a66e3f40db","id": "device_RevPiAIO_20170301_1_0_001","type": "LEFT_RIGHT","productType": "103","position": "36","name": "aio01","bmk": "RevPi AIO","inpVariant": 0,"outVariant": 0,"comment": "","offset": 463,"inp": {"0": ["fu_ist","0","16","0",false,"0000", "",""],"1": ["InputValue_2","0","16","2",false,"0001", "",""],"2": ["InputValue_3","0","16","4",false,"0002", "",""],"3": ["InputValue_4","0","16","6",false,"0003", "",""],"4": ["InputStatus_1","0","8","8",false,"0004", "",""],"5": ["InputStatus_2","0","8","9",false,"0005", "",""],"6": ["InputStatus_3","0","8","10",false,"0006", "",""],"7": ["InputStatus_4","0","8","11",false,"0007", "",""],"8": ["tmp_schrank","0","16","12",false,"0008", "",""],"9": ["RTDValue_2","0","16","14",false,"0009", "",""],"10": ["RTDStatus_1","0","8","16",false,"0010", "",""],"11": ["RTDStatus_2","0","8","17",false,"0011", "",""],"12": ["OutputStatus_1","0","8","18",false,"0012", "",""],"13": ["OutputStatus_2","0","8","19",false,"0013", "",""]},"out": {"0": ["OutputValue_1","0","16","20",false,"0014", "",""],"1": ["fu_soll","0","16","22",false,"0015", "",""]},"mem": {"0": ["Input1Range","1","8","24",false,"0016", "You must use wire bridges for current measurement!",""],"1": ["Input1Multiplier","1","16","25",false,"0017", "",""],"2": ["Input1Divisor","1","16","27",false,"0018", "",""],"3": ["Input1Offset","0","16","29",false,"0019", "",""],"4": ["Input2Range","1","8","31",false,"0020", "You must use wire bridges for current measurement!",""],"5": ["Input2Multiplier","1","16","32",false,"0021", "",""],"6": ["Input2Divisor","1","16","34",false,"0022", "",""],"7": ["Input2Offset","0","16","36",false,"0023", "",""],"8": ["Input3Range","1","8","38",false,"0024", "You must use wire bridges for current measurement!",""],"9": ["Input3Multiplier","1","16","39",false,"0025", "",""],"10": ["Input3Divisor","1","16","41",false,"0026", "",""],"11": ["Input3Offset","0","16","43",false,"0027", "",""],"12": ["Input4Range","1","8","45",false,"0028", "You must use wire bridges for current measurement!",""],"13": ["Input4Multiplier","1","16","46",false,"0029", "",""],"14": ["Input4Divisor","1","16","48",false,"0030", "",""],"15": ["Input4Offset","0","16","50",false,"0031", "",""],"16": ["ADC_DataRate","0","8","52",false,"0032", "Use lowest value for highest precision and a maximum 50 Hz suppression",""],"17": ["RTD1Type","0","8","53",false,"0033", "",""],"18": ["RTD1Wiring","0","8","54",false,"0034", "You must use wire bridges for 2-wire sensors!",""],"19": ["RTD1Multiplier","1","16","55",false,"0035", "",""],"20": ["RTD1Divisor","1","16","57",false,"0036", "",""],"21": ["RTD1Offset","0","16","59",false,"0037", "",""],"22": ["RTD2Type","0","8","61",false,"0038", "",""],"23": ["RTD2Wiring","0","8","62",false,"0039", "You must use wire bridges for 2-wire sensors!",""],"24": ["RTD2Multiplier","1","16","63",false,"0040", "",""],"25": ["RTD2Divisor","1","16","65",false,"0041", "",""],"26": ["RTD2Offset","0","16","67",false,"0042", "",""],"27": ["Output1Range","0","8","69",false,"0043", "",""],"28": ["Output1EnableSlew","0","8","70",false,"0044", "Enable slew rate deceleration",""],"29": ["Output1SlewStepSize","0","8","71",false,"0045", "Slew rate step size",""],"30": ["Output1SlewClock","0","8","72",false,"0046", "lock rate of slew rate deceleration in kHz",""],"31": ["Output1Multiplier","1","16","73",false,"0047", "",""],"32": ["Output1Divisor","1","16","75",false,"0048", "",""],"33": ["Output1Offset","0","16","77",false,"0049", "",""],"34": ["Output2Range","2","8","79",false,"0050", "",""],"35": ["Output2EnableSlew","0","8","80",false,"0051", "Enable slew rate deceleration",""],"36": ["Output2SlewStepSize","0","8","81",false,"0052", "Slew rate step size",""],"37": ["Output2SlewClock","0","8","82",false,"0053", "lock rate of slew rate deceleration in kHz",""],"38": ["Output2Multiplier","1","16","83",false,"0054", "",""],"39": ["Output2Divisor","1","16","85",false,"0055", "",""],"40": ["Output2Offset","0","16","87",false,"0056", "",""]},"extend": {}},{"catalogNr": "Virtual01","GUID": "c3bf8705-d96a-6452-2566-40c5d86a5061","id": "device_Virtual01_20160818_1_0_001","type": "VIRTUAL","productType": "32768","position": "64","name": "virt01","bmk": "Virtual Device 32 Byte","inpVariant": 0,"outVariant": 0,"comment": "Virtual Device to reserve space in process image for user applications","offset": 552,"inp": {"0": ["pbit0_7","0","8","0",false,"0000", "",""],"1": ["pbit8_15","0","8","1",false,"0001", "",""],"2": ["pbit16_23","0","8","2",false,"0002", "",""],"3": ["pbit24_31","0","8","3",false,"0003", "",""],"4": ["magazin1_max","4","8","4",false,"0004", "",""],"5": ["magazin2_max","4","8","5",false,"0005", "",""],"6": ["p_drehzahl1","136","8","6",false,"0006", "",""],"7": ["p_drehzahl2","19","8","7",false,"0007", "",""],"8": ["Input_9","0","8","8",false,"0008", "",""],"9": ["Input_10","0","8","9",false,"0009", "",""],"10": ["Input_11","0","8","10",false,"0010", "",""],"11": ["Input_12","0","8","11",false,"0011", "",""],"12": ["Input_13","0","8","12",false,"0012", "",""],"13": ["Input_14","0","8","13",false,"0013", "",""],"14": ["Input_15","0","8","14",false,"0014", "",""],"15": ["Input_16","0","8","15",false,"0015", "",""],"16": ["Input_17","0","8","16",false,"0016", "",""],"17": ["Input_18","0","8","17",false,"0017", "",""],"18": ["Input_19","0","8","18",false,"0018", "",""],"19": ["Input_20","0","8","19",false,"0019", "",""],"20": ["Input_21","0","8","20",false,"0020", "",""],"21": ["Input_22","0","8","21",false,"0021", "",""],"22": ["Input_23","0","8","22",false,"0022", "",""],"23": ["Input_24","0","8","23",false,"0023", "",""],"24": ["Input_25","0","8","24",false,"0024", "",""],"25": ["Input_26","0","8","25",false,"0025", "",""],"26": ["Input_27","0","8","26",false,"0026", "",""],"27": ["Input_28","0","8","27",false,"0027", "",""],"28": ["Input_29","0","8","28",false,"0028", "",""],"29": ["Input_30","0","8","29",false,"0029", "",""],"30": ["Input_31","0","8","30",false,"0030", "",""],"31": ["Input_32","0","8","31",false,"0031", "",""]},"out": {"0": ["meldung0_7","0","8","32",false,"0032", "",""],"1": ["meldung8_15","0","8","33",false,"0033", "",""],"2": ["meldung16_23","0","8","34",false,"0034", "",""],"3": ["meldung24_31","0","8","35",false,"0035", "",""],"4": ["magazin1","0","8","36",false,"0036", "",""],"5": ["magazin2","0","8","37",false,"0037", "",""],"6": ["Output_7","0","8","38",false,"0038", "",""],"7": ["Output_8","0","8","39",false,"0039", "",""],"8": ["Output_9","0","8","40",false,"0040", "",""],"9": ["Output_10","0","8","41",false,"0041", "",""],"10": ["Output_11","0","8","42",false,"0042", "",""],"11": ["Output_12","0","8","43",false,"0043", "",""],"12": ["Output_13","0","8","44",false,"0044", "",""],"13": ["Output_14","0","8","45",false,"0045", "",""],"14": ["Output_15","0","8","46",false,"0046", "",""],"15": ["Output_16","0","8","47",false,"0047", "",""],"16": ["Output_17","0","8","48",false,"0048", "",""],"17": ["Output_18","0","8","49",false,"0049", "",""],"18": ["Output_19","0","8","50",false,"0050", "",""],"19": ["Output_20","0","8","51",false,"0051", "",""],"20": ["Output_21","0","8","52",false,"0052", "",""],"21": ["Output_22","0","8","53",false,"0053", "",""],"22": ["Output_23","0","8","54",false,"0054", "",""],"23": ["Output_24","0","8","55",false,"0055", "",""],"24": ["Output_25","0","8","56",false,"0056", "",""],"25": ["Output_26","0","8","57",false,"0057", "",""],"26": ["Output_27","0","8","58",false,"0058", "",""],"27": ["Output_28","0","8","59",false,"0059", "",""],"28": ["Output_29","0","8","60",false,"0060", "",""],"29": ["Output_30","0","8","61",false,"0061", "",""],"30": ["Output_31","0","8","62",false,"0062", "",""],"31": ["Output_32","0","8","63",false,"0063", "",""]},"mem": {},"extend": {}}],"Connections":[]} \ No newline at end of file diff --git a/tests/cycleloop/test_cycleloop.py b/tests/cycleloop/test_cycleloop.py new file mode 100644 index 0000000..13fd3d0 --- /dev/null +++ b/tests/cycleloop/test_cycleloop.py @@ -0,0 +1,129 @@ +# -*- coding: utf-8 -*- +"""Test cycle loop functions.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" + +from os.path import dirname, join +from time import sleep + +import revpimodio2 +from tests import TestRevPiModIO +from tests.helper import ExitThread + +event_data = (None, None) + + +def xxx(name, value): + """Test event function.""" + global event_data + event_data = (name, value) + + +def xxx_thread(th): + """Test event function with thread.""" + global event_data + event_data = (th.ioname, th.iovalue) + th.stop() + + +def xxx_timeout(name, value): + """Test event with long timeout.""" + sleep(0.1) + + +class TestCycleloop(TestRevPiModIO): + + data_dir = dirname(__file__) + + def setUp(self): + global event_data + event_data = (None, None) + super().setUp() + + def test_cycleloop(self): + """Testet Cycleloop-Funktion.""" + rpi = self.modio() + with self.assertRaises(RuntimeError): + rpi.cycleloop(zyklus, 51) + + rpi.autorefresh_all() + with self.assertRaises(RuntimeError): + rpi.cycleloop(False, 51) + rpi.cycleloop(zyklus, 51) + + with self.assertRaises(TypeError): + rpi.cycleloop(lambda: None) + + rpi.exit() + + rpi.autorefresh_all() + sleep(0.1) + rpi._imgwriter.stop() + sleep(0.1) + with self.assertRaisesRegex(RuntimeError, r"autorefresh thread not running"): + rpi.cycleloop(zyklus) + + rpi.exit() + + def test_cycleloop_longtime(self): + """Testet no data.""" + rpi = self.modio(autorefresh=True) + rpi.debug = -1 + rpi._imgwriter.lck_refresh.acquire() + th_ende = ExitThread(rpi, 4) + th_ende.start() + + with self.assertWarnsRegex( + RuntimeWarning, r"no new io data in cycle loop for 2500 milliseconds" + ): + rpi.cycleloop(zyklus) + + rpi.exit() + + def test_cycletools(self): + rpi = self.modio() + ct = revpimodio2.Cycletools(50, rpi) + with self.assertRaises(TypeError): + ct.changed("bad_value") + with self.assertRaises(ValueError): + ct.changed(rpi.io.magazin1, edge=revpimodio2._internal.RISING) + del rpi + + def test_run_plc(self): + self.assertEqual( + revpimodio2.run_plc( + zyklus, + cycletime=30, + procimg=self.fh_procimg.name, + configrsc=join(self.data_dir, "config.rsc"), + ), + 1, + ) + + +def zyklus(ct): + """Cycle program for testing the cycle loop.""" + if ct.flag10c: + ct.set_ton("test", 100) + ct.set_tof("test", 100) + ct.set_tp("test", 100) + ct.set_tonc("testc", 3) + ct.set_tofc("testc", 3) + ct.set_tpc("testc", 3) + + ct.get_ton("test") + ct.get_tof("test") + ct.get_tp("test") + ct.get_tonc("testc") + ct.get_tofc("testc") + ct.get_tpc("testc") + + t = ct.runtime + + # Check change + ct.changed(ct.io.v_druck, edge=revpimodio2._internal.RISING) + ct.changed(ct.io.magazin1) + + if ct.flag20c: + return 1 From 276ea8dd72645c52b43dc7a2bd41373b132210f6 Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Fri, 8 Nov 2024 08:31:39 +0100 Subject: [PATCH 17/26] test: Cleanup tests and use relative imports --- tests/common/__init__.py | 5 +++++ tests/common/test_config_rsc_bugs.py | 2 +- tests/common/test_devices.py | 2 +- tests/common/test_init_modio.py | 2 +- tests/common/test_modio_class_basics.py | 2 +- tests/compact/__init__.py | 5 +++++ tests/compact/test_compact.py | 4 ++-- tests/cycleloop/__init__.py | 5 +++++ tests/cycleloop/test_cycleloop.py | 4 ++-- tests/events_and_signals/__init__.py | 5 +++++ tests/events_and_signals/test_events.py | 4 ++-- tests/events_and_signals/test_signals.py | 4 ++-- tests/flat/__init__.py | 5 +++++ tests/flat/test_flat.py | 2 +- tests/io_tests/__init__.py | 5 +++++ tests/io_tests/test_io_functions.py | 2 +- tests/io_tests/test_ios.py | 2 +- tests/mainloop/__init__.py | 5 +++++ tests/mainloop/test_mainloop.py | 4 ++-- tests/replace_io/__init__.py | 5 +++++ tests/replace_io/test_replace_io.py | 20 ++++++++------------ tests/revpi3/__init__.py | 5 +++++ tests/revpi3/test_connect.py | 2 +- tests/revpi3/test_core.py | 2 +- tests/revpi4/__init__.py | 5 +++++ tests/revpi4/test_connect4.py | 4 ++-- 26 files changed, 79 insertions(+), 33 deletions(-) create mode 100644 tests/common/__init__.py create mode 100644 tests/compact/__init__.py create mode 100644 tests/cycleloop/__init__.py create mode 100644 tests/events_and_signals/__init__.py create mode 100644 tests/flat/__init__.py create mode 100644 tests/io_tests/__init__.py create mode 100644 tests/mainloop/__init__.py create mode 100644 tests/replace_io/__init__.py create mode 100644 tests/revpi3/__init__.py create mode 100644 tests/revpi4/__init__.py diff --git a/tests/common/__init__.py b/tests/common/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/common/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/common/test_config_rsc_bugs.py b/tests/common/test_config_rsc_bugs.py index 7d6337a..460b7e4 100644 --- a/tests/common/test_config_rsc_bugs.py +++ b/tests/common/test_config_rsc_bugs.py @@ -6,7 +6,7 @@ __license__ = "GPLv2" from os.path import dirname -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestConfigRscBugs(TestRevPiModIO): diff --git a/tests/common/test_devices.py b/tests/common/test_devices.py index 9bcccc9..166351a 100644 --- a/tests/common/test_devices.py +++ b/tests/common/test_devices.py @@ -8,7 +8,7 @@ from os.path import dirname from revpimodio2 import OUT, MEM, INP from revpimodio2.device import Virtual, Base -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestDevicesModule(TestRevPiModIO): diff --git a/tests/common/test_init_modio.py b/tests/common/test_init_modio.py index a88a6d1..aac5725 100644 --- a/tests/common/test_init_modio.py +++ b/tests/common/test_init_modio.py @@ -9,7 +9,7 @@ from os.path import join, dirname from shutil import copyfile import revpimodio2 -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestInitModio(TestRevPiModIO): diff --git a/tests/common/test_modio_class_basics.py b/tests/common/test_modio_class_basics.py index bbe9811..606d2fa 100644 --- a/tests/common/test_modio_class_basics.py +++ b/tests/common/test_modio_class_basics.py @@ -9,7 +9,7 @@ from os.path import join, dirname from signal import SIGINT from threading import Event -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestModioClassBasics(TestRevPiModIO): diff --git a/tests/compact/__init__.py b/tests/compact/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/compact/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/compact/test_compact.py b/tests/compact/test_compact.py index 395e440..c2d71cf 100644 --- a/tests/compact/test_compact.py +++ b/tests/compact/test_compact.py @@ -4,10 +4,10 @@ __author__ = "Sven Sager" __copyright__ = "Copyright (C) 2024 Sven Sager" __license__ = "GPLv2" -from os.path import join, dirname +from os.path import dirname import revpimodio2 -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestCompact(TestRevPiModIO): diff --git a/tests/cycleloop/__init__.py b/tests/cycleloop/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/cycleloop/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/cycleloop/test_cycleloop.py b/tests/cycleloop/test_cycleloop.py index 13fd3d0..b2d9d63 100644 --- a/tests/cycleloop/test_cycleloop.py +++ b/tests/cycleloop/test_cycleloop.py @@ -8,8 +8,8 @@ from os.path import dirname, join from time import sleep import revpimodio2 -from tests import TestRevPiModIO -from tests.helper import ExitThread +from .. import TestRevPiModIO +from ..helper import ExitThread event_data = (None, None) diff --git a/tests/events_and_signals/__init__.py b/tests/events_and_signals/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/events_and_signals/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/events_and_signals/test_events.py b/tests/events_and_signals/test_events.py index f1dc009..875a05f 100644 --- a/tests/events_and_signals/test_events.py +++ b/tests/events_and_signals/test_events.py @@ -9,8 +9,8 @@ from threading import Event from time import sleep from revpimodio2 import RISING, FALLING -from tests import TestRevPiModIO -from tests.helper import ChangeThread +from .. import TestRevPiModIO +from ..helper import ChangeThread event_data = (None, None) diff --git a/tests/events_and_signals/test_signals.py b/tests/events_and_signals/test_signals.py index 802897b..6814256 100644 --- a/tests/events_and_signals/test_signals.py +++ b/tests/events_and_signals/test_signals.py @@ -6,8 +6,8 @@ __license__ = "GPLv2" from os.path import dirname -from tests import TestRevPiModIO -from tests.helper import ExitSignal +from .. import TestRevPiModIO +from ..helper import ExitSignal class TestSignals(TestRevPiModIO): diff --git a/tests/flat/__init__.py b/tests/flat/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/flat/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/flat/test_flat.py b/tests/flat/test_flat.py index 98e8472..b8c938b 100644 --- a/tests/flat/test_flat.py +++ b/tests/flat/test_flat.py @@ -7,7 +7,7 @@ __license__ = "GPLv2" from os.path import dirname import revpimodio2 -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestFlat(TestRevPiModIO): diff --git a/tests/io_tests/__init__.py b/tests/io_tests/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/io_tests/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/io_tests/test_io_functions.py b/tests/io_tests/test_io_functions.py index 38e96fb..4743489 100644 --- a/tests/io_tests/test_io_functions.py +++ b/tests/io_tests/test_io_functions.py @@ -7,7 +7,7 @@ __license__ = "GPLv2" from os.path import dirname from revpimodio2 import OUT -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestIoFunctions(TestRevPiModIO): diff --git a/tests/io_tests/test_ios.py b/tests/io_tests/test_ios.py index 83c6b73..e4a0666 100644 --- a/tests/io_tests/test_ios.py +++ b/tests/io_tests/test_ios.py @@ -7,7 +7,7 @@ __license__ = "GPLv2" from os.path import dirname from revpimodio2.io import IntIOCounter -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestIos(TestRevPiModIO): diff --git a/tests/mainloop/__init__.py b/tests/mainloop/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/mainloop/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/mainloop/test_mainloop.py b/tests/mainloop/test_mainloop.py index 23b604c..16aaa22 100644 --- a/tests/mainloop/test_mainloop.py +++ b/tests/mainloop/test_mainloop.py @@ -8,8 +8,8 @@ from os.path import dirname from time import sleep import revpimodio2 -from tests import TestRevPiModIO -from tests.helper import ExitThread, ChangeThread +from .. import TestRevPiModIO +from ..helper import ExitThread, ChangeThread event_data = (None, None) diff --git a/tests/replace_io/__init__.py b/tests/replace_io/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/replace_io/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/replace_io/test_replace_io.py b/tests/replace_io/test_replace_io.py index 0b7ca65..2451e41 100644 --- a/tests/replace_io/test_replace_io.py +++ b/tests/replace_io/test_replace_io.py @@ -7,7 +7,7 @@ __license__ = "GPLv2" from os.path import join, dirname from revpimodio2.io import IntIOReplaceable -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestReplaceIO(TestRevPiModIO): @@ -148,20 +148,16 @@ class TestReplaceIO(TestRevPiModIO): def test_replace_io_file_fail(self): with self.assertRaises(RuntimeError): - rpi = self.modio(replace_io_file=join(self.data_dir, "replace_io_fail.conf")) + self.modio(replace_io_file=join(self.data_dir, "replace_io_fail.conf")) with self.assertRaises(RuntimeError): - rpi = self.modio(replace_io_file="no_file_nonono") + self.modio(replace_io_file="no_file_nonono") with self.assertRaises(RuntimeError): - rpi = self.modio(replace_io_file=join(self.data_dir, "replace_io_failformat.conf")) + self.modio(replace_io_file=join(self.data_dir, "replace_io_failformat.conf")) with self.assertRaises(ValueError): - rpi = self.modio( - replace_io_file=join(self.data_dir, "replace_io_faildefaultvalue_bool.conf") - ) + self.modio(replace_io_file=join(self.data_dir, "replace_io_faildefaultvalue_bool.conf")) with self.assertRaises(ValueError): - rpi = self.modio( - replace_io_file=join(self.data_dir, "replace_io_faildefaultvalue_int.conf") - ) + self.modio(replace_io_file=join(self.data_dir, "replace_io_faildefaultvalue_int.conf")) with self.assertRaises(ValueError): - rpi = self.modio(replace_io_file=join(self.data_dir, "replace_io_failbit_int.conf")) + self.modio(replace_io_file=join(self.data_dir, "replace_io_failbit_int.conf")) with self.assertRaisesRegex(ValueError, r"defaultvalue to bytes"): - rpi = self.modio(replace_io_file=join(self.data_dir, "replace_io_bytes_fail.conf")) + self.modio(replace_io_file=join(self.data_dir, "replace_io_bytes_fail.conf")) diff --git a/tests/revpi3/__init__.py b/tests/revpi3/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/revpi3/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/revpi3/test_connect.py b/tests/revpi3/test_connect.py index d269e1c..23beeec 100644 --- a/tests/revpi3/test_connect.py +++ b/tests/revpi3/test_connect.py @@ -7,7 +7,7 @@ __license__ = "GPLv2" from os.path import dirname from revpimodio2 import BLUE -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestRevPiConnect(TestRevPiModIO): diff --git a/tests/revpi3/test_core.py b/tests/revpi3/test_core.py index c8106ec..fbda827 100644 --- a/tests/revpi3/test_core.py +++ b/tests/revpi3/test_core.py @@ -8,7 +8,7 @@ from os.path import dirname from revpimodio2 import RED, GREEN, OFF, BLUE from revpimodio2.io import IOBase, IntIO -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestRevPiCore(TestRevPiModIO): diff --git a/tests/revpi4/__init__.py b/tests/revpi4/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/revpi4/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/revpi4/test_connect4.py b/tests/revpi4/test_connect4.py index a88b2e7..8f0918c 100644 --- a/tests/revpi4/test_connect4.py +++ b/tests/revpi4/test_connect4.py @@ -4,10 +4,10 @@ __author__ = "Sven Sager" __copyright__ = "Copyright (C) 2024 Sven Sager" __license__ = "GPLv2" -from os.path import join, dirname +from os.path import dirname import revpimodio2 -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestRevPi4(TestRevPiModIO): From 579617d2235b7cb24eb2de1947c4831b9e25ef4c Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Fri, 8 Nov 2024 08:45:25 +0100 Subject: [PATCH 18/26] feat: Add more colors in constants for a RGB status LED On the Connect 4, the status LEDs are RGB. By switching several LEDs, further colors can be generated as red, green, blue. --- src/revpimodio2/_internal.py | 12 ++++++++++++ tests/test_import.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/revpimodio2/_internal.py b/src/revpimodio2/_internal.py index b1415ab..e28752f 100644 --- a/src/revpimodio2/_internal.py +++ b/src/revpimodio2/_internal.py @@ -8,7 +8,11 @@ __license__ = "LGPLv2" OFF = 0 GREEN = 1 RED = 2 +ORANGE = 3 BLUE = 4 +CYAN = 5 +MAGENTA = 6 +WHITE = 7 RISING = 31 FALLING = 32 BOTH = 33 @@ -54,8 +58,16 @@ def consttostr(value) -> str: return "GREEN" elif value == 2: return "RED" + elif value == 3: + return "ORANGE" elif value == 4: return "BLUE" + elif value == 5: + return "CYAN" + elif value == 6: + return "MAGENTA" + elif value == 7: + return "WHITE" elif value == 31: return "RISING" elif value == 32: diff --git a/tests/test_import.py b/tests/test_import.py index eb41847..f69c482 100644 --- a/tests/test_import.py +++ b/tests/test_import.py @@ -19,7 +19,7 @@ class ModuleImport(unittest.TestCase): self.assertEqual(revpimodio2._internal.consttostr(999), "") - lst_const = [0, 1, 2, 4, 31, 32, 33, 300, 301, 302, 4096] + lst_const = [0, 1, 2, 3, 4, 5, 6, 7, 31, 32, 33, 300, 301, 302, 4096] internal_dict = revpimodio2._internal.__dict__ # type: dict for key in internal_dict: if type(internal_dict[key]) is int: From f3f81f36338bac268a9eb635a58025b40f4a1a5e Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Thu, 7 Nov 2024 11:24:22 +0100 Subject: [PATCH 19/26] refactor: Show deprecation warning on root context manager This context manager can delete the entire instance of ModIO when using `with rpi:` after creating an instance of ModIO by `rpi = revpimodio.RevPiModIO(...)`. --- src/revpimodio2/modio.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/revpimodio2/modio.py b/src/revpimodio2/modio.py index cde5e22..d7c73b1 100644 --- a/src/revpimodio2/modio.py +++ b/src/revpimodio2/modio.py @@ -208,6 +208,19 @@ class RevPiModIO(object): self._myfh.close() def __enter__(self): + # todo: Remove this context manager in future + warnings.warn( + "This context manager is deprecated and will be removed!\n\n" + "You should use the context manager of the IO object `with revpi.io:` " + "or with a single device `with revpi.device.my_device:`.\n\n" + "This deprecated context manager can be reproduced as follows:\n" + "```" + "revpi = revpimodio2.RevPiModIO()" + "with revpi.io:" + " ..." + "```", + DeprecationWarning, + ) if self._context_manager: raise RuntimeError("can not use multiple context managers of same instance") if self._looprunning: From 94ac5c9b92fc407e2c01146b70dffbdc389b9419 Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Mon, 28 Oct 2024 15:05:03 +0100 Subject: [PATCH 20/26] feat: Add support for RevPi Connect 5 --- src/revpimodio2/device.py | 321 ++++++++++++++++++++----------------- src/revpimodio2/modio.py | 4 + src/revpimodio2/pictory.py | 1 + 3 files changed, 181 insertions(+), 145 deletions(-) diff --git a/src/revpimodio2/device.py b/src/revpimodio2/device.py index b2f92d4..92ce3b6 100644 --- a/src/revpimodio2/device.py +++ b/src/revpimodio2/device.py @@ -1062,11 +1062,8 @@ class Connect(Core): wdautotoggle = property(_get_wdtoggle, _set_wdtoggle) -class Connect4(ModularBase): - """Klasse fuer den RevPi Connect 4. - - Stellt Funktionen fuer die LEDs und den Status zur Verfuegung. - """ +class ModularBaseConnect_4_5(ModularBase): + """Class for overlapping functions of Connect 4/5.""" __slots__ = ( "_slc_output", @@ -1085,8 +1082,6 @@ class Connect4(ModularBase): "a5red", "a5green", "a5blue", - "x2in", - "x2out", ) def __setattr__(self, key, value): @@ -1107,17 +1102,15 @@ class Connect4(ModularBase): "a5red", "a5green", "a5blue", - "x2in", - "x2out", ): raise AttributeError("direct assignment is not supported - use .value Attribute") - super(Connect4, self).__setattr__(key, value) + super().__setattr__(key, value) def __led_calculator(self, led_value: int) -> int: """ - Calculate the LED value of Connect 4. + Calculate the LED value of Connect 4/5. - Only the Connect 4 has swapped LED colors red and green. We have to recalculate that + Only the Connect 4/5 have swapped LED colors red and green. We have to recalculate that values to match our values for GREEN, RED and BLUE. """ led_calculated = led_value & 0b001 @@ -1127,7 +1120,7 @@ class Connect4(ModularBase): return led_calculated def _devconfigure(self) -> None: - """Connect4-Klasse vorbereiten.""" + """Connect 4/5-Klasse vorbereiten.""" super()._devconfigure() self._slc_statusbyte = slice(0, 1) @@ -1178,18 +1171,6 @@ class Connect4(ModularBase): exp_a5green = exp_a1red exp_a5blue = exp_a1red - if len(lst_output) == 8: - # prepared for future extension with wdtoggle - exp_x2out = lst_output[0].export - else: - exp_x2out = lst_output[0].export - - lst_status = lst_myios[self._slc_statusbyte.start] - if len(lst_status) == 8: - exp_x2in = lst_status[6].export - else: - exp_x2in = lst_status[0].export - # Echte IOs erzeugen self.a1red = IOBase( self, @@ -1301,7 +1282,176 @@ class Connect4(ModularBase): False, ) - # IO Objekte für WD und X2 in/out erzeugen + def _get_leda1(self) -> int: + """ + Gibt den Zustand der LED A1 vom Connect zurueck. + + :return: 0=aus, 1=gruen, 2=root, 4=blau, mixed RGB colors + """ + return self.__led_calculator(self._ba_devdata[self._slc_led.start] & 0b00000111) + + def _get_leda2(self) -> int: + """ + Gibt den Zustand der LED A2 vom Core zurueck. + + :return: 0=aus, 1=gruen, 2=root, 4=blau, mixed RGB colors + """ + return self.__led_calculator((self._ba_devdata[self._slc_led.start] & 0b00111000) >> 3) + + def _get_leda3(self) -> int: + """ + Gibt den Zustand der LED A3 vom Core zurueck. + + :return: 0=aus, 1=gruen, 2=root, 4=blau, mixed RGB colors + """ + word_led = self._ba_devdata[self._slc_led] + return self.__led_calculator((unpack("> 6) + + def _get_leda4(self) -> int: + """ + Gibt den Zustand der LED A4 vom Core zurueck. + + :return: 0=aus, 1=gruen, 2=root, 4=blau, mixed RGB colors + """ + return self.__led_calculator((self._ba_devdata[self._slc_led.start + 1] & 0b00001110) >> 1) + + def _get_leda5(self) -> int: + """ + Gibt den Zustand der LED A5 vom Core zurueck. + + :return: 0=aus, 1=gruen, 2=root, 4=blau, mixed RGB colors + """ + return self.__led_calculator((self._ba_devdata[self._slc_led.start + 1] & 0b01110000) >> 4) + + def _set_leda1(self, value: int) -> None: + """ + Setzt den Zustand der LED A1 vom Connect. + + :param: value 0=aus, 1=gruen, 2=rot, 4=blue, mixed RGB colors + """ + if 0 <= value <= 7: + self.a1red(bool(value & 2)) + self.a1green(bool(value & 1)) + self.a1blue(bool(value & 4)) + else: + raise ValueError("led status must be between 0 and 7") + + def _set_leda2(self, value: int) -> None: + """ + Setzt den Zustand der LED A2 vom Connect. + + :param: value 0=aus, 1=gruen, 2=rot, 4=blue, mixed RGB colors + """ + if 0 <= value <= 7: + self.a2red(bool(value & 2)) + self.a2green(bool(value & 1)) + self.a2blue(bool(value & 4)) + else: + raise ValueError("led status must be between 0 and 7") + + def _set_leda3(self, value: int) -> None: + """ + Setzt den Zustand der LED A3 vom Connect. + + :param: value 0=aus, 1=gruen, 2=rot, 4=blue, mixed RGB colors + """ + if 0 <= value <= 7: + self.a3red(bool(value & 2)) + self.a3green(bool(value & 1)) + self.a3blue(bool(value & 4)) + else: + raise ValueError("led status must be between 0 and 7") + + def _set_leda4(self, value: int) -> None: + """ + Setzt den Zustand der LED A4 vom Connect. + + :param: value 0=aus, 1=gruen, 2=rot, 4=blue, mixed RGB colors + """ + if 0 <= value <= 7: + self.a4red(bool(value & 2)) + self.a4green(bool(value & 1)) + self.a4blue(bool(value & 4)) + else: + raise ValueError("led status must be between 0 and 7") + + def _set_leda5(self, value: int) -> None: + """ + Setzt den Zustand der LED A5 vom Connect. + + :param: value 0=aus, 1=gruen, 2=rot, 4=blue, mixed RGB colors + """ + if 0 <= value <= 7: + self.a5red(bool(value & 2)) + self.a5green(bool(value & 1)) + self.a5blue(bool(value & 4)) + else: + raise ValueError("led status must be between 0 and 7") + + def wd_toggle(self): + """Toggle watchdog bit to prevent a timeout.""" + raise NotImplementedError( + "On the Connect 4/5, the hardware watchdog was removed from the process image by " + "KUNBUS. This function is no longer available on Connect 4/5 devices." + ) + + A1 = property(_get_leda1, _set_leda1) + A2 = property(_get_leda2, _set_leda2) + A3 = property(_get_leda3, _set_leda3) + A4 = property(_get_leda4, _set_leda4) + A5 = property(_get_leda5, _set_leda5) + + +class Connect5(ModularBaseConnect_4_5, GatewayMixin): + """Klasse fuer den RevPi Connect 5. + + Stellt Funktionen fuer die LEDs und den Status zur Verfuegung. + """ + + pass + + +class Connect4(ModularBaseConnect_4_5): + """Klasse fuer den RevPi Connect 4. + + Stellt Funktionen fuer die LEDs und den Status zur Verfuegung. + """ + + __slots__ = ( + "x2in", + "x2out", + ) + + def __setattr__(self, key, value): + """Verhindert Ueberschreibung der speziellen IOs.""" + if hasattr(self, key) and key in ( + "x2in", + "x2out", + ): + raise AttributeError("direct assignment is not supported - use .value Attribute") + super().__setattr__(key, value) + + def _devconfigure(self) -> None: + """Connect4-Klasse vorbereiten.""" + super()._devconfigure() + + # Exportflags prüfen (Byte oder Bit) + lst_myios = self._modio.io[self._slc_devoff] + lst_output = lst_myios[self._slc_output.start] + + if len(lst_output) == 8: + # prepared for future extension with wdtoggle + exp_x2out = lst_output[0].export + else: + exp_x2out = lst_output[0].export + + lst_status = lst_myios[self._slc_statusbyte.start] + if len(lst_status) == 8: + exp_x2in = lst_status[6].export + else: + exp_x2in = lst_status[0].export + + # IO Objekte für X2 in/out erzeugen self.x2in = IOBase( self, ["core.x2in", 0, 1, self._slc_statusbyte.start, exp_x2in, None, "Connect_X2_IN", "6"], @@ -1317,125 +1467,6 @@ class Connect4(ModularBase): False, ) - def _get_leda1(self) -> int: - """ - Gibt den Zustand der LED A1 vom Connect zurueck. - - :return: 0=aus, 1=gruen, 2=root, 4=blau - """ - return self.__led_calculator(self._ba_devdata[self._slc_led.start] & 0b00000111) - - def _get_leda2(self) -> int: - """ - Gibt den Zustand der LED A2 vom Core zurueck. - - :return: 0=aus, 1=gruen, 2=root, 4=blau - """ - return self.__led_calculator((self._ba_devdata[self._slc_led.start] & 0b00111000) >> 3) - - def _get_leda3(self) -> int: - """ - Gibt den Zustand der LED A3 vom Core zurueck. - - :return: 0=aus, 1=gruen, 2=root, 4=blau - """ - word_led = self._ba_devdata[self._slc_led] - return self.__led_calculator((unpack("> 6) - - def _get_leda4(self) -> int: - """ - Gibt den Zustand der LED A4 vom Core zurueck. - - :return: 0=aus, 1=gruen, 2=root, 4=blau - """ - return self.__led_calculator((self._ba_devdata[self._slc_led.start + 1] & 0b00001110) >> 1) - - def _get_leda5(self) -> int: - """ - Gibt den Zustand der LED A5 vom Core zurueck. - - :return: 0=aus, 1=gruen, 2=root, 4=blau - """ - return self.__led_calculator((self._ba_devdata[self._slc_led.start + 1] & 0b01110000) >> 4) - - def _set_leda1(self, value: int) -> None: - """ - Setzt den Zustand der LED A1 vom Connect. - - :param: value 0=aus, 1=gruen, 2=rot, 4=blue - """ - if 0 <= value <= 7: - self.a1red(bool(value & 2)) - self.a1green(bool(value & 1)) - self.a1blue(bool(value & 4)) - else: - raise ValueError("led status must be between 0 and 7") - - def _set_leda2(self, value: int) -> None: - """ - Setzt den Zustand der LED A2 vom Connect. - - :param: value 0=aus, 1=gruen, 2=rot, 4=blue - """ - if 0 <= value <= 7: - self.a2red(bool(value & 2)) - self.a2green(bool(value & 1)) - self.a2blue(bool(value & 4)) - else: - raise ValueError("led status must be between 0 and 7") - - def _set_leda3(self, value: int) -> None: - """ - Setzt den Zustand der LED A3 vom Connect. - - :param: value 0=aus, 1=gruen, 2=rot, 4=blue - """ - if 0 <= value <= 7: - self.a3red(bool(value & 2)) - self.a3green(bool(value & 1)) - self.a3blue(bool(value & 4)) - else: - raise ValueError("led status must be between 0 and 7") - - def _set_leda4(self, value: int) -> None: - """ - Setzt den Zustand der LED A4 vom Connect. - - :param: value 0=aus, 1=gruen, 2=rot, 4=blue - """ - if 0 <= value <= 7: - self.a4red(bool(value & 2)) - self.a4green(bool(value & 1)) - self.a4blue(bool(value & 4)) - else: - raise ValueError("led status must be between 0 and 7") - - def _set_leda5(self, value: int) -> None: - """ - Setzt den Zustand der LED A5 vom Connect. - - :param: value 0=aus, 1=gruen, 2=rot, 4=blue - """ - if 0 <= value <= 7: - self.a5red(bool(value & 2)) - self.a5green(bool(value & 1)) - self.a5blue(bool(value & 4)) - else: - raise ValueError("led status must be between 0 and 7") - - def wd_toggle(self): - """Toggle watchdog bit to prevent a timeout.""" - raise NotImplementedError( - "On the Connect 4, the hardware watchdog was removed from the process image by " - "KUNBUS. This function is no longer available on Connect 4 devices." - ) - - A1 = property(_get_leda1, _set_leda1) - A2 = property(_get_leda2, _set_leda2) - A3 = property(_get_leda3, _set_leda3) - A4 = property(_get_leda4, _set_leda4) - A5 = property(_get_leda5, _set_leda5) - class Compact(Base): """ diff --git a/src/revpimodio2/modio.py b/src/revpimodio2/modio.py index d7c73b1..b6828de 100644 --- a/src/revpimodio2/modio.py +++ b/src/revpimodio2/modio.py @@ -368,6 +368,10 @@ class RevPiModIO(object): # RevPi Connect 4 dev_new = devicemodule.Connect4(self, device, simulator=self._simulator) self.core = dev_new + elif pt == ProductType.REVPI_CONNECT_5: + # RevPi Connect 5 + dev_new = devicemodule.Connect5(self, device, simulator=self._simulator) + self.core = dev_new elif pt == ProductType.REVPI_COMPACT: # RevPi Compact dev_new = devicemodule.Compact(self, device, simulator=self._simulator) diff --git a/src/revpimodio2/pictory.py b/src/revpimodio2/pictory.py index 01dcdbc..fd7c55d 100644 --- a/src/revpimodio2/pictory.py +++ b/src/revpimodio2/pictory.py @@ -50,6 +50,7 @@ class ProductType: REVPI_CONNECT = 105 REVPI_FLAT = 135 REVPI_CONNECT_4 = 136 + REVPI_CONNECT_5 = 138 VIRTUAL_CLOUD = 24584 VIRTUAL_MODBUS_TCP_SERVER = 24577 From 24744a5a9ca3394ff694aecba39be3b8c06b0ee5 Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Fri, 8 Nov 2024 09:31:04 +0100 Subject: [PATCH 21/26] test: Add tests for RevPi Connect 5 --- tests/revpi5/__init__.py | 5 +++ tests/revpi5/config_connect5.rsc | 1 + tests/revpi5/test_connect5.py | 69 ++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 tests/revpi5/__init__.py create mode 100644 tests/revpi5/config_connect5.rsc create mode 100644 tests/revpi5/test_connect5.py diff --git a/tests/revpi5/__init__.py b/tests/revpi5/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/revpi5/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/revpi5/config_connect5.rsc b/tests/revpi5/config_connect5.rsc new file mode 100644 index 0000000..5c02f6d --- /dev/null +++ b/tests/revpi5/config_connect5.rsc @@ -0,0 +1 @@ +{"App":{"name": "PiCtory", "version": "2.10.0","saveTS": "20241108090523","language": "en","layout": {"north":{"size":70,"initClosed":false,"initHidden":false},"south":{"size":540,"initClosed":false,"initHidden":false,"children":{"layout1":{"east":{"size":500,"initClosed":false,"initHidden":false}}}},"east":{"size":70,"initClosed":true,"initHidden":false,"children":{}},"west":{"size":259,"initClosed":false,"initHidden":false,"children":{"layout1":{}}}}},"Summary":{"inpTotal": 6,"outTotal": 7},"Devices":[{"GUID": "df5a907c-3d82-1d32-4e5f-4c33fb41a559","id": "device_RevPiConnect5_20240315_1_0_001","type": "BASE","productType": "138","position": "0","name": "connect5","bmk": "RevPi Connect 5","inpVariant": 0,"outVariant": 0,"comment": "This is a RevPi Connect 5 Device","offset": 0,"inp": {"0": ["RevPiStatus","0","8","0",true,"0000", "",""],"1": ["RevPiIOCycle","0","8","1",true,"0001", "",""],"2": ["RS485ErrorCnt","0","16","2",false,"0002", "",""],"3": ["Core_Temperature","0","8","4",false,"0003", "",""],"4": ["Core_Frequency","0","8","5",false,"0004", "",""]},"out": {"0": ["RevPiReservedByte","","8","6",false,"0005", "",""],"1": ["RS485ErrorLimit1","10","16","7",false,"0006", "",""],"2": ["RS485ErrorLimit2","1000","16","9",false,"0007", "",""],"3": ["RevPiLED","0","16","11",true,"0008", "",""]},"mem": {},"extend": {}}],"Connections":[]} diff --git a/tests/revpi5/test_connect5.py b/tests/revpi5/test_connect5.py new file mode 100644 index 0000000..f8d447a --- /dev/null +++ b/tests/revpi5/test_connect5.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +"""Tests for RevPi 5 devices.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" + +from os.path import dirname + +import revpimodio2 +from .. import TestRevPiModIO + + +class TestRevPi5(TestRevPiModIO): + + data_dir = dirname(__file__) + + def test_connect5(self): + rpi = self.modio(configrsc="config_connect5.rsc") + rpi.setdefaultvalues() + + self.assertIsInstance(rpi.core, revpimodio2.device.Connect5) + + # Test all LED (A1 - A5) with all colors + lst_led_test = [ + (rpi.core._get_leda1, rpi.core._set_leda1), + (rpi.core._get_leda2, rpi.core._set_leda2), + (rpi.core._get_leda3, rpi.core._set_leda3), + (rpi.core._get_leda4, rpi.core._set_leda4), + (rpi.core._get_leda5, rpi.core._set_leda5), + ] + for i in range(len(lst_led_test)): + get_led = lst_led_test[i][0] + set_led = lst_led_test[i][1] + for k in ( + (revpimodio2.GREEN, 2), + (revpimodio2.RED, 1), + (revpimodio2.BLUE, 4), + (revpimodio2.ORANGE, 3), + (revpimodio2.MAGENTA, 5), # Switched GR bit + (revpimodio2.WHITE, 7), + (revpimodio2.CYAN, 6), # Switched GR bit + (revpimodio2.OFF, 0), + ): + set_led(k[0]) + self.assertEqual( + rpi.io.RevPiLED.get_value(), + (k[1] << (i * 3)).to_bytes(2, "little"), + ) + self.assertEqual(get_led(), k[0]) + with self.assertRaises(ValueError): + set_led(8) + + self.assertIsInstance(rpi.core.temperature, int) + self.assertIsInstance(rpi.core.frequency, int) + + with self.assertRaises(NotImplementedError): + rpi.core.wd_toggle() + + with self.assertRaisesRegex(AttributeError, r"direct assignment is not supported"): + rpi.core.a5green = True + + # Connect 5 has no IOs build in + with self.assertRaises(AttributeError): + output = rpi.core.x2out.value + with self.assertRaises(AttributeError): + rpi.core.x2in.value = True + + rpi.exit() + del rpi From 41720ee04231c2c30103fcc5389f05731c576541 Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Tue, 12 Nov 2024 09:48:44 +0100 Subject: [PATCH 22/26] chore: Increase to RC1 of upcoming Release 2.8.0 --- src/revpimodio2/__about__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/revpimodio2/__about__.py b/src/revpimodio2/__about__.py index b75248f..f3ceeef 100644 --- a/src/revpimodio2/__about__.py +++ b/src/revpimodio2/__about__.py @@ -3,4 +3,4 @@ __author__ = "Sven Sager " __copyright__ = "Copyright (C) 2023 Sven Sager" __license__ = "LGPLv2" -__version__ = "2.7.2" +__version__ = "2.8.0rc1" From 19bbdb03e85262d40fbc1da81432c1228467d06e Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Tue, 12 Nov 2024 10:18:52 +0100 Subject: [PATCH 23/26] test: Fix test for default location of config.rsc The tests for the default path of the config.rsc are now performed optionally. If write permission exists for the standard paths, the tests are performed with the config.rsc. --- tests/common/test_init_modio.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/common/test_init_modio.py b/tests/common/test_init_modio.py index aac5725..0dffa5d 100644 --- a/tests/common/test_init_modio.py +++ b/tests/common/test_init_modio.py @@ -4,9 +4,10 @@ __author__ = "Sven Sager" __copyright__ = "Copyright (C) 2024 Sven Sager" __license__ = "GPLv2" -from os import remove +from os import remove, makedirs from os.path import join, dirname from shutil import copyfile +from warnings import warn import revpimodio2 from .. import TestRevPiModIO @@ -30,11 +31,17 @@ class TestInitModio(TestRevPiModIO): "configrsc": join(self.data_dir, "config.rsc"), } - # Datei an richtigen Ort kopieren und löschen - copyfile(defaultkwargs["configrsc"], "/opt/KUNBUS/config.rsc") - rpi = revpimodio2.RevPiModIO(procimg=self.fh_procimg.name) - del rpi - remove("/opt/KUNBUS/config.rsc") + # Check default path of config.rsc + for config_file in ("/opt/KUNBUS/config.rsc", "/etc/revpi/config.rsc"): + config_dir = dirname(config_file) + try: + makedirs(config_dir, exist_ok=True) + copyfile(defaultkwargs["configrsc"], config_file) + except PermissionError: + warn(f"Skip test for default location of '{config_file}' - permission denied") + else: + revpimodio2.RevPiModIO(procimg=self.fh_procimg.name) + remove(config_file) # RevPiModIO rpi = self.modio() From a9ec71e9702e0e950ec8d2f2f8382482543ec968 Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Tue, 12 Nov 2024 10:38:16 +0100 Subject: [PATCH 24/26] test: Update runtime warning for exceeded cycle time in mainloop --- tests/mainloop/test_mainloop.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/mainloop/test_mainloop.py b/tests/mainloop/test_mainloop.py index 16aaa22..47149b1 100644 --- a/tests/mainloop/test_mainloop.py +++ b/tests/mainloop/test_mainloop.py @@ -141,14 +141,15 @@ class TestMainloop(TestRevPiModIO): rpi.io.test1.unreg_event() rpi.io.test1.reg_event(xxx_timeout) + rpi.exit() - sleep(0.3) - - # Exceed cylcle time in main loop + # Exceed cycle time in mainloop with self.assertWarnsRegex(RuntimeWarning, r"io refresh time of 0 ms exceeded!"): + rpi = self.modio(debug=False, autorefresh=True) + rpi.mainloop(blocking=False) rpi._imgwriter._refresh = 0.0001 sleep(0.1) - rpi.exit() + rpi.exit() del rpi From f50a7744cdad93cd98e38ff44abb3f6002c6eacd Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Tue, 12 Nov 2024 10:19:56 +0100 Subject: [PATCH 25/26] chore: Increase to RC2 of upcoming Release 2.8.0 --- src/revpimodio2/__about__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/revpimodio2/__about__.py b/src/revpimodio2/__about__.py index f3ceeef..6456434 100644 --- a/src/revpimodio2/__about__.py +++ b/src/revpimodio2/__about__.py @@ -3,4 +3,4 @@ __author__ = "Sven Sager " __copyright__ = "Copyright (C) 2023 Sven Sager" __license__ = "LGPLv2" -__version__ = "2.8.0rc1" +__version__ = "2.8.0rc2" From 21d8c523ae2da012dc4dfa318779e181814a771d Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Wed, 13 Nov 2024 14:11:55 +0100 Subject: [PATCH 26/26] chore: Release 2.8.0 --- src/revpimodio2/__about__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/revpimodio2/__about__.py b/src/revpimodio2/__about__.py index 6456434..dc6a336 100644 --- a/src/revpimodio2/__about__.py +++ b/src/revpimodio2/__about__.py @@ -3,4 +3,4 @@ __author__ = "Sven Sager " __copyright__ = "Copyright (C) 2023 Sven Sager" __license__ = "LGPLv2" -__version__ = "2.8.0rc2" +__version__ = "2.8.0"