Using Node-RED and (Step7) PLCSIM


I am learning to program PLCs, specifically Siemens Step7 with TIA Portal, and in the meanwhile I am following some tutorials to use Node-RED to create HMI (just to write/read some data). Specifically I am using the "S7" nodes

I am using PLCSIM to do the first trials, but I am not being able to communicate the virtual PLC and Node-RED. I am using NetToPLCsim to create a virtual connection (I introduced the IP assigned to the PLC and the address of the ethernet adapter).

NetToPLCsim appears to work well. I made a "ping" to the IP address of the simulated PLC and I got response (108ms average).
The PUT/GET access is allowed.

Here you can see the set up of the S7 Node.

The debug shows the message : Error: connect ECONNREFUSED

Any idea of where is the mistake?

Thanks and best regards

Finally I found the error.
In the S7 Node I didn't have to write the IP Address assigned to the PLC, but the IP Address of the "network" that is "virtually" connected to PLCSIM in NetToPLCSIM.
At first I introduced the IP Address of the Ethernet adapter as the "Network Address" in NetToPLCSIM, and it didn't work. Then I wrote a different IP, such as, which was virtually connected to the PLC (simulated), and the S7 node in Node-RED was connected to this new address, and finally the connection between the S7 Node and PLCSIM was successful.

Best regards

Hi e-Duardo,
Looks interesting your project. Enables you to link and test connections/data exchange between S7-PLC and node-red without having the real hardware. Was planning to do the same setup, my idea is to use node-red ( and some python code) to simulate the behavior of real time processes and interact with control loop software in the S7-plc( PLCSIM in this case). It would be most helpful to me if you could send me some more details about the settings in NetToPLCsim. For the node-red part i prefer to use the "S7comm" nodes, had some issues with the ones you are using.
Best regards.

Hi Philip,
I can not be very precise in my explanation because I am newbie in both Step 7 (TIA Portal) and in Node-RED and anything related to network settings.
The settings in NetToPLCSIM are quite simple:

  • Start the program as administrator (it asks you to stop one service)
  • Add a new station
  • Introduce Network IP Address. At first I selected the IP address of the ethernet adaptor (if you click on the "..." button, you will have a list with the available network interface adresses), but it didn't work. It worked when I introduced a new IP address (
  • Introduce the IP Address assigned to the PLC. If PLCSIM is running, the address will be shown when you click in the "..." button next to the IP field.
  • Select the Rack and Slot of the PLC.
  • Start the Server...

In Node-RED, use the address of the network ( according to the example) instead of the PLC IP address. I suppose that this address is now the access point to the simulated PLC.
I would like to try if it is possible to run Node-RED in a different computer (or even a Raspberry Pi) than TIA Portal and NetToPLCSIM. I suppose that, in that case, I should select the ethernet adapter IP address in NetToPLCSIM.

Best regards

Hi there ,
Been using Step7 ( and even predecessor step5) for more then 30y ( oops ,...getting old), any question/problems, give me a ring. Just figuring out your setup. Are you running PLCSIM ( + net2plcsim) and the node-red server on the same machine? I think you can configure PLCSIM to be projected on a physical IP adres, so you could even run the node-red server on a separate platform. Install a remote tunnel to expose the localhost IPadres and you could connect remotely with the node-red client. Quiet some possibilities here...and lots of fun!


1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.