<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Read Serial Number of PLC</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4d9af945a3/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4d9af945a3/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/4d9af945a3/</id><updated>2024-05-21T05:39:37.262000Z</updated><subtitle>Recent posts to Read Serial Number of PLC</subtitle><entry><title>Read Serial Number of PLC</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4d9af945a3/?limit=25#0474" rel="alternate"/><published>2024-05-21T05:39:37.262000Z</published><updated>2024-05-21T05:39:37.262000Z</updated><author><name>corriibme</name><uri>https://forge.codesys.com/u/corriibme/</uri></author><id>https://forge.codesys.comfcd694bae09ff26d4e86a2736c75cace0befa8fe</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have recently used this example from @Brine, and it worked.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Read Serial Number of PLC</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4d9af945a3/?limit=25#4252" rel="alternate"/><published>2020-02-27T15:12:34.748000Z</published><updated>2020-02-27T15:12:34.748000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com8f1c5158d8583331a1e7e14bb0fb4e0f3ce752f9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
see attached Project...&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;diNumber&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;DINT&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;iAdapter&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;DINT&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;stName&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;255&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;stDescription&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;255&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;aby_address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;ARRAY&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="nx"&gt;..6&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="nd"&gt;OF&lt;/span&gt; &lt;span class="nt"&gt;BYTE&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;getnumberofadapters(ADR(diNumber));&lt;br/&gt;
FOR iAdapter := 0 TO diNumber DO&lt;br/&gt;
   getadapterinfo(&lt;br/&gt;
   iAdapterNum := iAdapter, &lt;br/&gt;
   pbName := ADR(stName), &lt;br/&gt;
   pbDescrition := ADR(stDescription), &lt;br/&gt;
   iBuffersize := SIZEOF(stName), &lt;br/&gt;
   iMacLength := 6, &lt;br/&gt;
   sMacAdress := ADR(aby_address));&lt;br/&gt;
END_FOR&lt;/p&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=3633" rel="nofollow"&gt;GetMacAdressSp12.project &lt;span&gt;&lt;span&gt;[64.39 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Read Serial Number of PLC</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4d9af945a3/?limit=25#9f11" rel="alternate"/><published>2020-02-27T15:12:32.985000Z</published><updated>2020-02-27T15:12:32.985000Z</updated><author><name>Brine</name><uri>https://forge.codesys.com/u/brine/</uri></author><id>https://forge.codesys.com09d52686cdc6556cc879372e2ca18b1d1d9cade9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Edwin,&lt;/p&gt;
&lt;p&gt;Thank you for your reply. I'm trying this on a Festo PLC (CECC-LK).&lt;br/&gt;
Is there another way to read any unique ID of the PLC? Say Mac ID or Serial number as an example.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Edwin Schwellinger hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Hi,&lt;br/&gt;
which plc are you using,&lt;br/&gt;
this does not work at the moment... will be implemented to the 3.5SP13 - (June) release.&lt;br/&gt;
BR&lt;br/&gt;
Edwin&lt;/p&gt;
&lt;/blockquote&gt;&lt;/div&gt;</summary></entry><entry><title>Read Serial Number of PLC</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4d9af945a3/?limit=25#2f0b" rel="alternate"/><published>2020-02-27T15:12:32.368000Z</published><updated>2020-02-27T15:12:32.368000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com919ea79e56af5de46decbbd07ec032c3978dc524</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
which plc are you using,&lt;br/&gt;
this does not work at the moment... will be implemented to the 3.5SP13 - (June) release.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Read Serial Number of PLC</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4d9af945a3/?limit=25#0ce1" rel="alternate"/><published>2020-02-27T15:12:30.597000Z</published><updated>2020-02-27T15:12:30.597000Z</updated><author><name>Brine</name><uri>https://forge.codesys.com/u/brine/</uri></author><id>https://forge.codesys.com1c486eb761a52d21588a5c14623fb1a18930126e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I'm trying to read the Serial number of the PLC using the SysTarget library function, "SysTargetGetSerialNumber" function.&lt;br/&gt;
I get a result of 12, when I'm expecting a value of 2341920805002900322006146049 for the Serial number.&lt;br/&gt;
What am I missing?&lt;br/&gt;
I have included the screenshot of the running program.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: 2018" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=3625"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>