Siemens PLC and python communication over profinet

Hello Guys,
I want to establish profinet communication between siemens plc and my system using python programming. Which python lib can i use to have the communication or what is the way to do the following?

Note: I need profinet communication

Thank you in advance!
 
Not really, because I would like to first know which library or what is the method to have the profinet communication with plc using python script.
 
Not really, because I would like to first know which library or what is the method to have the profinet communication with plc using python script.
I would be willing to bet there is no profinet-capable module in the canonical Python ecosystem (e.g. PyPi, anaconda, etc.). So your best bet is to search Github, like I did, or ask The Google where to find such a module.

The first hit in that Github search appears to be such a module; whether it meets your needs, or even works at all, is another question entirely.
 
Hmm, I am way off base here.

First of all, there is a module that claims to talk Profinet available via Pypi and pip; see here.

Also, Profinet operates at the a MAC-address level, so I wonder if there is a Python library that actually talks Profinet (although that pnio-dcp does access a packet-capture facility, so maybe it does).

There is summat called python-snap7, but that's not using Profinet. Modbus would be another option, if you have access to the siemens plc.

[updated to add clarity and maybe correct a few (more) things ;)]
 
As drbitboy points out, pnio-dcp does some of the ProfiNet implementation; but it is only the DCP (Discovery and Configuration Protocol) request stuff which is the initial configuration of a ProfiNet device. There won't be a full implementation of Profinet as a library in python, you'd need to search github and then you likely won't find anything.
When I have wanted to setup stuff to a Siemens PLC I have looked to using Snap7 instead of ProfiNet. Otherwise if the Siemens PLC is new enough look to OPC/UA stuff.
 
So the short answer is no, the long answer is it's complicated. There's not many if any Python libraries out there that can talk profinet to begin with, and those libraries don't socket well at all really with other Python libraries that can communicate to PLCs, like Pycomm3, libplctag, OPC UA, and others.
that said, there's always a path to follow, you can get profinet/modbus/ethernet translators and hodge podge something together, but that sounds more like a cowboy solution than it does an engineering solution. I use Pycomm3 and Pylogix to do all of my communications between python and PLC, I'd look into their documentation to find out if they can change the network protocol, I know python-snap7 has some features that might be helpful
 
Siemens S7 plcs can have profinet communication using python-snap7, there's also the choice of switching languages and in C++'s realm, there's OpenProfinet, you could hodge podge together some weird code that switches between python's pylogix, pycomm3, python-snap7, and/or others and then translates information to C++ libraries to get the communication via OpenProfinet, this can be done with the many many C++ Python translation libraries out there, but that wildly effects your project scope
 
raghu_K. are you absolutely certain that you need real PROFINET communication ?
Is your side to be the PROFINET IO Controller, or the PROFINET IO Device ?
What are the exact requirements, other than 'it must be PROFINET' ?

Siemens S7 plcs can have profinet communication using python-snap7,
Pythons-Snap7 is S7-Protocol, not PROFINET.
 
yeah, I didn't know that, I'm not too familiar with Siemens, but it's the only one of the few PLC interactive libraries I know of, good questions though, I'm skeptical about how much profinet is really needed
 

Similar Topics

Hi everyone, I am urgently looking to purchase a Siemens S7-200 CPU 224 DC/DC/DC PLC, part number 6ES7 214-1AD23-0XB0, as a spare for an existing...
3
Replies
168
Views
Hello everyone, I am facing a problem with an MTP700 HMI connected to a Siemens S7-1200 PLC. I have configured the communication, PLC tags, and...
3
Replies
269
Views
Hello all, I have a siemens 1200 PLC can't connect HMI KPT900 basic. my laptop can download program to PLC and also can download program to HMI. I...
1
Replies
209
Views
We need to integrate a sorting station. 4 barcode scanners (probably cognex), 2 scales, 2 Zebra Printers, 4 HMI, 1 PLC Also some physical...
13
Replies
847
Views
I will be uploading and providing link to ISO file soon. Meanwhile if anyone has that software please feel free to share.
2
Replies
353
Views
Top