In this opportunity we will make an integration of our LOGO! from Siemens with Node-RED, the connection platform for devices and IoT applications par excellence.
Recommended: Previous tutorials with LOGO!
Normally the LOGO! are programmed with LogoSoft Software Logo! , its programming language are logical block diagrams.

The LOGO! In addition to allowing load logic or control algorithms, it can also be configured as a controlled or remotely monitored I / O module, commonly performed with Siemens software (TIA Portal), but some people have made some implementations in Node-RED with Wireshark help to analyze the protocol.

S7COMM (S7 Comunication)
The S7Comm is a proprietary Siemens protocol that runs between the programmable logic controllers (PLC) of the Siemens S7-300 / 400 families and the most current S7-1200 / 1500.
It is used both for programming the controllers and for reading and writing registers, also in diagnostics, access from HMI and SCADA.
This protocol uses port 102, I will not go into details of its OSI layer model, more detailed dependency information : S7comm WireShark.
A great variety of implementations of this protocol have been created in a great variety of programming languages such as C # and platforms, highlighting implementations in VBasic and Nodejs, from the latter several versions have been created.
Materials
- LOGO! 0BA8 Ethernet
- Node-RED

S7Comm Nodes – NodeRED
These nodes were created to integrate with Siemens S7 PLCs.

More information Nodes: node-red-contrib-s7

Tests Performed
Next we will make the integration of a Logo! Ethernet with the Node-RED platform using the S7Comm protocol.
Configuration TSAP with Logo Soft Comfort
Using the LogoSoft configuration software Siemens:
- 1. We will create a basic strategy which changes the colors of the LCD display when activating certain outputs relay , each output will activate a different color.

- Configure local and remote TSAP connection.

Create connection to server, in this case Node-RED.

Configure connection parameters.

Download to the LOGO! via Ethernet.

Node-RED
Change of output status, Q0 of LOGO! in Node-RED is Q0.0.

Configuration Node S7Comm.

Configuration of Addressing of registers, entrances and exits.

Configuration of input node S7.

Node configuration of S7 outputs.

Next Tutorials

Video: Connection LOGO! 8 and Node-RED with S7Comm Protocol
Conclusions
This is a very useful implementation for basic industrial applications, the S7 nodes work correctly, although it is not a Siemens application itself it must take into account the scope in its functionality, it is an initiative driven by a community, so before implementing the nodes think about future support.
In conclusion although it works there is no certainty or no guarantee in real or complex applications, be careful.