<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Saving values in PLC code</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/a88f323711/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/a88f323711/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/a88f323711/</id><updated>2020-02-27T16:12:34.161000Z</updated><subtitle>Recent posts to Saving values in PLC code</subtitle><entry><title>Saving values in PLC code</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/a88f323711/?limit=25#d82c" rel="alternate"/><published>2020-02-27T16:12:34.161000Z</published><updated>2020-02-27T16:12:34.161000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com7da82e770bc8c965b44cf42022c32ff2c26a3058</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;But why the retain and persistant variable are reset when I download a program with a little difference?&lt;br/&gt;
this should not happen, see the table from the online help!&lt;br/&gt;
BR&lt;br/&gt;
Edwin&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img alt="IMG: table.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1861"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Saving values in PLC code</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/a88f323711/?limit=25#8ec3" rel="alternate"/><published>2020-02-27T16:12:33.359000Z</published><updated>2020-02-27T16:12:33.359000Z</updated><author><name>johan76swart</name><uri>https://forge.codesys.com/u/johan76swart/</uri></author><id>https://forge.codesys.com440287276d0673bdc3188e9127a5bcb961cfef3b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi SimonD,&lt;/p&gt;
&lt;p&gt;Alternatively you could use the SysFile library to read and write values to text files on a specified location on the raspberry. I think there is an example in the Store that will demonstrate on how to achieve this. &lt;/p&gt;
&lt;p&gt;Regard,&lt;/p&gt;
&lt;p&gt;Johan&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Saving values in PLC code</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/a88f323711/?limit=25#85f6" rel="alternate"/><published>2020-02-27T16:12:31.073000Z</published><updated>2020-02-27T16:12:31.073000Z</updated><author><name>suibaf</name><uri>https://forge.codesys.com/u/suibaf/</uri></author><id>https://forge.codesys.com41be2f8c2a7acca97b885ea684b01295a4c5f211</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;OK Edwin you are right.&lt;/p&gt;
&lt;p&gt;But why the retain and persistant variable are reset when I download a program with a little difference?&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Saving values in PLC code</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/a88f323711/?limit=25#3ffa" rel="alternate"/><published>2020-02-27T16:12:30.243000Z</published><updated>2020-02-27T16:12:30.243000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com6b781276840014e678970ed7178a1622af0010a8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;...except you are using an UPS, which make a graceful shutdown on Linux OS.&lt;br/&gt;
Then the Retains / Retains persistent data are saved and restored on the next Startup.&lt;br/&gt;
BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Saving values in PLC code</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/a88f323711/?limit=25#7a70" rel="alternate"/><published>2020-02-27T16:12:27.948000Z</published><updated>2020-02-27T16:12:27.948000Z</updated><author><name>suibaf</name><uri>https://forge.codesys.com/u/suibaf/</uri></author><id>https://forge.codesys.comf60d6067a48deb0bc834a2d29fd66272e8f372c3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If I understand well, there is no chance to have retain variable with raspberry:&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://forum.codesys.com/viewtopic.php?f=21&amp;amp;t=5722&amp;amp;hilit=retain" rel="nofollow"&gt;http://forum.codesys.com/viewtopic.php?f=21&amp;amp;t=5722&amp;amp;hilit=retain&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Saving values in PLC code</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/a88f323711/?limit=25#a651" rel="alternate"/><published>2020-02-27T16:12:27.120000Z</published><updated>2020-02-27T16:12:27.120000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com5ee81ce3d0b56887810b26f8e35dac6551e3b3d3</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;CoDeSys provides a "GVL_PERSISTENT" object.  If the Raspberry Pi supports it (it should), you simply have to create a GVL_PERSISTENT object and define your variables you wish to keep even after a power cycle.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Saving values in PLC code</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/a88f323711/?limit=25#ad01" rel="alternate"/><published>2020-02-27T16:12:26.310000Z</published><updated>2020-02-27T16:12:26.310000Z</updated><author><name>SimonD</name><uri>https://forge.codesys.com/u/simond/</uri></author><id>https://forge.codesys.com4b1c2a70eecedf7c6090826e0307df75c72ab03b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Folks, how can I save values so that they are loaded when the Pi boots up? I need to adjust values for timers during commissioning and have them saved for future use. I know I fan populate the prepared values of the tag but can I write to that register in run time?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>