diff --git a/pyLSV2/scripts/demo.py b/pyLSV2/scripts/demo.py index 17b7f98..3a4df18 100644 --- a/pyLSV2/scripts/demo.py +++ b/pyLSV2/scripts/demo.py @@ -100,7 +100,11 @@ def comprehensive_demo(): print("## double word: {}".format(con.read_plc_memory(0, MemoryType.DWORD, 5))) print("## string: {}".format(con.read_plc_memory(0, MemoryType.STRING, 5))) print("## input: {}".format(con.read_plc_memory(0, MemoryType.INPUT, 5))) - print("## output: {}".format(con.read_plc_memory(0, MemoryType.OUTPUT_WORD, 5))) + print("## output: {}".format(con.read_plc_memory(0, MemoryType.OUTPUT, 5))) + print("## input word: {}".format(con.read_plc_memory(0, MemoryType.INPUT_WORD, 5))) + print("## output word: {}".format(con.read_plc_memory(0, MemoryType.OUTPUT_WORD, 5))) + print("## input dword: {}".format(con.read_plc_memory(0, MemoryType.INPUT_DWORD, 5))) + print("## output dword: {}".format(con.read_plc_memory(0, MemoryType.OUTPUT_DWORD, 5))) print("# data values via data path, only available on some iTNC530") if con.versions.is_itnc(): diff --git a/tests/test_plc_read.py b/tests/test_plc_read.py index 4c22ef5..5eaa241 100644 --- a/tests/test_plc_read.py +++ b/tests/test_plc_read.py @@ -16,8 +16,11 @@ def test_plc_read(address: str, timeout: float): assert lsv2.read_plc_memory(0, pyLSV2.MemoryType.WORD, 1) is not False assert lsv2.read_plc_memory(0, pyLSV2.MemoryType.DWORD, 1) is not False assert lsv2.read_plc_memory(0, pyLSV2.MemoryType.STRING, 1) is not False - assert lsv2.read_plc_memory(0, pyLSV2.MemoryType.INPUT, 1) is not False assert lsv2.read_plc_memory(0, pyLSV2.MemoryType.OUTPUT_WORD, 1) is not False + assert lsv2.read_plc_memory(0, pyLSV2.MemoryType.OUTPUT_DWORD, 1) is not False + assert lsv2.read_plc_memory(0, pyLSV2.MemoryType.INPUT, 1) is not False + assert lsv2.read_plc_memory(0, pyLSV2.MemoryType.INPUT_WORD, 1) is not False + assert lsv2.read_plc_memory(0, pyLSV2.MemoryType.INPUT_DWORD, 1) is not False lsv2.logout(pyLSV2.Login.PLCDEBUG)