<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Schrittschalter</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/1fc011a276/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/1fc011a276/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Deutsch/thread/1fc011a276/</id><updated>2020-02-28T13:32:59.164000Z</updated><subtitle>Recent posts to Schrittschalter</subtitle><entry><title>Schrittschalter</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/1fc011a276/?limit=25#e04a" rel="alternate"/><published>2020-02-28T13:32:59.164000Z</published><updated>2020-02-28T13:32:59.164000Z</updated><author><name>kaspar</name><uri>https://forge.codesys.com/u/kaspar/</uri></author><id>https://forge.codesys.com5ea6f37c496aaee0771ba76167d59a9ee03a048f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo Gemeinde&lt;/p&gt;
&lt;p&gt;Habe zu Schrittschaltung eine geniale Lösung gefunden.&lt;/p&gt;
&lt;p&gt;U   E  1.0&lt;br/&gt;
UN  M  1.0&lt;br/&gt;
S   A  1.0&lt;/p&gt;
&lt;p&gt;U   E  1.0&lt;br/&gt;
U   M  1.0&lt;br/&gt;
R   A  1.0&lt;/p&gt;
&lt;p&gt;UN  E  1.0&lt;br/&gt;
U   A  1.0&lt;br/&gt;
S   M  1.0&lt;/p&gt;
&lt;p&gt;UN  E  1.0&lt;br/&gt;
UN  A  1.0&lt;br/&gt;
R   M  1.0&lt;/p&gt;
&lt;p&gt;Diese Lösung braucht keine Flankenauswertung und kein Entpellen.&lt;br/&gt;
Sie ist sehr gut nachvollziehbar und auch in FUP oder KOP gut zu realisieren.&lt;br/&gt;
Sie stammt aus dem SPS Forum und ursprünglich aus dem Buch Automatisieren mit S5-115U.&lt;br/&gt;
Diese Funktion nennt sich auch Binärutersetzer oder auch Frequenzteiler.&lt;br/&gt;
Wenn mehrere Schalter dazugeschaltet werden einfach ein Oder vor E 0.1 gesetzt.&lt;/p&gt;
&lt;p&gt;Gruss und viel Erfolg&lt;br/&gt;
Kaspar&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Schrittschalter</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/1fc011a276/?limit=25#65d5" rel="alternate"/><published>2020-02-28T13:32:51.730000Z</published><updated>2020-02-28T13:32:51.730000Z</updated><author><name>Pitsch52</name><uri>https://forge.codesys.com/u/pitsch52/</uri></author><id>https://forge.codesys.com825618a1f4940f1a983c14ca3e21bdf8b9087918</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo&lt;/p&gt;
&lt;p&gt;Also wenn Du einen Ausgang (der z.B. Eine Lampe über einen Impulsschalter ein- und ausschaltet) alternierend steuern willst, könntest Du es mal so, mit einem FB probieren.&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;Deklarationsteil&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;FUNCTION_BLOCK Alternate&lt;/p&gt;
&lt;p&gt;VAR_INPUT&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;CLOCK&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_VAR&lt;/p&gt;
&lt;p&gt;VAR_OUTPUT&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;OUT&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_VAR&lt;/p&gt;
&lt;p&gt;VAR&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;FLANKE&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_VAR&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;Codeteil&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;Baustein schaltet den Ausgang bei einer steigenden Flanke an CLOCK, alternierend Ein oder Aus&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;IF (CLOCK = TRUE AND FLANKE = FALSE) THEN (&lt;em&gt;Steigende Flanke an CLOCK erkennen&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;OUT := NOT OUT; (&lt;em&gt;Ausgang invertieren&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;END_IF&lt;/p&gt;
&lt;p&gt;FLANKE := CLOCK; (&lt;em&gt;Flankenmerker zurücksetzen&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;Ungetestet! Sollte aber funktionieren.&lt;/p&gt;
&lt;p&gt;Mit freundlichen Grüssen! Pitsch&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Schrittschalter</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/1fc011a276/?limit=25#8e23" rel="alternate"/><published>2020-02-28T13:32:49.007000Z</published><updated>2020-02-28T13:32:49.007000Z</updated><author><name>lolo68</name><uri>https://forge.codesys.com/u/lolo68/</uri></author><id>https://forge.codesys.com01d9c08beec438b714810123f9c45ca72f96d028</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo Pitsch,&lt;/p&gt;
&lt;p&gt;vielen Dank für ihre Antwort. Jetzt habe ich noch eine Frage?&lt;/p&gt;
&lt;p&gt;Ich habe mehrere tasten die ein Motor oder licht ein und ausschalten können, sollte diese Funktion über Schrittschaltung programmiert werden, oder gibt es eine andere Lösung.&lt;/p&gt;
&lt;p&gt;Mit freundlichen grüße.&lt;/p&gt;
&lt;p&gt;Lolo68&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Schrittschalter</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/1fc011a276/?limit=25#f2be" rel="alternate"/><published>2020-02-28T13:32:41.288000Z</published><updated>2020-02-28T13:32:41.288000Z</updated><author><name>lolo68</name><uri>https://forge.codesys.com/u/lolo68/</uri></author><id>https://forge.codesys.com4203b3b5bbbc1a058db69ace387516d52194f78f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;vielen dank für ihre hilfe, ich werde das morgen ausprobieren&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Schrittschalter</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/1fc011a276/?limit=25#32ca" rel="alternate"/><published>2020-02-28T13:32:38.446000Z</published><updated>2020-02-28T13:32:38.446000Z</updated><author><name>Pitsch52</name><uri>https://forge.codesys.com/u/pitsch52/</uri></author><id>https://forge.codesys.com62f8eeb45141449e1bdfd291cc72437042073b80</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo&lt;/p&gt;
&lt;p&gt;Mit einen FB, kannst DU mal das hier versuchen:&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;Deklarationsteil:&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;FUNCTION_BLOCK Schrittschalter&lt;/p&gt;
&lt;p&gt;VAR_INPUT&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;ENABLE&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;CLOCK&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_VAR&lt;/p&gt;
&lt;p&gt;VAR_OUTPUT&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;OUT_1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;OUT_2&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;OUT_3&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;OUT_4&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

   &lt;span class="o"&gt;(*&lt;/span&gt;&lt;span class="n"&gt;etc&lt;/span&gt;&lt;span class="o"&gt;.*)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_VAR&lt;/p&gt;
&lt;p&gt;VAR&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;FLANKE&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;COUNT&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;INT&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_VAR&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;Codeteil:&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;Schrittschalter Eingang Clock ist Flankengetriggert&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;Zähler&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;IF (CLOCK = TRUE AND FLANKE = FALSE) THEN  (&lt;em&gt;Steigende Flanke an Clock erkennen&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;COUNT := COUNT + 1;&lt;/p&gt;
&lt;p&gt;IF COUNT &amp;gt; 4 THEN (&lt;em&gt;Wenn Zählerstand grösser als höchster Ausgang&lt;/em&gt;)&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;COUNT&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;Z&lt;/span&gt;&lt;span class="err"&gt;ä&lt;/span&gt;&lt;span class="n"&gt;hler&lt;/span&gt; &lt;span class="n"&gt;auf&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt; &lt;span class="n"&gt;setzen&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_IF&lt;/p&gt;
&lt;p&gt;END_IF&lt;/p&gt;
&lt;p&gt;FLANKE := CLOCK; (&lt;em&gt;Flankenmerker zurücksetzen&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;Alle Ausgänge zurücksetzen&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;OUT_1 := FALSE;&lt;/p&gt;
&lt;p&gt;OUT_2 := FALSE;&lt;/p&gt;
&lt;p&gt;OUT_3 := FALSE;&lt;/p&gt;
&lt;p&gt;OUT_4 := FALSE;&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;etc.&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;Je nach Zählerstand, den entsprechenden Ausgang auf TRUE setzen&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;CASE COUNT&lt;/p&gt;
&lt;p&gt;OF&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;OUT_1&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;TRUE&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;OUT_2&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;TRUE&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;OUT_3&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;TRUE&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;OUT_4&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;TRUE&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="o"&gt;(*&lt;/span&gt;&lt;span class="n"&gt;etc&lt;/span&gt;&lt;span class="o"&gt;.*)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;ELSE&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;Bei nicht Irrelevanten Werten von COUNT (z.B. COUNT := 0), alle Ausgänge zurücksetzen&lt;/em&gt;)&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;OUT_1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;FALSE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;OUT_2&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;FALSE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;OUT_3&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;FALSE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;OUT_4&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;FALSE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;etc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_CASE;&lt;/p&gt;
&lt;p&gt;Habs nicht getestet! Sollte aber so funktionieren.&lt;/p&gt;
&lt;p&gt;Viel Spass beim Ausprobieren! &lt;/p&gt;
&lt;p&gt;Mit freundlichen Grüssen! Pitsch&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Schrittschalter</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/1fc011a276/?limit=25#4af1" rel="alternate"/><published>2020-02-28T13:32:35.677000Z</published><updated>2020-02-28T13:32:35.677000Z</updated><author><name>Erik Böhm</name><uri>https://forge.codesys.com/u/erik-boehm/</uri></author><id>https://forge.codesys.com2bdf937e0f056caaef5be98f29351ae0dd9589ee</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Moin&lt;/p&gt;
&lt;p&gt;Was ist denn ein Schrittschalter ?&lt;/p&gt;
&lt;p&gt;Gruss Erik&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Schrittschalter</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/1fc011a276/?limit=25#7be2" rel="alternate"/><published>2020-02-28T13:32:28.072000Z</published><updated>2020-02-28T13:32:28.072000Z</updated><author><name>Rolf-Geisler</name><uri>https://forge.codesys.com/u/rolf-geisler/</uri></author><id>https://forge.codesys.com493668b23bb275049af849e1e393ca5ffc9ba7b1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo,&lt;/p&gt;
&lt;p&gt;eine - hoffentlich brauchbare - "Kochbuchanleitung" für dieses Thema findest Du unter &lt;a class="" href="http://www.geisler-controls.de/Downloads/downloads.html#Zustandsgraphen" rel="nofollow"&gt;http://www.geisler-controls.de/Downloads/downloads.html#Zustandsgraphen&lt;/a&gt;. Ein bisschen Freeware ist auch dabei.&lt;/p&gt;
&lt;p&gt;Gruss Rolf&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Schrittschalter</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/1fc011a276/?limit=25#0359" rel="alternate"/><published>2020-02-28T13:32:25.431000Z</published><updated>2020-02-28T13:32:25.431000Z</updated><author><name>lolo68</name><uri>https://forge.codesys.com/u/lolo68/</uri></author><id>https://forge.codesys.com0871f5659653d62fcc2f649eaf21f5b6e85813eb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo&lt;/p&gt;
&lt;p&gt;Ich bin neu hier, Anfänger mit codesys, aber fasziniert vom programmieren.&lt;/p&gt;
&lt;p&gt;Könnte mir jemand klären wie ich ein Schrittschalter in ST programmieren kann.&lt;/p&gt;
&lt;p&gt;Im Voraus besten dank.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>