MCA Data Server Reference

wxMCA

Introduction

ARM Data structures

Version

Status

Controls

MCA Data Server

Overview

The Neutron-3K Programmer's Model

The Neutron-3K has an embedded ARM M0+ MCU (Atmel SAM L21J), which includes a 32-bit ARM processor with a USB interface. Attached to the ARM M0+ is an FPGA that receives a continuous data stream from a waveform-digitizing ADC. The pulse shape discrimination for neutron detection and all other data acquisition is implemented inside the FPGA. The ARM M0+ provides the USB interface and the system slow control, such as gain stabilization.

The software is structured into four layers as shown in the table below. It is written in Python and is compliant with Python 3.6 or higher.

Layer Purpose Description
mca_server.py Data server The data server is implemented using zero message queue ( zeromq.org). The server not only acts as a bridge between the detectors on the USB bus and the Internet, but also as a bridge between programming languages. All data are serialized using JSON strings.
While the server is written in Python, clients can access the Neutron-3K using any programming language they like.
Further, complex tasks can be distributed over independent clients, eg DAQ, reach back and gain stabilization, rather than creating one very complex super client.
The client exchanges data with the server via JSON strings.
mca_api.py API Level This is the API layer used to process commands directed at a single Neutron-3K or at an array of such devices.
The client exchanges data with the API via dictionaries.
neutron3k_data.py Data descriptor This device-specific layer provides one class for each set of control and data registers within the Neutron-3K. The classes have standardized functions to communicate with the API layer
mca_device.py device driver This layer provides a Python interface to the communication hardware.
libusb0.py USB driver This layer provides a Python binding to libusb0.1 using ctypes. Compiled libusb0.1 modules are provided for a number of platforms, and are also included by default in most commercial Linux computers.