<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Parameter Organizer</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/009692c4e2/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/009692c4e2/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/009692c4e2/</id><updated>2020-02-27T23:15:38.435000Z</updated><subtitle>Recent posts to Parameter Organizer</subtitle><entry><title>Parameter Organizer</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/009692c4e2/?limit=25#961b" rel="alternate"/><published>2020-02-27T23:15:38.435000Z</published><updated>2020-02-27T23:15:38.435000Z</updated><author><name>spfeif</name><uri>https://forge.codesys.com/u/spfeif/</uri></author><id>https://forge.codesys.com2b8beb866fc95b572ba12e46e7633e2a6a8e24d6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Use structures. Then you can create functions to set/get the data. &lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;TYPE Device :&lt;/p&gt;
&lt;p&gt;STRUCT&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;Uptime&lt;/span&gt;  :&lt;span class="nv"&gt;TIME&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;

&lt;span class="nv"&gt;TimeNow&lt;/span&gt; :&lt;span class="nv"&gt;TIME&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;

&lt;span class="nv"&gt;DateNow&lt;/span&gt; :&lt;span class="nv"&gt;DATE&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_STRUCT&lt;/p&gt;
&lt;p&gt;END_TYPE&lt;/p&gt;
&lt;p&gt;Now in your program create a variable:&lt;/p&gt;
&lt;p&gt;Pump1 :  Device ;&lt;/p&gt;
&lt;p&gt;Now access the data in the structure by using the dot operator:&lt;/p&gt;
&lt;p&gt;Pump1.Uptime;&lt;/p&gt;
&lt;p&gt;If you want to abstract the details like on a fault of the pump and you want to set some information then create a function Set_Pump_Fault_Time.&lt;/p&gt;
&lt;p&gt;In the Set_Pump_Fault_Time  function pass the structure. Then internally set the variables of the structure so the user doesn't need to know what it is doing. &lt;/p&gt;
&lt;p&gt;If you need more details etc... or don't understand you I am referring to just ask and I can create a simple app for you.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Parameter Organizer</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/009692c4e2/?limit=25#841f" rel="alternate"/><published>2020-02-27T23:15:36.783000Z</published><updated>2020-02-27T23:15:36.783000Z</updated><author><name>deluxe79</name><uri>https://forge.codesys.com/u/deluxe79/</uri></author><id>https://forge.codesys.com653c7aaffcd8024b282df72bae65c7414fbd3841</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Rewritten my question...&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PS: Using Wago 750-841 with no target parameter manager support.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I have a great deal of FB instances whitch of course include variables. How can I organize those variables (parameters) like in this example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;.
&lt;span class="o"&gt;|--&lt;/span&gt; &lt;span class="nv"&gt;Device&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt;    &lt;span class="o"&gt;|--&lt;/span&gt; &lt;span class="k"&gt;Uptime&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt;    &lt;span class="o"&gt;|--&lt;/span&gt; &lt;span class="nv"&gt;Time&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt;    &lt;span class="o"&gt;|--&lt;/span&gt; &lt;span class="nv"&gt;Date&lt;/span&gt;
&lt;span class="o"&gt;|--&lt;/span&gt; &lt;span class="nv"&gt;Regulator1&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt;    &lt;span class="o"&gt;|--&lt;/span&gt; &lt;span class="nv"&gt;Enable&lt;/span&gt; 
&lt;span class="o"&gt;|&lt;/span&gt;    &lt;span class="o"&gt;|--&lt;/span&gt; &lt;span class="nv"&gt;Setpoint&lt;/span&gt;
&lt;span class="o"&gt;|&lt;/span&gt;    &lt;span class="o"&gt;|--&lt;/span&gt; &lt;span class="nv"&gt;Offset&lt;/span&gt;
&lt;span class="nv"&gt;etc&lt;/span&gt;...
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;So if I call a function like this: GetParamByName('Device', 'Uptime'); it outputs the value of that parameter.&lt;/p&gt;
&lt;p&gt;I think accessing parameters in a indexed, structured way must be elementary, but I'm kind of stuck in the process of how to do this 'the right way'  &lt;/p&gt;
&lt;p&gt;Shortly speaking, I want to access my variables through ethernet, so if I for example send a packet to the plc, give me a list of all parameters, it outputs all parameter groups/names.&lt;/p&gt;
&lt;p&gt;Any suggestions/ideas? Is there a complete library for this available?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Frank&lt;span&gt;[quote]&lt;/span&gt;&lt;span&gt;[/quote]&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>