PelROOT
The Pelletron-Linac data analysis tools for ROOT

adac

This document describes the structure of the acquisition system programming interface. ADAC+ is used to compile the EVS program into a binary code that can be easily understood by the CAMAC driver. Every time a CAMAC module generates a LAM (Look-At-Me) signal an interruption is generated in the computer. This interruptions is processed by the CAMAC driver in the computer and the corresponding instructions are processed.

This document is divided as follow:

How to assemble a program

The commands to assembler and disassemble a program are: [FILE NAME] may or may not contain the extension (.EVS for the source code and .EVP for a compiled program). The command adac+ will produce the following files:

Structure of the program

The data acquisition program is divided into two main sections: The configuration section runs only when the program is loaded into the CAMAC driver. The event loop section runs every time an event is processed. The user should remember that a LAM signal should be generated by some CAMAC module in order to tell the computer to process an event. Therefore, there should be a command in this part of the program that enables the LAM feature in one of the CAMAC modules.

IMPORTANT NOTE: In general, the LAM signal is generated after the event is processed by the CAMAC module. If there are slower modules than the one used for the LAM generation it may be possible that the data in the slower modules can not be ready to be transferred to the computer, making, sometimes, the data unusable.

The configuration and event loop blocks are separated by the INIT statement. The INIT statement tells the computer where the event loop instructions begin. The END statements tells the computer where the event loop block finishes. A basic structure of a program is:
    ...
    ...
    CONFIGURATION INSTRUCTIONS
    ...
    ...

    INIT

    ...
    ...
    EVENT LOOP INSTRUCTIONS
    ...
    ...

    END

Basic instruction list and definitions

Macro instruction list and definitions

Registers and operators

There are 3 main registers available. The main difference between the different registers is their size. The registers are ZEROED in the beginning of each run but they are NOT zeroed from one event to the other. The registers are: Please note that the CA register is smaller than the others.

The operators are FORTRAN style operators and are:

Pre-compiler directives

Pre compiler directives are used to set some CAMAC parameters or label the compiled program. When running the acquisition system with the SPMRoot program there is no need for such directives. These directives are mainly used by the old SPM acquisition system. See the SPM documentation for more information.

The main pre-compiler directives are: