8b4619cf9f7868ea1885b0cbb84410e90fedf016
Add doc/Python_Scripts.md covering material_flow.py, tro_flow.py, tro_annotate.py, tro_catalog.py and dxf_registration.py: purpose, CLI switches, outputs and exit codes. Update CLAUDE.md, which still described lib/ and doc/ as empty design-phase scaffolding: reflect the working tooling, the doc/ reorganization (HundM/, 500573_Mubea/, TRO_Katalog/), the moved SCL templates, and the now-accepted bin/<tool>.bat+.sh wrapper convention. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
sps_skel
Das Programm erhält ein mechanische Layout von der Projektierung oder Angebotswesen zusammen mit dem elektronischen Layout mit der Liste aller Sensoren, Stopper, etc. Daraus erstellt es dann ein Skelett für die SPS Programmierung, welches direkt ins TIA Portal importiert werden kann.
Projektstruktur
sps_skel/
bin/ Skripte zur Umgebungsverwaltung
setenv.bat/.sh Umgebungsvariablen setzen
install_py.bat/.sh venv erstellen + pip install
activate_venv.bat/.sh venv aktivieren
get_cmd.bat/.sh Shell mit Umgebung oeffnen
cfg/ Konfigurationsdateien (INI/JSON)
data/ Eingabedaten (nicht im Git)
doc/ Dokumentation
examples/ Beispieldateien
lib/ Python-Quellcode / Bibliothek
log/ Log-Dateien (nicht im Git)
results/ Ergebnisse / Ausgaben (nicht im Git)
tests/ Unit Tests
.gitignore
LICENSE
README.md
requirements.txt
Umgebungsvariablen
| Variable | Beschreibung |
|---|---|
SPS_SKEL |
Wurzelverzeichnis |
SKEL_BIN |
Skriptverzeichnis |
SKEL_LIB |
Python-Quellcode |
SKEL_CFG |
Konfigurationsdateien |
SKEL_DATA |
Eingabedaten |
SKEL_LOG |
Log-Dateien |
SKEL_RESULTS |
Ergebnisse |
SKEL_EXAMPLES |
Beispieldateien |
PYTHONPATH |
Erweitert um SKEL_LIB |
Installation
Voraussetzungen
- Python 3.10 oder hoeher
Setup (Windows)
bin\install_py.bat
Setup (Linux / macOS)
bash bin/install_py.sh
Nutzung
Umgebung setzen
bin\setenv.bat # Windows
source bin/setenv.sh # Linux / macOS
Shell mit gesetzten Variablen oeffnen
bin\get_cmd.bat # Windows
source bin/get_cmd.sh # Linux / macOS
venv aktivieren
bin\activate_venv.bat # Windows
source bin/activate_venv.sh # Linux / macOS
Lizenz
MIT License - siehe LICENSE
Autor
Michael Stangl (GitHub: mistamichael)
Languages
Python
93.5%
Shell
3.2%
Batchfile
3.2%