MELScope - mahilab/MEL GitHub Wiki

MELScope

MELScope

About

MELScope is a real-time signal plotting GUI for MEL. It communicates with MEL driven applications through the MELShare shared memory framework. Using MELScope is simple: First, you create MELShare map(s) storing a vector of doubles in your C++ MEL application to which you write updated values at some specific rate (typically this happens in your control loop). Next, in MELScope you add these MELShare maps by their string name. MELScope will then begin to plot whatever values are stored on the MELShare maps.

You can add as many MELShare maps to MELScope as you like. You also have the option of expanding the number of scope widgets, and adding I/O widgets which allow you to receive and send values back to your C++ application (for example, you may use this as an online controller tunning mechanism). Using a data matrix selector, you can even name and customize which data is displayed on each widget. You can also change colors, line styles, ranges, legends and more. Finally, once you have your MELScope configured the way you like it, you can save your configuration for opening later.

Installation (Standalone)

The easiest way to use MELScope is to simply download the standalone release:

MELScope v0.3.0

Extract the .zip to the location of your choice and run MELScope.exe. You may wish to pin MELScope to your taskbar for convenience.

Installation (Python 3)

If you'd rather have the flexibility of running MELScope from the Python interpreter, follow these directions:

  1. Download Python 3 if you don't have it already:
> choco install python
  1. Use pip to install the following packages:
> pip install numpy
> pip install matplotlib
> pip install PyYaml
> pip install PyQt5
> pip install qdarkstyle
> pip install pyqtgraph
  1. Create a new Python script called test.py and paste the following code. Run the script to test PyQt5 + PyQtGraph. Play around with each test example, particularly the benchmarks, to ensure everything is working properly.
import pyqtgraph.examples
pyqtgraph.examples.run()
  1. If you want to build MELScope as a executable yourself, use the following command in the commands prompt:
> pip install pyinstaller
> pyinstaller --noconsole --icon=melscope_icon.ico --clean MELScope.pyw