<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to ENIP.Get_Attribute_Single</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/cada41cb65/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/cada41cb65/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Deutsch/thread/cada41cb65/</id><updated>2020-02-28T03:19:45.431000Z</updated><subtitle>Recent posts to ENIP.Get_Attribute_Single</subtitle><entry><title>ENIP.Get_Attribute_Single</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/cada41cb65/?limit=25#010f" rel="alternate"/><published>2020-02-28T03:19:45.431000Z</published><updated>2020-02-28T03:19:45.431000Z</updated><author><name>Bastler83</name><uri>https://forge.codesys.com/u/bastler83/</uri></author><id>https://forge.codesys.comed6d6af2a5f34e45bae8d5335b54c63a948b1ada</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Vielen Dank. Hat geklappt! Komisch das es in WinV3 ohne "SIZEOF(REAL)*12" funktioniert...&lt;/p&gt;
&lt;p&gt;Gibt es eine Möglichkeit mit Explicit Messaging Wert von einer anderen Steuerung aus dem Codesys zu lesen?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>ENIP.Get_Attribute_Single</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/cada41cb65/?limit=25#e023" rel="alternate"/><published>2020-02-28T03:19:43.477000Z</published><updated>2020-02-28T03:19:43.477000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com16e6af7c6cb30fa3e1ada1a845a6cc81e1e3cf1b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
ich denke es fehlt einfach beim Aufruf:&lt;/p&gt;
&lt;p&gt;udiDataSize:= SIZEOF(REAL) * 12&lt;/p&gt;
&lt;p&gt;also so:&lt;/p&gt;
&lt;p&gt;(&lt;em&gt; this instance call requests the host name (= name of the device in the network) from the WAGO_750_352_FC_ETHERNET device as soon as xExecute gets TRUE &lt;/em&gt;)&lt;br/&gt;
getAttributeSingle(&lt;br/&gt;
    xExecute:= , &lt;br/&gt;
    itfEtherNetIPDevice:= Powermonitor_500, (&lt;em&gt; instance of the device (instance is found in the I/O Image of the device) &lt;/em&gt;)&lt;br/&gt;
    eClass:= ENIP.CIPClass.AssemblyObject, (&lt;em&gt; cip class which contains the desired attribute &lt;/em&gt;)&lt;br/&gt;
    dwInstance:= 101, (&lt;em&gt; value of 0 is class level, range from 1..x is instance level &lt;/em&gt;)&lt;br/&gt;
    pData:= ADR(datareal), (&lt;em&gt; data buffer &lt;/em&gt;)&lt;br/&gt;
    wAttribute:= 3, (&lt;em&gt; attribute no. 6 of the tcp/ip interface object is the Hostname (CIP Spec. Vol.2 Chapter 5-3.3.2.6)&lt;/em&gt;) &lt;br/&gt;
&lt;strong&gt;udiDataSize:= SIZEOF(REAL) * 12,&lt;/strong&gt;   xDone=&amp;gt; , &lt;br/&gt;
    xBusy=&amp;gt; , &lt;br/&gt;
    xError=&amp;gt; , &lt;br/&gt;
    eError=&amp;gt; ,);&lt;/p&gt;
&lt;p&gt;Grüße&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>ENIP.Get_Attribute_Single</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/cada41cb65/?limit=25#2ae7" rel="alternate"/><published>2020-02-28T03:19:37.995000Z</published><updated>2020-02-28T03:19:37.995000Z</updated><author><name>Bastler83</name><uri>https://forge.codesys.com/u/bastler83/</uri></author><id>https://forge.codesys.com8c2e8f68d54ee52af57271e52c5104190c62e9e3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Wiedermal brauch ich Hilfe.&lt;/p&gt;
&lt;p&gt;Im Projekt mit WinV3 funktioniert die Verbindung und ich erhalte Daten. Mit dem Raspi hingegen tut es nicht. Ist aber alles gleich. Wieso?&lt;br/&gt;
Code:&lt;br/&gt;
PROGRAM PLC_PRG&lt;br/&gt;
VAR&lt;br/&gt;
    getAttributeSingle  : ENIP.Get_Attribute_Single;    (&lt;em&gt; fb to get a single attribute from a cip class &lt;/em&gt;)&lt;br/&gt;
    datareal            : ARRAY &lt;span&gt;[0..11]&lt;/span&gt; OF REAL;&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;(&lt;em&gt; this instance call requests the host name (= name of the device in the network) from the WAGO_750_352_FC_ETHERNET device as soon as xExecute gets TRUE &lt;/em&gt;)&lt;br/&gt;
getAttributeSingle(&lt;br/&gt;
    xExecute:= , &lt;br/&gt;
    itfEtherNetIPDevice:= Powermonitor_500,     (&lt;em&gt; instance of the device (instance is found in the I/O Image of the device) &lt;/em&gt;)&lt;br/&gt;
    eClass:= ENIP.CIPClass.AssemblyObject,      (&lt;em&gt; cip class which contains the desired attribute &lt;/em&gt;)&lt;br/&gt;
    dwInstance:= 101,                   (&lt;em&gt; value of 0 is class level, range from 1..x is instance level &lt;/em&gt;)&lt;br/&gt;
    pData:= ADR(datareal),                  (&lt;em&gt; data buffer &lt;/em&gt;)&lt;br/&gt;
    wAttribute:= 3,     (&lt;em&gt; attribute no. 6 of the tcp/ip interface object is the Hostname (CIP Spec. Vol.2 Chapter 5-3.3.2.6)&lt;/em&gt;)&lt;br/&gt;
    xDone=&amp;gt; , &lt;br/&gt;
    xBusy=&amp;gt; , &lt;br/&gt;
    xError=&amp;gt; , &lt;br/&gt;
    eError=&amp;gt; ,);&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum-de.codesys.com//download/file.php?id=1703" rel="nofollow"&gt;Problem.pdf &lt;span&gt;&lt;span&gt;[383.94 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>