<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Moeller XC201 und Inkrementalgeber</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/2981986266/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/2981986266/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Deutsch/thread/2981986266/</id><updated>2020-02-28T05:36:53.276000Z</updated><subtitle>Recent posts to Moeller XC201 und Inkrementalgeber</subtitle><entry><title>Moeller XC201 und Inkrementalgeber</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/2981986266/?limit=25#6077" rel="alternate"/><published>2020-02-28T05:36:53.276000Z</published><updated>2020-02-28T05:36:53.276000Z</updated><author><name>Borsti</name><uri>https://forge.codesys.com/u/borsti/</uri></author><id>https://forge.codesys.comd65bae7d83011d1fc162497950c77a2cbf5fea7e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Danke Michael, ich werds mal testen...&lt;/p&gt;
&lt;p&gt;LG&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Moeller XC201 und Inkrementalgeber</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/2981986266/?limit=25#c7d0" rel="alternate"/><published>2020-02-28T05:36:51.154000Z</published><updated>2020-02-28T05:36:51.154000Z</updated><author><name>Michael.Klank</name><uri>https://forge.codesys.com/u/michael-klank/</uri></author><id>https://forge.codesys.com4b97d53a3a58b708b6e2b50b19a0b4713fb79ab1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Wie soll das auch gehen? Sobald du eine Geschwindigkeit größer 1 Inkrement/Abtastzeit hast, wirst du nur zufällig mal die Null erwischen! Du kannst also nur den Zyklus rausfinden in dem der Modulowert gekippt ist. &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt; &lt;span class="nv"&gt;ModuloWert&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;8000&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
 &lt;span class="nv"&gt;iDiff&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;iGeberWert&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;iGeberWertOld&lt;/span&gt;&lt;span class="c1"&gt;; &lt;/span&gt;
 &lt;span class="nv"&gt;iGeberWertOld&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;iGeberWert&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
 &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nv"&gt;ABS&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;iDiff&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;ModuloWert&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
   &lt;span class="nv"&gt;bNullDurchgang&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="nv"&gt;end_if&lt;/span&gt;
...
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Es geht auch noch etwas genauer mit Totzeitkompensation usw. (Nockenschaltwerk) aber das sollte so funktionieren, ist aber nicht getestet, weil ich nicht im Büro bin.&lt;/p&gt;
&lt;p&gt;Ich hoffe das hilft Dir weiter.&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Moeller XC201 und Inkrementalgeber</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/2981986266/?limit=25#2a22" rel="alternate"/><published>2020-02-28T05:36:45.291000Z</published><updated>2020-02-28T05:36:45.291000Z</updated><author><name>Borsti</name><uri>https://forge.codesys.com/u/borsti/</uri></author><id>https://forge.codesys.com7b87abffb2ca11bd3c62e067e23371ff67037884</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo zusammen!&lt;/p&gt;
&lt;p&gt;Ich bin ein blutiger Codesys- und leider auch Moeller Neuling, daher bitte ich vorab schonmal um Verzeihung &lt;/p&gt;
&lt;p&gt;Ich habe eine Moeller CPU 201- in welcher man die Eingänge 0.0-0.3 für einen Drehgeber verwenden kann. &lt;/p&gt;
&lt;p&gt;Soweit so gut, das funktioniert auch alles. Der Drehgeber gibt auch die Werte von 0-7999 ab, springt wieder &lt;/p&gt;
&lt;p&gt;auf null und zählt wieder hoch. (permanente Hardwarereferenzierung)&lt;/p&gt;
&lt;p&gt;Nun will ich aber jeden Nulldurchgang erfassen, und da stehe ich vor meinem Problem: &lt;/p&gt;
&lt;p&gt;wenn ich sehr langsam drehe erkennt er die null, sobald ich etwas schneller drehe (langsamer als 1U/sec.) &lt;/p&gt;
&lt;p&gt;wird der Nulldurchgang nicht mehr erkannt. &lt;/p&gt;
&lt;p&gt;Vom Programm her siehts so aus&lt;/p&gt;
&lt;p&gt;LD   %IW2              (&lt;em&gt;Zählerstand-Low-Word&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;EQ   0                     (&lt;em&gt;Vergleich mit Null&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;S     Nulldurchgang  (&lt;em&gt;Variable - BOOL&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;Rückgesetzt wird später im Programm, wenn denn mal gesetzt wird und ich nicht zu schnell &lt;/p&gt;
&lt;p&gt;am Drehgeber gedreht habe....&lt;/p&gt;
&lt;p&gt;Wäre sehr dankbar für Eure Hilfe!!!&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>