<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Array auf Bool'schen Wert überprüfen</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/e1e53d61e0/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/e1e53d61e0/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Deutsch/thread/e1e53d61e0/</id><updated>2020-02-28T06:05:39.601000Z</updated><subtitle>Recent posts to Array auf Bool'schen Wert überprüfen</subtitle><entry><title>Array auf Bool'schen Wert überprüfen</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/e1e53d61e0/?limit=25#7e33" rel="alternate"/><published>2020-02-28T06:05:39.601000Z</published><updated>2020-02-28T06:05:39.601000Z</updated><author><name>Matze001</name><uri>https://forge.codesys.com/u/matze001/</uri></author><id>https://forge.codesys.comadd52d10d777dfa66d7c725eec7910e581724f20</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;wenn das Array unterschiedliche Größen haben kann, oder irgendwann mehr als 20 Einträge hat, sollte man schon mal über Schleifen nachdenken!&lt;/p&gt;
&lt;p&gt;MfG&lt;/p&gt;
&lt;p&gt;Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Array auf Bool'schen Wert überprüfen</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/e1e53d61e0/?limit=25#f9de" rel="alternate"/><published>2020-02-28T06:05:37.445000Z</published><updated>2020-02-28T06:05:37.445000Z</updated><author><name>e-pappy</name><uri>https://forge.codesys.com/u/e-pappy/</uri></author><id>https://forge.codesys.comeee8d3aa1386846290ae8c9b8bc77ae7ca7dab9b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;für die Hinweise!&lt;/p&gt;
&lt;p&gt;Die Pointer-Variante scheint mir wohl em elegantesten, obwohl Andy's Variante natürlich auch schön kurz ist &lt;/p&gt;
&lt;p&gt;Danke&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Array auf Bool'schen Wert überprüfen</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/e1e53d61e0/?limit=25#9c22" rel="alternate"/><published>2020-02-28T06:05:31.291000Z</published><updated>2020-02-28T06:05:31.291000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com56e05842d66f813f77d171e649f2e9d862513fd8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Andy :-)&lt;/p&gt;
&lt;p&gt;Hallo,&lt;/p&gt;
&lt;p&gt;Du kannst natürlich auch:&lt;/p&gt;
&lt;p&gt;fxON := (fx&lt;span&gt;[0]&lt;/span&gt; OR fx&lt;span&gt;[1]&lt;/span&gt; OR fx&lt;span&gt;[2]&lt;/span&gt; OR fx&lt;span&gt;[3]&lt;/span&gt; OR fx&lt;span&gt;[4]&lt;/span&gt; OR fx&lt;span&gt;[5]&lt;/span&gt; OR fx&lt;span&gt;[6]&lt;/span&gt; OR fx&lt;span&gt;[7]&lt;/span&gt;);&lt;/p&gt;
&lt;p&gt;schreiben...&lt;/p&gt;
&lt;p&gt;Andy&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Array auf Bool'schen Wert überprüfen</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/e1e53d61e0/?limit=25#ad53" rel="alternate"/><published>2020-02-28T06:05:29.060000Z</published><updated>2020-02-28T06:05:29.060000Z</updated><author><name>Erik Böhm</name><uri>https://forge.codesys.com/u/erik-boehm/</uri></author><id>https://forge.codesys.com743c3d74f7228030adcd31b4f3b5f05a16e85c72</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Moin&lt;/p&gt;
&lt;p&gt;Die erste Frage ist natürlich: Warum keine Schleife ???&lt;/p&gt;
&lt;p&gt;Du könntest alternativ auf das ARRAY einen Pointer to BYTE zeigen lassen, und dann das Byte auf Wert &amp;lt;&amp;gt; 0 abfragen.&lt;/p&gt;
&lt;p&gt;Oder anstatt dem ARRAY of BOOL ein Byte benutzen, und die einzelnen Bits ansprechen.&lt;/p&gt;
&lt;p&gt;Oder das ARRAY auf eine feste Adresse legen, ein Byte auf die selbe Adresse und wieder das Byte abfragen.&lt;/p&gt;
&lt;p&gt;Der Pointer wäre zweifellos das eleganteste.&lt;/p&gt;
&lt;p&gt;Gruss&lt;/p&gt;
&lt;p&gt;Erik&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Array auf Bool'schen Wert überprüfen</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/e1e53d61e0/?limit=25#257f" rel="alternate"/><published>2020-02-28T06:05:23.011000Z</published><updated>2020-02-28T06:05:23.011000Z</updated><author><name>e-pappy</name><uri>https://forge.codesys.com/u/e-pappy/</uri></author><id>https://forge.codesys.com019b8531087ecdf829f8550cc7efe601d9609d00</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo zusammen!&lt;/p&gt;
&lt;p&gt;Programmiere gerade in ST und Frage mich die ganze Zeit, ob es nicht irgendeinen Befehl gibt, der mir das hier vereinfachen kann:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;VAR&lt;/span&gt;
    &lt;span class="nv"&gt;fx&lt;/span&gt; : &lt;span class="nv"&gt;ARRAY&lt;/span&gt; [&lt;span class="mi"&gt;0&lt;/span&gt;..&lt;span class="mi"&gt;7&lt;/span&gt;] &lt;span class="nv"&gt;OF&lt;/span&gt; &lt;span class="nv"&gt;BOOL&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;fxON&lt;/span&gt; : &lt;span class="nv"&gt;BOOL&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;END_VAR&lt;/span&gt;
&lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="nv"&gt;fx&lt;/span&gt;[&lt;span class="mi"&gt;0&lt;/span&gt;] &lt;span class="nv"&gt;OR&lt;/span&gt; &lt;span class="nv"&gt;fx&lt;/span&gt;[&lt;span class="mi"&gt;1&lt;/span&gt;] &lt;span class="nv"&gt;OR&lt;/span&gt; &lt;span class="nv"&gt;fx&lt;/span&gt;[&lt;span class="mi"&gt;2&lt;/span&gt;] &lt;span class="nv"&gt;OR&lt;/span&gt; &lt;span class="nv"&gt;fx&lt;/span&gt;[&lt;span class="mi"&gt;3&lt;/span&gt;] &lt;span class="nv"&gt;OR&lt;/span&gt; &lt;span class="nv"&gt;fx&lt;/span&gt;[&lt;span class="mi"&gt;4&lt;/span&gt;] &lt;span class="nv"&gt;OR&lt;/span&gt; &lt;span class="nv"&gt;fx&lt;/span&gt;[&lt;span class="mi"&gt;5&lt;/span&gt;] &lt;span class="nv"&gt;OR&lt;/span&gt; &lt;span class="nv"&gt;fx&lt;/span&gt;[&lt;span class="mi"&gt;6&lt;/span&gt;] &lt;span class="nv"&gt;OR&lt;/span&gt; &lt;span class="nv"&gt;fx&lt;/span&gt;[&lt;span class="mi"&gt;7&lt;/span&gt;] &lt;span class="k"&gt;THEN&lt;/span&gt;
    &lt;span class="nv"&gt;fxON&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;TRUE&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;ELSE&lt;/span&gt;
    &lt;span class="nv"&gt;fxON&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;span class="c1"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Ich will also das Array auf einen TRUE-Wert überprüfen, aber ohne eine Schleife einzusetzen. Gibt es da von CoDeSys direkt einen Befehl der das überprüfen kann?&lt;/p&gt;
&lt;p&gt;Danke&lt;/p&gt;
&lt;p&gt;mfG&lt;br/&gt;
Patrick&lt;span&gt;[/code]&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>