How to get variable type? #437
Replies: 3 comments 1 reply
-
|
Is it even possible? Or PLC returns |
Beta Was this translation helpful? Give feedback.
-
|
Hello. From my knowledge.
PLC only keep the value for the variable, it doesn't keep the name and the data type of the variable, it's TIA portal who does that. So if you don't know the structure of the data you get from PLC, then you can not decode them (you can guess from which byte to which is an integer...). But with OPCUA you can load the data structure such as user defined data type etc. |
Beta Was this translation helpful? Give feedback.
-
|
Closing as answered. PLC memory does not store variable types or names -- only raw byte values. Type information exists only in the TIA Portal project. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to get declared variable type?
Let's say I've declared
PLC Tag%MB0namedSomeStringas typeChar.Is there a way to check how this memory was marked as?
I want to properly display value after read.
And the same question related to DBs.
Thanks for help in advance.
Beta Was this translation helpful? Give feedback.
All reactions