CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Sun May 28, 2017 5:35 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Feb 28, 2017 8:45 am 
Offline

Joined: Thu Feb 23, 2017 2:54 pm
Posts: 13
Hi,
i add a plc via script to an empty project. Then i want to add an Ethernet Interface as a profinet master. The problem is to Change/configure the inteface (eth0, eth1) by script.
Can somebody give me a simple code snippet to configure that Interface.

My second problem is the device id of the profinet slaves. The id's are like: 0x002A_0x0301_DIM 19. (Siemens IM151-3 PN ST V7.0). That id throws exceptions.....

Thank you


Top
   
PostPosted: Tue Feb 28, 2017 3:19 pm 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 192
Hi Steffen_R.

Steffen_R. wrote:
Hi,
i add a plc via script to an empty project. Then i want to add an Ethernet Interface as a profinet master. The problem is to Change/configure the inteface (eth0, eth1) by script.
Can somebody give me a simple code snippet to configure that Interface.

I think the configuration of a device is stored in its device and/or host parameters. Look at my example in my previous post. You have to edit it to match your devices.

Steffen_R. wrote:
My second problem is the device id of the profinet slaves. The id's are like: 0x002A_0x0301_DIM 19. (Siemens IM151-3 PN ST V7.0). That id throws exceptions.....

In the attached python script the code prints all device descriptions with have the type 81 and add a ProfiNet slave device from the imported device description.

BR
Martin


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

_________________
Check out the CODESYS store: http://store.codesys.com/

CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions


Top
   
PostPosted: Wed Mar 01, 2017 8:26 am 
Offline

Joined: Thu Feb 23, 2017 2:54 pm
Posts: 13
Hi Martin,
it works that way.

Thank you very much

Steffen_R.


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 3 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