<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to How to execute a python script</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c78eee2166/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c78eee2166/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/c78eee2166/</id><updated>2020-02-27T15:28:23.053000Z</updated><subtitle>Recent posts to How to execute a python script</subtitle><entry><title>How to execute a python script</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c78eee2166/?limit=25#1d96" rel="alternate"/><published>2020-02-27T15:28:23.053000Z</published><updated>2020-02-27T15:28:23.053000Z</updated><author><name>ziadibassem</name><uri>https://forge.codesys.com/u/ziadibassem/</uri></author><id>https://forge.codesys.com546768c53b3a6c6aa4ec76511d6cf3f269ee3307</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Edwin Schwellinger hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Hi,&lt;br/&gt;
the python scripts are added as external file in your CODESYS project and with the CODESYS download&lt;br/&gt;
of your application they will be copied to '/var/opt/codesys/PlcLogic/Application/'.&lt;br/&gt;
The copy to '/var/opt/codesys/' is needed because this is the directory where the runtime could call the script ( path envirnment)&lt;br/&gt;
Sure if you do not need this, just copy your script to a location where the runtime could call it... and do not forget to enable&lt;br/&gt;
the command which you allow to execute by SysProcessCommand....&lt;br/&gt;
BR&lt;br/&gt;
Edwin&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thank you very much!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to execute a python script</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c78eee2166/?limit=25#913c" rel="alternate"/><published>2020-02-27T15:28:22.371000Z</published><updated>2020-02-27T15:28:22.371000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com45a0f4f8ca09b38e78ba4e7312892efe87b5e5cb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
the python scripts are added as external file in your CODESYS project and with the CODESYS download&lt;br/&gt;
of your application they will be copied to '/var/opt/codesys/PlcLogic/Application/'.&lt;br/&gt;
The copy to '/var/opt/codesys/' is needed because this is the directory where the runtime could call the script ( path envirnment)&lt;/p&gt;
&lt;p&gt;Sure if you do not need this, just copy your script to a location where the runtime could call it... and do not forget to enable&lt;br/&gt;
the command which you allow to execute by SysProcessCommand....&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to execute a python script</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c78eee2166/?limit=25#d158" rel="alternate"/><published>2020-02-27T15:28:21.689000Z</published><updated>2020-02-27T15:28:21.689000Z</updated><author><name>ziadibassem</name><uri>https://forge.codesys.com/u/ziadibassem/</uri></author><id>https://forge.codesys.combd79402f15a1beadf57546c4590da6de472a61f8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Edwin Schwellinger hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Hi,&lt;br/&gt;
if you want to execute them on the Raspberry PI,&lt;br/&gt;
by your IEC code, check this example here:&lt;br/&gt;
 l &lt;a class="" href="https://forum.codesys.com/viewtopic.php?f=23&amp;amp;t=6247&amp;amp;p=19932#p19941" rel="nofollow"&gt;viewtopic.php?f=23&amp;amp;t=6247&amp;amp;p=19932#p19941&lt;/a&gt; l &lt;br/&gt;
BR&lt;br/&gt;
Edwin&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thank you! &lt;br/&gt;
I saw that post and I could not understand this line : &lt;br/&gt;
SysFileCopy('/var/opt/codesys/UHScroll.py', '/var/opt/codesys/PlcLogic/Application/UHScroll.py', ADR(dwCopySize));&lt;br/&gt;
What are these directories :&lt;/p&gt;
&lt;p&gt;/var/opt/codesys/UHScroll.py&lt;br/&gt;
/var/opt/codesys/PlcLogic/Application/UHScroll.py&lt;br/&gt;
?&lt;br/&gt;
should I do exactly like that ?&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Sans titre.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4273"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to execute a python script</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c78eee2166/?limit=25#f8a7" rel="alternate"/><published>2020-02-27T15:28:19.735000Z</published><updated>2020-02-27T15:28:19.735000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com1f02e2d6818cb99dbc6bb41b64707722637a253f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
if you want to execute them on the Raspberry PI,&lt;br/&gt;
by your IEC code, check this example here:&lt;br/&gt;
 l &lt;a class="" href="https://forum.codesys.com/viewtopic.php?f=23&amp;amp;t=6247&amp;amp;x=19932&amp;amp;p=19941&amp;amp;lan=en" rel="nofollow"&gt;viewtopic.php?f=23&amp;amp;t=6247&amp;amp;p=19932#p19941&lt;/a&gt; l &lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to execute a python script</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/c78eee2166/?limit=25#65d7" rel="alternate"/><published>2020-02-27T15:28:19Z</published><updated>2020-02-27T15:28:19Z</updated><author><name>ziadibassem</name><uri>https://forge.codesys.com/u/ziadibassem/</uri></author><id>https://forge.codesys.com2d2e6b1f62152cee37109c414932920946769c3e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I want to make a program for rasbperry pi using codesys such as it executes python scripts . So please can someone give me a simple example that I can follow?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>