Node-Red - Basic
Node-Red - Basic
SIMATIC IOT2000 as
Industrial IoT Gateway
Prerequisite & Required Hardware and Software
Prerequisite
6ES7647-0BA00-0YA2 6ES7647-0BA00-1YA2
• An Arduino UNO-compatible header is available in each version and can be used to put any Arduino
shields into operation. The option also exists to develop and use your own shields.
• The programming is different, depending on the shield. The TIA Portal is only able to use the individual
GPIOs (General Purpose Input/Outputs) as pure digital and analog inputs and outputs. Higher functions,
such as I²C (Inter-Integrated Circuit) or SPI (Serial Peripheral Interface), are not usable.
• A MicroSD card is needed for the operating system. The "Operating system from Siemens" needs a
minimum of 2 GB.
Top View
Front view
5) LED display
6) Left cover
7) Right cover
8) Securing device
9) RESET button for the CPU
10) USER button, programmable (not
via the TIA Portal)
Bottom View
• Now that the SD card has been written with the 1. Locate the network icon in the task bar at
operating system and inserted in the IOT2000, the bottom and click on "Network & Internet
the operating system can be configured. This is settings".
done using an SSH connection. The example
image has a preconfigured IP address:
192.168.200.1/24*.
3. Select the desired "LAN connection" you want 4. Select "Properties" under
to use to connect to the controller and right-click "Internet Protocol Version 4
"Properties". (TCP/IP)".
1. Start Putty
2. Under Host Name (or IP address), enter the IP
and the Port of the IOT2000 ( Host Name:
192.168.200.1 Port: 22)
3. Select the SSH item under Connection type (
Connection type: SSH)
4. Click on Open ( Open)
1. Start WinSCP
1. Node-RED is a programming tool for wiring together hardware devices, APIs and online services in
new and interesting ways.
2. It provides a browser-based editor that makes it easy to wire together flows using the wide range of
nodes in the palette that can be deployed to its runtime in a single-click.
3. It is originally developed by IBM’s Emerging Technology Services team and now a part of the JS
Foundation.
4. Node-RED is an open-source program.
Sidebar
• Contain
information of
the node,
Palette Debug,
• Contain the configuration
node,
node
Context data.
available to
be used.
Unrestricted© Siemens AG 2016 Editor Window 03/2016
Basic Features in Node-Red
3
Node-RED Description 4
features
1. Flow a) Tab name of the workspace (changeable)
b) Informally describe a single set of connected nodes
2. Node Input, output and functional point that used to create
flows.
3. Wires A line used to connect two or multiple point.
4. Subflow A collection of nodes that are collapsed into a single node
in the workspace.
Unrestricted© Siemens AG 2016 03/2016
Basic Node (Inject & Debug Node)
Debug window
We have 3 lamp
1st lamp will ‘on’ for a second and ‘off’ for a second then
2nd lamp will ‘on’ for a second and ‘off’ for a second
3rd lamp will ‘on’ for a second and ‘off’ for a second
This will continuously loop
1 2
Double click on the node to set the rules. The properties that can be set are divided
There are several rules can be set into the into four parts which are value rules,
node. sequence rules, JSONata Expression and
otherwise.
1. Set the properties of the range node 2. The input value must be in number
format. The output will be mapped based
by double click on the node on the range
3. There are several actions can be applied
to the node
• Node-red makes it easy to save, share and move flows between computers using the export
and import features
• Flows are exported as JSON file and imported from a JSON file.
• Export can be done for a part of a flow or the entire flow.
EXPORTING FLOWS
1. Press CTRL and click each node in the flow
that you want to export. The nodes will be
highlighted.
Note: Use CTRL+A to select all nodes in
the workspace.
Click export Click Menu tab
2. Then click on Menu >export
Flow save
in local
Flow save library
by user and
previously. example.
Click import
1. Copy and paste can be used to copy nodes between flows in the node-red workspace.
2. Select the nodes to copy using CTRL key to select individual nodes together into a group
or CTRL+A to select all nodes in the workspace.
3. CTRL+C to copy.
4. Moves to the place on the workspace or open the workspace where you want to copy the
nodes to and use CTRL+V to paste the nodes/ flow into the workspace