spec

Software for Diffraction

TDC

Risoe TDC

DESCRIPTION

The Risoe Time-to-Digital Converter (TDC) P2011a/P2012a processes events from the Risoe 2D multiwire small angle neutron scattering detector. spec supports the TDC over a GPIB interface.

The controller is selected in the config file with the line

GP_RISOTDC = gpib_address @img_sel

where sel is the image-device number used as the first argument in the image_par() and image_get() functions below. When running the configuration editor, switch to the MCA (1D) and Image (2D) Acquisition Device Configuration screen to select the Risoe TDC as a Image device.

The size of the 2D data array sent by the TDC is 128x128. The native data type is unsigned long.

FUNCTIONS

The image_par() function controls the TDC behavior as follows:

image_par(sel, "clear")
Clears the TDC memory.
image_par(sel, "run")
Start data collection. Memory is not cleared.
image_par(sel, "halt")
Halt data collection.
image_par(sel, "XYmode")
Set 2D mode, 128x128 pixels. This is the default mode.
image_par(sel, "Xmode")
Set data collection to 1D mode along the horizontal direction.
image_par(sel, "Ymode")
Set data collection to 1D mode along the vertical direction.
image_par(sel, "map", num)
Set the map number as described in the TDC manual. The default value for num is zero, which is appropriate for 2D data collection. For 1D data collection, a value of 2 is recommended.
image_get(sel, arr)
Reads data into the array arr.