<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to How to know the IP address</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/61d60a9fb7/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/61d60a9fb7/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/61d60a9fb7/</id><updated>2020-12-01T20:22:14.454000Z</updated><subtitle>Recent posts to How to know the IP address</subtitle><entry><title>How to know the IP address</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/61d60a9fb7/?limit=25#1087/1ebc" rel="alternate"/><published>2020-12-01T20:22:14.454000Z</published><updated>2020-12-01T20:22:14.454000Z</updated><author><name>agea28</name><uri>https://forge.codesys.com/u/agea28/</uri></author><id>https://forge.codesys.com31a7c281a107c0278329b3532d0b6126e34140de</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;And is this the same way for wlan0 address ?&lt;br/&gt;
Host.pAddrList&lt;span&gt;[0]&lt;/span&gt; returns the eth0 address but wlan0 is another adapter of addrList[], no ?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to know the IP address</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/61d60a9fb7/?limit=25#83ac" rel="alternate"/><published>2020-02-27T16:45:31.832000Z</published><updated>2020-02-27T16:45:31.832000Z</updated><author><name>nothinrandom</name><uri>https://forge.codesys.com/u/nothinrandom/</uri></author><id>https://forge.codesys.com28e5a53761aee655092b211406bd0f39406f2dd9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Great info! So is there a way to combine these two and get the IP address from eth0 always? Thanks&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to know the IP address</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/61d60a9fb7/?limit=25#18b7" rel="alternate"/><published>2020-02-27T16:45:29.279000Z</published><updated>2020-02-27T16:45:29.279000Z</updated><author><name>switcher</name><uri>https://forge.codesys.com/u/switcher/</uri></author><id>https://forge.codesys.com3df148840e4b919862234ed56a901fc920ea84f6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Great!&lt;/p&gt;
&lt;p&gt;Is there possible to get a Serial number from CPU?&lt;/p&gt;
&lt;p&gt;Thank You!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Zdenko.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to know the IP address</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/61d60a9fb7/?limit=25#6eb6" rel="alternate"/><published>2020-02-27T16:45:28.213000Z</published><updated>2020-02-27T16:45:28.213000Z</updated><author><name>mike197678</name><uri>https://forge.codesys.com/u/mike197678/</uri></author><id>https://forge.codesys.com3698bdbb21365f40ebefda76c6f4e0d7921bd236</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank You,&lt;/p&gt;
&lt;p&gt;work perfect.&lt;/p&gt;
&lt;p&gt;Thank you very much&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to know the IP address</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/61d60a9fb7/?limit=25#5dcb" rel="alternate"/><published>2020-02-27T16:45:27.268000Z</published><updated>2020-02-27T16:45:27.268000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com813d2f54cf82765d250683298b902903bc0a9b7d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
yes even this is possible:&lt;br/&gt;
You need to ad 'CmpSysEthernet' to the LibraryManager&lt;br/&gt;
then then the following code snippet should help.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;getnumberofadapters&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;ADR&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;diNumber&lt;/span&gt;&lt;span class="ss"&gt;))&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="nv"&gt;iAdapter&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="nv"&gt;TO&lt;/span&gt; &lt;span class="nv"&gt;diNumber&lt;/span&gt; &lt;span class="nv"&gt;DOPROGRAM&lt;/span&gt; &lt;span class="nv"&gt;PLC_PRG&lt;/span&gt;
&lt;span class="nv"&gt;VAR&lt;/span&gt;
   &lt;span class="nv"&gt;diNumber&lt;/span&gt;: &lt;span class="nv"&gt;DINT&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
   &lt;span class="nv"&gt;iAdapter&lt;/span&gt;: &lt;span class="nv"&gt;DINT&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
   &lt;span class="nv"&gt;stName&lt;/span&gt;: &lt;span class="nv"&gt;STRING&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
   &lt;span class="nv"&gt;stDescription&lt;/span&gt;: &lt;span class="nv"&gt;STRING&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
   &lt;span class="nv"&gt;aby_address&lt;/span&gt;:&lt;span class="nv"&gt;ARRAY&lt;/span&gt;[&lt;span class="mi"&gt;1&lt;/span&gt;..&lt;span class="mi"&gt;6&lt;/span&gt;]&lt;span class="nv"&gt;OF&lt;/span&gt; &lt;span class="nv"&gt;BYTE&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;END_VAR&lt;/span&gt;
   &lt;span class="nv"&gt;getadapterinfo&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;
   &lt;span class="nv"&gt;iAdapterNum&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;iAdapter&lt;/span&gt;, 
   &lt;span class="nv"&gt;pbName&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;ADR&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;stName&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;, 
   &lt;span class="nv"&gt;pbDescrition&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;ADR&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;stDescription&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;, 
   &lt;span class="nv"&gt;iBuffersize&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;SIZEOF&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;stName&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;, 
   &lt;span class="nv"&gt;iMacLength&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;, 
   &lt;span class="nv"&gt;sMacAdress&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;ADR&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;aby_address&lt;/span&gt;&lt;span class="ss"&gt;))&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;END_FOR&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: mac.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2243"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to know the IP address</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/61d60a9fb7/?limit=25#bb04" rel="alternate"/><published>2020-02-27T16:45:24.770000Z</published><updated>2020-02-27T16:45:24.770000Z</updated><author><name>mike197678</name><uri>https://forge.codesys.com/u/mike197678/</uri></author><id>https://forge.codesys.comddc3acd9d6b214f34aff135b3bffde89f14bd63e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;great, &lt;br/&gt;
