<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to C0564 Warning Message</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/afae53077a/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/afae53077a/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/afae53077a/</id><updated>2024-01-30T16:54:47.578000Z</updated><subtitle>Recent posts to C0564 Warning Message</subtitle><entry><title>C0564 Warning Message</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/afae53077a/?limit=25#92e9/307f" rel="alternate"/><published>2024-01-30T16:54:47.578000Z</published><updated>2024-01-30T16:54:47.578000Z</updated><author><name>masmith1553</name><uri>https://forge.codesys.com/u/masmith1553/</uri></author><id>https://forge.codesys.com3aefdc4e10314b19ab0ad90fdfe42bada6cdbac3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you for the reply. I was able to use this attribute in both of my Network Variable List Sends to clear the warnings. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>C0564 Warning Message</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/afae53077a/?limit=25#92e9" rel="alternate"/><published>2024-01-30T16:09:48.943000Z</published><updated>2024-01-30T16:09:48.943000Z</updated><author><name>r-niedermayer</name><uri>https://forge.codesys.com/u/r-niedermayer/</uri></author><id>https://forge.codesys.com87994391b49879a24cafd5fe3d2036b58bd45c48</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Please see or Online Help on how to initialize variable before using them:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_pragma_attribute_global_init_slot.html" rel="nofollow"&gt;https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_pragma_attribute_global_init_slot.html&lt;/a&gt; &lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;Regarding the Attribute global_init_slot:&lt;/p&gt;
&lt;p&gt;You can use this pragma to influence the order in which signatures are processed during global initialization. It can only be applied to signatures. &lt;/p&gt;
&lt;p&gt;By default, the initialization sequence for variables from global variable lists is undefined!&lt;/p&gt;
&lt;p&gt;However, if, for example, variables from one list depend on variables from another list, it is necessary to initialize one before the other.&lt;/p&gt;
&lt;p&gt;(Aee OLH and Syntax) The placeholder &amp;lt;slot&amp;gt; must be replaced by an integer value that defines the position in the initialization sequence.&amp;lt;/slot&amp;gt;&lt;/p&gt;
&lt;p&gt;The default value is 50000.&lt;/p&gt;
&lt;p&gt;A lower value causes an earlier initialization!&lt;br/&gt;
If several signatures have the same value for the 'global_init_slot' attribute, the order of their initialization remains undefined! &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cautious application should therefore be considered!&lt;/strong&gt;&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;Example: The project contains f.e. two global variable lists GVL_1 and GVL_2. The global variable "A" is part of the global variable list GVL_1:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;{attribute 'global_init_slot' := '300'}VAR_GLOBAL A : INT:=1000;END_VAR&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The initialization values of the variables "B" and "C" of GVL_2 are dependent on the variable "A".&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="err"&gt;attribute&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'global_init_slot'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;'350'&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;VAR_GLOBAL&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;B&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;INT&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;A&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;C&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;INT&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;A-1&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;So if you set the 'global_init_slot' attribute of the global variable list GVL_1 to 300, i.e. to the lowest initialization value in the example, then it is ensured that the expression "A+1" is well-defined at the time of initialization of "B".&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>C0564 Warning Message</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/afae53077a/?limit=25#941d" rel="alternate"/><published>2024-01-25T22:13:42.820000Z</published><updated>2024-01-25T22:13:42.820000Z</updated><author><name>masmith1553</name><uri>https://forge.codesys.com/u/masmith1553/</uri></author><id>https://forge.codesys.combeff9dd3c315bc062f488772128bd46fc7509fa3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;After updating from SP18 to SP19 I am receiving multiple C0564 warning messages after I compile. Does anyone know how to fix the warnings? &lt;/p&gt;&lt;/div&gt;</summary></entry></feed>