• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Profinet to Siemens PLC

I'm definitely not an expert in profinet and PLC but I've been reading lots of posts on this forum and it got me confused.

We want to exchange information between a PLC and the netPI RTE with PROFINET.

We plugged one of the fieldbus port into a siemens profinet ET 200S (I currently don't know what PLC we are using). On TIA portal we made the connection using the GSD file and gave a name and an IP to the netPI. We are using the netpi-nodered container (latest) and inside nodered, we use the fieldbus node. We correctly created the profinet table with a simple send (1 byte) and receive (1 byte). We made the same table in TIA. When we deploy the flow, everything is green and TIA portal shows that the connection is correct. This is working because if we change the netPI profinet table, TIA portals shows an error related a profinet table mismatch. We use a send fieldbus node and a receive one. They are correctly mapped to an inject node and a debug console.

When we deploy, we have a first receive message from profinet, with no error, showing a value of 0 (but the value in the PLC is not zero). Even if we change a value in the PLC, nodered does not detect it (it does not even receive a message from profinet). When we send a value, the PLC does not detect it either. It feels just like they are writing and reading in a different address but everything is properly configured.

What got me confused is the s7comm node. In a post, I saw that if we want to exchange data with the PLC, the s7comm node should be used over the main Ethernet port of the netPI (not the 2xRJ45 card). So basically we are not talking about profinet anymore ? We should'nt use the fieldbus card to exchange data with the PLC ?

Sorry if my questions are a bit... obvious to answer for you, but I'm definitely not an expert and even my coworkers (dealing with PLC stuff) are kinda confused because they don't really know nodered and the netPI technology  Sad

Best regards

Hi there again,

yes you are right. There are indeed two use cases.

In use case A.) netPI is driven in PROFINET mode and then it is part of a PROFINET mastered network where a PLC writes data cyclically from an output buffer to a PROFINET device and read data cyclically data from a device and put this data in an input buffer. For such a communication the netPI RTE 3 has a dual-rj45 port interface being capable of be driven as such a PROFINET device.

In use case B.) the netPI is behaving like TIA portal and just uses the TCP/IP based programming commands going forth and back between a PLC and TIA portal software usually. This use case does not need netPI RTE 3 PROFINET ports. It just needs a normal Ethernet port.

The use case B.) you can easily check yourself with any other standard Ethernet device like a PC or notebook. Install Node-RED under windows on this PC and post install the S7comm node additionally. Connect this PC to the (second) S7 PLC port (configure the PCs IP address well to fit the IP subnet of the PLC) and you can communicate with your PC to the PLC being able to read or write data from/to the buffers of the PLC immediately

Back to your initial problem. In the Node-RED on netPI ... does the node status printed out under the Node-RED indicate "communicating"? And are the LEDs RUN an ERR on netPI are both off and not shining? Are the SF BF LEDs on your PLC are also green and not indicating any red color?

You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

Thank you for your reply. That is what I understood thank you for the clariification.

Yes everything is green on the PLC and the netPI LED are both off. Nodered is printing communicating.
So far everything seems to work but the received values are always zero regardless the data type.

When I send a value using the inject node, the PLC does not detect any changes.
So all LEDs and status of the Node-RED node is perfect. Both devices are definitively exchanging data across their buffers.

Well you say you are not an expert with the PLC.

How do you write the values? Did you write a small PLC program? Clicking the netPI device you see the offset address where it is occupying data in the PLC output buffer.

The easiest start is indeed always to set data in the PLC and wait for any injection in Node-RED using the fieldbus output node. Then you can directly wire the Node-RED fieldbus output node to the Node-RED fieldbus input node to mirror the data back. This guarantees that there are no formatting issues with JSON output object in contrast to when you build an inject message yourself.

So first we have to see you are getting some outputs injected
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

We simply created a watch table in the PLC and forced some values within it.

But everything works now !

"Clicking the netPI device you see the offset address where it is occupying data in the PLC output buffer."
It really helped thank you !
In fact, when creating the PN I/O, TIA automatically sets the start address to 256 (why not) which normally should not be a problem. So we forced the values inside the watch table starting from this address but it did not work.
To check if the start address was a problem, we manually switch the start address to 10... and now it works.

Somehow, the automatic start address of TIA does not work really well... it's better to find one by yourself.

We checked every communication with nodered and everything works super well. The mirror is working well so our data types are correct.

Thank you again for your time and your help !

Best regards,


Possibly Related Threads…
Thread Author Replies Views Last Post
  Profinet name lost after reboot Dipro 7 5,185 November-16th-2020, 01:07 PM
Last Post: Armin@netPI
  Profinet stopped working (spidev spi0.0: SPI transfer timed out) Schranz 7 5,382 November-2nd-2020, 04:20 PM
Last Post: Armin@netPI
  netPI profinet device name WalterSchaefer 2 2,662 October-7th-2020, 11:10 AM
Last Post: WalterSchaefer
  Siemens PLC -Uploading and downloading using netPI & VPN SAhire@hilscher.local 22 15,665 July-20th-2020, 02:08 PM
Last Post: Armin@netPI
  how to pick up PROFINET data and store them to OPC UA server on Node-RED/netPI. tad 7 6,055 March-16th-2020, 10:21 AM
Last Post: Armin@netPI
  PROFINET IO startup compilation arpan.patel@slscorp.com 3 3,077 February-24th-2020, 12:47 PM
Last Post: Armin@netPI
  Profinet Startup Time Schranz 3 3,681 November-18th-2019, 03:22 PM
Last Post: Armin@netPI
  Codesys RTE profinet echteler 2 3,589 September-25th-2019, 09:56 AM
Last Post: Armin@netPI
  normal ethernet port using for Profinet MGharat 4 4,951 August-7th-2019, 10:39 AM
Last Post: hannes
  Detecting NetPI in Siemens TIA via Profinet andrewc 3 4,084 April-11th-2019, 06:42 PM
Last Post: Armin@netPI

Forum Jump:

Users browsing this thread: 1 Guest(s)