I'm trying to figure out if there's any way to instantiate variable comments in Twincat 3. As seen in my example below i have created two variables of the same type. They don't have the same purpose though (one is for showing temperature and the other one is for pressure).
I would like to have individual description of the two instances output in an ads (preferred) or opc ua list.
I have seen the opc ua attribute below but i don't think it's possible to change a description of a variable inside a functionblock?
Zitat:
Data Access (DA)
{attribute 'OPC.UA.DA.Description' := 'x'}
Name: OPC.UA.DA.Description
Value: see right column
Sets a text for the OPC UA attribute "Description".
I want to have an individual comment of "rOutput" of each instance, not a comment of the instances of the functionblocks it self. I'm going to put information like description, unit, format and so on and use it to generate a CSV-taglist for a scada-system.
One "solution" that i'm using today is to make functionblock for pressure and one for temperature, but since the logic is identical it feels stubbornly to create multiple functionblocks just to hold a comment...
Best Regards Optimizer3000
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is the point of hierarchical comments.
If you correctly declare your variables inside namespaces / GVLs / FBs, you can trace the functionnal description of your tag, using each level description.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
I'm trying to figure out if there's any way to instantiate variable comments in Twincat 3. As seen in my example below i have created two variables of the same type. They don't have the same purpose though (one is for showing temperature and the other one is for pressure).
I would like to have individual description of the two instances output in an ads (preferred) or opc ua list.
I have seen the opc ua attribute below but i don't think it's possible to change a description of a variable inside a functionblock?
https://infosys.beckhoff.com/english.ph ... 1.html&id=
Any of you who have an idea?
Best Regards Optimizer3000
just declare your instance with a comment
Hi!
Thanks for your answer!
I want to have an individual comment of "rOutput" of each instance, not a comment of the instances of the functionblocks it self. I'm going to put information like description, unit, format and so on and use it to generate a CSV-taglist for a scada-system.
One "solution" that i'm using today is to make functionblock for pressure and one for temperature, but since the logic is identical it feels stubbornly to create multiple functionblocks just to hold a comment...
Best Regards Optimizer3000
This is the point of hierarchical comments.
If you correctly declare your variables inside namespaces / GVLs / FBs, you can trace the functionnal description of your tag, using each level description.