Is there a method to get the DataType of a tag? #226
-
Is there an easy way to retrieve the data type of a PLC tag, or is it necessary to iterate over the tag list to obtain the data type? |
Beta Was this translation helpful? Give feedback.
Answered by
dmroeder
May 16, 2023
Replies: 1 comment 1 reply
-
If it is a UDT, then you have to get the tag list. If it is one of the base data types: import pylogix
with pylogix.PLC("192.168.1.10") as comm:
ret = comm.Read("BaseDINT")
print(comm.KnownTags["BaseDINT"][0]) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Destination2Unknown
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If it is a UDT, then you have to get the tag list.
If it is one of the base data types: