<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to copy online parameters to offline parameters</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b917925baf/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b917925baf/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/b917925baf/</id><updated>2020-02-27T15:00:55.744000Z</updated><subtitle>Recent posts to copy online parameters to offline parameters</subtitle><entry><title>copy online parameters to offline parameters</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b917925baf/?limit=25#d37e" rel="alternate"/><published>2020-02-27T15:00:55.744000Z</published><updated>2020-02-27T15:00:55.744000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com8f26f659535aa0848c14f91e90f67d48a14941fe</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;Hi Martin,&lt;/p&gt;
&lt;p&gt;I'm still looking for a solution, to get this to work. &lt;/p&gt;
&lt;p&gt;First of all - Thank you for updating the example. The example still doesn't work for me, during I'm in the online mode. &lt;/p&gt;
&lt;p&gt;I stay in contact with one of your colleague, who has also added the issue to jira (CDS-54028).&lt;br/&gt;
It seems like there is a problem with "read_online_value".&lt;/p&gt;
&lt;p&gt;This functionality has a very high importance for us. So maybe there are also some other customers who have this requirement. &lt;/p&gt;
&lt;p&gt;Thank you in advance.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
KevinR&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>copy online parameters to offline parameters</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b917925baf/?limit=25#6385" rel="alternate"/><published>2020-02-27T15:00:53.590000Z</published><updated>2020-02-27T15:00:53.590000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com63b418b967a4b27d0ee48ec3996c37096fe8f12a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Steffen_R.&lt;/p&gt;
&lt;p&gt;Perfect!!&lt;br/&gt;
 Thank you very much... That helps me&lt;/p&gt;
&lt;p&gt;Steffen&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>copy online parameters to offline parameters</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b917925baf/?limit=25#cfcb" rel="alternate"/><published>2020-02-27T15:00:52.773000Z</published><updated>2020-02-27T15:00:52.773000Z</updated><author><name>mkeller</name><uri>https://forge.codesys.com/u/mkeller/</uri></author><id>https://forge.codesys.com895e0911cd6d25d61a47745807896fbc49cee7ff</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Steffen_R.&lt;/p&gt;
&lt;p&gt;I fixed it.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Martin&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=2564" rel="nofollow"&gt;device_show_and_change_parameters.py &lt;span&gt;&lt;span&gt;[1.71 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>copy online parameters to offline parameters</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b917925baf/?limit=25#ab6f" rel="alternate"/><published>2020-02-27T15:00:51.867000Z</published><updated>2020-02-27T15:00:51.867000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com3c3be37efddf4cf61f27cd947c7fe054e4eedd9d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Steffen_R.&lt;/p&gt;
&lt;p&gt;Hi Martin,&lt;br/&gt;
i tried running the script but it does not work correctly. The attached picture shows the error. I think it is line 15 in the script.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;
&lt;p&gt;Steffen&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Fehler.PNG" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2558"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>copy online parameters to offline parameters</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b917925baf/?limit=25#41b3" rel="alternate"/><published>2020-02-27T15:00:49.724000Z</published><updated>2020-02-27T15:00:49.724000Z</updated><author><name>mkeller</name><uri>https://forge.codesys.com/u/mkeller/</uri></author><id>https://forge.codesys.com458d824c837aea9e89df15f14d002ac266f2e663</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Kevin.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;KevinR hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
can I copy all online parameters to the offline parameters with a python script?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A device parameter or data element in Scripting has the property "can_access_online" so you can check if it supports the online mode. If it is supported you can read the current value with the method "read_online_value(...)". If a timeout of 1000ms is enough to read the value from the PLC you can use the method without specifing that parameter.&lt;/p&gt;
&lt;p&gt;Here some untested code:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nv"&gt;data&lt;/span&gt;.&lt;span class="nv"&gt;can_access_online&lt;/span&gt;:
   &lt;span class="nv"&gt;val&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;data&lt;/span&gt;.&lt;span class="nv"&gt;read_online_value&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;
   &lt;span class="nv"&gt;data&lt;/span&gt;.&lt;span class="nv"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;val&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I also added a simple python script which prints the parameter tree to the Message view and change the value of one parameter.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Martin&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=2486" rel="nofollow"&gt;device_show_and_change_parameters.py &lt;span&gt;&lt;span&gt;[1.65 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>copy online parameters to offline parameters</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b917925baf/?limit=25#9213" rel="alternate"/><published>2020-02-27T15:00:49.060000Z</published><updated>2020-02-27T15:00:49.060000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comb5003bb8c685b0e9d09ec6e999b81561635537bd</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;can I copy all online parameters to the offline parameters with a python script?&lt;/p&gt;
&lt;p&gt;This will give me the opportunity to save the current online configuration values to my offline project file.&lt;/p&gt;
&lt;p&gt;Visual concept: &lt;/p&gt;
&lt;p&gt;Thank you in advance&lt;/p&gt;
&lt;p&gt;Regards,&lt;br/&gt;
Kevin&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Python.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2485"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>