User Tools

Site Tools


data_acquisition_daq

This is an old revision of the document!


S800 Data Aquisition

USB Data Acquisition Setup Guide

This page contains information on the USB-based data acquisition running on the NSCL-supported devices. It is intended to provide a better understanding of the software and a way for users to setup or modify the configurations to their needs.

The USB-based data acquisition is built around the VM-USB (VME) and CC-USB (CAMAC) crate controllers available from Wiener Electronics. These controllers contain at their core an FPGA on which the controller firmware is loaded. The controllers have two modes of operation:

  1. Interactive mode: commands sent to the USB port are immediately executed and their result returned
  2. Data acquisition mode: the controller executes a list of commands preloaded in a stack upon a trigger condition (event, interrupt or periodic)

The first mode is typically used when setting up the modules contained in the crate, such as gains, thresholds and so on, while the second mode is used for acquiring event-driven data. The two modes are mutually exclusive, and issuing an interactive command while in data acquisition mode will typically result in an error or lockup of the controller.

The USB DAQ is a Tcl-based software using a simple API library to handle the low-level handling of the data. It is capable of handling multiple crate controllers (CC-USB or VM-USB) connected to the same computer. Each controller is polled by an independent thread which then sends the data through a predefined TCP/IP port.

The machine-level calls to the USB interface are handled by a library called “libusb” which is widely available on many platforms (Linux, OS X, Windows). The installation of this library is mandatory in order to use this data acquisition system. Wiener Electronics provides a C library called “libxxusb” built on top of libusb with subroutines tailored to the VM-USB and CC-USB. The USB DAQ in turn uses this library in a Tcl API written to interface the C subroutines of libxxusb to the Tcl world. The library implementing this API is called “libTclXXUSB”. It also contains custom subroutines used in sending data through TCP/IP ports.

The data streams coming from the various crates are synchronized and combined into a single stream by the event builder program (written in C). This program connects to the TCP/IP ports of the USB DAQ as a client. It also checks the sanity of the buffers before assembling them into NSCL standard buffers.

The software is distributed into the following folder structure:

  • TclXXUSB: contains the USB DAQ main program (RunControl.tcl) as well as class definitions for different types of modules
  • libTclXXUSB: contains the Wiener Electronics library libxxusb as well as the Tcl API implemented in libTclXXUSB
  • eventbuild: contains the event builder program and its debug files
  • Scripts: contains the Tcl scripts for the various crates and sequences
  • Configs: contains the configuration files of the various modules used in the setup
data_acquisition_daq.1386808471.txt.gz · Last modified: 2013/12/11 19:34 by pereira