This is the application that communicates with the CAMAC crate and creates data files. It accepts three command line arguments:

-F aFileName  --> specifies starting file name that the DAQ should use to save data to. Note: when the time comes to create new file, it will revert to standard naming convention. This is an optional parameter.

-D aDirectory  --> specifies a directory where all data files will be saved to.

-C aFilePath  --> specifies the path to the configuration file where discriminator values are stored in. Discriminators are read in the left to right order, first 3412, then 3412E, then 4413 discriminators. Values should be real desired voltages expressed in milivolts.


As the DAQ starts it will send "ON" command to the HV controller. That will turn the HVs on if they were off. The voltage will slowly (6-8 seconds) ramp up to desired voltages.

When the TDC(0) LAM is detected, the DAQ starts the readout by reading all ADC, then TDC, than the GPS module. Every N detected events a new file will be created and the housekeeping will be written. Housekeeping information is stored at the beginning of each file (after the first event).

The application response time to an event is 150 microseconds on average. The whole readout is completed within 5 milliseconds. A new event can be accepted immediately after that. That gives it a theoretical event throughput of 200 Hz.

The DAQ is extending the crate VETO signal by the means of parallel port and an OR input on the discriminator inhibit module. Any parallel port pin in the range between 2 and 9 acts as a DAQ busy signal. At the moment, pins 2-6 are soldered together in order to get more power out of them. It is using TTL2NIM module to convert parallel TTL output to NIM output that drives the OR input on the gate generator.

The SCSI port can become corrupted by pure chance, or by turning off/on the CAMAC crates. If the DAQ is complaining that the CAMAC controllers can not be found it probably means that the SCSI port is corrupted. You can fix this by rebooting the PC.

About source code and compilation:

The application is written in C/C++ and is using 2 external libraries. First external library is the CAMAC communication library by FERMILAB( Second external library is PARAPIN(, parallel port handling library written by Jeremy Elson (

All hardware modules are described by C++ classes contained in the ./camacModules/ directory. All important DEFINES and data structures are defined in ./camacIncludes/ directory.

The application is compiled by running compileDAQ.compile shell script.