This application example shows how to use the SIMATIC IOT2050 to gather weatherdata from the internet, connect to LOGO! via Modbus TCP and connect to an S7-1500 via OPC UA using node-red. All gathered data are displayed on a local node-red dashboard on the IOT2050
The soil moisture is recorded with two decentralized LOGO! sensors at different locations and sent to the SIMATIC IOT2050 gateway via Modbus TCP. The IOT2050 obtains the current weather data via the internet and sends this and the sensor data to the SIMATIC S7-1500, which performs the control tasks, via OPC UA.
The open source software node-red acts as the central development and runtime environment for the gateway functionality of the SIMATIC IOT2050
The following steps describe how to run this application example.
- 1x S7-1511C
- 2x LOGO! 8 with some sensors connected to AI1 / AI2
- 1x IOT2050
- 1x SCALANCE Switch
- TIA Portal V16
- LOGO! Soft Comfort
- Win32 Disk Imager
- putty
- Knowledge in the handling with LOGO! and LOGO! Soft Comfort
- Knowledge in the handling with S7-1500 and TIA Portal
- Basic Linux Knowledge
- Account in the Siemens Industry Online Support to download the operating system for the IOT2050
This is needed to create an API key to retrieve data from this service via the node-red node
- Open http://openweathermap.com
- Click on Sign in
- Click in Create an Account when you don't have an account, otherwise sign in with your credentials and skip the Step 4
- Follow the process for creating an account and sign in afterwards
- Go to API keys
- Either remember the default key or create a new one
- You will need this key at a later stage
- Open LOGO! Soft Comfort project
- Download project to the respective LOGO!
- Open TIA Portal project
- Download project to the S7-1511C
- Download Example Image for the IOT2050 from here: https://support.industry.siemens.com/cs/ww/en/view/109780231
- Follow SIMATIC_IOT2050_Setting_up.md to setup the IOT2050
- Establish an internet connection (via USB-WiFi dongle or eth1)
- Open a browser on your PC and open node-red via the URL http://192.168.200.1:1880
- Go to the Menu -> Manage Palette -> Install
- Search for node-red-contrib-modbus and click on Install
- Search for node-red-contrib-opcua and click on Install
- Search for node-red-node-openweathermap and click on Install
- Search for node-red-dashboard and click on Install
- Copy the content of flows.json
- Go to the node-red Menu -> Import -> Clipboard and paste the content of flows.json
- Go to the flow Weather and double-click on the openweathermap node
- Paste your API Key and click on Done
- Click on Deploy to deploy the program
- Open a browser on your PC and open the node-red dashboard via the URL http://192.168.200.1:1880/ui
- Choose the city you want to read the weather data from
- Weatherdata is displayed on the dashboard, as well as the LOGO! sensor values
- On the LOGO! display you will see the temperature and pressure value
- On the S7-1500 the LEDs of the outputs show the current temperature in relation (the higher the temperature is the more LEDs are on)
Thank you for your interest in contributing. Anybody is free to report bugs, unclear documentation, and other problems regarding this repository in the Issues section. Additionally everybody is free to propose any changes to this repository using Pull Requests.
If you haven't previously signed the Siemens Contributor License Agreement (CLA), the system will automatically prompt you to do so when you submit your Pull Request. This can be conveniently done through the CLA Assistant's online platform. Once the CLA is signed, your Pull Request will automatically be cleared and made ready for merging if all other test stages succeed.
Please read the Legal information.