Public | Automated Build

Last pushed: 3 days ago
Short Description
Node-RED and netX Fieldbus nodes for netPI RTE 3 (or Pi 3 + NHAT 52-RTE)
Full Description

Node-RED + fieldbus nodes

Made for netPI RTE 3, the Open Edge Connectivity Ecosystem
(runs also with Pi + NHAT 52-RTE)

Debian with Node-RED and fieldbus nodes to access netX

The image provided hereunder deploys a container with installed Debian, Node-RED and fieldbus nodes to communicate with the onboard Industrial Network Controller netX.

Base of this image builds a tagged version of debian:jessie with installed Internet of Things flow-based programming web-tool Node-RED, two extra nodes fieldbus in and fieldbus out and a fieldbus configurator as web server application. The nodes initialize netX as PROFINET device or EtherNet/IP adaptor allowing the exchange of cyclic IO process data with PLCs such as Siemens S7 or Allen Bradley and your flow.

The container checkes whether it runs on a netPI RTE 3 or on a Pi with NHAT 52-RTE on top and adjusts the netX firmware accordingly.

Container prerequisites

Port mapping

To allow the access to the Node-RED programming over a web browser the container TCP port 1880 needs to be exposed to the host.

To grant access to the containerized fieldbus configurator web server application the container TCP port 9000 needs to be exposed to the host port 9000 fixed.

Host network

The container needs the "Host" network stack to be shared with the container.

Host device

To grant access to the netX from inside the container the /dev/spidev0.0 host device needs to be added to the container.
(If using a Pi make sure the device /dev/spidev0.0 is activated. If not use raspi-config tool to enable it.)

Environment Variables

The type of field network protocol loaded into netX is configured through the following variable

  • FIELD with value pns to load PROFINET IO slave or value eis to load EtherNet/IP adapter network protocol

Getting started

On netPI RTE 3

STEP 1. Open netPI's landing page under https://<netpi's ip address>.

STEP 2. Click the Docker tile to open the Portainer.io Docker management user interface.

STEP 3. Enter the following parameters under Containers > Add Container

  • Image: hilschernetpi/netpi-nodered-fieldbus

  • Port mapping: Host "1880" (any unused one) -> Container "1880"andHost "9000" -> Container "9000"

  • Network > Network: Host

  • Restart policy" : always

  • Runtime > Env : name "FIELD" -> value "pns" or "eis"

  • Runtime > Devices > add device: Host "/dev/spidev0.0" -> Container "/dev/spidev0.0"

STEP 4. Press the button Actions > Start container

Pulling the image from Docker Hub may take up to 5 minutes.

On Pi + NHAT 52-RTE

STEP 1. Establish a console connection to Pi.

STEP 2. Install Docker if not already done, else skip.

STEP 3. Run a container instance of the image using the following command lines

PROFINET IO slave: docker run -p 1880:1880 -p 9000:9000 --device=/dev/spidev0.0 -e "FIELD=pns"--restart=always --network=host hilschernetpi/netpi-nodered-fieldbus

EtherNet/IP adapter: docker run -p 1880:1880 -p 9000:9000 --device=/dev/spidev0.0 -e "FIELD=eis"--restart=always --network=host hilschernetpi/netpi-nodered-fieldbus

Accessing

The container starts Node-RED automatically.

Open Node-RED in your browser with http://<netPi ip address>:<mapped host port> (NOT https://) e.g. http://192.168.0.1:1880. Use the two extra nodes fieldbus in and fieldbus out in the nodes library for exchanging process data with netX in your flow. The nodes' info tab explains how to use the nodes.

Use the electronic data sheets in the folder electronic-data-sheets to feed your PLC/master engineering software with device related data.

Tags

  • hilscher/netPI-nodered-fieldbus:latest - non-versioned latest development output of the master branch. Can run on any netPI RTE 3 system software version or Pi with NHAT 52-RE module on top.

  • hilscher/netPI-nodered-fieldbus:0.9.1.0 - tag with "old" type of fieldbus nodes allowing users to specify the type of fieldbus protocol in the nodes' configuration settings. Can run on any netPI RTE 3 system software version or Pi with NHAT 52-RE module on top.

GitHub sources

The image is built from the GitHub project netPI-nodered-fieldbus. It complies with the Dockerfile method to build a Docker image automated.

To build the container for an ARM CPU on Docker Hub(x86 based) the Dockerfile uses the method described here resin.io.

Hilscher Gesellschaft fuer Systemautomation mbH www.hilscher.com

Docker Pull Command
Owner
hilschernetpi
Source Repository