<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Reboot when a GPIO input is triggered</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e4292b47c7/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e4292b47c7/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/e4292b47c7/</id><updated>2021-04-19T15:19:51.194000Z</updated><subtitle>Recent posts to Reboot when a GPIO input is triggered</subtitle><entry><title>Reboot when a GPIO input is triggered</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e4292b47c7/?limit=25#aea8/043e" rel="alternate"/><published>2021-04-19T15:19:51.194000Z</published><updated>2021-04-19T15:19:51.194000Z</updated><author><name>laruso</name><uri>https://forge.codesys.com/u/laruso/</uri></author><id>https://forge.codesys.comb19b33ce8f445c94e0642db435fefae9af653e7f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Offtopic!&lt;br/&gt;
But: To retain the variables, the variables have to be declared as retain ;-) and are only reliable saved, if the system process "shutdown/reboot" is used.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Reboot when a GPIO input is triggered</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e4292b47c7/?limit=25#aea8" rel="alternate"/><published>2020-02-27T17:12:00.121000Z</published><updated>2020-02-27T17:12:00.121000Z</updated><author><name>aceron76</name><uri>https://forge.codesys.com/u/aceron76/</uri></author><id>https://forge.codesys.comaae01925000d17954ece53d75d659b7937cebd87</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, I know its an older thread and it was helping me a lot, but in my case when pi reboots all my data are lost. How was it in your case or do you know how to solve such an issue?&lt;br/&gt;
BR&lt;br/&gt;
Erwin &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Reboot when a GPIO input is triggered</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e4292b47c7/?limit=25#a2f1" rel="alternate"/><published>2020-02-27T17:11:59.155000Z</published><updated>2020-02-27T17:11:59.155000Z</updated><author><name>McBain</name><uri>https://forge.codesys.com/u/mcbain/</uri></author><id>https://forge.codesys.com51671dca36561dd807cffb4821579ae179f79b34</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo&lt;/p&gt;
&lt;p&gt;hast du das script mit dem gleichen User und Rechten über Putty ausgeführt wie codesys es ausführt?&lt;/p&gt;
&lt;p&gt;MFG&lt;/p&gt;
&lt;p&gt;McBain&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Reboot when a GPIO input is triggered</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e4292b47c7/?limit=25#b8f0" rel="alternate"/><published>2020-02-27T17:11:58.194000Z</published><updated>2020-02-27T17:11:58.194000Z</updated><author><name>mauskopf</name><uri>https://forge.codesys.com/u/mauskopf/</uri></author><id>https://forge.codesys.com9387dfd8f0f58e8f2a0e27a6ebab19d41fe0aa5a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Ich habe das Skript unter /usr/bin/ angelegt und ausführbar gemacht!(in Putty funktioniert das skript)&lt;br/&gt;
In der CODESYSControl.cfg habe ich folgende Einträge gemacht&lt;br/&gt;
&lt;span&gt;[SysProcess]&lt;/span&gt;&lt;br/&gt;
Command=AllowAll&lt;br/&gt;
Command.0=cs_mail&lt;/p&gt;
&lt;p&gt;Der Aufruf in Codesys sieht so aus&lt;br/&gt;
IF (xSendMail) THEN&lt;br/&gt;
_('cs_mail' , ADR(Result) );&lt;br/&gt;
xSendMail:=FALSE;&lt;br/&gt;
END_IF&lt;/p&gt;
&lt;p&gt;Result ist nach dem Ausführen auf 25&lt;br/&gt;
Was mache ich falsch?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Reboot when a GPIO input is triggered</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e4292b47c7/?limit=25#132f" rel="alternate"/><published>2020-02-27T17:11:55.484000Z</published><updated>2020-02-27T17:11:55.484000Z</updated><author><name>plcmax</name><uri>https://forge.codesys.com/u/plcmax/</uri></author><id>https://forge.codesys.combd030a974fdb5019e032019609f860587b7bdcc5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo,&lt;br/&gt;
was hast du in der CODESYSControl.cfg eingetragen und welches Kommando&lt;br/&gt;
rufst du denn auf in Codesys?&lt;/p&gt;
&lt;p&gt;Grüße&lt;br/&gt;
plcmax&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Reboot when a GPIO input is triggered</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e4292b47c7/?limit=25#a526" rel="alternate"/><published>2020-02-27T17:11:54.499000Z</published><updated>2020-02-27T17:11:54.499000Z</updated><author><name>mauskopf</name><uri>https://forge.codesys.com/u/mauskopf/</uri></author><id>https://forge.codesys.comb66888450d2fddcc663ba6a384d89cd40a4c2a66</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Habe ein Problem bekomme immer 25 als rückgabe von Result&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Reboot when a GPIO input is triggered</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e4292b47c7/?limit=25#b0d1" rel="alternate"/><published>2020-02-27T17:11:51.767000Z</published><updated>2020-02-27T17:11:51.767000Z</updated><author><name>AlexB</name><uri>https://forge.codesys.com/u/alexb/</uri></author><id>https://forge.codesys.com42dcaafb8c36be7e449c0c8bf646e6071f3bdc37</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If nothing is configured, Sys Execute Command will always fail.&lt;br/&gt;
In addition to that, it is also possible to ignore the above white list and allow all commands by: Command=AllowAll&lt;br/&gt;
ATTENTION: If Command=AllowAll is set, there is no further verification done, before a command is executed. Please check your security requirements carefully before activating this. For the same reason you should also choose the allowed commands in the list accurately.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[SysProcess]&lt;/span&gt;&lt;br/&gt;
Command=AllowAll&lt;br/&gt;
Command.0=script_run&lt;br/&gt;
Command.1=reboot&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;xRun&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
   &lt;span class="nv"&gt;SysProcess&lt;/span&gt;.&lt;span class="nv"&gt;S&lt;/span&gt; &lt;span class="nv"&gt;ysProcessE&lt;/span&gt; &lt;span class="nv"&gt;xecuteCommand&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;echo test &amp;gt; /dev/ttyO1&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;, &lt;span class="nv"&gt;ADR&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="ss"&gt;))&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
   &lt;span class="nv"&gt;xRun&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;FALSE&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;END_IF&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>Reboot when a GPIO input is triggered</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e4292b47c7/?limit=25#7ce2" rel="alternate"/><published>2020-02-27T17:11:50.794000Z</published><updated>2020-02-27T17:11:50.794000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com5d75f76deedc335c8a52bf6929436fa99a988cbf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;may I ask what exactly you are realize with the 433 Mhz Signal on GPIO17?&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Reboot when a GPIO input is triggered</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e4292b47c7/?limit=25#ed2a" rel="alternate"/><published>2020-02-27T17:11:48.085000Z</published><updated>2020-02-27T17:11:48.085000Z</updated><author><name>brub</name><uri>https://forge.codesys.com/u/brub/</uri></author><id>https://forge.codesys.com3403a2e93d5e35165075208d1b6c1a7824675aaa</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks a lot!!!&lt;/p&gt;
&lt;p&gt;Finally it works i think i was mentally blocked...&lt;/p&gt;
&lt;p&gt;How easy &lt;/p&gt;
&lt;p&gt;-&amp;gt;Solved&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Reboot when a GPIO input is triggered</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/e4292b47c7/?limit=25#7c48" rel="alternate"/><published>2020-02-27T17:11:47.106000Z</published><updated>2020-02-27T17:11:47.106000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.comd84ec98a7faa8870082ea28eb40fb003c4f1b2cd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;either call 'script.sh' in CODESYS or rename your script in /usr/bin to script&lt;/p&gt;
&lt;p&gt;you could check if the script is executed with cat /tmp/codesyscontrol.log&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>