Skip to content

Commit

Permalink
add new data types for input and output double words
Browse files Browse the repository at this point in the history
  • Loading branch information
drunsinn committed Jun 22, 2024
1 parent a5dc285 commit 32e5e78
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pyLSV2/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,18 @@ def decode_plc_memory_address(address: str):
elif s_type == "W":
val_num = int(val_num / 2)
val_type = MemoryType.INPUT_WORD
elif s_type == "D":
val_num = int(val_num / 4)
val_type = MemoryType.INPUT_DWORD
elif m_type == "O":
if s_type is None:
val_type = MemoryType.OUTPUT
elif s_type == "W":
val_num = int(val_num / 2)
val_type = MemoryType.OUTPUT_WORD
elif s_type == "D":
val_num = int(val_num / 4)
val_type = MemoryType.OUTPUT_DWORD
elif m_type == "S" and s_type is None:
val_type = MemoryType.STRING

Expand Down

0 comments on commit 32e5e78

Please sign in to comment.