Hilscher Community Forum
cifx0 and Node-Red - Printable Version

+- Hilscher Community Forum (https://forum.hilscher.com)
+-- Forum: netPI 3 - Docker featuring Industrial Raspberry Pi 3 platform (https://forum.hilscher.com/forum-1.html)
+--- Forum: Software (https://forum.hilscher.com/forum-5.html)
+--- Thread: cifx0 and Node-Red (/thread-785.html)

cifx0 and Node-Red - fabio1975 - November-19th-2021

Hello to all.
I state that I am taking the first steps in this environment.
I am trying to configure a NIOT-E-NPI3-51-EN-RE to communicate with an S7 PLC that uses an NL-50 MPI
On the NIOT I installed the NODE-RED docker and I was able to get the information from the S7 PLC if it is in the same network segment as the NIOT management card.
My goal, however, is to have a separate management network from the one where the S7 PLCs are connected, I tried to use the ports indicated as FIELDBUS using the appropriate docker to enable them.
But without success, I cannot recover data from NODE-RED from the cifx0 card.
Is there a guide?

RE: cifx0 and Node-Red - Armin@netPI - November-19th-2021


well on netPI device "NIOT-E-NPI3-51-EN-RE" the netX controller featuring cifx0/fieldbus interface can only be fieldbus device OR ethernet-lan interface at the same time. Both at the same time is not possible. This is due to the two independently running docker containers , Node-RED and Ethernet-LAN. Only one docker container of both (the last one that is started on the netPI system after boot sequence) will "win" and claims the netX access prior the other container. So if the Ethernet-LAN container is the one started later after the Fieldbus container was started the netX will turned into Ethernet-LAN ... if the fieldbus container is started after the Ethernet-LAN container then the netX will be turned in a fieldbus interface.

I am sorry to say that this scenario is not possible at all. The only chance you have is to connect the netPI's eth0 interface to the S7 PLC as well and let netX run in fieldbus bus.


RE: cifx0 and Node-Red - fabio1975 - November-19th-2021

Thank you for the fast answer.

For me it might be enough that all three network ports of the NIOT are ethernet-lan. On which I can put different network segments and let my NODE-RED communicate with one of these network segments.
 it's possible? Now the NODE-RED can only talk to the management interface

RE: cifx0 and Node-Red - Armin@netPI - November-19th-2021

The 2-ported cifx0 interface is working as a switch always. This means it has only one MAC address and hence only one IP addresse but it is switched. So you can make inline installations with it without the need for an additional external switch.

The 1-port eth0 port is anyway an ethernet/TCP-IP/LAN port.

If you deploy now the https://hub.docker.com/r/hilschernetpi/netpi-netx-ethernet-lan/ container on your netPI, the container immediately creates a network interface named "cifx0" which is visible in netPI management UI unter "networks". there you can configure its IP address and network mask as it is usual for other ethernet interfaces.


RE: cifx0 and Node-Red - fabio1975 - November-22nd-2021

Thanks for the info.
I proceeded to deploy https://hub.docker.com/r/hilschernetpi/netpi-netx-ethernet-lan/ and correctly in the netPI I was able to enter the network configuration for the cifx0.

I also installed the docker for node-red and did the interface tests to an S7, but I can't figure out how to tell the node-red docker that the S7 is on the network connected to the citfx0 port and not from that of managment


RE: cifx0 and Node-Red - Armin@netPI - November-22nd-2021

Please tell me exactly which Node-RED container you have installed right how?

Since eth0 interface and cifx0 interface are both even network interfaces now (as if you have plugged in two network cards in a PC) the standard netPI Linux OS routing will automatically route the packets to the right interface based on the corresponding subnet and mask you have setup. This means there is no parameter you can setup anywhere ... all is done automatically by Linux.