<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to send from pi to codesys</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/7690998fbf/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/7690998fbf/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/7690998fbf/</id><updated>2020-02-27T15:46:30.188000Z</updated><subtitle>Recent posts to send from pi to codesys</subtitle><entry><title>send from pi to codesys</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/7690998fbf/?limit=25#ed26" rel="alternate"/><published>2020-02-27T15:46:30.188000Z</published><updated>2020-02-27T15:46:30.188000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.comec614558b2202e2712ec03bfeaeeab4498255d96</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;maybe it work to use:  l &lt;a class="" href="http://forum.codesys.com/viewtopic.php?f=23&amp;amp;t=6247&amp;amp;x=12699&amp;amp;p=12711&amp;amp;lan=en" rel="nofollow"&gt;viewtopic.php?f=23&amp;amp;t=6247&amp;amp;p=12699#p12711&lt;/a&gt; l &lt;br/&gt;
and parse the return values of your script in CODESYS not 100% sure if this will work.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>send from pi to codesys</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/7690998fbf/?limit=25#5cc1" rel="alternate"/><published>2020-02-27T15:46:29.350000Z</published><updated>2020-02-27T15:46:29.350000Z</updated><author><name>mike197678</name><uri>https://forge.codesys.com/u/mike197678/</uri></author><id>https://forge.codesys.com0020c4eb3945c0359148e3657768b8b892adc3cd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello, sorry for my bad english, come from germany.&lt;/p&gt;
&lt;p&gt;What do I want to do:&lt;br/&gt;
I have a sms center running at Rasppery.&lt;br/&gt;
If now a sms received,&lt;br/&gt;
I turn on a gpio port.&lt;br/&gt;
This gpio port I ask in codeys.&lt;br/&gt;
Then I solve an action, for example: start a video, switch an output, etc.&lt;/p&gt;
&lt;p&gt;Is it not possible that I in my rasppery script directly a variable in codesys switch?&lt;br/&gt;
Just as it is also possible to send from codesys commands to rasperry!&lt;/p&gt;
&lt;p&gt;Here is the script with which I evaluated an incoming sms:&lt;/p&gt;
&lt;p&gt;#!/bin/bash&lt;br/&gt;
PASSWORD="1234"&lt;/p&gt;
&lt;p&gt;if &lt;span&gt;[ "$1" = "RECEIVED" ]&lt;/span&gt;; then&lt;/p&gt;
&lt;p&gt;TEXT=&lt;code&gt;sed -e '1,/^$/ d' &amp;lt; $2&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;# Make text uppercase:&lt;br/&gt;
  TEXT=&lt;code&gt;echo "$TEXT" | tr "a-z" "A-Z"&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;RCVPASS=&lt;code&gt;echo "$TEXT" | cut -d" " -f1&lt;/code&gt;&lt;br/&gt;
  ACTION=&lt;code&gt;echo "$TEXT" | cut -d" " -f2&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;if &lt;span&gt;[ "$PASSWORD" = "$RCVPASS" ]&lt;/span&gt;; then&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;  &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;ACTION&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;

    &lt;span class="o"&gt;#&lt;/span&gt;&lt;span class="n"&gt;Reboot&lt;/span&gt; &lt;span class="n"&gt;Server&lt;/span&gt;
    &lt;span class="n"&gt;REBOOT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="n"&gt;reboot&lt;/span&gt;
    &lt;span class="p"&gt;;;&lt;/span&gt;

    &lt;span class="o"&gt;#&lt;/span&gt;&lt;span class="n"&gt;Shutdown&lt;/span&gt; &lt;span class="n"&gt;Server&lt;/span&gt;
    &lt;span class="n"&gt;SHUTDOWN&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="n"&gt;shutdown&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt;
    &lt;span class="p"&gt;;;&lt;/span&gt;

    &lt;span class="o"&gt;#&lt;/span&gt;&lt;span class="n"&gt;Schalte&lt;/span&gt; &lt;span class="n"&gt;gpio&lt;/span&gt; &lt;span class="mi"&gt;17&lt;/span&gt; &lt;span class="n"&gt;ein&lt;/span&gt;
    &lt;span class="n"&gt;FILM_AB&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
       &lt;span class="n"&gt;gpio&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;g&lt;/span&gt; &lt;span class="k"&gt;write&lt;/span&gt; &lt;span class="mi"&gt;17&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="p"&gt;;;&lt;/span&gt;

    &lt;span class="o"&gt;#&lt;/span&gt;&lt;span class="n"&gt;Schalte&lt;/span&gt; &lt;span class="n"&gt;gpio&lt;/span&gt; &lt;span class="mi"&gt;17&lt;/span&gt; &lt;span class="n"&gt;aus&lt;/span&gt;
    &lt;span class="n"&gt;FILM_STOP&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
       &lt;span class="n"&gt;gpio&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;g&lt;/span&gt; &lt;span class="k"&gt;write&lt;/span&gt; &lt;span class="mi"&gt;17&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="p"&gt;;;&lt;/span&gt;

  &lt;span class="n"&gt;esac&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;fi&lt;/p&gt;
&lt;p&gt;fi&lt;/p&gt;
&lt;p&gt;I hope you can understand my english  &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>send from pi to codesys</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/7690998fbf/?limit=25#40b4" rel="alternate"/><published>2020-02-27T15:46:27.157000Z</published><updated>2020-02-27T15:46:27.157000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.comfb55b183b190991cdc586422aab43274a74fdd28</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
you mean if the CODESYS development system is connected there should popup a dialog in CODESYS with an advice?&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>send from pi to codesys</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/7690998fbf/?limit=25#4d86" rel="alternate"/><published>2020-02-27T15:46:26.390000Z</published><updated>2020-02-27T15:46:26.390000Z</updated><author><name>mike197678</name><uri>https://forge.codesys.com/u/mike197678/</uri></author><id>https://forge.codesys.com456279d40665b2d8e905fb5ecc4639256f20c1ef</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Is it possible to send commands from the pi to codesys?&lt;br/&gt;
for example:&lt;br/&gt;
Turn on or off a marker?&lt;/p&gt;
&lt;p&gt;With the PI Terminal.&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>