134 lines
3.5 KiB
Markdown
134 lines
3.5 KiB
Markdown
# 🤖 OPC UA Robot Control Dashboard
|
|
|
|
**Version 2.0** - Modernes Streamlit-Dashboard für OPC UA Robotersteuerung
|
|
|
|
## 📋 Übersicht
|
|
|
|
Dieses Projekt ermöglicht die Steuerung eines Roboters über OPC UA (OPC Unified Architecture) durch ein benutzerfreundliches Web-Dashboard. Das Dashboard ersetzt die ursprünglichen Batch-Dateien durch eine moderne, interaktive Oberfläche.
|
|
|
|
## ✨ Features
|
|
|
|
### 🎮 **Control Buttons**
|
|
- **🔧 INIT** - Adaptiert Zugriffsrechte für OPC UA
|
|
- **▶️ START** - Startet den Roboterprozess
|
|
- **⏹️ STOP** - Stoppt den Roboterprozess
|
|
- **🔄 RESET** - Setzt das System zurück
|
|
|
|
### 🖥️ **Dashboard Features**
|
|
- **Moderne Web-Oberfläche** mit Streamlit
|
|
- **Echtzeit-Status** der OPC UA Verbindung
|
|
- **Activity Log** mit Zeitstempel
|
|
- **Responsive Design** für verschiedene Bildschirmgrößen
|
|
- **Schöne Icons** und Hover-Effekte
|
|
|
|
## 🚀 Installation & Start
|
|
|
|
### Voraussetzungen
|
|
- **Anaconda** oder **Miniconda** installiert
|
|
- **Python 3.10+**
|
|
|
|
### Automatische Installation
|
|
1. **Repository klonen:**
|
|
```bash
|
|
git clone <repository-url>
|
|
cd opcuaCOM_PY
|
|
```
|
|
|
|
2. **Dashboard starten:**
|
|
- **Windows:** Doppelklick auf `EXEC_DASHBOARD.bat`
|
|
- **Manuell:**
|
|
```bash
|
|
conda env create -f environment.yml
|
|
conda activate opcua_com
|
|
streamlit run app.py --server.port 8505
|
|
```
|
|
|
|
### Manuelle Installation
|
|
```bash
|
|
# Conda-Umgebung erstellen
|
|
conda env create -f environment.yml
|
|
|
|
# Umgebung aktivieren
|
|
conda activate opcua_com
|
|
|
|
# Dashboard starten
|
|
streamlit run app.py --server.port 8505
|
|
```
|
|
|
|
## ⚙️ Konfiguration
|
|
|
|
### OPC UA Server
|
|
Bearbeiten Sie `cfg.yaml` für Ihre OPC UA Server-Einstellungen:
|
|
|
|
```yaml
|
|
cred:
|
|
robot:
|
|
url: "opc.tcp://192.168.214.1:4840"
|
|
username: "OpcUaClient"
|
|
password: "OPCUACLIENT"
|
|
```
|
|
|
|
### Button-Mapping
|
|
Die Button-Zuordnungen sind in `cfg_varlist.csv` definiert:
|
|
```csv
|
|
BTN_START ns=2;s=LBP_Chan1.A_NCStart
|
|
BTN_STOP ns=2;s=LBP_Chan1.A_NCStop
|
|
BTN_RESET ns=2;s=LBP_Chan1.A_Reset
|
|
```
|
|
|
|
## 🎯 Verwendung
|
|
|
|
1. **Dashboard öffnen:** `http://localhost:8505`
|
|
2. **Verbindung initialisieren:** "🔌 Initialize Connection" klicken
|
|
3. **Status prüfen:** Sollte "Connected" anzeigen
|
|
4. **Buttons verwenden:** INIT, START, STOP, RESET
|
|
|
|
## 📁 Projektstruktur
|
|
|
|
```
|
|
opcuaCOM_PY/
|
|
├── app.py # Streamlit Dashboard
|
|
├── opcua_connector.py # OPC UA Verbindungslogik
|
|
├── environment.yml # Conda-Umgebung
|
|
├── cfg.yaml # Konfiguration
|
|
├── cfg_varlist.csv # Button-Mapping
|
|
├── EXEC_DASHBOARD.bat # Start-Script
|
|
└── README.md # Diese Datei
|
|
```
|
|
|
|
## 🔧 Technische Details
|
|
|
|
### Abhängigkeiten
|
|
- **streamlit** - Web-Dashboard
|
|
- **opcua** - OPC UA Client
|
|
- **pandas** - Datenverarbeitung
|
|
- **influxdb-client** - Zeitreihen-Datenbank
|
|
- **pyyaml** - Konfigurationsdateien
|
|
|
|
### Architektur
|
|
- **Frontend:** Streamlit Web-Interface
|
|
- **Backend:** OPC UA Client mit Threading
|
|
- **Datenbank:** InfluxDB für Logging
|
|
- **Konfiguration:** YAML-basiert
|
|
|
|
## 🆚 Version History
|
|
|
|
### v2.0 (Aktuell)
|
|
- ✅ Streamlit Dashboard hinzugefügt
|
|
- ✅ Moderne Web-Oberfläche
|
|
- ✅ Automatische Conda-Umgebungsverwaltung
|
|
- ✅ Verbesserte Fehlerbehandlung
|
|
|
|
### v1.0 (Legacy)
|
|
- Batch-Dateien für Button-Steuerung
|
|
- Kommandozeilen-basierte Ausführung
|
|
|
|
## 📞 Support
|
|
|
|
Bei Problemen oder Fragen:
|
|
1. Prüfen Sie die Activity Logs im Dashboard
|
|
2. Überprüfen Sie die OPC UA Server-Verbindung
|
|
3. Stellen Sie sicher, dass alle Abhängigkeiten installiert sind
|
|
|
|
---
|
|
**Entwickelt für OPC UA Robotersteuerung** 🤖 |