• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read/write data from S7 with netPI over Profinet
#1
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

 


Attached Files Thumbnail(s)
   
  Reply
#2
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
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#3
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
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#4
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
  Reply
#5
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
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#6
Thank you very much, the information is very helpful!

Marcel
  Reply
#7
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
  Reply
#8
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/n...dered/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
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#9
Hello,

thank you for the quick reply.
But I meant the container: https://github.com/HilscherAutomation/ne.../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
  Reply
#10
But also for this container there are several tags available. Please watch yourself

https://registry.hub.docker.com/r/hilsch...ldbus/tags

There is a tag 1.1.0 this is 5 month old.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] Storing data on a (remote) database MGharat 20 20,327 June-13th-2022, 03:05 PM
Last Post: Armin@netPI
  Realize your first netFIELD project - write to contact@netfield.io Armin@netPI 0 1,934 December-23rd-2020, 09:39 AM
Last Post: Armin@netPI
  Converter from TCP/IP to ProfiNet WalterSchaefer 8 6,485 August-5th-2020, 08:31 PM
Last Post: WalterSchaefer
  Send Data to Specific Port via UDP Hoeber 2 3,355 July-29th-2020, 09:10 AM
Last Post: Hoeber
  PROFINET to OPC UA data conversion with Node-RED Armin@netPI 0 3,480 July-7th-2020, 12:20 PM
Last Post: Armin@netPI
  Getting data from AllenBradley PLC MarcoMedina 3 4,036 February-26th-2020, 11:53 AM
Last Post: Armin@netPI
  Fetch data from S7 PLC Profibus DP MGharat 3 3,679 March-14th-2019, 11:21 AM
Last Post: Armin@netPI
  netPI as simulator for PROFINET "shared devices" reiboh 1 3,044 January-15th-2018, 05:29 PM
Last Post: Armin@netPI
  IBM sensor data historian and analytics engine for the netPi AlexKoeMuc 0 2,273 November-28th-2017, 01:39 PM
Last Post: AlexKoeMuc

Forum Jump:


Users browsing this thread: 1 Guest(s)