CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Wed Aug 15, 2018 6:04 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Mar 27, 2018 12:56 am 
Offline

Joined: Fri Nov 09, 2012 12:08 am
Posts: 4
Hi,

I'm trying to read the Serial number of the PLC using the SysTarget library function, "SysTargetGetSerialNumber" function.
I get a result of 12, when I'm expecting a value of 2341920805002900322006146049 for the Serial number.
What am I missing?
I have included the screenshot of the running program.


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Tue Mar 27, 2018 4:50 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2792
Hi,
which plc are you using,
this does not work at the moment... will be implemented to the 3.5SP13 - (June) release.

BR
Edwin


Top
   
PostPosted: Tue Mar 27, 2018 9:33 pm 
Offline

Joined: Fri Nov 09, 2012 12:08 am
Posts: 4
Hi Edwin,

Thank you for your reply. I'm trying this on a Festo PLC (CECC-LK).
Is there another way to read any unique ID of the PLC? Say Mac ID or Serial number as an example.

Edwin Schwellinger wrote:
Hi,
which plc are you using,
this does not work at the moment... will be implemented to the 3.5SP13 - (June) release.

BR
Edwin


Top
   
PostPosted: Wed Mar 28, 2018 5:54 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2792
Hi,
see attached Project...

Code:
PROGRAM PLC_PRG
VAR
   diNumber: DINT;
   iAdapter: DINT;
   stName: STRING(255);
   stDescription: STRING(255);
   aby_address:ARRAY[1..6]OF BYTE;
END_VAR


Code:
getnumberofadapters(ADR(diNumber));
FOR iAdapter := 0 TO diNumber DO
   getadapterinfo(
   iAdapterNum := iAdapter,
   pbName := ADR(stName),
   pbDescrition := ADR(stDescription),
   iBuffersize := SIZEOF(stName),
   iMacLength := 6,
   sMacAdress := ADR(aby_address));
END_FOR

BR
Edwin


You do not have the required permissions to view the files attached to this post.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: jeffgamsby and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited