<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to instantiate variable comments in Twincat 3?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a5a65d0d01/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a5a65d0d01/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/a5a65d0d01/</id><updated>2020-02-27T13:49:09.588000Z</updated><subtitle>Recent posts to instantiate variable comments in Twincat 3?</subtitle><entry><title>instantiate variable comments in Twincat 3?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a5a65d0d01/?limit=25#61ae" rel="alternate"/><published>2020-02-27T13:49:09.588000Z</published><updated>2020-02-27T13:49:09.588000Z</updated><author><name>dFx</name><uri>https://forge.codesys.com/u/dfx/</uri></author><id>https://forge.codesys.com38feef0cbcc0acdfdfb1fa393f8a67b47ac74415</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This is the point of hierarchical comments.&lt;br/&gt;
If you correctly declare your variables inside namespaces / GVLs / FBs, you can trace the functionnal description of your tag, using each level description.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>instantiate variable comments in Twincat 3?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a5a65d0d01/?limit=25#8805" rel="alternate"/><published>2020-02-27T13:49:09.478000Z</published><updated>2020-02-27T13:49:09.478000Z</updated><author><name>Optimizer3000</name><uri>https://forge.codesys.com/u/optimizer3000/</uri></author><id>https://forge.codesys.comc0579a989698977fdf1a18a72857d5d73762dcea</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;dFx hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
just declare your instance with a comment&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;VAR&lt;/span&gt;
&lt;span class="nt"&gt;Temperature&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;fbFunctionBlock&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;This&lt;/span&gt; &lt;span class="nt"&gt;is&lt;/span&gt; &lt;span class="nt"&gt;pressure&lt;/span&gt;
&lt;span class="nt"&gt;Pressure&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;fbFunctionBlock&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;This&lt;/span&gt; &lt;span class="nt"&gt;is&lt;/span&gt; &lt;span class="nt"&gt;pressure&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Thanks for your answer!&lt;/p&gt;
&lt;p&gt;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. &lt;/p&gt;
&lt;p&gt;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...&lt;/p&gt;
&lt;p&gt;Best Regards Optimizer3000 &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>instantiate variable comments in Twincat 3?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a5a65d0d01/?limit=25#a125" rel="alternate"/><published>2020-02-27T13:49:09.374000Z</published><updated>2020-02-27T13:49:09.374000Z</updated><author><name>dFx</name><uri>https://forge.codesys.com/u/dfx/</uri></author><id>https://forge.codesys.com21ddf39aa738b91deb66e8aac352c8c7e9bd17db</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;just declare your instance with a comment&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;VAR&lt;/span&gt;
&lt;span class="nt"&gt;Temperature&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;fbFunctionBlock&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;This&lt;/span&gt; &lt;span class="nt"&gt;is&lt;/span&gt; &lt;span class="nt"&gt;pressure&lt;/span&gt;
&lt;span class="nt"&gt;Pressure&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;fbFunctionBlock&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;This&lt;/span&gt; &lt;span class="nt"&gt;is&lt;/span&gt; &lt;span class="nt"&gt;pressure&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>instantiate variable comments in Twincat 3?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a5a65d0d01/?limit=25#2695" rel="alternate"/><published>2020-02-27T13:49:09.282000Z</published><updated>2020-02-27T13:49:09.282000Z</updated><author><name>Optimizer3000</name><uri>https://forge.codesys.com/u/optimizer3000/</uri></author><id>https://forge.codesys.com7898baf085a97f2fd28ae5782c1cc046a826da16</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;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).&lt;/p&gt;
&lt;p&gt;I would like to have individual description of the two instances output in an ads (preferred) or opc ua list.&lt;/p&gt;
&lt;p&gt;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?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Zitat:&lt;/strong&gt;&lt;br/&gt;
Data Access (DA)&lt;br/&gt;
{attribute 'OPC.UA.DA.Description' := 'x'}&lt;br/&gt;
Name: OPC.UA.DA.Description&lt;br/&gt;
Value: see right column&lt;br/&gt;
Sets a text for the OPC UA attribute "Description".&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a class="" href="https://infosys.beckhoff.com/english.php?content=../content/1033/tcopcuaserver/81064793371379595-1.html&amp;amp;id=" rel="nofollow"&gt;https://infosys.beckhoff.com/english.ph ... 1.html&amp;amp;id=&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Any of you who have an idea?&lt;/p&gt;
&lt;p&gt;Best Regards Optimizer3000 &lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Anteckning 2019" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4994"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>