wxMCA Software Package Reference

wxMCA Package

Introduction

MDS Description

Supported Devices

Counter

MCA-1K

MCA-2K

MCA-3K

eMorpho

Application Examples

Code Examples

Introduction

The wxMCA software package consists of processes that communicate with each other through messages exchanged through ZMQ as the protocol layer. To the user this transparent, and interprocess messages are human-readable JSON strings. Within the modules of any process communication occurs via dictionaries or class objects.

MCA Data Server

The MCA Data Server server can work with clients written in any of the popular programming languages.

The MCA Data Server (MDS) underpins all data acquisition. Its purpose is to provide a bridge between the detector on the USB or serial bus and multiple clients. It needs to always be active, with the exception when accessing the MCA devices directly from the MDS API (mca_api.py) In that case, the client has to write the DAQ software in Python, and the remainder of the discussion below does not apply, as there would be no data server present to listen to the other processes. When the MDS is used, it needs to be started first.

On Linux systems the MCA Data Server must be run with root privilege.

Once the MDS is up and running users can deploy one or more clients to the MDS for the purpose of data acquisition or control (such as the gain stabilizer). There is no concern over the processes interfering with each other.

For one, the ZMQ protocol ensures that messages are delivered uncorrupted and in order to the MDS. Each client process uses the ZMQ REQ/REP (request/reply) protocol, where the MDS will receive a request, process it and deliver an answer back to the requesting client. Only then will the MDS proceed to deal with the next message in the queue.

Secondly, all requests to change settings in the MCA-1K device (such as detector operating voltage, eg) can be issued as read-modify-write requests. For instance, a read-modify-write request to change the operating voltage is executed atomically: The MDS receives the new voltage value, reads the control registers of the MCA-1K, updates the voltage register, writes the data back to the MCA-1K and only then sends a reply back to the requesting client.

DAQ Examples

There are small, uncomplicated examples for all supported types of data acquisition.

The package comes with an exhaustive list of independent examples that demonstrate data acquisition, either with the actual hardware or with the device simulator.