Actualización de la documentación en MemoriaDeEvolucion.md para incluir una descripción funcional detallada de la aplicación, sus principales funciones y el manejo de variables y conjuntos de datos. Se añadió información sobre la transmisión en tiempo real, el monitoreo en vivo y la persistencia de la aplicación tras reinicios.

This commit is contained in:
Miguel 2025-07-20 19:46:48 +02:00
parent e9c86ed234
commit 5ea9e51cd4
1 changed files with 22 additions and 0 deletions

View File

@ -2,7 +2,29 @@
## PLC S7-315 Streamer & Logger
Functional Description of the Application
This application is a web server (created with the Flask framework in Python) that acts as an intermediary to monitor and record data in CSV format from a PLC Siemens S7 with the SNAP7 library to be used on a low-resource PC connected to the PLC.
It must be as simple as possible to allow the pack using PyInstaller
#### Its key functions are:
Variables are defined in DataSets or groups with different polling times. DataSets enable data exchange between machines as they are JSON files that allow setting various polling times. CSV files are also created with a suffix from the DataSet, making it easier to use the data externally.
* DataSets can be active or inactive, which determines if they are saved in the corresponding CSV.
* Variables can be active or inactive for streaming.
Real-Time Transmission (Streaming): Sends data in real time using the UDP protocol, allowing applications like PlotJuggler to receive and visualize data live.
For streaming, there is an update interval for the data, but this interval only updates available data. It does not mean the data is read at that speed. Streaming uses only a reading cache of active variables. If variables are not active, they are not included in streaming.
Live Monitoring: The web interface displays current variable values and system status, updating in real time.
Frontend monitoring also uses only the cache of active variables.
In summary, variables are read from the PLC only if they are active and at the speed set in their DataSet. Each read variable is stored in a memory cache. JSON streaming and frontend monitoring have their own intervals and read values only from this cache, which helps protect the PLC from overload.
The application is designed to be persistent across restarts, restoring the previous state as much as possible. This includes reconnecting to the PLC, reactivating DataSets, and resuming streaming if they were active before.
## Modifications
### Latest Modifications (Current Session)