Hilscher Community Forum
Read/write data from S7 with netPI over Profinet - Printable Version

+- Hilscher Community Forum (https://forum.hilscher.com)
+-- Forum: General Infos (https://forum.hilscher.com/forum-28.html)
+--- Forum: Projects (https://forum.hilscher.com/forum-41.html)
+--- Thread: Read/write data from S7 with netPI over Profinet (/thread-599.html)

Pages: 1 2


Read/write data from S7 with netPI over Profinet - student - May-25th-2020

Hello,

I need some help with my project. I have to read/write data from an S7 1500 PLC with the netPI using Node-RED over Profinet. The "netPI-nodered-fieldbus" container is running, I implemented the netPI into my TIA-Project, did the physical and software connection and I have included the Profinet-Node into my flow. Everything works fine. 

Now I want to read and write data from my DB, But how can I do this? The PUT/GET option is activated and the hook on static addresses is deleted in the properties of my DB.
I tried it with the s7comm-Nodes but this seems to be wrong, there is no connection respectively there is a missing configuration. 
Maybe I have to use a JSON payload after the fieldbus-in Node? But I don't know how to read data from my DB in the TIA Project with it.

I put my Flow into the attachment. 

Thanks!

Marcel

 


RE: Read/write data from S7 with netPI over Profinet - Armin@netPI - May-25th-2020

Hello, your understanding is not correct.

If you want to read/write data sets from/to an S7 PLC like your Windows TIA portal software is doing it during programming session or diagnostics then you do NOT need fieldbus nodes and you have to use S7 Comm nodes instead. These nodes support a subset of the functiond a TIA portal software supports. For this the netPI and IP address needs to be in the same subnet as you TIA Portal Windows PC and connected to the same Ethernet switch for example. Then the S7comm nodes can access to the PLC at the same time as your TIA portal software.

In contrast of this previous use case is if you want to exchange process data from PLC I/O buffers with a PROFINET IO slave like with Beckhoff IO or Wago IO devices, then you need the fieldbus nodes. The Fieldbus nodes let the netPI simulating IO data that can be exchanged with Node-RED forth and back.

Thx
Armin


RE: Read/write data from S7 with netPI over Profinet - Armin@netPI - May-25th-2020

There is one more remark in addition. While cyclic IO goes over 2xRJ45 real-time ethernet ports, the acyclic communication put/get with the S7comm nodes goes over the single RJ45 Ethernet port


RE: Read/write data from S7 with netPI over Profinet - student - May-25th-2020

At first thank you very much for the fast reply and the good information.

That is what I already thought. The device delivers just the information from the S7 to other Profinet IO devices over the Fieldbus ports. The s7comm-nodes communicate about tcp/ip and that was my fault. 


I have a further question: for one of my project tasks, I have to find out how the netPI can communicate with an S7 plc via Profinet on the one hand as a device and on the other hand as a master device. What I read is that the netX controller is not able to work as a master device. is that right? 

Thank you!

Marcel


RE: Read/write data from S7 with netPI over Profinet - Armin@netPI - May-25th-2020

Yes this is right. netX51 type of chip cannot be a master. It supports device protocol stacks only.

But if you want to let a Rasperry Pi be a PROFINET master (and because netPI is compatible to RPi it works with netPI too) then this is very easy. It goes across the eth0 port using CODESYS SoftPLC. You can test it 2 hours for free then the PLC stops. So you can replace an S7 PLC with a Raspberry Pi or netPI.

Next to PROFINET master, CODESYS can also be EtherNet/IP master or EtherCAT master.

Thx
Armin


RE: Read/write data from S7 with netPI over Profinet - student - May-25th-2020

Thank you very much, the information is very helpful!

Marcel


RE: Read/write data from S7 with netPI over Profinet - student - July-17th-2020

Hello Armin,

I'm still working on my project to read/write data with the netpi from an S7-1500 plc with Profinet using node-red.
At the start, I had these problems which i posted here. Your information was very helpfully so I finished the first part of my project. I was able to read/write data from the S7 with the fieldbus nodes and everything worked fine.
A few days ago, I had to reinstall the netPI. I installed the docker container netPI-nodered-fieldbus as I did it the first time. But now I'm not able to read or write the profinet signal. The output gives me some values which doesnt make sense. I did everything as before time but it doesnt work. So i thought maybe there is a new version of netPI-nodered-fieldbus on GitHub. 14 days ago, there was a update for these container. maybe something is wrong with that? could you check it? I cannot explain why my implementation should be wrong, everything is as before when it worked.

Thank you very much!

Best regards,
Marcel


RE: Read/write data from S7 with netPI over Profinet - Armin@netPI - July-17th-2020

Well the fieldbus node itself has not been changed since 2 years. Correct is that from time to time we are updating Node-RED itself to the latest version.

If you look to the container images be build under https://hub.docker.com/r/hilschernetpi/netpi-nodered/tags you see the releases von the Node-RED container we made.

If you feel that the current container is not working properly you can specify an exact version that is loaded instead of the "latest". So try to load and older tag like "hilschernetpi/netpi-nodered:1.5.6" for example.

Give report if this or any other version works better.

Thx
Armin


RE: Read/write data from S7 with netPI over Profinet - student - July-17th-2020

Hello,

thank you for the quick reply.
But I meant the container: https://github.com/HilscherAutomation/netPI-nodered-fieldbus/releases/tag/1.2.0
14 days ago there was a netx driver update. maybe there are problems to use profinet with it.

Thank you.

Beste regards,
Marcel


RE: Read/write data from S7 with netPI over Profinet - Armin@netPI - July-17th-2020

But also for this container there are several tags available. Please watch yourself

https://registry.hub.docker.com/r/hilschernetpi/netpi-nodered-fieldbus/tags

There is a tag 1.1.0 this is 5 month old.