and the mac adress?&lt;/p&gt;
&lt;p&gt;thx&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to know the IP address</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/61d60a9fb7/?limit=25#312c" rel="alternate"/><published>2020-02-27T16:45:23.864000Z</published><updated>2020-02-27T16:45:23.864000Z</updated><author><name>JAPIB</name><uri>https://forge.codesys.com/u/japib/</uri></author><id>https://forge.codesys.com409ef7fde9222ade15de49867aa907f05a54cd16</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Edwin,&lt;br/&gt;
Thank you. Its work well.&lt;br/&gt;
How to discover the possibilitése all those libraries that are not documented in the online help ?&lt;br/&gt;
It lacks a Wikipedia section !  &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to know the IP address</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/61d60a9fb7/?limit=25#1087" rel="alternate"/><published>2020-02-27T16:45:21.299000Z</published><updated>2020-02-27T16:45:21.299000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.coma61ebe7739f69d378e9c76257410b92033c35a76</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Jabib,&lt;/p&gt;
&lt;p&gt;use SysSocket lib following codesnippet or check attached Project example&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;PROGRAM&lt;/span&gt; &lt;span class="nt"&gt;PLC_PRG&lt;/span&gt;
&lt;span class="nt"&gt;VAR&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;sHostName&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;STRING&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Host&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;SysSocket&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;SOCK_HOSTENT&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;pIPAddress&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;POINTER&lt;/span&gt; &lt;span class="nt"&gt;TO&lt;/span&gt; &lt;span class="nt"&gt;DWORD&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;in_addr&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;INADDR&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;sIPAddress&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;STRING&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="s1"&gt;'aaa.bbb.ccc.ddd'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;sTextEingabe&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;String&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;span class="o"&gt;(*&lt;/span&gt; &lt;span class="nt"&gt;Get&lt;/span&gt; &lt;span class="nt"&gt;own&lt;/span&gt; &lt;span class="nt"&gt;hostname&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="o"&gt;*)&lt;/span&gt;
&lt;span class="nt"&gt;SysSockGetHostName&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;szHostName&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;sHostName&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;diNameLen&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;SIZEOF&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;sHostName&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;
&lt;span class="o"&gt;(*&lt;/span&gt; &lt;span class="nt"&gt;Get&lt;/span&gt; &lt;span class="nt"&gt;own&lt;/span&gt; &lt;span class="nt"&gt;IP&lt;/span&gt; &lt;span class="nt"&gt;address&lt;/span&gt; &lt;span class="nt"&gt;by&lt;/span&gt; &lt;span class="nt"&gt;its&lt;/span&gt; &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="o"&gt;*)&lt;/span&gt;
&lt;span class="nt"&gt;SysSockGetHostByName&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;szHostName&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;sHostName&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;pHost&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;ADR&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;Host&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;
&lt;span class="nt"&gt;pIPAddress&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;Host&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;pAddrList&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="o"&gt;;//&lt;/span&gt; &lt;span class="nt"&gt;select&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;adapter&lt;/span&gt; &lt;span class="nt"&gt;of&lt;/span&gt; &lt;span class="nt"&gt;addrList&lt;/span&gt;&lt;span class="cp"&gt;[]&lt;/span&gt;
&lt;span class="nt"&gt;in_addr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ulAddr&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;pIPAddress&lt;/span&gt;&lt;span class="o"&gt;^;&lt;/span&gt;
&lt;span class="nt"&gt;SysSockInetNtoa&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;pInAddr&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;ADR&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;in_addr&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt;&lt;span class="nt"&gt;szIPADDR&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;sIPAddress&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;diIPAddrSize&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;SIZEOF&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;sIPAddress&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=1164" rel="nofollow"&gt;PiFaceIoDrv_LadderExample_andSysProcess.project &lt;span&gt;&lt;span&gt;[104.28 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to know the IP address</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/61d60a9fb7/?limit=25#e204" rel="alternate"/><published>2020-02-27T16:45:20.401000Z</published><updated>2020-02-27T16:45:20.401000Z</updated><author><name>JAPIB</name><uri>https://forge.codesys.com/u/japib/</uri></author><id>https://forge.codesys.com6f9a2c8d7f0b66fb5ae6087904b9b47aba8ed6b2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello &lt;br/&gt;
My raspberry get an IP address by a DHCP server. I want to show it on a visualisation page.&lt;br/&gt;
What function block and what library should J use to find the IP address by programme......&lt;br/&gt;
Thank you in advance for your reply  &lt;/p&gt;&lt;/div&gt;</summary></entry></feed>