s.ayadi 5dcaa8b8fa Take the conveying direction from the element's own height change
The new export fills Hoehe_Von_mm / Hoehe_Bis_mm, so the direction of a transport
element no longer has to be guessed from its neighbours. drive_uphill() now
decides in this order:

  1. Hoehe_Von_mm -> Hoehe_Bis_mm: the rise of the element itself. Only the sign
     is read, since the values are absolute on a Gefaellestrecke (1941 -> 1466)
     but relative on a Strecke (0 -> 474).
  2. Antriebfahrtrichtung "Auf" (up) or "Ab" (down).
  3. A Gefaellestrecke without either runs downhill by definition.

Previously a Gefaellestrecke was assumed downhill outright and everything else
depended on Antriebfahrtrichtung alone; now both are backed by the height data
and the fallback order is explicit.

The node label states what was read and what follows from it, e.g.
"0 -> 474 mm (+474) = aufwaerts", so the arrow can be checked against the export
without opening the CSV.

Adds a plausibility check for the case where Antriebfahrtrichtung and the height
change disagree. The height wins and the conflict is reported, rather than one of
the two silently deciding.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 14:08:58 +02:00
2026-07-20 16:28:31 +02:00

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)

S
Description
No description provided
Readme MIT 25 MiB
Languages
Python 92%
Shell 4%
Batchfile 3.9%
Common Lisp 0.1%