MCA-1K Software Package V3 Reference

MCA-1K Package

Introduction

Capabilities

Taking Data

User's Manual (pdf)

Components

MCA Data Server

GUI

Simulator

Configuration

Code Examples

MCA-1K Software V3

The software package consists of a number of independent server and client modules serving different tasks. While there are some requirements for pre-installed software, the package itself requires no installer and the files can be copied to wherever the user wishes. It will be advantageous, although not strictly necessary, to maintain the internal folder hierarchy.

Requirements

The package is mostly written in Python and requires Python 3.7. While some of the package is compatible with Python 2.7, we have performed software testing only under Python 3.6, 64-bit, and higher.

Within the package, client-server communication is established via ZMQ (www.zeromq.org). ZMQ is available for over 40 programming languages, and the protocol allows the client programmer to access our server software from many different programming languages. Hence our server software acts as a bridge between the USB-based hardware and the local network, as well as acting as a bridge between programming languages.

The graphics user interface is built using matplotlib. Starting with version 3.1 of the software packet, the GUI will also use wxPy with wxWidgets.

Using pip install

Especially under Python 3.7, using pip to install new software is quite simple. If the Python 3.7 installation is in your environment path, you can use the pip commands from any terminal or cmd window. Otherwise you'll need to open the terminal or command window in the folder where the pip executable can be found.

ZMQ: pip install zmq.

matplotlib: pip install matplotlib.

USB driver

We use a user-space USB driver called libusb0.1. Most Linux-based OS ship with a working version of libusb0.1, and the user is encouraged to find the local version of the *.so file. In the near future, we will add support for libusb1.0, which is now more commonly supported.

On Windows 10 a signed USB-driver is required. Bridgeport's installer provides a signed libusb-win32 driver, which is based on libusb0.1.

The MCA Data Server comes with a selection of libusb0.1 shared objects and a dll. It tries to select the appropriate one from the environment information that is accessible to Python, but the user can select a particular driver file if necessary.

Software components

The components of the software package are listed in the table below.

Component Purpose Description
mds_v3 Connect MCA-1K to the world The MCA Data Server (MDS) connects to one or more MCA-1K devices and provides a server interface the the network and the world.
dashboard GUI back-end There is a graphics user interface (GUI) accessible via the run_dashboard command. The code itself is located in the folder matplot_gui
rad_config Configuration data All software components have some configurability. In particular one can set server-client IP addresses and a few other parameters, such as where data might be stored. All configuration data are JSON-strings and human-readable.
sim_v3 Device simulator This simulator can run alternatively to running the MDS. This is helpful when no MCA-1K hardware is present, but the developer wants to test basic DAQ software.
MDD MCA Data Daemon(MDD) The optional MDD is used to launch necessary processes and check if they are alive. A hung or crashed process will be respawned. This is highly configurable and is often used in unattended systems. The OS may make sure the MDD is up and running and the MDD takes care of all subordinate processes. For instance the MDD may make sure that, at the minimum, the MDS and the stabilizer are running.