<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Probleme mit Bitaccess für Strukturen</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/6ec1545412/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/6ec1545412/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Deutsch/thread/6ec1545412/</id><updated>2020-02-28T11:56:00.572000Z</updated><subtitle>Recent posts to Probleme mit Bitaccess für Strukturen</subtitle><entry><title>Probleme mit Bitaccess für Strukturen</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/6ec1545412/?limit=25#f8b6" rel="alternate"/><published>2020-02-28T11:56:00.572000Z</published><updated>2020-02-28T11:56:00.572000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.come867b70bdef21d61b18b5639b465f67d2c5a57d8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; GP&lt;/p&gt;
&lt;p&gt;Hallo Herr Hess,&lt;/p&gt;
&lt;p&gt;ich habe drei Schrittmotormodule anzusteuern. Da ich die 40 bit nicht für jedes Modul neu anlegen will, habe ich Datenstrukturen definiert, über die ich mittels Zeiger auf die E/A's zugreifen will. Den Bitaccess habe ich in der Codesys-Hilfe gefunden. Dort gibt es sogar ein Beispiel dafür.&lt;/p&gt;
&lt;p&gt;Die Compileroptionen habe ich auch eingestellt. Es funktioniert aber trotzdem nicht.&lt;/p&gt;
&lt;p&gt;mfg&lt;/p&gt;
&lt;p&gt;Gero Pöschl&lt;/p&gt;
&lt;p&gt;Matrix Technologies GmbH&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Probleme mit Bitaccess für Strukturen</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/6ec1545412/?limit=25#5eef" rel="alternate"/><published>2020-02-28T11:55:53.372000Z</published><updated>2020-02-28T11:55:53.372000Z</updated><author><name>Dieter Hess</name><uri>https://forge.codesys.com/u/dieter-hess/</uri></author><id>https://forge.codesys.com5a8c231ce8eecd2950c8ca371e190e89857f7b27</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo GP,&lt;/p&gt;
&lt;p&gt;Bitaccess für Strukturen ist eher ein Spezialisten Feature, daß OEM-Kunden bei der Definition von Bibliotheken verwenden (woher kennen Sie überhaupt dies Feature?). Daher gibt es zwei nicht offensichtliche Randbedingungen die zum Funktionieren notwendig sind:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Die Bitoffsets müssen als globale Konstanten festgelegt sein also&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;VAR_GLOBAL CONSTANT&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;mbx&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;5&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;ERR&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;6&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;REQ_ACK&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="mi"&gt;7&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;ul&gt;
&lt;li&gt;Bei Projekt/Optionen/Compiler muss "Konstanten ersetzten aktiviert sein&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Gruß&lt;/p&gt;
&lt;p&gt;Dieter Hess&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Probleme mit Bitaccess für Strukturen</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/6ec1545412/?limit=25#db96" rel="alternate"/><published>2020-02-28T11:55:50.617000Z</published><updated>2020-02-28T11:55:50.617000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com3a3f1f17925f5bcc28599d458b738b41946e8f55</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; GP&lt;/p&gt;
&lt;p&gt;Hallo&lt;/p&gt;
&lt;p&gt;Ich habe folgende Datenstruktur definiert:&lt;/p&gt;
&lt;p&gt;TYPE Stepper_IF :&lt;/p&gt;
&lt;p&gt;STRUCT&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;CTL0&lt;/span&gt;    &lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;BYTE&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bitaccess&lt;/span&gt; &lt;span class="n"&gt;mbx&lt;/span&gt;  &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="s1"&gt;'Mailbox ON'&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bitaccess&lt;/span&gt; &lt;span class="n"&gt;ERR&lt;/span&gt;  &lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="s1"&gt;'ERROR,read only}&lt;/span&gt;

&lt;span class="s1"&gt;{bitaccess REQ_ACK  7 '&lt;/span&gt;&lt;span class="n"&gt;MUSS&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="n"&gt;sein&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;CTL1&lt;/span&gt;    &lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;BYTE&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_STRUCT&lt;/p&gt;
&lt;p&gt;END_TYPE&lt;/p&gt;
&lt;p&gt;Wie kann ich auf das Bit zugreifen?&lt;/p&gt;
&lt;p&gt;Monitoring der Bits geht auch nicht, oder ich bin zu dumm.? &lt;/p&gt;&lt;/div&gt;</summary></entry></feed>