<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cpr-robots.com/index.php?action=history&amp;feed=atom&amp;title=Persistent_Variables</id>
	<title>Persistent Variables - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cpr-robots.com/index.php?action=history&amp;feed=atom&amp;title=Persistent_Variables"/>
	<link rel="alternate" type="text/html" href="https://wiki.cpr-robots.com/index.php?title=Persistent_Variables&amp;action=history"/>
	<updated>2026-04-07T14:53:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.cpr-robots.com/index.php?title=Persistent_Variables&amp;diff=806&amp;oldid=prev</id>
		<title>OLT at 14:53, 23 October 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.cpr-robots.com/index.php?title=Persistent_Variables&amp;diff=806&amp;oldid=prev"/>
		<updated>2025-10-23T14:53:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:53, 23 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l16&quot;&gt;Line 16:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 16:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Definition from the &amp;#039;Program &amp;amp; Variable&amp;#039; area=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Definition from the &amp;#039;Program &amp;amp; Variable&amp;#039; area=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The other way to define a persistent variable, is the ‘Program &amp;amp; Variable’ Section in the Footer area of the iRC. This section contains a list of all Variables that currently exist in the robot’s memory. To add a variable, click on the ‘+’ button in the respective list, depending on the kind of variable that should be added. After the variable was added, it can be renamed, and the values can be set to the desired values by clicking on it. To apply the Changes either press on the ‘Apply Changes’  button, or simply press ‘Enter’.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The other way to define a persistent variable, is the ‘Program &amp;amp; Variable’ Section in the Footer area of the iRC. This section contains a list of all Variables that currently exist in the robot’s memory. To add a variable, click on the ‘+’ button &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(&#039;&#039;not available in simulation&#039;&#039;) &lt;/ins&gt;in the respective list, depending on the kind of variable that should be added. After the variable was added, it can be renamed, and the values can be set to the desired values by clicking on it. To apply the Changes either press on the ‘Apply Changes’  button, or simply press ‘Enter’.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[file:ProgramAndVariableSection Footer.png | center| thumb| 720px | Variables can be edited, deleted and added in the &amp;#039;Program &amp;amp; Variables&amp;#039; Section in the Footer area of iRC.]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[file:ProgramAndVariableSection Footer.png | center| thumb| 720px | Variables can be edited, deleted and added in the &amp;#039;Program &amp;amp; Variables&amp;#039; Section in the Footer area of iRC.]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Changing the name of a variable does only change the name in the robot’s memory. All references to it must be changed manually, to make sure programs continue to work as expected. It is therefore NOT recommended to change the name of a variable that is already in use.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Changing the name of a variable does only change the name in the robot’s memory. All references to it must be changed manually, to make sure programs continue to work as expected. It is therefore NOT recommended to change the name of a variable that is already in use.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>OLT</name></author>
	</entry>
	<entry>
		<id>https://wiki.cpr-robots.com/index.php?title=Persistent_Variables&amp;diff=330&amp;oldid=prev</id>
		<title>OLT: Created page with &quot;In some cases, it is useful to be able to store variables that are kept even when the robot is turned off or the program is changed. If, for example the total number of cycles of a specific program should be tracked, the counter should not be reset every time the robot is turned off. Instead, the value should be stored such that it can be used to count the program cycles over the robot’s lifetime, and not only during a single period of being turned on.  Defining a vari...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.cpr-robots.com/index.php?title=Persistent_Variables&amp;diff=330&amp;oldid=prev"/>
		<updated>2025-08-11T14:18:35Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;In some cases, it is useful to be able to store variables that are kept even when the robot is turned off or the program is changed. If, for example the total number of cycles of a specific program should be tracked, the counter should not be reset every time the robot is turned off. Instead, the value should be stored such that it can be used to count the program cycles over the robot’s lifetime, and not only during a single period of being turned on.  Defining a vari...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In some cases, it is useful to be able to store variables that are kept even when the robot is turned off or the program is changed. If, for example the total number of cycles of a specific program should be tracked, the counter should not be reset every time the robot is turned off. Instead, the value should be stored such that it can be used to count the program cycles over the robot’s lifetime, and not only during a single period of being turned on. &lt;br /&gt;
Defining a variable as ‘persistent’ makes it possible to store their values in between sessions. This is not restricted to simple number Variables but is also availabe for position variables. &lt;br /&gt;
&lt;br /&gt;
=Definition in a robot program=&lt;br /&gt;
One way to define a persistent variable is to add it to a robot program like a normal variable. The only necessary additional step, is to check the checckbox labeled &amp;#039;persistent&amp;#039; in the command definition in the program editor. &lt;br /&gt;
&lt;br /&gt;
[[file:CmdDefinition PersistentVariable.png | center| thumb| 720px | Command Definition for variable storage. Variables can be set persistent by checking the checkbox.]]&lt;br /&gt;
&lt;br /&gt;
When trying to add a variable that already exists, there are four special cases users should be aware of: &lt;br /&gt;
#&amp;#039;&amp;#039;&amp;#039;The existing variable is a normal variable &amp;amp; the persistent checkbox is NOT checked&amp;#039;&amp;#039;&amp;#039; : The value of the existing variable will be overwritten.&lt;br /&gt;
#&amp;#039;&amp;#039;&amp;#039;The existing variable is a normal variable &amp;amp; the persistent checkbox is checked&amp;#039;&amp;#039;&amp;#039;: The value of the existing variable will be changed to the value defined in the command. The variable will also be set to persistent.&lt;br /&gt;
#&amp;#039;&amp;#039;&amp;#039;The existing variable is a persistent variable &amp;amp; the persistent checkbox is checked&amp;#039;&amp;#039;&amp;#039;: If the existing variable is persistent, the state of the checkbox is irrelevant. The value of the variable will also NOT be changed. Otherwise the store command would have to be manually removed from a program, to not defeat the purpose of a persistent variable. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the recommended way to add persistent variables, as it makes sure that variables, that are used in a program actually exist, and persistent variables are also available in the simulation of a robot.&lt;br /&gt;
&lt;br /&gt;
=Definition from the &amp;#039;Program &amp;amp; Variable&amp;#039; area=&lt;br /&gt;
The other way to define a persistent variable, is the ‘Program &amp;amp; Variable’ Section in the Footer area of the iRC. This section contains a list of all Variables that currently exist in the robot’s memory. To add a variable, click on the ‘+’ button in the respective list, depending on the kind of variable that should be added. After the variable was added, it can be renamed, and the values can be set to the desired values by clicking on it. To apply the Changes either press on the ‘Apply Changes’  button, or simply press ‘Enter’. &lt;br /&gt;
&lt;br /&gt;
[[file:ProgramAndVariableSection Footer.png | center| thumb| 720px | Variables can be edited, deleted and added in the &amp;#039;Program &amp;amp; Variables&amp;#039; Section in the Footer area of iRC.]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Changing the name of a variable does only change the name in the robot’s memory. All references to it must be changed manually, to make sure programs continue to work as expected. It is therefore NOT recommended to change the name of a variable that is already in use.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;</summary>
		<author><name>OLT</name></author>
	</entry>
</feed>