Weidmüller STARTERKIT-UC20-WL2000-IoT User manual

Starter-Kit | u-control
Internet of Things with Node-RED (IoT)
2666060000 | STARTERKIT-UC20-WL2000-IoT
Quick Start Guide for Starter-Kit IoT + Node-RED
Instructions for setup and usage of the Starter-Kit with u-create Web and Node-RED
QSG0033v01

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 2
Revision history
Version
Date
Change log
01
01.2021
First release
Contact
Weidmüller Interface GmbH & Co. KG
Klingenbergstraße 26
32758 Detmold, Germany
T +49 5231 14-0
F +49 5231 14-292083
info@weidmueller.com
www.weidmueller.com
For further support please contact your local
sales representative.
Author: w100141

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 3
1. Warning and disclaimer.................................................................................................. 4
2. Abstract.......................................................................................................................... 5
3. Requirements................................................................................................................. 5
3.1. Hardware........................................................................................................................ 5
3.2. Software......................................................................................................................... 5
4. Installation of starter kit hardware................................................................................... 6
5. Network settings............................................................................................................. 7
5.1. u-control ......................................................................................................................... 7
5.2. WiFi access point as a client........................................................................................... 9
6. Getting started with u-create web ..................................................................................14
6.1. Importing the demo application......................................................................................14
6.2. Devices and I/O.............................................................................................................15
6.3. Global variables.............................................................................................................16
6.4. Visualisation ..................................................................................................................17
7. Getting started with Node-RED......................................................................................18
7.1. Importing and running the demo application..................................................................19
7.2. Turning the temperature controller into an IoT-device....................................................21
8. Further information ........................................................................................................22

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 4
1. Warning and disclaimer
Warning
Controls may fail in unsafe operating conditions, causing uncontrolled operation of the controlled devices.
Such hazardous events can result in death and / or serious injury and / or property damage. Therefore,
there must be provide safety equipment/ electrical safety design or other redundant safety features that are
independent from the automation system.
Disclaimer
This Example / Application Note does not relieve you of the obligation to handle it safely during use,
installation, operation and maintenance. Each user is responsible for the correct operation of his control
system.
By using this program example / application note prepared by Weidmüller, you accept that Weidmüller
cannot be held liable for any damage to property and / or personal injury that may occur because of the
use.
Note
The application examples do not represent customer-specific solutions, they are simply intended to help for
typical tasks. The user is responsible for the proper operation of the described products. This application
example does not relieve you of the obligation of safe use, installation, operation and maintenance.
Application examples are not binding and do not claim to be complete in terms of configuration as well as
any contingencies.
By using this Application Example, you acknowledge that we cannot be held liable for any damages beyond
the described liability regime. We reserve the right to make changes to this sample application at any time
without notice.
In case of discrepancies between the proposals in the application example and other Weidmüller
publications, like manuals, such contents always have more priority to the examples.
We assume no liability for the information contained in this document. Our liability, for whatever legal
reason, for damages caused by the use of the examples, instructions, programs, project planning and
performance data, etc. described in this application example is excluded.
Security notes
In order to protect equipment, systems, machines and networks against cyber threats, it is necessary to
implement (and maintain) a complete state-of-the-art industrial security concept. The customer is
responsible for preventing unauthorized access to his equipment, systems, machines and networks.
Systems, machines and components should only be connected to the corporate network or the Internet if
necessary and appropriate safeguards (such as firewalls and network segmentation) have been taken.

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 5
2. Abstract
This guide contains instructions on how to activate the starter kit and connect to the controller.
Furthermore, it contains a guide how to setup the controller, setup an internet connection using
the provided wireless access point and download a demo application to the controller. This demo
application utilizes all key components of the starter kit to showcase the implementation of a
simple temperature controller. Building on this temperature controller, the publishing of sensor
values to a public MQTT broker as well as the reception of these values with a MQTT subscriber
is shown.
3. Requirements
For certain parts of this Quick Start Guide you will need an internet connection, to push data to
an IoT-service or to download software. Ideally, to complete every chapter of this guide, the
internet connection is accessible via a simple WPA2-PSK encrypted WiFi (e.g. no corporate
network or eduroam with EAP).
3.1. Hardware
Hardware
Order Nr.
Weidmüller
Comments
STARTERKIT-UC20-SL2000-IOT
2666060000
PC with Ethernetand full-size USB
--------
3.2. Software
Software
Order Nr.
Weidmüller
Comments
Recent web browser
--------
Microsoft Edge, Firefox, Chrome
u-control Demo Application
--------
Download from Weidmüller, Filetype .ucp
Node-RED Demo Application
--------
Download from Weidmüller, Filetype .json

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 6
4. Installation of starter kit hardware
1. Take the starter kit board and the power supply out of the box and connect the power supply
with the board (1) and a power socket (2). Now the board can be activated by the switch on
the left side (3).
Figure 1: Starter kit and power supply
2. It is possible to supply multiple starter kits with one 24V power supply. You can use the rear
facing orange connector to daisy chain up to three starter kits. Use only the provided power
supply or an equivalent.
Figure 2: Daisy chaining of up to three starter kits

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 7
5. Network settings
The starter kit contains two networked devices, the u-control PLC and an WiFi Access Point (AP).
The AP can also be used as an WiFi client to connect the u-control PLC to an existing WiFi
network.
First, we will configure the u-control PLC to acquire an IP address via DHCP, then we will use the
AP to connect to your WiFi network and the internet.
5.1. u-control
You have two options to connect your PC to the u-control PLC:
1. The easiest way of accessing the web interface of the u-control is via USB on the service
interface X3. Make sure the board is powered up prior to connecting via USB. Enter the
address 192.168.10.202 in a web browser of your choice to access the web interface.
2. You can also access the u-control via one of the network interfaces X1 / X2 under the
static IP 192.168.0.101. Make sure the network adapter of your engineering PC which the
u-control is connected to is configured with a static IP in the same subnet, e.g.
192.168.0.100.
For simplicity we will use the first option here. We will use the second approach to connect to the
AP in the following section. Once you have connected the u-control to your PC via USB and
accessed its web interface with a browser, you will be asked to enter login credentials.
Out of the box the following IP addresses are used:
u-control USB: 192.168.10.202
u-control Ethernet: 192.168.0.101
Access Point/Client: 192.168.1.110
i
The default credentials are:
User: admin
Password: Detmold
i

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 8
After login you are greeted by the following screen:
Figure 3: Welcome screen of u-create web, menu network settings
We will start by exploring the network settings of the u-control.
You can configure the network interfaces to either have their IP address assigned dynamically via
DHCP or to have a static IP address. Configure X2 to use DHCP:
Figure 4: Network settings dialog of u-create web

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 9
5.2. WiFi access point as a client
Out of the box the AP is configured with the static IP 192.168.1.110 and can only be accessed
using a wired connection. Connect an ethernet cable between the AP and your PC.
Configure the network adapter to use a static IP in the same subnet, e.g. 192.168.1.100:
Figure 5: Windows network adapter settings
Figure 6: Windows network adapter with static IPv4 address

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 10
Enter the IP address 192.168.1.110 in your browser. The login page of the AP will open:
Figure 7: Login page of the wireless access point
Log in using the default credentials as shown in Figure 7. You will be greeted by an overview of
the AP’s configuration, as shown in Figure 8.
Figure 8: Configuration overview of the AP

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 11
Navigate to Wireless LAN Setup ► Operation Mode and select “Client”. Make sure the wireless
interface is enabled. Make sure to submit your changes after each step.
Figure 9: Operation mode selection "Client"
Navigate to Wireless LAN Setup ► WLAN ► Basic WLAN Setup. Enter the SSID (e.g. name) of
the wireless network you want to connect to.
Figure 10: Basic configuration of the wireless connection
Under Wireless LAN Setup ► WLAN ► WLAN Security Settings configure the security mode,
passphrase and other settings to match your wireless network.
Figure 11: Security settings of the wireless connection
At last configure the AP to receive it’s IP address dynamically using DHCP.
Figure 12: Network settings of the AP, dynamic IP address assignment (DHCP)

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 12
Navigate to Save Configuration and click on the “Save” button.
Figure 13: Save the configuration of the AP
Next navigate to Restart and click the “Restart” button. The AP will reboot, as shown in Figure 15.
Figure 14: Restart menu of the AP
Figure 15: The AP is restarting
Since we’ve configured the AP to receive it’s IP address via DHCP, it will be assigned a new
address and won’t be reachable under the default IP address anymore. To discover it’s new IP
address, you can use the web interface of the wireless router or access point that’s hosting your
wireless network.
Figure 16: The WLAN Administration Tool allows quick discovery of the AP's new IP address
Alternatively, Weidmüller provides the “WLAN Administration Tool” for PC shown in Figure 16. It
is available as a free download fromthe productcatalogue page of the wireless AP. SeeChapter 8

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 13
for further information. Click on the IP address of the discovered “IE-WL-BL-AP-CL-EU” to open
the configuration overview as shown in Figure 17.
Figure 17: Overview of the completed AP configuration
To test the internet connection, use the ping tool under Maintenance ► Ping. Google’s public
DNS servers (8.8.8.8, 8.8.4.4) are a suitable ping destination. Note the 0% packet loss in the
output of the ping tool shown in Figure 18. This means the internet connection is working.
Figure 18: Ping 8.8.8.8 (Google's public DNS server) confirms internet connectivity

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 14
6. Getting started with u-create web
Now that your starter kit is up and running, we’re ready to download and deploy the first
application. To make use of most of the provided components we will implement a simple
temperature controller. It utilizes most of the starter kit hardware and demonstrates how to read
and write global variables and I/O of the u-control PLC with Node-RED.
In this chapter you can familiarize yourself with the hardware of the starter kit and the online
engineering tool u-create web. The next chapter shows the implementation of the temperature
controller in Node-RED and how to connect it to an MQTT broker.
6.1. Importing the demo application
To download the demo application files for u-create web and Node-RED, navigate to the support
page for Weidmüller’s u-control starter kits. Scroll down to the downloads section for the u-control
IoT starter kit and download the temperature controller example program. You need three files,
one for u-create web (.ucp) and two for Node-RED (.json).
Access the u-create welcome page (see section 5.1). Click on the “Edit” button to enter the
planning mode of u-create web.
Figure 19: Welcome screen of u-create web, edit button highlighted
The kebab menu (three vertical dots) in the top right-hand corner allows you to upload a project
file to the u-control PLC. Select the .ucp file that you’ve downloaded from the support page. Once
the upload finished, click on deploy. If the deploy fails or if you made any changes to the IO-
modules, click on “Autoscan Station”before trying to deploy again. Don’t worry that the devices
tab still looks the same after the deploy. You’ll explore the other tabs in the next sections.

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 15
Figure 20: u-create web in planning (e.g. edit) mode, devices tab, import/export menu
6.2. Devices and I/O
The starter kit comes fully assembled and ready to use.
Figure 21: Overview of the starter kit hardware

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 16
The following devices are connected to the I/O modules and can be used to develop your first
applications without making any changes to the starter kit’s hardware:
Pos
Hardware
I/O Module
Connection
7
Pushbutton red
UR20-8DI-P-2W
Channel 0 / DI 1.1
7
Pushbutton yellow
UR20-8DI-P-2W
Channel 1 / DI 1.3
7
Pushbutton green
UR20-8DI-P-2W
Channel 2 / DI 2.1
8
Rotary switch
UR20-8DI-P-2W
Channel 3 / DI 2.3
8
Rotary switch
UR20-8DI-P-2W
Channel 4 / DI 3.1
6
Hand/Auto
Analogue encoder
UR20-8DI-P-2W
Channel 5 / DI 3.3
7
LED red
UR20-8DO-P
Channel 0 / DO 1.1
7
LED yellow
UR20-8DO-P
Channel 1 / DO 1.3
7
LED green
UR20-8DO-P
Channel 2 / DO 2.1
8
LED white
UR20-8DO-P
Channel 3 / DO 2.3
6
OUT (Y)
Analogue encoder
UR20-4AI-UI-16
Channel 0 / AI 1.1
6
IN (YR)
Analogue encoder
UR20-4AO-UI-16
Channel 0 / AO 1.1
6
IN (YGND)
Analogue encoder
UR20-4AO-UI-16
Channel 0 / AO 1.4
9
Pt100 +
Temperature
sensor
UR20-4AI-RTD-DIAG
Channel 0 / AI 1.1
9
Pt100 -
Temperature
sensor
UR20-4AI-RTD-DIAG
Channel 0 / AI 1.4
Table 1: List of the starter kit hardware and connections
We will use all four LEDs to signal the state of the temperature controller. The temperature set
point will be given by the analogue encoder, while the Pt100 sensor is used to determine the
actual temperature. The rotary switch is used to enable the temperature controller and to reset
the alarm condition. The pushbuttons are not used.
6.3. Global variables
Navigate to the global variables tab of u-create web’s live view. To leave the planning mode go
back to the welcome page. Then click on “Global Variables”.
The live mode is different from the planning mode used in section 6.1, it does not allow you to
make any changes but gives you live information about the value of the variables.

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 17
Figure 22: Live view of global variables in u-create web
Note that variables that are mappedto an input are preceded by an “I_”, variables that are mapped
to an output by an “O_”. Next comes the type, “I” for integer, “X” for bool, “R” for real. This is a
design decision, you can name variables as you prefer, using your own naming convention.
The Variables “RSETPOINT” and “RTEMPERATURE” are set by the Node-RED application,
which we haven’t uploaded to the u-control yet. Therefore, they will have a value of 0 at this point.
6.4. Visualisation
u-create web includes a powerful yet easy to use visualisation tool. You can create and display
interactive visualisations like shown in Figure 23 using only a web browser. This is especially
useful if you want to use mobile devices like tablets as an HMI. While the creation of these
visualisations is out of the scope of this guide, feel free to explore the visualisation in the planning
mode. The application note that accompanies this quick start guide goes into more detail, see
chapter 8 for further information.

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 18
Figure 23: Live view of the visualisation in u-create web
7. Getting started with Node-RED
Now that you’ve explored the integrated features of u-create web, let’s see how Node-RED builds
on these features and allows you to create automation applications using web technologies. To
open Node-RED, click on the respective button on the welcome page of u-create web.
Figure 24: Application menu in u-create web

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 19
7.1. Importing and running the demo application
Now that you’ve opened the Node-RED application, you will be greeted by an empty flow canvas.
To import the demo application into Node-RED, click on the hamburger menu in the top right-
hand corner and select “Import”. Upload the .json file that you’ve downloaded previously. Make
sure to select the file without “mqtt” in its name.
Figure 25: Import dialog in Node-RED, accessible via the hamburger menu in the top right-hand corner
A new tab will be created, containing the temperature controller.
Figure 26: The imported flow in Node-RED, a simple temperature controller that lights the LEDs of the starter kit

Quick Start Guide for Starter-Kit IoT with u-create Web and Node-RED
QSG0033v01 20
Hit “Deploy” to run the program. Any changes made to the program must be deployed as well to
take effect. Look at the starter kit. You might notice some LEDs being lit. If not, turn the rotary
switch to the South-East / 4:30 position. This enables the temperature controller. You can use the
following user inputs to interact with it:
Reset Alarm Condition
Controller off
Controller on
Temperature set point [10°C, 30°C]
The controller’s state is shown as a status notice in the Node-RED application on screen.
Physically it is indicated by the LEDs of the starter kit:
Heating
Idle
Cooling
On: Controller active; Flashing: Alarm triggered
These status indicators are replicated on the u-create web HMI, in addition to a graph of the
temperature set point and actual temperature. Navigate to the visualisation tab of the u-create
live view as shown previously in Figure 23.
To interact with the controller, use the analogue encoder (Pos 6 in Figure 21). Note that the
encoder has to be switched to “Hand” to have an effect. It is mapped to the temperature set point,
in the range of 10°C to 30°C. You should see the controllers state changing from cooling over idle
to heating, depending on the actual temperature. To change the actual temperature, either place
your fingers or a damp piece of cloth on the Pt100 sensor to heat or cool it.
If you reach the limits of the allowed temperature range (<10°C or >30°C) the controller will go
into an alarm state, indicated by the flashing white LED. To reset it, wait for the temperature
sensor to recover to the allowed range and then hold the rotary switch in the north-east position
till the LED turns of. Now the controller can be activated again.
While the implementation of this example application is out of the scope of this guide, feel free to
explore the Node-RED flow and the source code in the function nodes on your own. The
application note that accompanies this quick start guide describes the implementation in detail,
see chapter 8 for further information.
This manual suits for next models
1
Table of contents
Other Weidmüller Controllers manuals