IMPORTANT NOTE
This app os now archived and should be considered as obsolete. (a lot) Improved successor is pid-controller-gui project, make sure to look at it first.
Python-based GUI application for controlling PID regulator (see maglev-ti-rtos).
- Get and set PID parameters:
- Setpoint
- PID algorithm output value
- Kp, Ki and Kd coefficients
- Limits of P & I errors
- Resetting accumulated I error
- Monitor controlled parameter and PID algorithm output via plots (and save them as pictures)
- Save PID parameters to the MCU' EEPROM
- Demo mode: activates when no network connection established
- Python 3 (tested Python 3.5+)
- matplotlib
- PyQt5
- [PyInstaller]
Run
$ python3 main.py
After loading you should see IP/port pair request and then main GUI appears.
Performs via PyInstaller. Pick appropriate .spec
script and run
$ pyinstaller "PID_GUI.spec"
As in a non-standalone case, you should run the app from terminal to be able to set IP/port and start the GUI.
Please use sources that lay under ./pyinstaller
folder. They differ only in the way to set paths to icons (see SO for more details).
Some notes on app' architecture:
- 3 modules:
main
: executes general logic, renders graphics, interact with a user,mcuconn
: holds network connection to the remote MCU,miscgraphics
: contains accessory graphic (matplotlib'Graph
,PicButton
, etc.);
- Version naming in order of the Greek alphabet;
- Main window
MainWindow
inheritsQMainWindow
and includes menu bar, status bar, toolbar and alsoFormWidget(QWidget)
containing all other elements; - All elements are grouped in several vertical and horizontals layouts. In turn, they are grouped together in bigger boxes. Global layout of the whole widget -
QGridLayout
; - Redrawing of plots is performed by setting
None
as a parent ofGraph
and repeating of drawing.
All rights to icons belong to icons' author from https://www.flaticon.com/. All third-party components belong to their authors. (C) Andrey Chufyrev, 2018.