<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Execut Python Script in CoDeSys POU</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/102e8589e3/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/102e8589e3/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/102e8589e3/</id><updated>2020-02-27T14:54:13.662000Z</updated><subtitle>Recent posts to Execut Python Script in CoDeSys POU</subtitle><entry><title>Execut Python Script in CoDeSys POU</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/102e8589e3/?limit=25#3e0a" rel="alternate"/><published>2020-02-27T14:54:13.662000Z</published><updated>2020-02-27T14:54:13.662000Z</updated><author><name>chris.beard</name><uri>https://forge.codesys.com/u/chris-beard/</uri></author><id>https://forge.codesys.com809625a8cc9edf157ed1e1e52b56990d39742d97</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;you could try building the script as a .exe using pyinstaller and calling this as a process using the PLC?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Execut Python Script in CoDeSys POU</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/102e8589e3/?limit=25#3dec" rel="alternate"/><published>2020-02-27T14:54:13.052000Z</published><updated>2020-02-27T14:54:13.052000Z</updated><author><name>agrobot</name><uri>https://forge.codesys.com/u/agrobot/</uri></author><id>https://forge.codesys.com5551a34a2ba6f9b887a805e598b046f15acc62d7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have doubts about how to call my python pwm script in the program, I did not have to do it, think you could help me&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Execut Python Script in CoDeSys POU</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/102e8589e3/?limit=25#b17d" rel="alternate"/><published>2020-02-27T14:54:12.443000Z</published><updated>2020-02-27T14:54:12.443000Z</updated><author><name>mkeller</name><uri>https://forge.codesys.com/u/mkeller/</uri></author><id>https://forge.codesys.com640ca1d369520eedbca6ded4c3bc84197df97d68</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi agrobot.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;agrobot hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Did he do it?&lt;br/&gt;
I want to do the same, and I can not find the solution&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Take a look at the example for the Raspberry Pi and SenseHAT:&lt;/p&gt;
&lt;p&gt;&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;https://forum.codesys.com/viewtopic.php?f=23&amp;amp;t=6247&amp;amp;p=19932#p19941&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This works because the Raspberry Pi has the python interpreter installed. If the PLC has not python interpreter it does not work.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Martin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Execut Python Script in CoDeSys POU</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/102e8589e3/?limit=25#6c9c" rel="alternate"/><published>2020-02-27T14:54:10.757000Z</published><updated>2020-02-27T14:54:10.757000Z</updated><author><name>agrobot</name><uri>https://forge.codesys.com/u/agrobot/</uri></author><id>https://forge.codesys.com586bf40c432a15b8f0a06c565130973cc0d80bc6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Did he do it?&lt;/p&gt;
&lt;p&gt;I want to do the same, and I can not find the solution&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Execut Python Script in CoDeSys POU</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/102e8589e3/?limit=25#8d4f" rel="alternate"/><published>2020-02-27T14:54:10.180000Z</published><updated>2020-02-27T14:54:10.180000Z</updated><author><name>Ioannis</name><uri>https://forge.codesys.com/u/ioannis/</uri></author><id>https://forge.codesys.comc3c459375a14cbcee4541709c84c45b19c1aca9c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I am also trying to run a python script inside a schneider m251 plc but haven't figured how yet. The script runs perfectly on my pc.&lt;br/&gt;
Can anyone give a tip?&lt;br/&gt;
The python script is the following:&lt;br/&gt;
from twilio.rest import Client&lt;br/&gt;
account_sid = 'xxxxxxxxx'&lt;br/&gt;
auth_token = 'xxxxxxx'&lt;br/&gt;
client = Client(account_sid, auth_token)&lt;/p&gt;
&lt;p&gt;message = client.messages \&lt;br/&gt;
    .create(&lt;br/&gt;
        body='Alarm',&lt;br/&gt;
        from_='xxx',&lt;br/&gt;
        to='xxxx'&lt;br/&gt;
    )&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Execut Python Script in CoDeSys POU</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/102e8589e3/?limit=25#bd60" rel="alternate"/><published>2020-02-27T14:54:08.584000Z</published><updated>2020-02-27T14:54:08.584000Z</updated><author><name>Mark0ne</name><uri>https://forge.codesys.com/u/mark0ne/</uri></author><id>https://forge.codesys.com5054a627dc4e0f68c766160977db4e702c8e772e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Good day All,&lt;/p&gt;
&lt;p&gt;I am currently busy with a project where I need to run a python script from a condition/trigger in my SoMachine (CoDeSys) project.&lt;/p&gt;
&lt;p&gt;I was wondering if anyone could maybe inform me on a way to execute the file in Structured Text. Also I added the python file in my program (see attached). Keep in mind that it needs to execute while running on the PLC and the script might be executed multiple times in the program.&lt;/p&gt;
&lt;p&gt;I would appreciate any help or advice.&lt;/p&gt;
&lt;p&gt;Kind regards&lt;br/&gt;
Markus Oosthuizen&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: SOM1.PNG" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4540"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: SOM2.PNG" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4539"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>