This is the codebase of our Lego sorting robot for an educational setup as OST. While there is another experimental implementaiton of this robot in the rep SmartFactory_SorticRoboter, this is the current stable code that is used in production. For installation, please use the "production" branch to get stable code with the latest bugfixes.
Sortic150 consists of several modules located in the sw-# Introducton
This is the codebase of our Lego sorting robot for an educational setup as OST. While there is another experimental implementaiton of this robot in the rep SmartFactory_SorticRoboter, this is the current stable code that is used in production. For installation, please use the "production" branch to get stable code with the latest bugfixes.
This branch designed to use with a PLC compact CPU 1512C-1 PN to resemble an real decentralized factory.
Sortic150 consists of several modules located in the sw-modules directory. The individual modules are presented below:
Write into memory of the PLC (DB100) with OPCua or RFC1006-communication protocol
OPCua ns=3;s="Data_Block1"."BoxAt"
IN type Offset
done Bool 0 distanz Int16 6 BoxAt Int16 8 getPackage Bool 10
OUT type Offset
sollPos Int16 2
gets Data with OPCua
sollPos (Int) '1 pickup back' '2 put down back' '3 pickup front' '4 put down front'
done (Bool)
Sends Data with MQTT
getPackage Bool
- RaspberryPi(Model 3B+)
- SD-Card(16Gb)
- Touch-Screen
- Download Raspbian Buster with desktop
- Follow Installing instructions installing-images
- Insert the sd-card and put the device together(plug-in the usb cables etc.)
- Connect the RaspberryPi with the Internet
- Install latest the Node-Red follow instructions
- Autostart Chromium in Kioskmode
- Copy/paste the node-red.json into running node-red
- Install node-red-dashboard
- Autostart node-red on boot: sudo systemctl enable nodered.service
ip_raspbi:1880/ui
Show connected devices
python -m platformio device list
Show API OUT from device(needs sudo)
python -m platformio device monitor
Image from SIEMENS website. (https://support.industry.siemens.com/cs/document/109780231/simatic-iot2050-sd-card-beispielimage?dti=0&lc=de-CH)
Setup like module-raspbi. Node-red is pre-installed
differents to Raspberry Pi:
- Nodes for Hardware-Pins (for Arduino Shields)
- in python scipts you'll need the mraa-Library to connect to GPIO's
- ... modules directory. The individual modules are presented below:
Build&Upload
python -m platformio run -t upload
- RaspberryPi(Model 3B+)
- SD-Card(16Gb)
- Touch-Screen
- Download Raspbian Buster with desktop
- Follow Installing instructions installing-images
- Insert the sd-card and put the device together(plug-in the usb cables etc.)
- Connect the RaspberryPi with the Internet
- Install latest the Node-Red follow instructions
- Autostart Chromium in Kioskmode
- Copy/paste the node-red.json into running node-red
- Install node-red-dashboard
- Autostart node-red on boot: sudo systemctl enable nodered.service
ip_raspbi:1880/ui
Show connected devices
python -m platformio device list
Show API OUT from device(needs sudo)
python -m platformio device monitor