<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to override init value for VAR_GLOBAL CONSTANT in library from project.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8064f2eb9/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8064f2eb9/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/f8064f2eb9/</id><updated>2020-04-13T20:20:37.166000Z</updated><subtitle>Recent posts to override init value for VAR_GLOBAL CONSTANT in library from project.</subtitle><entry><title>override init value for VAR_GLOBAL CONSTANT in library from project.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8064f2eb9/?limit=25#54df" rel="alternate"/><published>2020-04-13T20:20:37.166000Z</published><updated>2020-04-13T20:20:37.166000Z</updated><author><name>JAPIB</name><uri>https://forge.codesys.com/u/japib/</uri></author><id>https://forge.codesys.com1648d8819d34d64c8fc0c9766162aac6efd18081</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello, I'm trying to do the same thing and I don't understand how to do.&lt;br/&gt;
Into CODESYS HELP they spoke about ParameterList here : &lt;br/&gt;
&lt;a href="https://help.codesys.com/webapp/_cds_cmd_save_project_as;product=codesys;version=3.5.15.0" rel="nofollow"&gt;https://help.codesys.com/webapp/_cds_cmd_save_project_as;product=codesys;version=3.5.15.0&lt;/a&gt; , in the chapter "Before saving a project as a library:"&lt;br/&gt;
"A parameter list is a special type of global variable list." yes, but how to get it ?&lt;br/&gt;
BR&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>override init value for VAR_GLOBAL CONSTANT in library from project.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8064f2eb9/?limit=25#a113" rel="alternate"/><published>2020-04-12T20:52:17.948000Z</published><updated>2020-04-12T20:52:17.948000Z</updated><author><name>hrimicha</name><uri>https://forge.codesys.com/u/hrimicha/</uri></author><id>https://forge.codesys.com4d21f6635567cd31638d96e52bd1908931186be7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
It is maybe a late answer but I faced the same issue and I found the location of the library parameter list as indicated in the photo &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>override init value for VAR_GLOBAL CONSTANT in library from project.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8064f2eb9/?limit=25#9552" rel="alternate"/><published>2020-02-27T14:07:02.218000Z</published><updated>2020-02-27T14:07:02.218000Z</updated><author><name>ssl</name><uri>https://forge.codesys.com/u/ssl/</uri></author><id>https://forge.codesys.com0a0c12b283af872f7e4127923b07cea913cd10d3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;scott_cunningham hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
For libraries, add a library "Parameter list" object (screenshot below).  This will allow you to define a constant that can be changed when the library is used in a project.  The online help should give more information - topic parameter list and then sub-subject GVL.&lt;br/&gt;
lib-props.png&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi guys, &lt;br/&gt;
I'm doing a library where i need to be able to change the library constants from the project where the library is used. I simply can not find anywhere where it is possible to add this "Parameter list". Also I find no reference in the help to such a parameter list? Any surgestions on how to achieve changing library constants from project (In 2.3 you simply declared a variable with the same name in the project)&lt;/p&gt;
&lt;p&gt;It seems that "Parameter list" is removed in 3.5.15.x as well as support for libraries pre. version 3 (2.3 libraries)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>override init value for VAR_GLOBAL CONSTANT in library from project.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8064f2eb9/?limit=25#ef20" rel="alternate"/><published>2020-02-27T14:07:01.898000Z</published><updated>2020-02-27T14:07:01.898000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com1c88194b1afe6ae9e263549aafbc66cd6807e3a1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; KevinR&lt;/p&gt;
&lt;p&gt;Scott - thank you so much for your support!&lt;/p&gt;
&lt;p&gt;This was exactly the right thing what I was looking for. &lt;/p&gt;
&lt;p&gt;Have a nice day! &lt;/p&gt;
&lt;p&gt;cheers&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>override init value for VAR_GLOBAL CONSTANT in library from project.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8064f2eb9/?limit=25#0977" rel="alternate"/><published>2020-02-27T14:07:00.895000Z</published><updated>2020-02-27T14:07:00.895000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comf26a53d43d108dfe42228a89d286fe4ee27b7564</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; scott_cunningham&lt;/p&gt;
&lt;p&gt;Everything was good until your last step. Don't define the variable again in your main project. Instead, from your project, open the library object (like you are going to add a library to your project) and then highlight your library and look at the available objects - you will see you "parameters" and you can insert the value you want.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>override init value for VAR_GLOBAL CONSTANT in library from project.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8064f2eb9/?limit=25#fab6" rel="alternate"/><published>2020-02-27T14:07:00.398000Z</published><updated>2020-02-27T14:07:00.398000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comd0141b6c6dd04c0fe87141ab5211fec6c7f90cda</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; KevinR&lt;/p&gt;
&lt;p&gt;Hello scott,&lt;/p&gt;
&lt;p&gt;thank you for the fast reply. &lt;/p&gt;
&lt;p&gt;I added an Parameter list "Param_XY" in the library:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;VAR_GLOBAL&lt;/span&gt; &lt;span class="n"&gt;CONSTANT&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt; &lt;span class="n"&gt;Param&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;gc_UpBound&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;gc_Length&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;Timeout&lt;/span&gt; &lt;span class="n"&gt;Param&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;gc_TimeOut&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;TIME&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="o"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="n"&gt;S&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;END_VAR&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;FB in Library with Array &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;
&lt;span class="n"&gt;VAR_INPUT&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;arrTest&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;ARRAY&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="n"&gt;gc_UpBound&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;OF&lt;/span&gt; &lt;span class="n"&gt;STRING&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gc_Length&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;END_VAR&lt;/span&gt; 
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;PRG in Project:&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="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;arrXXX&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;ARRAY&lt;/span&gt; &lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="bp"&gt;..&lt;/span&gt;&lt;span class="nx nx-Member"&gt;gc_UpBound&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt; &lt;span class="nt"&gt;OF&lt;/span&gt; &lt;span class="nt"&gt;STRING&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;gc_Length&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;In the PRG i fill the arrXXX (within the range) and then i call the FB in the library and use the declared arrXXX as Input. This works all fine. &lt;/p&gt;
&lt;p&gt;But I can't change the CONSTANT Vars in the Paramter List "Param_XY". &lt;/p&gt;
&lt;p&gt;I tried to add an GVL in the Project:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;VAR_GLOBAL&lt;/span&gt; &lt;span class="n"&gt;CONSTANT&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt; &lt;span class="n"&gt;Param&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; {&lt;/span&gt;&lt;span class="n"&gt;attribute&lt;/span&gt; &lt;span class="s1"&gt;'const_replaced'&lt;/span&gt;&lt;span class="err"&gt;}&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;gc_UpBound&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; {&lt;/span&gt;&lt;span class="n"&gt;attribute&lt;/span&gt; &lt;span class="s1"&gt;'const_replaced'&lt;/span&gt;&lt;span class="err"&gt;}&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;gc_Length&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt;  &lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;Timeout&lt;/span&gt; &lt;span class="n"&gt;Param&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; {&lt;/span&gt;&lt;span class="n"&gt;attribute&lt;/span&gt; &lt;span class="s1"&gt;'const_replaced'&lt;/span&gt;&lt;span class="err"&gt;}&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;gc_TimeOut&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;TIME&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="o"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="n"&gt;S&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;END_VAR&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;but it doesnt override the paramters in the library and it allways use the parameters from the lib. &lt;/p&gt;
&lt;p&gt;I can't find anything in the help file about that topic expect the attribute 'const_replaced'.&lt;/p&gt;
&lt;p&gt;What I'm doing wrong?&lt;/p&gt;
&lt;p&gt;Thank you in advance.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>override init value for VAR_GLOBAL CONSTANT in library from project.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8064f2eb9/?limit=25#f735" rel="alternate"/><published>2020-02-27T14:07:00.056000Z</published><updated>2020-02-27T14:07:00.056000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com7dbc11ea5c61ee2806417cbfd9e02fdf6368a54d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; scott_cunningham&lt;/p&gt;
&lt;p&gt;For libraries, add a library "Parameter list" object (screenshot below).  This will allow you to define a constant that can be changed when the library is used in a project.  The online help should give more information - topic parameter list and then sub-subject GVL.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: lib" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2043"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>override init value for VAR_GLOBAL CONSTANT in library from project.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8064f2eb9/?limit=25#524f" rel="alternate"/><published>2020-02-27T14:06:59.752000Z</published><updated>2020-02-27T14:06:59.752000Z</updated><author><name>rickj</name><uri>https://forge.codesys.com/u/rickj/</uri></author><id>https://forge.codesys.com0b48a57c676964ae0e3f41e8048339776025c9df</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;You may find this thread of some use&lt;br/&gt;
 l &lt;a class="" href="http://forum.codesys.com/viewtopic.php?f=11&amp;amp;t=6971" rel="nofollow"&gt;viewtopic.php?f=11&amp;amp;t=6971&lt;/a&gt; l &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>override init value for VAR_GLOBAL CONSTANT in library from project.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8064f2eb9/?limit=25#8e00" rel="alternate"/><published>2020-02-27T14:06:58.778000Z</published><updated>2020-02-27T14:06:58.778000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com13ab4c7a1a1e649b0f6b1509b22a77436ebdfa34</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; KevinR&lt;/p&gt;
&lt;p&gt;Dear community,&lt;/p&gt;
&lt;p&gt;i'm using VAR_GLOBAL CONSTANTS in an Library to define upper and lowerbound of an array. All VAR_GLOBAL CONSTANTS, have an predefined init value.&lt;/p&gt;
&lt;p&gt;Now i want to predefine the init value from my Project, where i'm using the Library. I tried to override the VAR_GLOBAL CONSTANTS in the Library from the project, but it doesn't work. &lt;/p&gt;
&lt;p&gt;Is there any solution or work arround?&lt;/p&gt;
&lt;p&gt;Thank you in advance!&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>