<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Size of a GVL file in bytes </title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3d12b5a055/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3d12b5a055/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/3d12b5a055/</id><updated>2020-06-29T12:28:11.972000Z</updated><subtitle>Recent posts to Size of a GVL file in bytes </subtitle><entry><title>Size of a GVL file in bytes </title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3d12b5a055/?limit=25#ab4f" rel="alternate"/><published>2020-06-29T12:28:11.972000Z</published><updated>2020-06-29T12:28:11.972000Z</updated><author><name>ontdk</name><uri>https://forge.codesys.com/u/ontdk/</uri></author><id>https://forge.codesys.comcd466f24c50d07f6b3b7863b67de618722099a84</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you Quirzo. That will do the job.&lt;/p&gt;
&lt;p&gt;But I think it would be a nice feature if 3S were adding some kind of functionality to show the size of GVL/NVL files in Codesys.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Size of a GVL file in bytes </title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3d12b5a055/?limit=25#aadf" rel="alternate"/><published>2020-06-29T06:07:45.892000Z</published><updated>2020-06-29T06:07:45.892000Z</updated><author><name>quirzo</name><uri>https://forge.codesys.com/u/quirzo/</uri></author><id>https://forge.codesys.comece75daa2b15bdd471cdce3ad27b9a778bae95d4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;One way to get the size is to use SIZEOF() operator. But you have to do it for each GVL variable.&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="n"&gt;GVL_Test&lt;/span&gt;
&lt;span class="n"&gt;VAR_GLOBAL&lt;/span&gt;
    &lt;span class="k"&gt;First&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;STRING&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;Second&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="n"&gt;Third&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ST_Struct&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;Then in code somewhere:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;VAR&lt;/span&gt;
    &lt;span class="n"&gt;GvlSize&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;UDINT&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;END_VAR&lt;/span&gt;
&lt;span class="n"&gt;GvlSize&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&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;GvlSize&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;GvlSize&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;SIZEOF&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;GVL_Test&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;First&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;GvlSize&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;GvlSize&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;SIZEOF&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;GVL_Test&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;Second&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;GvlSize&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;GvlSize&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;SIZEOF&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;GVL_Test&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Third&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;Now&lt;/span&gt; &lt;span class="n"&gt;GvlSize&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="k"&gt;size&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;bytes&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>Size of a GVL file in bytes </title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3d12b5a055/?limit=25#b8b8" rel="alternate"/><published>2020-06-24T07:27:39.781000Z</published><updated>2020-06-24T07:27:39.781000Z</updated><author><name>ontdk</name><uri>https://forge.codesys.com/u/ontdk/</uri></author><id>https://forge.codesys.com70df14de03b05557a9a97e8aa15ae13f9041269d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello everybody.&lt;/p&gt;
&lt;p&gt;I have a novice question regarding the actual size of the GVL files in my project?&lt;/p&gt;
&lt;p&gt;I have a GVL file containing different types of variables and structs, that I would like to transfer to another device. Can I see how many bytes of data the file contains, without counting the number of variables and calculating the total file size manually? &lt;/p&gt;
&lt;p&gt;Is the a menu or compiler logfile somewhere, or can I eventually see it when I'm online on the device?&lt;/p&gt;
&lt;p&gt;I'm currently using CODESYS V3.5 SP14, Patch 2. &lt;/p&gt;
&lt;p&gt;Best regards&lt;br/&gt;
Ole&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>