FlexEye Python Examples
Four example programs, written in Python are provided. The basic example demonstrates creating subprocesses for different channel combinations. The second example shows how to communicate information from a child process back to the parent process. The third example launches 6 subprocesses that each take 60 seconds to complete and display a tkinter graph. Most importantly it shows that all six subprocesses run asynchronously ending after 60 seconds instead of 6 x 60 seconds. Because each example program installs simulated channels with FlexDCA offline, no hardware is required to run them. Refer to the FlexDCA Programmer's help to learn about these examples programs:
- Example of configuring a variety of FlexEye sessions (simulated modules)
- Example of child process that communicates with the parent via stdout (simulated modules)
- Example of child process with tkinter graph (simulated modules)
The FlexEye examples were written for Python 3. All examples were developed and tested using the following environment:
- Windows 10 PC
- Keysight IO Libraries Suite installed for VISA (Virtual Instrument Software Architecture) library. Go to http://www.keysight.com/find/iosuite.
- Python 3.5. Anaconda Python distribution (Windows 32-bit) from Continuum Analytics installed using the graphical installer. For information on Anaconda, go to https://www.anaconda.com/distribution/.
- PyVISA which is a Python front end for the VISA library. The correct version of PyVISA is provided with Anaconda. To learn about PyVISA, go to https://pyvisa.readthedocs.io/.
- For graphs, the matplotlib module is used which is provided with Anaconda.