Home
Electronic Instrumentation
Contents
1. Arguments Name Description 00 handle Device handler buffer The address of the acquisition buffer buffsize The acquisition buffer size in samples events The pointer to the event list allocated via MallocDPPEvents numEventsArray The pointer to an array of int which will contain the number of events found per channel Return Values 0 Success negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Description Allocates the event buffer matrix which is handled by the GetDPPEvents function The matrix has one event array per channel and must be declared as a MAX_CH sized array of pointers Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ MallocDPPEvents int handle void events uint32 t alllocatedSize typedef struct d tiac qe rorat uint64 t TimeTag uintl6 e Energy abguedl o E meras uint32_t Waveforms lt pointer to coded data inside the readout buffer only meant to be supplied to CAEN DGTZ DecodeDPPWaveforms CAEN DGTZ DPP PHA Event t typedef struct d uint32_t Format uint32 t TimeTag intl16 t ChargeShort intl6 t ChargeLong umso Baseline Zelle ic s uint32 t Waveforms pointer to coded data inside the readout buffer only meant to be supplied to CAEN DGTZ DecodeDPPWaveforms CAEN DGTZ DPP PSD Event t typedef struct uint32_t Format Uint3s2 t
2. IMPORTANT The following function identifies the different boards with a system which may change for different connection methods USB Conet ecc Refer to CAENDigitizer user manual for more info brief CAEN DGTZ OpenDigitizer lt LikType gt lt LinkNum gt lt ConetNode gt lt VMEBaseAddress gt lt handler gt Some examples below The following is for b boards connected via b USB direct links in this case you must set lt LikType gt CAEN DGTZ USB and lt ConetNode gt lt VMEBaseAddress gt 0 cet CAEN DGTZ OpenDigitizer CAEN DGTZ USB b 0 0 amp handle b UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation The following is for b boards connected via 1 opticalLink in dasy chain in this case you must set lt LikType gt CAEN DGTZ PCI OpticalLink and lt LinkNum gt lt VMEBaseAddress gt 0 cet CAEN DGTZ OpenDigitizer Params b LinkType 0 b Params b VMEBaseAddress amp handle b The following is for b boards connected to A2818 or A3818 via opticalLink or USB with A1718 in this case the boards are accessed throught VME bus and you must specify the VME address of each board lt LikType gt CAEN DGTZ PCI OpticalLink CAEN DGTZ PCIE OpticalLink for A3818 or CAEN DGTZ USB for A1718 lt LinkNum gt must be the bridge identifier lt ConetNode gt must be the port identifier in case of A2818 or A3818 or 0 in
3. Fig 7 3 Connection example no 3 The host PC houses two CAEN A2818 PCI CONET Controllers the VME crate houses the following boards e Two V1724 Digitizer connected in a Daisy chain between them end to the A2818 0 Dev 1 first in Daisy chain and Dev 2 second in Daisy chain e Two V1724 Digitizer connected in a Daisy chain between them end to the A2818 1 Dev 3 first in Daisy chain and Dev 4 second in Daisy chain Note The A2818 number refers to the PCI slot and depends on the motherboard of the PC used It is not known a priori which PCI card is assigned to which number In this example we assume that the A2818 connected to Dev 1 and Dev 2 is inserted into the first PCI slot and get Link Number 0 Open Dev 1 V1724 first device in Daisy chain of A2818 0 CAEN DGTZ OpenDigitizer CAEN DGTZ PCI OpticalLink LinkType physical communication channel Optical Link via A2818 PCI Controller OF LinkNum Link number 0 first device OF ConetNode first device in the chain O OF VMEBaseAddress must be 0 amp handleV1724 1 Pointer to the handler returned by function Open Dev 2 V1724 second device in Daisy chain of A2818H0 CAEN DGTZ OpenDigitizer CAEN DGTZ PCI OpticalLink LinkType physical communication channel Optical Link via A2818 PCI Controller OF LinkNum Link number 0 first device ly ConetNode second device in the chain 1 D VMEBaseAdaress must be 0 amp handleV1724 2 Pointer to the handle
4. typedef enum CAEN DGTZ PulsePolarityPositive 0 CAEN DGTZ PulsePolarityNegative 1 CAL NBD CDU Uses Ae Arguments handle Device handler channel The channel to set get information for pol pol Value of the pulse polarity Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN DI Electronic Instrumentation Description Sets gets the run synchronization mode of the digitizer used to synchronize an acquisition on multiple boards Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetRunSynchronizationMode int handle CAEN DGTZ RunSyncMode t mode 1 CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetRunSynchronizationMode int handle CAEN DGTZ RunSyncMode t mode i typedef enum CAEN_DGTZ_RUN_SYNC_Disabled CAEN DGTZ RUN SYNC TrgOutTrgInDaisyChain CAEN DGTZ RUN SYNC TrgOutSinDaisyChain CAEN DGTZ RUN SYNC SinFanout CAEN DGTZ RUN SYNC GpioGpioDaisyChain CAEN DGTZ Run SyncMode t Arguments handle Device handler mode mode The run synchronization mode to set get Return Values 0 Success Negative numbers are error codes see Return Codes Description Sets gets the I O level Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetIOLevel int handle CAEN DGTZ IOLevel t level CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetIOLevel int handle CAEN DGTZ IOLevel t level
5. CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetChannelTriggerThreshold int handle Units 2a channely ints EST Oe i Arguments handle Device handler channel Channel to set Tvalue Threshold value in ADC counts Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 30 CAEN DI Electronic Instrumentation Description This function sets gets the Trigger Threshold for a specified group of channel The threshold is common to the 8 channels in the group See the Set GetChannelTriggerThreshold function for further details A Note to be used only with x740 series Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetGroupTriggerThreshold int handle uint32 t group uint32 t Tveillue CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetGroupTriggerThreshold int handle uint32 t group uint32 t Tvalue i Arguments handle Device handler group Group to set Tvalue Threshold value Return Values 0 Success Negative numbers are error codes see Return Codes Description Sets gets the value of the pulse polarity for the specified channel Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetChannelPulsePolarity int handle pomis Ap hanmes CAEN DGTZ PulsePolarity t pol i CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetChannelPulsePolarity int handle uint32 t channel CAEN DGTZ PulsePolarity t pol
6. typedef enum 1 CAEN DGTZ IOLevel NIM OL CAEN DGTZ IOLevel TTL 1L CAEN DGTZ IOLevel t Arguments handle Device handler level level The I O level of the digitizer to set get Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 32 CAEN DI Electronic Instrumentation Description Sets gets the trigger polarity of a specified channel A Note not to be used with DPP firmware Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetTriggerPolarity int handle pano Mte heme CAEN DGTZ TriggerPolarity t Polarity i CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetTriggerPolarity int handle Uint32 e channel CAEN EDEL AN ima gge r polari tyit Polarity i typedef enum CAEN DGTZ TriggerOnRisingEdge OL CAEN DGTZ TriggerOnFallingEdge 1L CAEN DGTZ TriggerPolarity t Arguments handle Device handler channel channel Selects the channel to set get the trigger polarity for Polarity Polarity The polarity of the trigger to set get Return Values 0 Success Negative numbers are error codes see Return Codes Description Sets gets the threshold value on TRn input used as external trigger for the local trigger generation in x742 series As the threshold is an hardware threshold input of a programmable 16 bit DAC whose voltage output goes to a comparator it is not easy to set and the user
7. CAEN DGTZ ErrorCode ret Buffers to store the data The memory must be allocated using the appropriate CAENDigitizer API functions see below so they must not be initialized here NB you must use the right type for different DPP analysis in this case PSD char buffer NULL readout buffer CAEN DGTZ DPP PSD Event t Events MaxNChannels events buffer CAEN DGTZ DPP PSD Waveforms t Waveform NULL waveforms buffer The following variables will store the digitizer configuration parameters CAEN DGTZ DEE PSD Params t DPPParams MAXNB DigitizerParams t Params MAXNB Arrays for data analysis uint64 t PrevTime MAXNB MaxNChannels uint64 t ExtendedTT MAXNB MaxNChannels uint32 t EHistoShort MAXNB MaxNChannels Energy Histograms for short gate charge integration uint32 t EHistoLong MAXNB MaxNChannels Energy Histograms for long gate charge integration float EHistoRatio MAXNB MaxNChannels Energy Histograms for ratio Long Short int ECnt MAXNB MaxNChannels Number of Entries Counter for Energy Histograms short and long gate int TrgCnt MAXNB MaxNChannels The following variable will be used to get an handler for the digitizer The handler will be used for most of CAENDigitizer functions to identify the board int handle MAXNB Other variables aede il Id ld EN int Quit 0 int AcqRun 0 IL Cl Leen el en BDUCCSrOLAS int Nb 0 int DoSa
8. for ch 0 ch lt MaxNChannels ch if Params b ChannelMask amp 1 ch continue Update Histograms for ev 0 ev NumEvents ch ev aree sone Del Fen aree Time Tag if Events ch ExtendedTT PrevTime b ch fr vnqesieesyy 4 ase 0 ff BILL EHistoS EHistoL ECnt b Get Waveforms alae Params Dos int size intl6 t Wa wolines ic D UM1935 CAENDigitizer User amp Reference Manual Events ch ev ChargeLong gt 0 E r ie beer seseg ev TimeTag lt PrevTime b ch Events ch ev TimeTag the histograms hort b ch Events ch ev ChargeShort ong b ch Events ch ev ChargeLong ch tts only from 1st event in the buffer CAEN DGTZ SLAVE TERMINATED READOUT MBLT Events Events ch ev ChargeShort gt amp BitMask amp BitMask b AcqMode l CAEN DGTZ DPP ACQ MODE List amp amp aveWave b ch amp amp ev 0 veLine gitalWaveLine 90 91 CAEN DI Electronic Instrumentation CAEN DGTZ DecodeDPPWaveforms handle b amp Events ch e Use waveform data here size int Waveform gt Ns Number of samples WaveLine Waveform gt Tracel First trace for ALWAYS the Input Signal SaveWaveform b ch 1 size WaveLine v Waveform DPPePODOUPE As WaveLine Waveform gt Trace2 Second Trace if single trace mode it is a sequence of
9. Trigger Threshold The following parameter is used to specifiy the number of samples for the baseline averaging 0 gt absolute Bl 1 4samp 2 8samp 3 gt 16samp 4 32samp 5 64samp 6 128samp DPPParams 5 nsbl ch 2 DPPParams b lgate ch 32 Long Gate Width N 4ns DPPParams b sgate ch 24 Short Gate Width N 4ns DPPParams b pgate ch 8 Pre Gate Width N 4ns Self Trigger Mode 0 Disabled 1 Enabled DPPParams b selft ch 1 Trigger configuration CAEN DGTZ DPP TriggerConfig Peak trigger on peak NOTE Only for FW E 35 5 CAEN DGTZ DPP TriggerConfig Threshold gt trigger on threshold DPPParams b trgc ch CAEN DGTZ DPP TriggerConfig Threshold Trigger Validation Acquisition Window DPPParams b tvaw ch 50 Charge sensibility e LSB l gt 160fe USB 2 gt o40 C LSB 9 72 5pe USB DPPParams b csens ch 0 Pile Up rejection Mode CAEN DGTZ DPP PSD PUR DetectOnly gt Only Detect Pile Up CAEN DGTZ DPP PSD PUR Enabled gt Reject Pile Up DPPParams b purh CAEN DGTZ DPP PSD PUR DetectOnly DPPParams b purgap 100 Purity Gap DPPParams b blthr 3 Baseline Threshold DPPParams b bltmo 100 Baseline Timeout DPPParams b trgho 8 Trigger HoldOf t KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK xy Open the digitizer and read bo
10. z hecsfollowingevalbuescaresvadlidotorcthesfollowingeDEB PSbIES Firmwares id x x 20 Boards AMG REM lt gt 13 gt S soul Boerces AMC ium lt 13255 x For newer firmwares use the values marked with R4 in the name S WARNING WARNING WARNING WARNING WARNING WARNING WARNING EOKCKCKCKCk Ck k ck ck ck ck kk kk CKCkCkCk Ck ck ck ck ck ck ck ck ck kc kCkCk Ck CkCk ck ck ck ck ck ck ck ck ko ko ko kk kk ke ke ke x x x x x720 Digital Probes Types CAEN DGTZ DPP PSD DIGITALPROBEl1 Armed fh CAEN DGTZ DPP PSD DIGITALPROBE1 Trigger dy CAEN DGTZ DPP PSD DIGITALPROBEl ChargeReady guy CAEN DGTZ DPP PSD DIGITALPROBE1 PileUp Bi CAEN DGTZ DPP PSD DIGITALPROBE1 BlOutSafeBand 4L CAEN DGTZ DPP PSD DIGITALPROBE1 BlTimeout Sib CAEN DGTZ DPP ban DIGITALPROBE1 CoincidenceMet 6L CAEN DGTZ DPP PSD DIGITALPROBEl Tvaw Tiy x751 Digital Probes Types CAEN DGTZ DPP PSD DIGITALPROBE1 OverThr Gi CAEN DGTZ DPP PSD DIGITALPROBEl GateShort OL CAEN DGTZ DPP PSD DIGITALPROBE1 None iit BRK KKK KKK KKK KK KK KK KKK KK KK KKK KKK KK KK KK KK KK WARNING WARNING WARNING WARNING WARNING WARNING WARNING The following values are valid for the following DPP PSD Firmwares x 20 Boacds AMC e REI 91 16 s S SL odd SEMAINE ET MG For older firmwares use the values above es WARNING WARNING WARNING WARNING WARNING WARNING WARNING EOKCKCKCKCk Ck k ck ck kk Ck kOkOCKCKCK
11. CAEN DGTZ DPP PSD Params t in case of DPP PSD CAEN DGTZ DPP CI Params t in case of DPP CI Return Values 0 Success negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Description Sets gets the DPP acquisition mode Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetDPPAcquisitionMode int handle CAEN DGTZ DPP AcqMode t mode CAEN DGTZ DPP SaveParam t param i CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetDPPAcquisitionMode int handle CAEN DGTZ DPP AcqMode t mode CAEN DGTZ DPP SaveParam t param i typedef enum CAEN DGTZ DPP ACQ MODE Oscilloscope OL CAEN DGTZ DPP ACQ MODE List L CAEN DGTZ DPP ACQ MODE Mixed Sr CAEN DGTZ DPP AcqMode t typedef enum CAEN DGTZ DPP SAVE PARAM EnergyOnly OL CAEN DGTZ DPP SAVE PARAM TimeOnly L CAEN DGTZ DPP SAVE PARAM EnergyAndTime 2L CAEN DGTZ DPP SAVE PARAM ChargeAndTime 4L CAEN DGTZ DPP SAVE PARAM None 3L CAEN DGTZ DPP SaveParam t Arguments handle Device handler The DPP acquisition mode to set get CAEN DGTZ DPP ACO MODE Oscilloscope OL enables the acquisition of the samples of the digitized waveforms mode mode CAEN DGTZ DPP ACO MODE List 1L enables the acquisition of time stamps and energy values in case of DPP PHA or charge in case of DPP CI and DPP PSD CAEN DGTZ DPP ACOQ M
12. CAEN DGTZ DPP PHA Params t for b 0 b MAXNB b for ch 0 ch MaxNChannels ch EHisto b ch NULL set all histograms pointers to NULL we will allocate them later RRR KKKKKK KKK KK KK KK KK KK KK KK KK Communication Parameters x A A A KK RRR KK d Direct USB connection Params b LinkType CAEN DGTZ USB Link Type Params b VMEBaseAddress 0 For direct USB connection VMEBaseAddress must be 0 Direct optical connection Params b LinkType CAEN DGTZ PCI OpticalLink Link Type Params b VMEBaseAddress 0 For direct CONET connection VMEBaseAddress must be 0 Optical connection to A2818 or A3818 and access to the board with VME bus Params b LinkType CAEN DGTZ PCI OpticalLink Link Type CAEN DGTZ PCIE OpticalLink for A3818 Params b VMEBaseAddress 0x32100000 VME Base Address only for VME bus access must be 0 for direct connection CONET or USB USB connection to V1718 bridge and access to the board with VME bus Params b LinkType CAEN DGTZ USB Link Type Params b VMEBaseAddress 0x32110000 VME Base Address only for VME bus access must be 0 for direct connection CONET or USB Params b IOlev CAEN DGTZ IOLevel TTL S EK K K K k k kk ko ko kk ke KK KKK KK KK KK KK K Acquisition parameters NO ok ko ke koe ke ke ke ke ke keke ke ke e eee d Params b AcqMode CAEN DGTZ DPP ACQ MODE Mixed L CAEN DGTZ DPP ACQ MODE List
13. CAEN DGTZ GetZeroSuppressionMode int handle CAEN DGTZ ZS Mode t mode typedef enum CAEN DGTZ ZS NO 0 CAEN DGTZ ZS INT e i CAEN DGTZ ZS ZLE 2 CAEN DGTZ ZS AMP B CAEN DGTZ ZS Mode t Arguments handle Device handler Zero Suppression Mode CAEN DGTZ ZS NO 0 no Zero suppression mode CAEN DGTZ ZS INT 1 Full Suppression based on the integral of the signal CAEN DGTZ ZS ZLE 2 Zero Length Encoding CAEN DGTZ ZS AMP 3 Full Suppression based on the signal amplitude Supported digitizers and permitted zero suppression modes x720 X X X V1721 V1731 X X X x724 X X X X Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 42 43 CAEN DI Electronic Instrumentation Description Sets Gets Zero Suppression parameters for a specific channel in the supported digitizers see the table in the Set GetZeroSuppressionMode functions Note the Set GetChannelZSParams functions are to be used in combination with Set GetTriggerPolarity and Set GetZeroSuppressionMode functions which relate to the trigger polarity logic and the zero suppression algorithm Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetChannelZSParams int handle Wnei e channel CAEN DGTZ ThresholdWeight t weight Oe Me Shoal int32_t nsamp CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetChannelZSParams int handle
14. OF ConetNode unique device in the chain O 0x55010000 VMEBaseAddress amp handleV1724 1 Pointer to the handler returned by function Open Dev 2 V1724 VME base address 0x55020000 accessed via VMEbus through the V2718 connected to A3818 port 2 CAEN DGTZ OpenDigitizer CAEN DGTZ PCIE OpticalLink LinkType physical communication channel Optical Link via A3818 PCle Controller 2 LinkNum unique device Link number A3818 port number 2 OF ConetNode unique device in the chain O 0x55020000 VMEBaseAddress amp handleV1724 2 Pointer to the handler returned by function Open Dev 3 DT5751 first device in Daisy chain of A3818 port 2 CAEN DGTZ OpenDigitizer CAEN DGTZ PCIE OpticalLink LinkType physical communication channel Optical Link via A3818 PCle Controller ag LinkNum unique device Link number A3818 port number 3 OF ConetNode unique device in the chain O Oy VMEBaseAddress must be 0 amp handleDT5751 3 Pointer to the handler returned by function 97 UM1935 CAENDigitizer User amp Reference Manual CAEN DI Electronic Instrumentation Arguments description LinkType CAEN DGTZ PCIE OpticalLink Indicates A3818 gt Optical Link either direct connection or VME through V2718 as the physical communication channel LinkNum Link number For the CONET the link number indicates which link of A2818 or A3818 is used For A3818 refers to the PCI slot and depends on the motherboard of the PC used Link
15. printf Readout Error n goto QuitProgram j if BufferSize continue Nb BufferSize flear ret NumEvents LE ret T pringtfi Data Error goto QuitProgram d n Analyze data for ch 0 ch lt MaxNChannels ch if Params b ChannelMask continue Update Histograms for ev 0 ev lt NumEvents ch aeree Dell ela ckt Time Tag if Events ch e ExtendedTT b PrevTime b ch EE EE alae V peche Fill the histogra EHisto b ch Events ch ECnt gt cal Get Waveforms alg at siza intl6 t WaveLine CAEN DGTZ ReadData handle b amp BufferSize amp ev Events ch Events ch ev Charge gt 0 ms only from Params b AcqMode DoSaveWave b ch CAEN DGTZ SLAVE TERMINATED READOUT MBLT DataConsistencyCheck uint32 t buffer BufferSize 4 CAEN DGTZ GetDPPEvents handle b buffer BufferSize Events ret l lt eh TimeTag lt PrevTime b ch ev TimeTag 1 ev Charge amp BitMask st event in the buffer CAEN DGTZ DPP ACQ MODE List ev 0 amp amp amp amp uint8 t DigitalWaveLine CAEN DGTZ DecodeDPPWaveforms handle b amp Events ch ev Waveform Use waveform data here size WaveLine int Waveform Ns Waveform gt Tracel Number of samples First trace for DPP CI it is ALWAYS the Inpu
16. 0 b MAXNB b ret ProgramDigitizer handle b Params b DPPParams b if ret printf Failed to program the digitizer n goto QuitProgram WARNING because the to allocate Allocate The mallocs MUST be done after the digitizer programming following functions needs to know the digitizer configuration the right memory amount memory for the readout buffer ret CAEN DGTZ MallocReadoutBuffer handle 0 amp buffer amp AllocatedSize Allocate memory for the events ret CAEN DGTZ MallocDPPEvents handle 0 Events amp AllocatedSize Allocate memory for the waveforms ret CAEN DGTZ MallocDPPWaveforms handle 0 amp Waveform amp AllocatedSize Ef ret d printf Can t allocate memory buffers Nin goto QuitProgram Okck ck ck ck ck ck ck ck ck ck ck ck kc k k kk kk k ko k ck ko k KKK ok ck ko kok ck ck ck ck ck ck ko k ko k KKK kk kk ck ck kk kk kk kk kk kx kx kx kx kx kx kx kx kx kk kk kk kk kk Readout Loop 5 KEKKKKKKKKKK ck ck ck ck ck ck ck ck ck ck ok ck ok ok KKK KKK KKK KKK KKK ok kk ck ck kk kk ko k ko k ck ck ck ko k KKK kk kk kk kk kk kk kk kk kkkkkkk Clear Histograms and counters for b 0 b MAXNB b for ch 0 ch lt MaxNChannels ch BHa sito gt i eh M onmes a maoe AE EMANE SA sizeof ints 2At memset EHisto b ch 0 1 lt lt MAXNBITS sizeof uint32 t Weeer Js ken Og ECnt b ch 0 PrevTime
17. AC Arguments Name Description 00 handle Device handler mode mode The Virtual Probe mode to set get vpl vpl The Virtual Probe1 mode to set get vp2 vp2 The Virtual Probe2 mode to set get dp dp The Digital Probe mode to set get Return Values 0 Success negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 64 CAEN DI Electronic Instrumentation Description Sets gets the information about the output signal of the DPP PSD acquisition mode Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetDPP PSD VirtualProbe int handle CAEN DGTZ DPP VirtualProbe t mode CAEN DGTZ DPP PSD VirtualProbe t vp CAEN DGTZ DPP PSD DigitalProbel t dpl CAEN DGTZ DPP PSD DigitalProbe2 t dp2 CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetDPP PSD VirtualProbe int handle CAEN DGTZ DPP VirtualProbe t mode CAEN DGTZ DPP PSD VirtualProbe t vp CAEN DGTZ DPP PSD DigitalProbel t dpl CAEN DGTZ DPP PSD DigitalProbe2 t dp2 typedef enum CAEN DGTZ DPP VIRTUALPROBE SINGLE OL CAEN DGTZ DPP VIRTUALPROBE DUAL 1L CAEN DGTZ DPP VirtualProbe t typedef enum CAEN DGTZ DPP PSD VIRTUALPROBE Baseline OL CAEN DGTZ DPP PSD VIRTUALPROBE Threshold 1L CAEN DGTZ DPP PSD VirtualProbe t typedef enum BRK K KK KK KKK KK KK KK KK kk kk kkk kkk kk kk kkk kk kkk kk kkk kk kk kkk KK WARNING WARNING WARNING WARNING WARNING WARNING WARNING
18. AnalogMonitorOutputMode t mode CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetAnalogMonOutput int handle CAEN DGTZ AnalogMonitorOutputMode t mode typedef enum CAEN DGTZ AM TRIGGER MAJORITY 8 CAEN DGTZ AM TEST i CAEN DGTZ AM ANALOG INSPECTION 2 CAEN DGTZ AM BUFFER OCCUPANCY 3 CAEN DGTZ AM VOLTAGE LEVEL 4 CAEN DGTZ AnalogMonitorOutputMode t Arguments handle Device handler Analog Monitor Mode CAEN DGTZ AM TRIGGER MAJORITY 0 Trigger Majority Mode side CAEN DGTZ AM TEST 1 Test Mode CAEN DGTZ AM ANALOG INSPECTION 2 Analog Inspection Mode CAEN DGTZ AM BUFFER OCCUPANCY 3 Buffer Occupancy Mode CAEN DGTZ AM VOLTAGE LEVEL 4 Voltage Level Mode Supported digitizers and permitted AM modes V1720 V1721 V1731 V1740 V1751 X X X X V1724 X X X X X Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 44 45 CAEN DI Electronic Instrumentation Description Sets Gets the Analog Inspection Monitor parameters for a V1724 digitizer running standard firmware Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetAnalogInspectionMonParams int handle uint32 t channelmask laut 2 MSc CAEN DGTZ AnalogMonitorMagnify t mf CAEN DGTZ AnalogMonitorInspectorInverter t ami i CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetAnalogInspectionMonParams int handle uint
19. CAEN DGTZ USB 0 Ld 0 r 0x33020000 amp handleV1724 2 LinkType physical communication channel USB LinkNum Link number 0 first device ConetNode if USB 0 VMEBaseAddress Pointer to the handler returned by function Open Dev 3 V1740 VME base address 0x44030000 accessed via VMEbus through the V1718 CAEN DGTZ OpenDigitizer CAEN DGTZ USB 0 Zi 0 L 0x44030000 amp handleV1740 3 Arguments description LinkType physical communication channel USB LinkNum Link number 0 first device ConetNode if USB 0 VMEBaseAddress Pointer to the handler returned by function CAEN DGTZ USB Indicates USB as the physical communication channel Link number in case of USB the link numbers are assigned by the PC when you connect the cable to the device it is O for the first device 1 for the second There is not a fixed correspondence between the USB port and the link number Name Description LinkType LinkNum ConetNode In case of USB ConetNode must be 0 VMEBaseAddress VME Base Address of the board rotary switches setting expressed as a 32 bit number This argument is used only for the VME models accessed through the VME bus and MUST BE O in all other cases UM1935 CAENDigitizer User amp Reference Manual 94 CAEN DI Electronic Instrumentation Example No 3 95 Dev 1 V1724 Dev 3 V1724 Dev 2 V1724 Dev 4 V1724 PCI
20. DAC setting is applied Use 1 for all groups Tvalue DAC value from 0x0000 to OxFFFF Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 40 CAEN DI Electronic Instrumentation Description This function enables or disables the Dual Edge Sampling mode that is the channel interleaving option to double the sampling frequency This option is available in the x731 and x751 series only A WARNING when the DES mode is enabled only the odd channels for the x751 or the even channels for the x731 41 will work the other channels must be left unconnected Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetDESMode int handle CAEN DGTZ EnaDis t mode CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetDESMode int handle CAEN DGTZ EnaDis t mode typedef enum CAEN DGTZ ENABLE i CAEN DGTZ DISABLE 0 CAEN DGTZ EnaDis t Arguments handle Device handler iode CAEN DGTZ ENABLE to enable the DES mode CAEN DGTZ DISABLE to disable the DES mode Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN DI Electronic Instrumentation Description sets gets the Zero Suppression mode Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetZeroSuppressionMode int handle CAEN DGTZ ZS Mode t mode CAEN DGTZ ErrorCode CAENDGTZ API
21. DGTZ SetMaxNumEventsBLT handle b 3 Set the max number of events to transfer in a sigle readout ret CAEN DGTZ SetAcquisitionMode handle b CAEN DGTZ SW CONTROLLED Js Set the acquisition mode di ere D CARIN DETZ Sxxexsesme i princi Veteran Digitizer Coni igura t ion AAN goto QuitProgram printf n nPress s to start the acquisition Mn prine CCS eer eren the Een su bom ET printe pressie iere euer eben eeleren ee No Nor B while 1 c checkCommand if c 9 break if c 2 return Sleep 100 Malloc Readout Buffer NOTE1 The mallocs must be done AFTER digitizer s configuration NOTE2 In this example we use the same buffer for every board We Use the first board to allocate the buffer so if the configuration is different for different boards or you use different board models may be that the size to allocate must be different for each one ret CAEN DGTZ MallocReadoutBuffer handle 0 amp buffer amp size for b 0 b MAXNB b UM1935 CAENDigitizer User amp Reference Manual 48 CAEN DI Electronic Instrumentation Start Acquisition NB the acquisition for each board starts when the following line is executed so in general the acquisition does NOT starts syncronously for different boards ef ret CAEN DGTZ SWStartAcquisition handle b Start acquisition loop while 1 for b 0 b lt MAXNB bt ret CAEN DGTZ SendSWtrigger handle
22. Electronic Instrumentation Acquisition example 47 The following example shows how to perform a data acquisition cycle CAEN provides this example also as source files and project inside the CAENDigitizer full installation package compliant to Visual Studio Professional 2010 include lt stdio h gt include CAENDigitizer h include keyb h define CAEN USE DIGITIZERS define IGNORE DPP DEPRECATED define MAXNB 1 Number of connected boards int checkCommand Ant c 0 alse idoine return 0 c getch switeh o 1 case eis return 9 break ease Tki merci ile break case Toi return 2 break return 0 int main int argc char argv The following variable is the type returned from most of CAENDigitizer library functions and is used to check if there was an error in function execution For example ret CAEN DGTZ some function some args JL aeren primer Vecne Queue 3 CAEN DGTZ ErrorCode ret The following variable will be used to get an handler for the digitizer The handler will be used for most of CAENDigitizer functions to identify the board ALONE handle MAXNB CAEN DGTZ BoardInfo t BoardInfo CAEN DGTZ EventInfo t eventInfo CAEN DGTZ UINT16 EVENT t Evt NULL char buffer NULL dle eu int c 0 count MAXNB char evtptr NULL wubar32 t elize beize uint32 t numEvents i sizeof CAEN DGTZ TriggerMode t for b 0 b lt MAXNB btt
23. Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetDPPParameters int handle uint32 t channelMask void params DPP parameter structure to be initialized and passed to CAEN DGTZ SetDPPParameters To be used only for DPP PHA typedef struct int M MAX V1724DPP CHANNEL SIZE Signal Decay Time Constant int m MAX V1724DPP CHANNEL SIZE Trapezoid Flat Top intik MAX V1724DPP CHANNEL SIZE Trapezoid Rise Time iine Seel MAX V1724DPP CHANNEL SIZE Flat Top Delay int a MAX V1724DPP CHANNEL SIZE Trigger Filter smoothing factor int b MAX V1724DPP CHANNEL SIZE Input Signal Rise time abge elec MAX V1724DPP CHANNEL SIZE Trigger Threshold int nsbl MAX V1724DPP CHANNEL SIZE Number of Samples for Baseline Mean int nspk MAX V1724DPP CHANNEL SIZE Number of Samples for Peak Mean int pkho MAX V1724DPP CHANNEL SIZE Peak Hold Off int blho MAX V1724DPP CHANNEL SIZE Base Line Hold Off int otrej MAX V1724DPP CHANNEL SIZE int trgho MAX V1724DPP CHANNEL SIZE Trigger Hold Off int twwdt MAX V1724DPP CHANNEL SIZE int trgwin MAX V1724DPP CHANNEL SIZE int dgain MAX V1724DPP CHANNEL SIZE Digital Probe Gain float enf MAX V1724DPP CHANNEL SIZE Energy Normalization Factor int decimation MAX V1724DPP CHANNEL SIZE Decimation of Input Signal CAEN DGTZ DPP PHA Params t DPP parameter structure to be initialized and passed to CAEN DGTZ SetDPPPar
24. case of A1718 VMEBaseAddress 0 0xXXXXXXXX address of first board VMEBaseAddress 1 0OxYYYYvYYYY address of second board lt VMEBaseAddress gt b 1 0xZZZZZZZZ address of last board See the manual for details ret CAEN DGTZ OpenDigitizer CAEN DGTZ USB 0 0 0x11110000 shandle b Aaner I CNN DIGI Success printf Can t open digitizer n goto QuitProgram Once we have the handler to the digitizer we use it to call the other functions Si ret CAEN DGTZ GetInfo handle b amp BoardInfo printf NnConnected to CAEN Digitizer Model Sa recognized as board d n BoardInfo ModelName b printf NtROC FPGA Release is s n BoardInfo ROC FirmwareRel printf NtAMC FPGA Release is s n BoardInfo AMC FirmwareRel ret CAEN DGTZ Reset handle b Ves Reset Digitizer ret CAEN DGTZ GetInfo handle b amp BoardInfo Get Board Info CAEN DGTZ SetRecordLength handle Db 4096 Set the lenght of each waveform in samples ret CAEN DGTZ SetChannelEnableMask handle b 1 Enable channel 0 reg ret CAEN DGTZ SetChannelTriggerThreshold handle b 0 32768 Set selfTrigger threshold TEE CAEN DGTZ SetChannelSelfTrigger handle b CAEN DGTZ TRGMODE _ACQ_ONLY 1 Set trigger on channel 0 to be ACQ ONLY SE ret CAEN DGTZ SetSWTriggerMode handle b CAEN DGTZ TRGMODE ACQ ONLY Set the behaviour when a SW tirgger arrives ne CAEN
25. ch if Params b ChannelMask amp 1 ch continue Update Histograms for ev 0 ev NumEvents ch ev Use Cie Dell lal eee UM1935 CAENDigitizer User amp Reference Manual 74 75 CAEN DI Electronic Instrumentation Time Tag alae PrevTime b ch Energy Events ch ev Energy gt 0 LE ExtendedTT b ch Events ch ev TimeTag Events ch ev TimeTag lt PrevTime b ch Fill the histograms EHisto b ch Events ch ev Energy amp BitMask Ise DS bela tere else PileUp Purtnt gt ch Get Waveforms only from 1st event in the buffer LE Params b AcqMode CAEN DGTZ DPP ACQ MODE List amp amp DoSaveWave b ch amp amp ev 0 int size intl6 t WaveLine uint8 t DigitalWaveLine CAEN DGTZ DecodeDPPWaveforms handle b amp Events ch ev Waveform Use waveform data here size int Waveform gt Ns Number of samples WaveLine Waveform Tracel First trace VIRTUALPROBE1 set with CAEN DGTZ SetDPP PSD VirtualProbe SaveWaveform b ch 1 size WaveLine WaveLine Waveform gt Trace2 Second Trace if single trace mode it is a sequence of zeroes SaveWaveform b ch 2 size WaveLine DigitalWaveLine Waveform gt DTracel First Digital Trace DIGITALPROBE1 set with CAEN DGTZ SetDPP PSD VirtualProbe SaveDigitalProbe b ch 1 si
26. ch 1 KREKKKKKKKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK kk kk kk kkk Open the digitizer and read board information Mi kkxkxkxkxkxkxkkkkkkkkkxkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkxkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkxk k The following function is used to open the digitizer with the given connection parameters and get the handler to it for b 0 b MAXNB b IMPORTANT The following function identifies the different boards with a system which may change for different connection methods USB Conet ecc Refer to CAENDigitizer user manual for more info Some examples below The following is for b boards connected via b USB direct links In this case you must set Params b LinkType CAEN DGTZ USB and Params b VMEBaseAddress 0 ret CAEN DGTZ OpenDigitizer Params b LinkType b 0 Params b VMEBaseAddress amp handle b The following is for b boards connected via 1 opticalLink in dasy chain In this case you must set Params b LinkType CAEN DGTZ PCI OpticalLink and Params b VMEBaseAddress 0 ret CAEN DGTZ OpenDigitizer Params b LinkType 0 b Params b VMEBaseAddress amp handle b The following is for b boards connected to A2818 or A3818 via opticalLink or USB with A1718 In this case the boards are accessed throught VME bus and you must specify the VME address of each board Params b LinkType CAEN DGTZ PCI OpticalLink CA
27. int handle CAEN DGTZ OutputSignalMode t mode typedef enum CAEN DGTZ TRIGGER Oly CAEN DGTZ FASTTRG ALL diu CAEN DGTZ FASTTRG ACCEPTED 2L CAEN DGTZ BUSY Suy CAEN DGTZ OutputSignalMode t handle Device handler mode mode The output signal mode to set get Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 36 CAEN DI Electronic Instrumentation 4 Acquisition 37 Description This function enables disables the channels for the acquisition Disabled channels don t give any trigger and don t participate to the event data For the x740 and x742 series use the Set GetGroupEnableMask function Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetChannelEnableMask int handle uint32 t mask CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetChannelEnableMask int handle Oto 2 Juge Arguments handle Device handler mask Enable Mask Bit n with 0 lt n lt 7 corresponds to channel n Return Values 0 Success Negative numbers are error codes see Return Codes Examples WAVEDUMP Code To be implemented Description This function enables disables the groups for the acquisition This function is valid only for the x740 and x742 series Disabled groups don t give any trigger and don t participate to the event data The 8 channel in a group are all enabled disabled according to the
28. read the status of interrupt requests on the VME bus IRQ1 7 and for this reason the handle to be passed is the VME master one not the digitizer one This function can only be used for digitizer that communicate via the VME bus The purpose of this function is almost exclusively for debugging Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ VMEIRQCheck int VMEHandle uint8 t Mask Arguments VMEHandle Device handler of the VME bridge that handles the interrupts Mask Mask of the IRQ lines read from the VME bus 1 IRQ active O IRQ not active Return Values 0 Success Negative numbers are error codes see Return Codes Description This function performs an interrupt acknowledge cycle on the digitizer identified by the handle This function can only be used for direct communications via optical links in case of communication via the VME it should be used VMEIACKCycle described farther Although in the case of direct connection to the optical link there is not need to identify the digitizer that generated the interrupt request the IACK cycle is still executed in the case of mode ROAK release on acknowledge to release the request Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ IACKCycle int handle nm Mod ciel i Arguments handle Device handler of the digitizer board_id Data status_id returned by the digitizer that asserted the interrupt request Return Values 0 Success Negat
29. relevant bit in the enable mask Note to be used only with x740 and x742 series Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetGroupEnableMask int handle uint32 t mask CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetGroupEnableMask int handle uint32 t mask 1 Arguments handle Device handler mask Enable Mask Bit n with 0 lt n lt 7 corresponds to group n Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Description This function starts the acquisition in a board using a software command When the acquisition starts the relevant RUN LED on the front panel lights up It is worth noticing that in case of multiple board systems the software start doesn t allow the digitizer to start synchronously For this purpose it is necessary to use to start the acquisition using a physical signal such as the S IN or GPI as well as the TRG IN TRG OUT Daisy chain Please refer to Digitizer manual for more details on this issue Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SWStartAcquisition int handle Arguments handle Device handler Return Values 0 Success Negative numbers are error codes see Return Codes Description This function stops the acquisition in a board using a software command Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SWStopAcquis
30. the device it is O for the first device 1 for the second and so on There is not a fixed correspondence between the USB port and the link number LinkNum For the CONET the link number indicates which link of A2818 or A3818 is used Link index start from 0 1 Optical link port in the 1 slot used It is not known a priori which is the first slot used it depends on the motherboard of the PC used IMPORTANT NOTE if A2818 and A3818 are installed together the A2818 have lower index assigned The CONET node identifies which device in the Daisy chain is being addressed The node is LinkType ConetNode O for the first device in the chain 1 for the second and so on In case of USB ConetNode must be 0 VME Base Address of the board rotary switches setting expressed as a 32 bit number VMEBaseAddress This argument is used only for the VME models accessed through the VME bus and MUST BE 0 in all other cases handle Pointer to the handler returned by the open function Return Values 0 Success Negative numbers are error codes see Return Codes Examples See the various examples described at p 92 99 9 UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Description This function closes the digitizer Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ CloseDigitizer int handle Arguments handle Device handler Return Values 0 Success Negative numbers a
31. the name SZ WARNING WARNING WARNING WARNING WARNING WARNING WARNING UM1935 CAENDigitizer User amp Reference Manual CAEN DI Electronic Instrumentation K K K E KK hh AK kk Kk k k k k e ke kk A ke ke ke eoe e e e x d CAEN DGTZ DPP CI DIGITALPROBE2 BlOutSafeBand OL CAEN DGTZ DPP CI DIGITALPROBE2 BlTimeout 1L CAEN DGTZ DPP CI DIGITALPROBE2 CoincidenceMet 2L CAEN DGTZ DPP CI DIGITALPROBE2 Tvaw 3L A kkkkkkkkkkkkkkkkkkkkkkkkk KKK KK ck ko ko kk KK KKK KK WARNING WARNING WARNING WARNING WARNING WARNING WARNING The following values are valid for the following DPP CI Firmwares S i x20 Boards AMG REL gt 130222 For older firmwares use the values above WARNING WARNING WARNING WARNING WARNING WARNING WARNING EOKCKCKCKCkCk KK KK KK KK ck ck ck ck ckckckCkCkCkCkCk Ck ck ck ck ck ck ck ck ck ck KK KKK CAEN DGTZ DPP CI DIGITALPROBE2 R22 OverThr 5L CAEN DGTZ DPP CI DIGITALPROBE2 R22 TrgVal 6L CAEN DGTZ DPP CI DIGITALPROBE2 R22 TrgHO 7L CAEN DGTZ DPP CI DIGITALPROBE2 R22 Coincidence 9L CAEN DGTZ DPP CI DigitalProbe2 t Arguments Name Description handle Device handler mode mode The Virtual Probe mode to set get vp vp The Virtual Probe to set get dp1 dp1 The Digital Probe1 to set get dp2 dp2 The Digital Probe2 to set get Return Values 0 Success negative numbers are error codes see Return Codes DPP code examples d The following example codes are intended to l
32. within the acquisition window The size is expressed in percentage of the record length 0 means that the trigger is at the end of the window while 100 means that it is at the beginning Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetPostTriggerSize int handle pumuS2tperseent CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetPostTriggerSize int handle pnmo percent Arguments handle Device handler percent Post trigger in percent of the record length Return Values 0 Success Negative numbers are error codes see Return Codes Description Gets Sets digitizer acquisition mode Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetAcquisitionMode int handle CAEN DGTZ AcqMode t mode CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetAcquisitionMode int handle CAEN DGTZ AcqMode t mode i typedef enum CAEN DGTZ SW CONTROLLED 0 CAEN DGTZ S IN CONTROLLED 1 CAEN DGTZ AcqMode t Arguments handle Device handler ede The acquisition mode CAEN_DGTZ_SW_CONTROLLED or CAEN_DGTZ_S_IN_CONTROLLED Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN DI Electronic Instrumentation Description This function sets the 16 bit DAC that adds a DC offset to the input signal in order to adapt it to the dynamic range of the ADC By default the DAC is set to middle scale 0x8000 which corres
33. 1 R6 OverThr CAEN DGTZ DPP PSD DIGITALPROBE1 R6 TrigOut CAEN DGTZ DPP PSD DIGITALPROBE1 R6 CoincWin CAEN DGTZ DPP PSD DIGITALPROBE1 R6 PileUp CAEN DGTZ DPP PSD DIGITALPROBE1 R6 Coincidence CAEN DGTZ DPP PSD DIGITALPROBE1 R6 GateLong NOTE x751 only Virtual Probes only for FW lt 13X 5 CAEN DGTZ DPP PSD DIGITALPROBE1 Armed NOTE x720 only CAEN DGTZ DPP PSD DIGITALPROBE1 Trigger NOTE x720 only CAEN DGTZ DPP PSD DIGITALPROBE1 ChargeReady NOTE x720 only CAEN DGTZ DPP PSD DIGITALPROBE1 PileUp NOTE x720 only CAEN DGTZ DPP PSD DIGITALPROBE1 BlOutSafeBand NOTE x720 only CAEN DGTZ DPP PSD DIGITALPROBEl BlTimeout NOTE x720 only CAEN DGTZ DPP PSD DIGITALPROBE1 CoincidenceMet NOTE x720 only CAEN DGTZ DPP PSD DIGITALPROBE1 Tvaw NOTE x720 only CAEN DGTZ DPP PSD DIGITALPROBE1 OverThr NOTE 275 only CAEN DGTZ DPP PSD DIGITALPROBE1 GateShort NOTE x751 only CAEN DGTZ DPP PSD DIGITALPROBE1 None NOTE x751 only Digital Probes types for Digital Trace 4 x720 3 x751 Virtual Probes only for FW gt 13X 6 CAEN DGTZ DPP PSD DIGITALPROBE2 R6 GateShort CAEN DGTZ DPP PSD DIGITALPROBE2 R6 OverThr CAEN DGTZ DPP PSD DIGITALPROBE2 R6 TrgVal CAEN DGTZ DPP PSD DIGITALPROBE2 R6 TrgHO CAEN DGTZ DPP PSD DIGITALPROBE2 R6 PileUp CAEN DGTZ DPP PSD DIGITALPROBE2 R6 Coincidence Virtual Probes only for FW lt 13X 5 CAEN DGTZ DPP PSD DIGITALPROBE2 Armed NOTE x720 only CAEN DGTZ DPP PSD DIGITALPROBE2 Trigger NOTE x720 only CAEN DGTZ DPP PSD DIGITALP
34. 20 boards can save 2 analog waveforms Analog Trace 1 it is always the input signal Analog Trace 2 it can be specified with the VIRTUALPROBE parameter 4 digital waveforms Digital Trace I it is always the trigger Digital Trace 2 it is always the long gate Digital Trace 3 4 they can be specified with the DIGITALPROBE 1 and 2 parameters DPP PSD for x 51 boards can save 2 analog waveforms Analog Trace 1 it is always the input signal Analog Trace 2 it can be specified with the VIRTUALPROBE parameter UM1935 CAENDigitizer User amp Reference Manual 84 85 CAEN DI Electronic Instrumentation 3 digital waveforms Digital Trace I it is always the trigger Digital Trace 2 3 they can be specified with the DIGITALPROBE 1 and 2 parameters CAEN DGTZ DPP VIRTUALPROBE SINGLE Save only the Input Signal waveform CAEN DGTZ DPP VIRTUALPROBE DUAL E NES2vemElscoEhcMEvavenoimgsrecnshirecn VIRTUALPROBE Virtual Probes types for Trace 2 CAEN DGTZ DPP PSD VIRTUALPROBE Baseline gt Save the Baseline waveform mean on nsbl parameter Virtual Probes only for FW lt 13X 5 CAEN DGTZ DPP PSD VIRTUALPROBE Threshold gt Save the Baseline Threshold B Ji 5 a waveform NOTE x720 only Digital Probes types for Digital Trace 3 x720 2 x751 Virtual Probes only for FW gt 13X 6 CAEN DGTZ DPP PSD DIGITALPROBE1 R6 ExtTrg NOTE x720 only CAEN DGTZ DPP PSD DIGITALPROBE
35. 20 x For newer firmwares use the values marked with R21 in the name WARNING WARNING WARNING WARNING WARNING WARNING WARNING He RK KK RK A Ck e ck ck ckckckCKCKCkCkCkCk ck ck ck ck ck ck ck ck ck kc k ck ck ck sk sk k e x CAEN DGTZ DPP CI DIGITALPROBE1 BlOutSafeBand Oil CAEN DGTZ DPP CI DIGITALPROBE1 BlTimeout 1L CAEN DGTZ DPP CI _DIGITALPROBE1 CoincidenceMet 2L CAEN DGTZ DPP CI _DIGITALPROBE1 Tvaw 3L A kkkkkkkk KKK KK KK kkk kkk kk kk kkk kkk kk kk kkk kk kkk kk kkk kk kkk KK KK WARNING WARNING WARNING WARNING WARNING WARNING WARNING The following values are valid for the following DERZ ME Firmwares ia e x 20 Boards AMC REE gt 130 22 For older firmwares use the values above WARNING WARNING WARNING WARNING WARNING WARNING WARNING KKK KK KK k k k k KA kk KK d CAEN DGTZ DPP CI DIGITALPROBE1 R21 ExtTrg 4L CAEN DGTZ DPP CI _DIGITALPROBE1 R21 OverThr Bin CAEN DGTZ DPP CI _DIGITALPROBE1 R21 TrigOut 6L CAEN DGTZ DPP CI DIGITALPROBE1 R21 CoincWin 7L CAEN DGTZ DPP CI DIGITALPROBE1 R21 Coincidence 9L CAEN DGTZ DPP CI DigitalProbel t typedef enum BRK K KK KK KKK KK KK KK KK KKK KK KK KKK KKK KK KK KK WARNING WARNING WARNING WARNING WARNING WARNING WARNING The following values ane valid for the following DPP CTO Firmwares E a0 Boards AMee REI lt 30020 e For newer firmwares use the values marked with R21 in
36. 32 t channelmask RER t Offset CAEN DGTZ AnalogMonitorMagnify t mf CAEN DGTZ AnalogMonitorInspectorInverter t ami typedef enum CAEN DGTZ AM MAGNIFY 1X 0 CAEN DGTZ AM MAGNIFY 2X 1 CAEN DGTZ AM MAGNIFY 4X 2 CAEN DGTZ AM MAGNIFY 8X By CAEN DGTZ AnalogMonitorMagnify t typedef enum CAEN DGTZ AM INSPECTORINVERTER P 1X 0 CAEN DGTZ AM INSPECTORINVERTER N 1X E CAEN DGTZ AnalogMonitorInspectorInverter t Arguments Name Description 00 handle Device handler channelmask channel enable mask offset DC Offset for the analog output signal mf Multiply factor ami Invert Output Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Description This function allows to enable or disable the Pack 2 5 mode of V1720 DT5720 Digitizers Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetEventPackaging int handle CAEN DGTZ EnaDis t mode CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetEventPackaging int handle CAEN DGTZ EnaDis t mode typedef enum CAEN DGTZ ENABLE 1L CAEN DGTZ DISABLE OL CAEN DGTZ EnaDis t Arguments handle Device handler mode Enable Disable the Pack 2 5 mode Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 46 CAEN DI
37. 4 DataCorrection t Arguments CTable Pointer to the structure filled with the correction data frequency DSR4 sampling frequency Mask for the correction type to be applied 3 bit BitO Cell Offset correction Bit1 Index Sampling correction Bit2 Time correction data Raw acquired data to be corrected CorrectionLevelMask Return Values 0 Success Description Gets the current number of events stored in the acquisition buffer Synopsis int32 t GetNumEvents char buffer EE ie lowes ee uint32 t numEvents Arguments buffer Address of the acquisition buffer buffersize Size of the data stored in the acquisition buffer numEvens Number of events stored in the acquisition buffer Return Values 0 Success UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Description Retrieves the event pointer of a specified event in the acquisition buffer Synopsis umo je ESieiyemeP ie lee I Ui CTS EE EE int32_t numEvent char EventPtr Arguments buffer Address of the acquisition buffer buffersize Acquisition buffer size numEvent Index of the requested event EventPtr Pointer to the requested event in the acquisition buffer Return Values 0 Success Description Decodes a specified event stored in the acquisition buffer writing data in Evt memory L Note Once used the Evt memory MUST be deallocated by the calle
38. 780 zl CAEN DGTZ N6780 zu CAEN DGTZ V1780 SIG CAEN DGTZ DT5761 24L CAEN DGTZ N6761 28 CAEN DGTZ V1761 26L CAEN DGTZ BoardModel t typedef enum CAEN DGTZ VME64 FORM FACTOR OL CAEN DGTZ VME64X FORM FACTOR 1L CAEN DGTZ DESKTOP FORM FACTOR 2L CAEN DGTZ NIM FORM FACTOR Sb CAEN DGTZ BoardFormFactor t typedef enum CAEN DGTZ XX724 FAMILY CODE OL 14 bit 100 MS s CAEN DGTZ XX721 FAMILY CODE 1L 8 bit 500 MS s CAEN DGTZ XX731 FAMILY CODE 2L 8 bit 500 1000 MS s CAEN DGTZ XX720 FAMILY CODE 3L 12 bit 250 MS s CAEN DGTZ XX740 FAMILY CODE 4L 12 bit 65 MS s CAEN DGTZ XX751 FAMILY CODE 5L 10 bit 1000 2000 MS s CAEN DGTZ XX742 FAMILY CODE 6L 12 bit 5 GS s switched capacitor CAEN DGTZ XX780 FAMILY CODE 7L 14 bit 100 MS s Multi Channel Analyser CAEN DGTZ XX761 FAMILY CODE 8L 10 bit 4 GS s CAEN DGTZ BoardFamilyCode t UM1935 CAENDigitizer User amp Reference Manual 12 13 Arguments handle CAEN DI Electronic Instrumentation Device handler Board Info Pointer to the structure containing the Board Info filled by the CAEN DGTZ Getlnfo BoardiInfo Fields ModelName Model name for example V1724 Model See type enum CAEN DGTZ BoardModel t Channels Number of channels FormFactor Format Factor VME NIM Desktop seetype C
39. AEN DGTZ BoardFormFactor t FamilyCode Family ADC type seetype CAEN DGTZ FamilyCode t ROC FirmwareRel Firmware Revision of the FPGA on the mother board ROC for example 01 02 AMC FirmwareRel Firmware Revision of the FPGA on the daughter board AMC SerialNumber Serial number of the board PCB Revision PCB Revision number ADC NBits Number of bits of the ADC Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Interrupt configuration All digitizers can generate interrupt requests IRQ to the PC to the occurrence of a particular condition if the memory contains at least Ne events ready for reading where Ne is a programmable parameter This allows to create programs that build the process of readout read access to the memory buffer on interrupts they perform passive wait cycles until they are awakened by the driver at the arrival of an interrupt from the digitizer at such point the process can read data aware to find at least Ne events in memory without having to check in advance the presence of data as in the case of the readout based on polling The readout based on the interrupts is therefore more efficient in terms of employment of the PC resources compared to the one based on polling The interrupt requests are transferred from the digitizer to the PC via
40. CAEN DGTZ GetInterruptConfig int handle CAEN DGTZ EnaDis t state uint8 t level ines qe veut abel uintl6 t event number CAEN DGTZ IROMode t mode D typedef enum CAEN DGTZ ENABLE 1L CAEN DGTZ DISABLE OL CAEN DGTZ EnaDis t typedef enum CAEN DGTZ IRQ MODE RORA 0 CAEN DGTZ IRQ MODE ROAK 1 CAEN DGTZ IRQMode t Arguments handle Device handler state Enable Disable level VME IRQ Level from 1 to 7 Must be 1 for direct connection through CONET 32 bit number assigned to the device and returned by the device during the Interrupt Acknowledge If the number of events ready for the readout is equal to or greater than event number then the digitizer asserts the interrupt request Interrupt release mode CAEN DGTZ IRQ MODE RORA release on register access or CAEN DGTZ IRQ MODE ROAK release on acknowledge status id event number mode Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN DI Electronic Instrumentation Description Once set up the digitizer to generate an interrupt request by the function described above the reading process can enter a state of passive waiting to be woken up as the interrupt request from the digitizer which is communicating with the one identified uniquely from the handle passed as a parameter is sent This function is valid only for direct c
41. CAEN Electronic Instrumentation Tools for Discovery UM1935 CAENDigitizer User amp Reference AERITE Rev 5 08 May 2013 Purpose of this User Manual This User Manual contains the full description of the C version of CAENDigitizer library updated to the last rel 2 3 1 Change Document Record Date Revision Changes 16 February 2012 01 Fully revised and implemented 85 18 June 2012 02 Fully revised to document the software library 2 2 1 08 October 2012 03 Removed LabVIEW content 10 December 2012 04 Revised functions at pp 58 59 08 May 2013 05 Revised DPP CI and DPP PSD digital probes Symbols abbreviated terms and notation ADC Analog to Digital Converter DPP Digital Pulse Processing FFT Fast Fourier Transform FSR Full Scale Range OS Operating System SBC Single Board Computer Reference Document RD1 UM1934 CAENComm User amp Reference Manual RD2 AN2472 CONET1 to CONET2 migration RD3 UM2784 CAENDigitizer LabView User amp Reference Manual CAEN S p A Via Vetraia 11 55049 Viareggio LU ITALY Tel 39 0584 388 398 Fax 39 0584 388 959 info caen it www caen it CAEN SpA 2012 Disclaimer No part of this manual may be reproduced in any form or by any means electronic mechanical recording or otherwise without the prior written permission of CAEN SpA The information contained herein has been carefully checked and is believed to be accurate however no r
42. CkCkCk Ck ck ck ck ck ck ck ck ck ck kCkCkCkCkCk Ck ck ck ck ck ck ck ck ko ko ke ko ko ko ke ke ke ke x x x x CAEN DGTZ DPP PSD DIGITALPROBEl R6 ExtTrg 11L x720 only CAEN DGTZ DPP PSD DIGITALPROBE1 R6 OverThr 12L CAEN DGTZ DPP PSD DIGITALPROBE1 R6 TrigOut 13L CAEN DGTZ DPP PSD DIGITALPROBE1 R6 CoincWin 14L CAEN DGTZ DPP PSD DIGITALPROBE1 R6 PileUp 15L CAEN DGTZ DPP PSD DIGITALPROBE1 R6 Coincidence 16L UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation CAEN DGTZ DPP PSD DIGITALPROBE1 R6 GateLong 17L x751 only CAEN DGTZ DPP PSD DigitalProbel t typedef enum BRK KKK KKK KK KKK KK KK kk kk kkk kk kkk kk kkk kk kkk kk kkk kk kk kkk k k WARNING WARNING WARNING WARNING WARNING WARNING WARNING The following values are valid for the following DPP PSD Firmwares 5 xu 20 Boards 7 AME REM lt UII D xL Boercces AME Ran s 132 3 i For newer firmwares use the values marked with R4 in the name WARNING WARNING WARNING WARNING WARNING WARNING WARNING EOKCKCKCKCk Ck k ck ck ck ck kk OkOCKCKCKCkCkCk Ck ck ck ck ck ck ck ck ck ck ck k Ck Ck CkCk Ck ck ck ck ck ck ck ck ck ok ck kc kk ke ke ke ke KK x x x720 Digital Probes Types CAEN DGTZ DPP PSD D CAEN DGTZ DPP PSD DI CAEN DGTZ DPP PSD D CAEN DGTZ DPP PSD DI CAEN DGTZ DPP PSD DI CAEN DGTZ DPP PSD DI CAEN DGTZ DPP PSD DI CAEN DGTZ DPP PSD DI TALPROBE2 Armed TALPROBE2 Trigger TALPR
43. DGTZ SW CONTROLLED or CAEN DGTZ S IN CONTROLLED ret CAEN DGTZ SetAcquisitionMode handle CAEN DGTZ SW CONTROLLED Set the number of samples for each waveform ret CAEN DGTZ SetRecordLength handle Params RecordLength Set the I O level CAEN DGTZ IOLevel NIM or CAEN DGTZ IOLevel TTL ret CAEN DGTZ SetIOLevel handle Params IOlev Set the digitizer s behaviour when an external trigger arrives CAEN DGTZ TRGMODE DISABLED do nothing CAEN DGTZ TRGMODE EXTOUT ONLY generate the Trigger Output signal CAEN DGTZ TRGMODE ACQ ONLY generate acquisition trigger CAEN DGTZ TRGMODE ACQ AND EXTOUT generate both Trigger Output and acquisition trigger see CAENDigitizer user manual chapter Trigger configuration for details ret CAEN DGTZ SetExtTriggerInputMode handle CAEN DGTZ TRGMODE ACQ ONLY UM1935 CAENDigitizer User amp Reference Manual 76 77 CAEN DI Electronic Instrumentation Set the enabled channels ret CAEN DGTZ SetChannelEnableMask handle Params ChannelMask Set how many events to accumulate in the board memory before being available for readout ret CAEN DGTZ SetDPPEventAggregation handle Params EventAggr 0 Set the mode used to syncronize the acquisition between different boards In this example the sync is disabled ret CAEN DGTZ SetRunSynchronizationMode handle CAEN DGTZ RUN SYNC Disabled Set the DPP specific parameters for the channels i
44. EBaseAddress 0 ret CAEN DGTZ OpenDigitizer Params b LinkType b 0 Params b VMEBaseAddress amp handle b The following is for b boards connected via 1 opticalLink in dasy chain in this case you must set Params b LinkType CAEN DGTZ PCI OpticalLink and Params b VMEBaseAddress 0 UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation cet CAEN DGTZ OpenDigitizer Params b LinkType 0 b Params b VMEBaseAddress amp handle b The following is for b boards connected to A2818 or A3818 via opticalLink or USB with A1718 in this case the boards are accessed throught VME bus and you must specify the VME address of each board Params b LinkType CAEN DGTZ PCI OpticalLink CAEN DGTZ PCIE OpticalLink for A3818 or CAEN DGTZ USB for A1718 Params 0 VMEBaseAddress OxXXXXXXXX address of first board Params 1 VMEBaseAddress OxYYYYYYYY address of second board etc ret CAEN DGTZ OpenDigitizer Params b LinkType 0 0 Params b VMEBaseAddress amp handle b if ret printf Can t open digitizer n goto QuitProgram Once we have the handler to the digitizer we use it to call the other functions 3 ret CAEN DGTZ GetInfo handle b amp BoardInfo Lf iret 4 printf Can t read board info n goto QuitProgram printf nConnected to CAEN Digitizer Model Sa recognized as board d n BoardInfo ModelName b printf R
45. EN DGTZ PCIE OpticalLink for A3818 or CAEN DGTZ USB for A1718 Params 0 VMEBaseAddress 0OxXXXXXXXX address of first board Params 1 VMEBaseAddress OxYYYYYYYY address of second board etc ret CAEN DGTZ OpenDigitizer Params b LinkType OF ER Params b VMEBaseAddress amp handle b EE ret A printf Can t open digitizer n goto QuitProgram Once we have the handler to the digitizer we use it to call the other functions E ret CAEN DGTZ GetInfo handle b amp BoardInfo if ret printer Coni t read boardi teren goto QuitProgram printf nConnected to CAEN Digitizer Model ss recognized as board d n BoardInfo ModelName b printf ROC FPGA Release is s n BoardInfo ROC FirmwareRel printf AMC FPGA Release is s n BoardInfo AMC FirmwareRel Check firmware revision only DPP firmwares can be used with this Demo sscanf BoardInfo AMC FirmwareRel sd amp MajorNumber if MajorNumber 128 printf This digitizer has not a DPP PHA firmware n goto QuitProgram UM1935 CAENDigitizer User amp Reference Manual 72 73 CAEN DI Electronic Instrumentation KKEKKKKKKKKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK kk kk kkkk Program the digitizer see function ProgramDigitizer GA KEKKKKKKKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKKKKK for b
46. Each type of digitizer has a different event data format This function decodes unpacks the data of a specified event and fills the event structure containing the data of each channel i e the waveform and or other parameters in case of DPP separately There are two ways to allocate the memory for the unpacked event data e f the pointer Evt to the event structure passed to the function is initialized to NULL then the event is automatically allocated by the DecodeEvent function that knows the exact size of the decoded event data hence there is no waste in the memory usage In this case the user must free the event memory buffer once it has been used e The memory buffer for the decoded event can be allocated once at the beginning of the acquisition this is done by the AllocateEvent function This solution is more efficient in terms of readout rate no waste of time to allocate and free the memory but requires more memory because the buffer must be able to contain the maximum event size In this mode the memory free must be done at the end of the acquisition A Note If using DPP PHA DPP PSD or DPP CI firmware you have to refer to the GetDPPEvents function Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ DecodeEvent int handle eliam es Et vold Evt Arguments handle Device handler dee Pointer to the event data in the readout buffer this is the pointer returned by the GetEventinfo function Pointer to th
47. FPIOModelnvalid 15 Invalid FPIO Mode CAEN DGTZ WrongAcqMode 16 Wrong acquisition mode CAEN DGTZ FunctionNotAllowed 17 This function is not allowed for this module CAEN DGTZ Timeout 18 Communication Timeout CAEN DGTZ InvalidBuffer 19 The buffer is invalid CAEN DGTZ EventNotFound 20 The event is not found CAEN DGTZ InvalidEvent 21 The event is invalid CAEN DGTZ OutOfMemory 22 Out of memory CAEN_DGTZ_CalibrationError 23 Unable to calibrate the board CAEN_DGTZ_DigitizerNotFound 24 Unable to open the digitizer CAEN_DGTZ_DigitizerAlreadyOpen 25 The Digitizer is already open CAEN_DGTZ_DigitizerNotReady 26 The Digitizer is not ready to operate CAEN_DGTZ_InterruptNotConfigured 27 The Digitizer has not the IRQ configured CAEN DGTZ DigitizerMemoryCorrupted 28 The digitizer flash memory is corrupted CAEN DGTZ DPPFirmwareNotSupported 29 The digitizer DPP firmware is not supported in this lib version CAEN DGTZ NotYetlmplemented 99 The function is not yet implemented Tab 2 Return codes table UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation 2 Communication These functions allow to open and close the connection with the digitizer as well as get board information such as the serial number the model the firmware revision etc To open one board is necessary to describe the physical communication channel from the PC to the device as already indicated in the introduction Once the devi
48. GTZ DPP PHA DIGITAL PROBE Flat CAEN DGTZ DPP PHA DIGITAL PROBE trgHoldOff ret CAEN DGTZ SetDPP PHA VirtualProbe handle CAEN DGTZ DPP VIRTUALPROBE DUAL CAEN DGTZ DPP PHA VIRTUALPROBE1 Delta2 CAEN DGTZ DPP PHA VIRTUALPROBE2 Input CAEN DGTZ DPP PHA DIGITAL PROBE trgHoldOff ae Gene di printf Warning errors found during the programming of the digitizer nSome settings may not be executed Wn return ret 5 x else return 0 FEAE HEE Ra HEE AE AE FE HE RAE df MAIN ay alone FEAE HH AE FE HE EH REE AE df In ter eluate Clie Serec The following variable is the type returned from most of CAENDigitizer library functions and is used to check if there was an error in function execution For example ret CAEN DGTZ some function some args ite Sie princ MSoms Cue 3 CAEN DGTZ ErrorCode ret Buffers to store the data The memory must be allocated using the appropriate CAENDigitizer API functions see below so they must not be initialized here NB you must use the right type for different DPP analysis in this case PHA char buffer NULL readout buffer CAEN DGTZ DPP PHA Event t Events MaxNChannels events buffer CAEN DGTZ DPP PHA Waveforms t Waveform NULL waveforms buffer The following variables will store the digitizer configuration parameters CAEN DGTZ DPP PHA Params t DPPParams MAXNB DigitizerParams t Params MAXNB A
49. HistoRatio b ch 0 1 lt lt MAXNBITS sizeof float eer SYN Tes ur Op ECnt b ch 0 PrevTime b ch 0 ExtendedTT b ch 0 PrevRateTime get time AcqRun 0 PrintInterface printf Type a command while Quit Check keyboard abre edat ONE ener cr c getch Lf c q Quit lr if c t for b 0 b MAXNB b CAEN DGTZ SendSWtrigger handle b Send a software trigger to each board ise CVn 89 for b 0 b MAXNB b for ch 0 ch MaxNChannels ch alae ge ewe Bel rele t 9 q Save Histograms to file for each board and channel Saveni t EE EE Sto Short BIEMME SaveHistogram HistoLong b ch EHistoLong b ch if c w for b 0 b MAXNB b for ch 0 ch lt MaxNChannels ch DoSaveWave b ch 1 save waveforms to file for each channel for each board at next trigger ais geetUy dq for b 0 b lt MAXNB b CAEN DGTZ SWStopAcquisition handle b printf Restarted n CAEN DGTZ ClearData handle b CAEN DGTZ SWStartAcquisition handle b if c s for b 0 b MAXNB b Start Acquisition NB the acquisition for each board starts when the following line is executed so in general the acquisition does NOT starts syncronously for different boards CAEN DGTZ SWStartAcquisition handle b printf Acquisition Started for Board d n b AcqRun 1 if c S for b 0 b MA
50. LED Ou CAEN DGTZ TRGMODE ACQ ONLY iit CAEN DGTZ TriggerMode t Arguments handle Device handler mode mode The fast trigger value to set get Return Values 0 Success Negative numbers are error codes see Return Codes Description Regarding the x742 series sets gets the sampling frequency of the DRS4 chips which sample the input analog signal and the fast trigger signal A Note to be used only with x742 series Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetDRS4SamplingFrequency int handle CAEN DGTZ DRS4Frequency t frequency CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetDRS4SamplingFrequency int handle CAEN DGTZ DRS4Frequency t frequency typedef enum CAEN DGTZ DRS4 5GHz OL CAEN DGTZ DRS4 2 5GHz 1L CAEN DGTZ DRS4 1GHz 2L CAEN DGTZ DRSA4Frequency t Arguments handle Device handler frequency frequency The sampling frequency value to set get Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Description Sets gets the signal to be provided out over the TRG OUT output channel in the x742 series Note to be used only with x742 series Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetOutputSignalMode int handle CAEN DGTZ OutputSignalMode t mode 1 CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetOutputSignalMode
51. Link Hi Link Type CAEN DGTZ PCIE OpticalLink for A3818 Params b VMEBaseAddress 0x32100000 VME Base Address only for VME bus access must be 0 for direct connection CONET or USB USB connection to V1718 bridge and access to the board with VME bus Params b LinkType CAEN DGTZ USB Link Type CAEN DGTZ PCIE OpticalLink for A3818 Params b VMEBaseAddress 0x11110000 VME Base Address only for VME bus access must be 0 for direct connection CONET or USB Params b IOlev CAEN DGTZ IOLevel TTL S EEKE KK KKK KKK KK KK KK k k k k KK KK KK Acquisition parameters HR RK KK RR KK x d Params b AcqMode CAEN DGTZ DPP ACQ MODE Mixed Hilf CAEN DGTZ DPP ACQ MODE List ue CAEN DGTZ DPP ACQ MODE Oscilloscope Params b RecordLength 300 Num of samples of the waveforms only for Oscilloscope mode Params b ChannelMask OxF Channel enable mask Params b EventAggr 0 number of events in one aggregate 0 automatic Params b PulsePolarity CAEN DGTZ PulsePolarityNegative Pulse Polarity this parameter can be individual RK K K K KKK KKK KKK KK KK KK KK KK KK KK tl DPP parameters P A A A A A A E E E e k k KK for ch 0 ch lt MaxNChannels ch DPPParams b thr ch 100 Trigger Threshold The following parameter is used to specifiy the number of samples for the baseline averaging 0 8samp L ING Sami 2 gt 32samp 3 64samp DPPParams
52. N DGTZ POLLING 2eSST 5 CAEN DGTZ ReadMode t Arguments handle Device handler CAEN DGTZ SLAVE TERMINATED READOUT MBLT 0 CAEN_DGTZ_SLAVE_TERMINATED_READOUT_2eVME 1 de CAEN_DGTZ_SLAVE_TERMINATED_READOUT_2eSST 2 CAEN_DGTZ_POLLING_MBLT CAEN_DGTZ_POLLING_2eVME CAEN_DGTZ_POLLING_2eSST 5 buffer Pointer to the readout buffer bufferSize Size of the data block read from the board expressed in bytes Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation 4 Description This function scans the readout buffer and gets the number of events contained in the data block previously read by the ReadData function The number of events is returned in the parameter numEvents Note If using DPP PHA DPP PSD or DPP CI firmware you have to refer to the GetDPPEvents function Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetNumEvents int handle char buffer uimt92Ntobuftfsize uint32 t numEvents Arguments handle Device handler buffer Pointer to the readout buffer d Size of the data block contained in the readout buffer This value is given by the ReadData buffsize function numEvents Number of events contained in the readout buffer Return Values 0 Success Negative numbers are error codes see Return Codes Description This function retrieves the information tr
53. OBE2 ChargeReady TALPROBE2 PileUp ITALPROBE2 BlOutSafeBand TALPROBE2 BlTimeout ITALPROBE2 CoincidenceMet TALPROBE2 Tvaw 3 on Oa OSS Wes es we s G G G G G G G G x751 Digital Probes Types CAEN DGTZ DPP PSD DIGITALPROBE2 GateShort 8L CAEN DGTZ DPP PSD DIGITALPROBE2 GateLong 9L CAEN DGTZ DPP PSD DIGITALPROBE2 None i BRK KK KK KKK KK KK KK KK KK KKK KK KK KK KKK KK KK KK KK WARNING WARNING WARNING WARNING WARNING WARNING WARNING The following values ane valid for the following DPP PSDO s Firmwares x 20 Boards AMG RE gt gt 1316 i x x ol Boards AMO REL gt 132 6 x For older firmwares use the values above WARNING WARNING WARNING WARNING WARNING WARNING WARNING EOKCKCKCKCk Ck k ck k ck ck ck kk CKCkCkCk Ck ck ck ck ck ck ck ck ck ck kCkCkCkCkCk Ck ck ck ck ck ck ck ck ck ko k kk ke ke ke ke x x x x CAEN DGTZ DPP PSD DIGITALPROBE2 R6 GateShort l1L CAEN DGTZ DPP PSD DIGITALPROBE2 R6 OverThr 12L CAEN DGTZ DPP PSD DIGITALPROBE2 R6 TrgVal 13L CAEN DGTZ DPP PSD DIGITALPROBE2 R6 TrgHO 14L CAEN DGTZ DPP PSD DIGITALPROBE2 R6 PileUp St CAEN DGTZ DPP PSD DIGITALPROBE2 R6 Coincidence 16L CAEN DGTZ DPP PSD DigitalProbe2 t Arguments Name Description 000 handle Device handler mode mode The Virtual Probe mode to set get apy erp The Virtual Probe to set get NOTE ignored for x751 VirtualProbes ar
54. OC FPGA Release is s n BoardInfo ROC FirmwareRel printf AMC FPGA Release is s n BoardInfo AMC FirmwareRel Check firmware revision only DPP firmware can be used with this Demo sscanf BoardInfo AMC FirmwareRel sd amp MajorNumber if MajorNumber 130 printf This digitizer has not a DPP CI firmwareNn goto QuitProgram KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Program the digitizer see function ProgramDigitizer Su KREKKKKKKKK ck ck ck ck ck ck ck ok ck ck ck ck ck ck ck ok ck ck ck ck kk ck ck kk ck kk kk ck kk ck ck kk ck kk kk ko ko k ko ko ko ko k ck k k kk kk kk kk kk kkkkkk for b 0 b MAXNB b ret ProgramDigitizer handle b Params b DPPParams b FE reti i printf Failed to program the digitizer n goto QuitProgram WARNING The mallocs MUST be done after the digitizer programming because the following functions needs to know the digitizer configuration to allocate the right memory amount Allocate memory for the readout buffer ret CAEN DGTZ MallocReadoutBuffer handle 0 amp buffer amp AllocatedSize Allocate memory for the events ret CAEN DGTZ MallocDPPEvents handle 0 Events amp AllocatedSize Allocate memory for the waveforms ret CAEN DGTZ MallocDPPWaveforms handle 0 amp Waveform amp AllocatedSize if ret 1 printf Can t allocate memory buffers Win goto Q
55. ODE Mixed 2L enables the acquisition of both waveforms energies or charges and time stamps param param The acquisition data to retrieve in acquisition Return Values 0 Success negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 62 63 CAEN Electronic Instrumentation Description Sets gets the DPP Trigger mode Note to be used only with DPP PSD and DPP CI enabled firmware Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetDPPTriggerMode int handle CAEN DGTZ DPP TriggerMode t mode i CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetDPPTriggerMode int handle CAEN DGTZ DPP TriggerMode t mode typedef enum CAEN DGTZ DPP TriggerMode Normal CAEN DGTZ DPP TriggerMode Coincidence CAEN DGTZ DPP TriggerMode t Arguments handle Device handler For SetDPPTriggerMode it is the desired trigger mode which can be set DEEN mde CAEN DGTZ DER TriggerMode Normal CAEN DGTZ DPP TriggerMode Coincidence For GetDPPTriggerMode it is the current trigger mode Return Values 0 Success negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Description Set gets the information about the output signal of the DPP PHA acquisition mode Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetDPP PHA VirtualProbe int handle CAEN DGTZ DPP Virt
56. ROBE2 ChargeReady NOTE x720 only CAEN DGTZ DPP PSD DIGITALPROBE2 PileUp NOTE x720 only CAEN DGTZ DPP PSD DIGITALPROBE2 BlOutSafeBand NOTE x720 only CAEN DGTZ DPP PSD DIGITALPROBE2 BlTimeout NOTE x720 only CAEN DGTZ DPP PSD DIGITALPROBE2 CoincidenceMet NOTE 3720 only CAEN DGTZ DPP PSD DIGITALPROBE2 Tvaw NOTE x720 only CAEN DGTZ DPP PSD DIGITALPROBE2 GateShort CAEN DGTZ DPP PSD DIGITALPROBE2 GateLong CAEN DGTZ DPP PSD DIGITALPROBE2 None CAEN DGTZ SetDPP PSD VirtualProbe handle ret DIE CH vein ll yy NOTE x751 only IGMP Sey Spl coma aie ese 2 printf Warning return ret else return 0 CAEN DGTZ DPP PSD VIRTUALPROBE Baseline CAEN DGTZ DPP PSD DIGITALPROBEl R6 GateLong CAEN DGTZ DPP PSD DIGITALPROBE2 R6 OverThr SUE TEE S Se found during the programming of the ttings may not be executed n CAEN DGTZ DPP VIRTUALPROBE SINGLE digitizer NnSome UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Jr sate aaa Ra PEE EH EEE HE EE EER EER EEE HEE HERRERA REEPEEPEEREE MAIN n Jr ata EE EEE HEE HEE HE EERE REE EEE HEE HPAP EER RERREE EEE REEREEREEREE int main int argc char argv The following variable is the type returned from most of CAENDigitizer library functions and is used to check if there was an error in function execution For example ret CAEN DGTZ some function some args if ret printf Some error
57. T connection VMEBaseAddress must be 0 Optical connection to A2818 or A3818 and access to the board with VME bus Params b LinkType CAEN DGTZ PCI OpticalLink Link Type CAEN DGTZ PCIE OpticalLink for A3818 Params b VMEBaseAddress 0x32100000 NME Base Address only for VME bus access must be 0 for direct connection CONET or USB USB connection to V1718 bridge and access to the board with VME bus Params b LinkType CAEN DGTZ USB Link Type CAEN DGTZ PCIE OpticalLink for A3818 Params b VMEBaseAddress 0x32110000 NME Base Address only for VME bus access must be 0 for direct connection CONET or USB Params b IOlev CAEN DGTZ IOLevel TTL J EE K K K kk kk ko kk KK KK KKK KK KK KK KKK N Acquisition parameters FRR RR ke e k k d Params b AcqMode CAEN DGTZ DPP ACQ MODE Mixed iif CAEN DGTZ DPP ACQ MODE List or CAEN DGTZ DPP ACQ MODE Oscilloscope Params b RecordLength 12 Num of samples of the waveforms only for Oscilloscope mode Params b ChannelMask OxF Channel enable mask Params b EventAggr 17554 number of events in one aggregate 0 automatic Params b PulsePolarity CAEN DGTZ PulsePolarityNegative Pulse Polarity this parameter can be individual SEEK K KK KKK KK KK KK KK k k KK KK KK KKK A DPP parameters 2 FR CK Ck kk RK ko ke ke ke ke kk ke ke ke ke ke KK KK d for ch20 ch MaxNChannels cht DPPParams b thr ch 50
58. XNB b Stop Acquisition CAEN DGTZ SWStopAcquisition handle b printf Acquisition Stopped for Board Sd n b AcqRun 0 UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation if AcqRun Sleep 10 continue Calculate throughput and eent eee AE ElapsedTime CurrentTime if ElapsedTime gt 1000 system CLEARSCR PrintInterface printf Readout Rate 2f MB n for b 0 b MAXNB b printf nBoard d for i 0 alse mre eme e Lat printf NtCh d tTrgRate 2f KHzNt An else ele Veta Wels Wwe Deca we TrgCnt b i 0 Nb 0 PrevRateTime Eeen E Faia 9 CurrentT Read data from the board for b 0 b MAXNB b i lt MaxNChannels trigger rate every second PrevRateTime milliseconds n b acp d gt 0 Irlak float Nb float ElapsedTime 1048 576f float TrgCnt b i float ElapsedTime i ime e ww Read data from the board ret CAEN DGTZ ReadD Ia Greng if ret printf Readout Err goto QuitProgram if BufferSize 0 continue Nb BufferSize ata handle b amp BufferSize iue Nim ret DataConsistencyCheck uint32 t buffer BufferSize 4 ret CAEN DGTZ GetDPPEvents handle b buffer BufferSize NumEvents sb ae q ormone leet Biereg Gefuer goto QuitProgram Analyze data
59. ameters To be used only for DPP PSD typedef struct tnt Joyllicigue s int bltmo Je bus MAX V1720DPP CHANNEL SIZE int selft MAX V1720DPP CHANNEL SIZE int csens MAX V1720DPP CHANNEL SIZE int sgate MAX V1720DPP CHANNEL SIZE int lgate MAX V1720DPP CHANNEL SIZE int pgate MAX V1720DPP CHANNEL SIZE int tvaw MAX V1720DPP CHANNEL SIZE int nsbl MAX V1720DPP CHANNEL SIZE CAEN DGTZ DPP TriggerConfig t trgc MAX V1720DPP CHANNEL SIZE Ignored for x751 CAEN DGTZ DPP PUR t purh Ignored for x751 int purgap Ignored for x751 CAEN DGTZ DPP PSD Params t DPP parameter structure to be initialized and passed to CAEN DGTZ SetDPPParameters To be used only for DPP CI typedef struct int pithi int bltmo aine ele MAX V1720DPP CHANNEL SIZE int selft MAX V1720DPP CHANNEL SIZE int csens MAX V1720DPP CHANNEL SIZE int gate MAX V1720DPP CHANNEL SIZE int pgate MAX V1720DPP CHANNEL SIZE int tvaw MAX V1720DPP CHANNEL SIZE int nsbl MAX V1720DPP CHANNEL SIZE CAEN DGTZ DPP TriggerConfig t trgc MAX V1720DPP CHANNEL SIZE r i CAEN DGTZ DPP CI Params t UM1935 CAENDigitizer User amp Reference Manual 60 CAEN DI Electronic Instrumentation Arguments handle Device handler channelMask A bit mask indicating the channels to apply the DPP parameters The pointer to a preallocated struct of type n CAEN DGTZ DPP PHA Params t in case of DPP PHA params
60. ard information kkxkxkxkxkxkxkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkxk The following function is used to open the digitizer with the given connection parameters UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation and get the handler to it for b 0 b MAXNB b IMPORTANT The following function identifies the different boards with a system which may change for different connection methods USB Conet ecc Refer to CAENDigitizer user manual for more info Some examples below The following is for b boards connected via b USB direct links in thiis case you must Som Params b LinkType CAEN DGTZ USB and Params b VMEBaseAddress 0 cet CAEN DGTZ OpenDigitizer Params b LinkType b 0 Params b VMEBaseAddress amp handle b The following is for b boards connected via 1 opticalLink in dasy chain Tne chs cose ouMEmusit eS et Eenelter CARNE GTC tn ceatistanea de amici Params b VMEBaseAddress 0 ret CAEN DGTZ OpenDigitizer Params b LinkType 0 b Params b VMEBaseAddress amp handle b The following is for b boards connected to A2818 or A3818 via opticalLink or USB with A1718 in this case the boards are accessed throught VME bus and you must specify the VME address of each board Params b LinkType CAEN DGTZ PCI OpticalLink CAEN DGTZ PCIE OpticalLink for A3818 or CAEN DGTZ USB for A1718 Params 0 VMEBa
61. ata handle b CAEN DGTZ SWStartAcquisition handle b if c s for b 0 b MAXNB b Start Acquisition NB the acquisition for each board starts when the following line is executed so in general the acquisition does NOT starts syncronously for different boards CAEN DGTZ SWStartAcquisition handle b printf Acquisition Started for Board d n b AcqRun 1 if c S for b 0 b MAXNB b Stop Acquisition CAEN DGTZ SWStopAcquisition handle b printf Acquisition Stopped for Board d n b AcqRun 0 if AcqRun Sleep 10 continue Calculate throughput and trigger rate every second eent eee eile 2 ElapsedTime CurrentTime PrevRateTime milliseconds if ElapsedTime gt 1000 system CLEARSCR PrintInterface printf Readout Rate 2f MB n float Nb float ElapsedTime 1048 576f for b 0 b MAXNB b printf nBoard d n b for i 0 i lt MaxNChannels i alse ubiere Cie D T Lab I 40 Printer EG d tTrgRate 2f KEZA ENAN ak float TrgCnt b i float ElapsedTime else princi H eea sde o Decal as TrgCnt b i 0 81 UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Nb 0 PrevRateTime Eeer Ua inl 9 CurrentTime Read data from the boards for b 0 b MAXNB b Read data from the board ret buffer LE ret T
62. b Send a SW meiege 2 Ter CAEN_DGTZ_ReadData handle b CAEN DGTZ SLAVE TERMINATED REA DOUT MBLT buffer amp bsize Read the buffer from the digitizer The buffer red from the digitizer is used in the other functions to get the event data The following function returns the number of events in the buffer tet CAEN DGTZ GetNumEvents handle b buffer bsize numEvents PEA o M o count b numEvents for i 0 i lt numEvents it Get the Infos and pointer to the event ret CAEN DGTZ GetEventInfo handle b buffer bsize i amp eventInfo amp evtptr Decode the event to get the data ret CAEN DGTZ DecodeEvent handle b evtptr amp Evt J RRR kkkkkkkkkkkkkkkk kkk KK KK KK KK KK KK kkk Event Elaboration J RRR RRR KKK KK ke ke kk KK sk ke ke KK KK ke ke ke e KG KG k k ke ret CAEN DGTZ FreeEvent handle b amp Evt c checkCommand if c 1 goto Continue if c 2 goto Continue end of loop on boards end of readout loop Continue for b 0 b MAXNB b printf nBoard d Retrieved d Events n b count b goto QuitProgram Quit program routine QuitProgram Free the buffers and close the digitizers ret CAEN DGTZ FreeReadoutBuffer amp buffer for b 0 b MAXNB b ret CAEN DGTZ CloseDigitizer handle b printf Press Enter key to exit n c getchar return 0 UM1935 CAENDigitizer User amp Reference Man
63. b ch 0 ExtendedTT b ch 0 PurCnt b ch 0 aart me eee leet 9 AcqRun 0 PrintInterface printf Type a command while Quit Check keyboard abre deleti hn A ener ey c getch if c q Quit 1 if c t for b 0 b MAXNB b CAEN DGTZ SendSWtrigger handle b Send a software trigger to each board if c h IE HER for b 0 b MAXNB b for ch 0 ch MaxNChannels ch dE Beat iol teml Y 0 SaveHistogram Histo b ch EHisto b ch Save Histograms to file for each board e w for b 0 b MAXNB b for ch 0 ch MaxNChannels ch DoSaveWave b ch 1 save waveforms to file for each channel for each board at next trigger c E for b 0 b MAXNB btt CAEN DGTZ SWStopAcquisition handle b printf Restarted n CAEN DGTZ ClearData handle b CAEN DGTZ SWStartAcquisition handle b c 5 1 for b 0 b lt MAXNB b Start Acquisition UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation NB the acquisition for each board starts when the following line is executed so in general the acquisition does NOT starts syncronously for different boards CAEN DGTZ SWStartAcquisition handle b printf Acquisition Started for Board d n b AcqRun 1 if c 2 S for b 0 b MAXNB b Stop Acquisition CAEN DGTZ SWStopAcquisition handle b printf Acquisi
64. b nsbl ch 2 DPPParams b gate ch 200 Gate Width N 4ns DPPParams b pgate ch 25 Pre Gate Width N 4ns Self Trigger Mode 0 Disabled 1 Enabled DPPParams b selft ch 1 Trigger configuration CAEN DGTZ DPP TriggerConfig Peak trigger on peak CAEN DGTZ DPP TriggerConfig Threshold gt trigger on threshold DPPParams b trgc ch CAEN DGTZ DPP TriggerConfig Peak Trigger Validation Acquisition Window DPPParams b tvaw ch 50 DPPParams b blthr 3 Baseline Threshold DPPParams b bltmo 100 Baseline Timeout DPPParams b trgho 0 Trigger Holdoff KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Open the digitizer and read board information KEKKKKKKK ck ck ck ck ck ck ck ck ck ck ck ck ck ck ck ck ck ck ck ck KK KKK ck ck ck KKK ck ck ck KKK KKK ck ck ck ck ko k ko ko k KKK KKK kk kk kk kk kk kk KEKE The following function is used to open the digitizer with the given connection parameters and get the handler to it for b 0 b MAXNB b IMPORTANT The following function identifies the different boards with a system which may change for different connection methods USB Conet ecc Refer to CAENDigitizer user manual for more info Some examples below The following is for b boards connected via b USB direct links in this case you must Sou Params b LinkType CAEN DGTZ USB and Params b VM
65. can refer to the board User Manual for setting examples A Note to be used only with x742 series Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetGroupFastTriggerThreshold int handle Units 2 Crota uint32 t Tvalue i CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetGroupFastTriggerThreshold int handle nomeo MEME panini Mediae i Arguments handle Device handler group The channels group the threshold is applied to Tvalue Tvalue The value of the TRn threshold to set get Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Description Regarding the x742 series sets gets the TRn signal DC offset when it is sampled in the DRS4 chips in order to make positive negative or bipolar input signals to be compliant with the DRS4 input dynamics The DC offset also affects the TRn when used as trigger in this case it relates to the threshold setting above described please refer to the board User Manual for setting examples A Note to be used only with x742 series Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetGroupFastTriggerDCOffset int handle vinto Grop uint32_t DCvalue CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetGroupFastTriggerDCOffset int handle uint32 t group uimt92 to Der oe i Arguments handle Device handler group The channels group the DC o
66. ce is opened the function returns a handle that becomes the unique identifier of that device any access operation to the device except for VME IRQ management will take place according to its handle thus making transparent the physical channel Desktop and NIM versions can be directly handled via USB just connecting the digitizer to the host PC via the USB cable the USB driver is available on Digitizer web page Description Opens the digitizer and gets the device handle See the examples below for the different types of communication channels and the relevant parameters Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ OpenDigitizer CAEN DGTZ ConnectionType LinkType int LinkNum int ConetNode uint32 t VMEBaseAddress int handle 1 typedef enum CAEN DGTZ USB CAEN DGTZ PCI OpticalLink CAEN DGTZ PCIE OpticalLink CAEN DGTZ PCIE EmbeddedDigitizer CAEN DGTZ ConnectionType USB direct or V1718 gt VME PCI A2818 direct or V2718 gt VME PCIe A3818 direct or V2718 gt VME future development UNI WNHRO o oS oS Arguments Indicates the physical communication channel It can be CAEN DGTZ USB either direct connection or VME through V1718 CAEN DGTZ PCI OpticalLink A2818 gt Optical Link either direct connection or VME through V2718 or CAEN DGTZ PCIE OpticalLink same as A2818 but using A3818 Link number in case of USB the link numbers are assigned by the PC when you connect the cable to
67. channels in a group of 8 participate to the generation of the self trigger of that group The self trigger is the OR of the channels enabled by this function that are above the threshold WARNING the channels that are not connected must be disabled here otherwise it may happen that one channel has a DC offset higher than the threshold and it keeps the OR always active A Note to be used only with x740 series Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetChannelGroupMask int handle smit E Grow uint32_t channelmask CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetChannelGroupMask int handle uint32 t group uint32 t channelmask i Arguments handle Device handler group Group for which the mask is set channelmask Channels Trigger mask for the group 8 bits Return Values 0 Success Negative numbers are error codes see Return Codes Description This function sets the Trigger Threshold for a specific channel The threshold is applied to the digital signal after the ADC and it is expressed in ADC counts The user should take care of the DC offset adjust when converting the digital threshold in the corresponding voltage level on the analog input For the x740 series use the Set GetGroupTriggerThreshold function For the DPP firmware use the SetDPPParameters function Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetChannelTriggerThreshold int handle uint32 t channel uint32 t Tvalue
68. cycle Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ VMEIRQWait int LinkType int LinkNum int ConetNode Uint3s2 5b timeout int VMEHandle Arguments Indicates the physical communication channel used to connect the CAEN VME bridge that handles the interrupts on the VME bus It can be CAENComm USB forthe V1718 or CAENComm PCI OpticalLink for the A2818 gt Optical Link V2718 or CAENComm PCIe OpticalLink same as A2818 but using A3818 Link number in case of USB the link numbers are assigned by the PC when you connect the cable to the device it is O for the first device 1 for the second and so on There is not LinkNum a fixed correspondence between the USB port and the link number For the CONET the link number indicates which A2818 or A3818 is used also in this case it is not known a priori which PCI PCle card is assigned to which number The CONET node identifies which device in the Daisy chain is being addressed The node is LinkType ConetNode 0 for the first device in the chain 1 for the second and so on In case of USB ConetNode must be 0 timeout Timeout max wait time in msec VMEHandle Device handler of the CAEN VME Bridge that received the interrupt request Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 16 CAEN DI Electronic Instrumentation Description This function allows to
69. e Laimelag inele Charges intl16 t Baseline uint32 t Waveforms pointer to coded data inside the readout buffer only meant to be supplied to CAEN DGTZ DecodeDPPWaveforms T CAEN DGIZ DPR Cl Bvent t Arguments handle Device handler The pointer to the event matrix which shall be of type gg CAEN DGTZ DPP PHA Event t for DPP PHA events CAEN_DGTZ_DPP_PSD_Event_t for DPP PSD CAEN DGTZ DPP CI Event t for DPP CI allocatedSize The size in bytes of the event list Return Values 0 Success negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 54 CAEN DI Electronic Instrumentation Description Deallocates the event buffer matrix Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ FreeDPPEvents int handle void events Arguments handle Device handler events The pointer to the event buffer Return Values 0 Success negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Description Allocates the waveform buffer which is used by CAEN_DGTZ_DecodeDPPWaveforms Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ MallocDPPWaveforms int handle void waveforms Uinta t alllocatedSize typedef struct tamed Ner lau c ere Mints e VProbel uint8 t WVProbe2 uint8 t VDProbe Eelere angu je ee trt oM SPI ace
70. e always Input and Baseline dp1 dp1 The Digital Probe1 to set get dp2 dp2 The Digital Probe2 to set get Return Values 0 Success negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 66 CAEN Electronic Instrumentation Description Sets gets the information about the output signal of the DPP CI acquisition mode A Note this function is supported only by DPP CI firmware from release 3 4 130 16 on Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetDPP CI VirtualProbe int handle CAEN DGTZ DPP VirtualProbe t mode CAEN DGTZ DPP CI VirtualProbe t vp CAEN DGTZ DPP CI DigitalProbel t dpl CAEN DGTZ DPP CI DigitalProbe2 t dp2 1 CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetDPP CI VirtualProbe int handle CAEN DGTZ DPP VirtualProbe t mode CAEN DGTZ DPP CI VirtualProbe t vp CAEN DGTZ DPP CI DigitalProbel t dpl CAEN DGTZ DPP CI DigitalProbe2 t dp2 typedef enum CAEN DGTZ DPP VIRTUALPROBE SINGLE CAEN DGTZ DPP VIRTUALPROBE DUAL 1L I E CAEN DGTZ DPP VirtualProbe t typedef enum CAEN DGTZ DPP CI VIRTUALPROBE Baseline OL CAEN DGTZ DPP CI VirtualProbe t typedef enum BRK K KKK KKK KK KK KK KKK KK KK KK KK kkk kk kk kkk kk kkk ke KK kk kkk KK KK WARNING WARNING WARNING WARNING WARNING WARNING WARNING the following values are valid for the following DPP Ci Firmwares e x 20 Boards AMG REG lt 130
71. e decoded event structure This pointer must be initialized to NULL if you ieee want the function to allocate the memory buffer automatically Conversely if the memory buffer has been already allocated this is the pointer to that memory buffer The latter case is more efficient in terms of readout rate Return Values 0 Success Negative numbers are error codes see Return Codes Description This function allocates the memory buffer for the decoded event data The size of the buffer is calculated in order to keep the maximum event size Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ AllocateEvent int handle void Byt Arguments handle Device handler Evt Pointer to memory buffer for the event structure Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN DI Electronic Instrumentation 4 Description This function releases the event memory buffer allocated by either the DecodeEvent or AllocateEvent function Note If using DPP PHA DPP PSD or DPP CI firmware you have to refer to the GetDPPEvents function Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ FreeEvent int handle void Evt Arguments handle Device handler Evt Pointer to memory buffer for the event structure Return Values 0 Success Negative numbers are error codes see Return Codes Description Regardin
72. eferred to the groups and cannot be set individually channel by channel Each group of 8 channels generates one single self trigger which is the OR of the 8 self triggers in the group with a programmable trigger enable mask see next function The group self trigger can generate the acquisition trigger for the board and or a pulse on the Trigger Output A Note to be used only with x740 series Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetGroupSelfTrigger int handle CAEN DGTZ TriggerMode t mode uint32 t groupmask i CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetGroupSelfTrigger int handle uint32 t group CAEN DGTZ TriggerMode t mode i typedef enum CAEN DGTZ TRGMODE DISABLED 0 CAEN DGTZ TRGMODE EXTOUT ONLY 2 CAEN DGTZ TRGMODE ACQ ONLY i CAEN DGTZ TRGMODE ACQ AND EXTOUT 3 CAEN DGTZ TriggerMode t Arguments handle Device handler Group Self Trigger mode CAEN DGTZ TRGMODE DISABLED 0 mode CAEN_DGTZ_TRGMODE_EXTOUT_ONLY 2 CAEN_DGTZ_TRGMODE_ACQ_ONLY 1 CAEN_DGTZ_TRGMODE_ACQ_AND_EXTOUT 3 only for Set the function applies only to those groups that have the relevant bit in the groupmask mask equal to 1 group only for Get group for which the mode is get Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Description This function decides which
73. egative numbers are error codes see Return Codes 19 UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Description Concerning the Digitizers running the standard firmware this function sets gets the maximum number of events for each transfer Regardless of the type of link during a block transfer cycle the digitizer stops the transfer after a predetermined number of events or when the memory is empty The greater the number of events transferred and thus the size of the block read the greater the efficiency of the readout since the protocol overhead is smaller In contrast higher values for MaxNumEventsBLT imply the need to allocate a memory buffer for very large the readout A Note If using DPP PHA DPP PSD or DPP CI firmware you have to refer to the SetDPPEventAggregation function Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetMaxNumEventsBLT int handle uint32 t numEvents D CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetMaxNumEventsBLT int handle uint32 t numEvents Arguments handle Device handler numEvents Maximum number of events to transfer in a BlockRead Return Values 0 Success Negative numbers are error codes see Return Codes Description This function allocates the memory buffer for the data block transfer from the digitizer to the PC The size of the buffer allocated is calculated by the function according to the size of the eve
74. eias 18 iunc T sense 18 Data D e f 19 e de E EE 19 DisableEventAlignedReadout esses nennen tne nenne nnne nennen trente nnne nennen 19 Set GetMaxNumEventsBLT 20 MallocReadoutBuffer sss 20 FreeReadoutBuffer sss 5521 E EC oec enh eden IHR Gite eis 21 GetNumEwVventis aoo uds e e 4422 GetEventinfo sss KK DecodeEventt EE 5523 AllocateEvent no aseceneee nemen nes 123 dila lp e 24 LoadDRS4CorrectionData sss nnne nennen nnne nenne nnne nter nennen nennen 24 Enable Disable DRS4Correction seen nennen nnne te nnne nne nennen 25 3 TrdgerconfiQurallODLasosecvxtotincdoEpi pO bm b FIR Dd Do bn pf pon DU ERE cU ERE D DOR DER NE 26 SOMA WUC sesso cs dedic nd coves HT e aa e E UERE PURGE ERR ERE TRE eR ER eaten anes 26 Set GetSWTriggerMode EE 27 Set GetExtTriggerlnputMode sese nnt entere ne tenente tenete netten nens 27 Set GetChannelSelfTrigger M Set GetGroupSelfTrigger sse nene netetetn tenent tetn nene nete te tete tn enean tnter enini Set GetChannelGroupMask sse nennen nnne tenente teneret te tn tn nene te trente trenes 30 Set GetCha
75. en you connect the cable to the device it is O for the first device DT5724 1 for the second DT5720 There is not a fixed correspondence between the USB port and the link number In case of USB ConetNode must be 0 Not used 0 used only for model accessed via VME UM1935 CAENDigitizer User amp Reference Manual CAEN DI Electronic Instrumentation Example No 2 V1718 USB Fig 7 2 Connection example no 2 Dev 1 V1724 Base Address 33010000 Dev 2 V1724 Base Address 33020000 Dev 3 V1740 Base Address 44030000 The host PC is connected via USB ports to one V1718 VME USB2 0 Bridge housed in a VME crate The crate contains also the following boards H Dev 1 V1724 8 Channel 14 bit 100 MS s Digitizer Base address 0x33010000 e Devit2 V1724 8 Channel 14 bit 100 MS s Digitizer Base address 0x33020000 e Devii3 V1740 64 Channel 12 bit 62 5 MS s Digitizer Base address 0x44030000 Open Dev 1 V1724 VME base address 0x33010000 accessed via VMEbus through the V1718 CAEN DGTZ OpenDigitizer CAEN DGTZ USB 0 r 0 r 0x33010000 amp handleV1724 1 LinkType physical communication channel USB LinkNum Link number 0 first device ConetNode if USB 0 VMEBaseAddress Pointer to the handler returned by function Open Dev 12 V1724 VME base address 0x33020000 accessed via VMEbus through the V1718 CAEN DGTZ OpenDigitizer
76. ers return O0 success l error int ProgramDigitizer int handle DigitizerParams t Params CAEN DGTZ DPP PHA Params t DPPParams This function uses the CAENDigitizer API functions to perform the digitizer s initial configuration inte i ret 0 Reset the digitizer zc e CARIN Ie Bazar neue 2 if ret printf ERROR can t reset the digitizer Nin ie buen ile ret CAEN DGTZ WriteRegister handle 0x8000 0x01000114 Channel Control Reg indiv trg seq readout Set the DPP acquisition mode This setting affects the modes Mixed and List see CAEN DGTZ DPP AcqMode t definition for details CAEN DGTZ DPP SAVE PARAM EnergyOnly Only energy DPP PHA or charge DPP PSD DPP CI is returned CAEN DGTZ DPP SAVE PARAM TimeOnly Only time is returned CAEN DGTZ DPP SAVE PARAM EnergyAndTime Both energy charge and time are returned CAEN DGTZ DPP SAVE PARAM None No histogram data is returned Ret CAEN DGTZ SetDPPAcquisitionMode handle Params AcqMode CAEN DGTZ DPP SAVE PARAM EnergyAndTime Set the digitizer acquisition mode CAEN DGTZ SW CONTROLLED or CAEN DGTZ S IN CONTROLLED ret CAEN DGTZ SetAcquisitionMode handle CAEN DGTZ SW CONTROLLED Set the number of samples for each waveform ret CAEN DGTZ SetRecordLength handle Params RecordLength Set the I O level CAEN DGTZ IOLevel NIM or CAEN DGTZ IOLevel TTL ret CAEN DGTZ SetIOLevel handle Params IO
77. esponsibility is assumed for inaccuracies CAEN SpA reserves the right to modify its products specifications without giving any notice for up to date information please visit www caen it CAEN DI Electronic Instrumentation Index Purpose of this User Manual icc ccsicccccetcccecseacccssstscendeacsesnteansconveanscandesatcondeansesnsesascsnsesusesndesuscenseensconseentess 2 Change Document RECOM M 2 Symbols abbreviated terms and notation ccsssssessesesessessessesssessessecsesseessessessaesessessesseeesenseesesees 2 FRReTErenCe DOCUIMCMM MIETEN TI 2 jq 3 NI Edd ewe P 4 Ed Nl ls 4 E UDIEOUHUGHODL un io iones RPG E FORO RE ine pP M DNO OM PIED EE RM RUM MS EHE 6 System requirements amp installation setup eeeeeeseeeeseeeeeee eene nennen etes en sensn sins insita ttn stnsin 7 a TTE OT T 8 MUR Gh ee 9 Open DIG itiZe rs is c ccc c D 9 le E ET EE 10 WriteRegister VMEIRQWait Mdhieielldldge deian 17 IACKCycle ES Md ieu
78. et rr codes table rrt nre rrr torre Eden rr to veniet on tee Ere Der edP E WDR oa e HERD DT ed 8 5 UM1935 CAENDigitizer User amp Reference Manual CAEN DI Electronic Instrumentation 1 Introduction CAEN has developed a family of Sampling ADCs modules with different form factors VME NIM and Desktop They all provide the possibility to be handled and readout by a host PC via different communication channels The CAENDigitizer is a library of functions designed specifically for the digitizer family and it supports also the boards running special DPP Digital Pulse Processing firmware The purpose of this library is to allow the user to open the digitizer program it and manage the data acquisition in an easy way with few lines of code the user can make a simple readout program without the necessity to know the details of the registers and the event data format The CAENDigitizer library implements a common interface to the higher software layers masking the details of the physical channel and its protocol thus making the libraries and applications that rely on the CAENDigitizer independent from the physical layer Supported platforms are Windows and Linux 32 and 64 bit A specific version of CAENDigitizer library has been developed for LabVIEW and is documented in the soon to be relased RD3 The CAENDigitizer library is based on the CAENComm library that manages the communication at low level read and write access The CAENComm
79. et the developer deal with the library C functions to build up a readout cycle when using DPP PHA DPP CI and DPP PSD firmware CAEN provides these examples also as source files and projects inside the CAENDigitizer full installation package compliant to Visual Studio Professional 2010 Note the DPP CI example code works only with the DPP CI firmware from release 3 4 130 16 on DPP PHA EXAMPLE CODE include CAENDigitizer h include lt stdio h gt include lt stdlib h gt define INDIVIDUAL TRIGGER INPUTS NB the following define MUST specify the ACTUAL max allowed number of boards define MAXNB il NB the following define MUST specify the ACTUAL max allowed number of board s channels it is neededi for consistency inside the CARNDigitizers functions used to alilocate the memory define MaxNChannels 8 define MAXNBITS 14 include some useful functions from file Functions c you can find this file in the sre directory include Functions h Jr EAEE a a aE aE aE aE AE a HE aE aE aE HE HE FE HE aE HE HE FE HE aE aE EE aE HEHE aE EE aE Ea aE aa E E EE Z Functions EAE HaHa HE FE AE FE HE AE FE AE HAE AE AE AE AE RAE FE AE AE E AE EAE PEER AEE e 4 fn int ProgramDigitizer int handle DigitizerParams t Params CAEN DGTZ DPPParamsPHA t DPPParams UM1935 CAENDigitizer User amp Reference Manual 68 CAEN DI Electronic Instrumentation brief Program the registers of the digitizer with the relevant paramet
80. eturn ret UM1935 CAENDigitizer User amp Reference Manual CAEN DI Electronic Instrumentation 6 ZLE x751 specific functions Under development UM1935 CAENDigitizer User amp Reference Manual 92 CAEN DI Electronic Instrumentation 7 Examples of communication settings Example No 1 Dev 1 DT5724 Fig 7 1 Connection example no 1 The host PC is connected via 2 USB ports to two desktop digitizer D Dev 1 DT5724 4 Channel 14 bit 100 MS s Digitizer D Dev 2 DT5720 4 Channel 12 bit 250 MS s Digitizer The computer is first connected to DT5724 then to the DT5720 Open Dev 1 DT5724 connected via USB cable CAEN DGTZ OpenDigitizer g CAEN DGTZ USB LinkType physical communication channel USB OF LinkNum Link number 0 first device OF ConetNode if USB 0 Us VMEBaseAddress must bez 0 amp handleDT5724 1 Pointer to the handler returned by function Open Dev 2 DT5720 connected via USB cable CAEN DGTZ OpenDigitizer D I CAEN DGTZ USB LinkType physical communication channel USB i LinkNum Link number 1 second device OF ConetNode if USB 0 or VMEBaseAddress must be 0 amp handleDT5720 2 Pointer to the handler returned by function Arguments description Name LinkType LinkNum ConetNode VMEBaseAddress 93 Description CAEN_DGTZ_USB Indicates USB as the physical communication channel Link number in case of USB the link numbers are assigned by the PC wh
81. ffset is applied to DCvalue DCvalue The value of the TRn DC offset to set get Return Values 0 Success Negative numbers are error codes see Return Codes Description Regarding the x742 series enables disables set the presence of the TRn signal in the data readout as well as allows for checking the status of the setting get A Note to be used only with x742 series Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetFastTriggerDigitizing int handle CAEN DGTZ EnaDis t enable i CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetFastTriggerDigitizing int handle CAEN DGTZ EnaDis t enable typedef enum 1 CAEN DGTZ ENABLE 1L CAEN DGTZ DISABLE OL CAEN DGTZ EnaDis t Arguments handle Device handler enable enable The enable flag to set get Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 34 CAEN DI Electronic Instrumentation Description Enables disables set the TRn input as local trigger in x742 series as wells allows for checking the status of the setting get A Note to be used only with x742 series Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetFastTriggerMode int handle CAEN DGTZ TriggerMode t mode CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetFastTriggerMode int handle CAEN DGTZ TriggerMode t mode typedef enum CAEN DGTZ TRGMODE DISAB
82. g the x742 series in order to compensate for unavoidable construction differences in the DRS4 chips a data correction is required for details please refer to the User Manual of the board This function loads the correction parameters stored on board while a DecodeEvent function is then needed to apply them The correction parameters to load depend on the operating sampling frequency Note to be used only with x742 series Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ LoadDRS4CorrectionData int handle CAEN DGTZ DRS4Frequency t frequency typedef enum CAEN DGTZ DRS4 5GHz OL CAEN DGTZ DRS4 2 5GHz 1L CAEN DGTZ DRS4 1GHz 2L CAEN DGTZ DRSA4Frequency t Arguments handle Device handler frequency The DRS4 sampling frequency Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 24 CAEN DI Electronic Instrumentation NN 25 Description Enables disables the data correction in the x742 series Note to be used only with x742 series Note If enabled the data correction through the DecodeEvent function only applies if a LoadDRS4CorrectionData has been previously called otherwise the DecodeEvent runs the same but data will be provided out not compensated Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ EnableDRS4Correction int handle CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ DisableDRS4Correcti
83. gitizer setup executable file and follow the installer instructions e For Linux users follow the instructions in the README file within the library package Note Installation of CAENDitizer also includes a folder Samples with a set of source files and projects for readout with standard firmware p 47 and DPP firmware p 68 to be available for user practice as well as functions for the offline data correction p 50 of x742 digitizers 7 UM1935 CAENDigitizer User amp Reference Manual Return Codes CAEN DI Electronic Instrumentation Error code NETT Meaning CAEN_DGTZ_Success 0 Operation completed successfully CAEN DGTZ CommError 1 Communication error CAEN_DGTZ_GenericError 2 Unspecified error CAEN_DGTZ_InvalidParam 3 Invalid parameter CAEN DGTZ InvalidLinkType 4 Invalid Link Type CAEN_DGTZ_InvalidHandler 5 Invalid device handler CAEN_DGTZ_MaxDevicesError 6 Maximum number of devices exceeded CAEN_DGTZ_BadBoardType 7 Operation not allowed on this type of board CAEN DGTZ BadinterruptLev 8 The interrupt level is not allowed CAEN DGTZ BadEventNumber 9 The event number is bad CAEN DGTZ ReadDeviceRegisterFail 10 Unable to read the registry CAEN DGTZ WriteDeviceRegisterFail 11 Unable to write into the registry CAEN DGTZ InvalidChannelNumber 13 The Channel is busy CAEN DGTZ ChannelBusy 14 The channel number is invalid CAEN DGTZ
84. h if EHisto b ch NULL free EHisto b ch CAEN DGTZ FreeReadoutBuffer amp buffer CAEN DGTZ FreeDPPEvents handle 0 Events CAEN DGTZ FreeDPPWaveforms handle 0 Waveform return ret DPP PSD EXAMPLE CODE include CAENDigitizer h include stdio h include lt stdlib h gt define MANUAL BUFFER SETTING 0 The following define must be set to the actual number of connected boards define MAXNB ji NB the following define MUST specify the ACTUAL max allowed number of board s channels it is needed for consistency inside the CAENDigitizer s functions used to allocate the memory define MaxNChannels 8 define MAXNBITS 12 include some useful functions from file Functions h you can find this file in the src directory include Functions h Jr sate a a aE aE HH a HE aE EH HE FE HE HE HE HE FE HE aE HEE HE EE HE aE EEE aE aE EEE E E E E iren eer O AEAEE TE FE AE AE HE AE FE AE AE FE AE FE E TE FE AE AE HE AE FE E AE FE AE AE E AE FE AE AE AE AE AE E AE AE AE AE AE AE AE AE E EE E EE EEE EEEE e 4 n fer AE int ProgramDigitizer int handle DigitizerParams t Params CAEN DGTZ DPPParamsPHA t DPPParams s brief Program the registers of the digitizer with the relevant parameters 5 NXreturn 0 success l error nte Jeer ene tere Lasel Digit izere ramsi e Pam sm CAEN DGTZ DPP PSD Params t DPPParams This function uses the CAENDigitizer API functions to perform the digiti
85. he first device in the chain 1 for the second and so on See Fig 7 4 Not used 0 used only for model accessed via VME CONET node Aud VME 0 xj BOARD PC side TX RX VME A281 H 1 B E BOARD l l l is VME N E BOARD Fig 7 4 A2818 network scheme UM1935 CAENDigitizer User amp Reference Manual 96 CAEN DI Electronic Instrumentation Example No 4 Dev 1 V1724 Base Address 55010000 V2718 Dev 2 V1724 Base Address 55020000 Optical Link port 0 Optical Link port 1 gt Optical Link port 2 PCle Dev 3 DT5751 Fig 7 5 Connection example no 4 The host PC houses one CAEN A3818C PCle CONET Controller with 4 Optical Link e porti3 is connected to Dev 3 DT5751 2 4 Channel 10 bit 2 1 GS s Digitizer e portit2 is connected to a V2718 VME PCI Optical Link Bridge housed in a VME crate that contains the following boards o Devi V1724 8 Channel 14 bit 100 MS s Digitizer Base address 0x55010000 o Devi 2 V1724 8 Channel 14 bit 100 MS s Digitizer Base address 0x55020000 Open Dev 1 V1724 VME base address 0x55010000 accessed via VMEbus through the V2718 connected to A3818 port 2 CAEN DGTZ OpenDigitizer CAEN DGTZ PCIE OpticalLink LinkType physical communication channel Optical Link via A3818 PCle Controller 27 LinkNum unique device Link number A3818 port number 2
86. he type returned from most of CAENDigitizer iibrary functions jand ws used to check af there wes an error in EUNE EION execution For example ret CAEN DGTZ some function some args if ret printf Some error CAEN DGTZ ErrorCode ret Buffers to store the data The memory must be allocated using the appropriate CAENDigitizer API functions see below so they must not be initialized here NB you must use the right type for different DPP analysis in this case CI char buffer NULL readout buffer CAEN DGTZ DPP CI Event t Events MaxNChannels events buffer CAEN DGTZ DPP CI Waveforms t Waveform NULL waveforms buffer The following variables will store the digitizer configuration parameters CAEN DGTZ DPP CI Params t DPPParams MAXNB DigitizerParams t Params MAXNB Arrays for data analysis uint64 t PrevTime MAXNB MaxNChannels uint64 t ExtendedTT MAXNB MaxNChannels uint32 t EHisto MAXNB MaxNChannels Energy Histograms int ECnt MAXNB MaxNChannels int TrgCnt MAXNB MaxNChannels The following variable will be used to get an handler for the digitizer The handler will be used for most of CAENDigitizer functions to identify the board int handle MAXNB Other variables ligt ak Joy ele EN int Quit 0 int AcqRun 0 tintz tc Allocatecbilzs Es Eeer wee int Nb 0 int DoSaveWave MAXNB MaxNChannels int MajorNumber int BitMask 0 uin
87. ic a EES Set GetDPPAcquisitionMode sese nente enint ne tenente entente nnne nene Set GetDPPTriggerMode sss Set GetDPP DHA Virtualbrobe Set GetDPP PGD VirtualProbe Ee Set GeiDPP CI VirtualProbe nr een ete mr EE EE ge DPP Cod Ee ZLE x751 specific dl TEE 92 Examples of communication settings eese enne 93 2ciunj d 93 2 Ch di ro H 94 Example NO Sro CEA 95 Example e E 97 DENO EA a E E EA E A E E P E E E E E E 99 List of Figures Fig Fig Fig Fig Fig Fig Fig 1 1 Hardware and Software layers ccccccecescesceseesceresecseeseeeeseceecaesaecaesaesassaeseseesaesaecaeeaeeaeseeeesaesaecaesaeeaeeessesaesarsaesaeeaeeeseeseeeats 6 7 1 Connection example no 1 eee S 7 2 Connection example no o eccesccssessesscssessesssssecseccsscsesssesseseaessesesecsusssessscseesasssesascsecasssesesseaesasseesesscseseassaesessseeseaseaesenes 94 7 3 Connection nl UE D EE 95 7 4 A2818 network scheme sse 96 7 5 Connection example no 4 sse 97 NEE e RE nl EE 99 List of Tables Tab 1 Host le le EC 7 UM1935 CAENDigitizer User amp Reference Manual 4 CAEN DI Electronic Instrumentation Tabs 2 R
88. igger time stamp event number channel mask etc associated to one event contained in the readout buffer This function reads the header of the numEvent event in the buffer fills the eventInfo structure and set the data pointer EventPtr to the first word of the event data in the readout buffer This pointer will be passed to the DecodeEvent function described below Note If using DPP PHA DPP PSD or DPP CI firmware you have to refer to the GetDPPEvents function Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetEventInfo int handle char buffer Wints2 E buttsize int32_t numEvent CAEN DGTZ EventInfo t eventInfo char EventPtr typedef struct uint32 t EventSize uint32 t BoardId Uint32 E Pattern uint32_t ChannelMask uint32 t EventCounter uint32 t TriggerTimeTag CAEN DGTZ EventInfo t Arguments Name Description 000 handle Device handler buffer Pointer to the readout buffer buffsize Size of the data block contained in the readout buffer numEvent Number of the requested event in the readout buffer 0 is the first event in the buffer eventInfo Pointer to the structure that contains the information about the requested event EventPtr Pointer to the requested event data in the readout buffer Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 22 CAEN DI Electronic Instrumentation Description
89. ile Functions c you can find this file in the sre directory include Functions h Jr et a a aE HH a aE EH HE HE EEE FE a HE aE HE EE HE EE HE aE EE EEE EEE Ha E E EE 2 Funetions EAH EE HH REE E E AE AE FE E E REET HR REET ERTS ER ETT AE AE E E AE AE AE E AE AE AE AE E AE HEE fn int ProgramDigitizer int handle DigitizerParams t Params CAEN DGTZ DPPParamsPHA t DPPParams brief Program the registers of the digitizer with the relevant parameters 5 NXreturn O success l error int ProgramDigitizer int handle DigitizerParams t Params CAEN DGTZ DPP CI Params t DPPParams This function uses the CAENDigitizer API functions to perform the digitizer s initial configuration inte ret 5 Reset the digitizer ret CAEN DGTZ Reset handle be iret T printf ERROR can t reset the digitizer Nin JEE ile Set the DPP acquisition mode This setting affects the modes Mixed and List see CAEN DGTZ DPP AcqMode t definition for details CAEN DGTZ DPP SAVE PARAM EnergyOnly Only energy DPP PHA or charge DPP PSD DPP CI v2 is returned CAEN DGTZ DPP SAVE PARAM TimeOnly Only time is returned CAEN DGTZ DPP SAVE PARAM EnergyAndTime Both energy charge and time are returned CAEN DGTZ DPP SAVE PARAM None No histogram data is returned ret CAEN DGTZ SetDPPAcquisitionMode handle Params AcqMode CAEN DGTZ DPP SAVE PARAM EnergyAndTime Set the digitizer acquisition mode CAEN
90. index start from 0 1 Optical link port in the 1 slot used It is not known a priori which is the first slot used Important note if also A2818s are installed these ones have lower index assigned ConetNode The CONET node identifies which device in the Daisy chain is being addressed The node is O for the first device in the chain 1 for the second and soon used only for model accessed via VME Must be 0 in other cases UM1935 CAENDigitizer User amp Reference Manual 98 CAEN DI Electronic Instrumentation Example No 5 99 Optical Link port 0 Optical Link port 1 Optical Link port 2 Fig 7 6 Connection example no 5 The host PC houses e one A2818 PCI CONET Controller connected to Dev 3 DT5751 2 4 Channel 10 bit 2 1 GS s Digitizer e one CAEN A3818C PCle CONET Controller with 4 Optical Link with port 2 connected to a V2718 VME PCI Optical Link Bridge housed in a VME crate that contains the following boards o Devi V1724 8 Channel 14 bit 100 MS s Digitizer Base address 0x55010000 o Devi V1724 8 Channel 14 bit 100 MS s Digitizer Base address 0x55020000 Open Dev 1 V1724 VME base address 0x55010000 accessed via VMEbus through the V2718 connected to A3818 port 2 CAEN DGTZ OpenDigitizer CAEN DGTZ PCIE OpticalLink LinkType physical communication channel Optical Link via A3818 PCle Controller SL LinkNum 3 A3818 po
91. ink either direct connection or VME through V2718 as the physical communication channel LinkNum Link number For the CONET the link number indicates which link of A2818 or A3818 is used For A3818 A2818 refers to the PCI slot and depends on the motherboard of the PC used Link index start from 0 1 Optical link port in the 1 slot used It is not known a priori which is the first slot used Important note if also A2818s are installed these ones have lower index assigned ConetNode The CONET node identifies which device in the Daisy chain is being addressed The node is O for the first device in the chain 1 for the second and soon Used only for model accessed via VME Must be 0 in other cases UM1935 CAENDigitizer User amp Reference Manual 100 CAEN Electronic Instrumentation Tools for Discovery CAEN SpA is acknowledged as the only company in the world providing a complete range of High Low Voltage Power Supply systems and Front End Data Acquisition modules which meet IEEE Standards for Nuclear and Particle Physics Extensive Research and Development capabilities have allowed CAEN SpA to play an important long term role in this field Our activities have always been at the forefront of technology thanks to years of intensive collaborations with the most important Research Centres of the world Our products appeal to a wide range of customers including engineers scientists and technical professionals who all t
92. ition int handle Arguments handle Device handler Return Values 0 Success Negative numbers are error codes see Return Codes Description This function sets the size of the acquisition window that is the number of samples that belong to it Due to the way the samples are written into the memory more samples are put in parallel there is a specific granularity of the record length depending on the board model For example in the x720 series the samples are written 4 by 4 hence the record length must be a multiple of 4 The function accepts any value for the parameter size and then takes the closest value multiple of the granularity The function GetRecordLength returns the exact value Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetRecordLength int handle lau size CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetRecordLength int handle wubsueS 2 reizer Arguments handle Device handler size size The size of the record in samples to set get A int specifying the channel to set get the record length for Used only for digitizers channel optional z running DPP firmware in particular DPP PSD and DPP CI Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 38 CAEN DI Electronic Instrumentation Description This function sets the post trigger size that is the position of the trigger
93. ive numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN DI Electronic Instrumentation Description This function performs an interrupt acknowledge cycle to know the board id of the board that raised an interrupt As described previously in the case of interrupt requests on the VME bus it is not possible to know in advance which digitizer asserted a certain IRQ line Indeed it could also happen that a line is asserted by any other slave on the VME bus with which no communication is established For this reason when the reading process on hold in a specific IRQ is awakened it must perform an interrupt acknowledge cycle to see which one generated the interupt The identification is as follows during acknowledge cycle which is very similar to a read cycle the slave that caused the interruption puts on his bus status id actually the value previously programmed by the user through the Set function of Set GetinterruptConfig function In the case of multiple cards having different values of the programmed status id the user will be able to figure out who sent the request and then which one is to be read It should be noted that in the case of multiple cards on the bus even inhomogeneous the interrupt management must be centralized as the acknowledge cycle should be performed only once It is therefore not recommended although possible to have more process waiting on the same IRQ line Syno
94. iven channel CAEN DGTZ PulsePolarityPositive or CAEN DGTZ PulsePolarityNegative ret CAEN DGTZ SetChannelPulsePolarity handle i Params PulsePolarity UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Set the virtual probes settings DEP PRA can savs 2 analog waveforms the first and the second can be specified with the VIRTUALPROBE 1 and 2 parameters 4 digital waveforms the first is always the trigger the second is always the gate the third and fourth can be specified with the DIGITALPROBE 1 and 2 parameters CAEN DGTZ DPP VIRTUALPROBE SINGLE gt Save only the Input Signal waveform CAEN DGTZ DPP VIRTUALPROBE DUAL gt Save also the waveform specified in 8 Ke J VIRTUALPROBE Virtual Probes 1 types CAEN DGTZ DPP PHA VIRTUALPROBE1 trapezoid CAEN DGTZ DPP PHA VIRTUALPROBE1 Delta CAEN DGTZ DPP PHA VIRTUALPROBE1 Delta2 CAEN DGTZ DPP PHA VIRTUALPROBE1 Input Virtual Probes 2 types CAEN DGTZ DPP PHA VIRTUALPROBE2 Input CAEN DGTZ DPP PHA VIRTUALPROBE2 S3 CAEN DGTZ DPP PHA VIRTUALPROBE2 DigitalCombo CAEN DGTZ DPP PHA VIRTUALPROBE2 trapBaseline CAEN DGTZ DPP PHA VIRTUALPROBE2 None Digital Probes types CAEN DGTZ DPP PHA DIGITAL PROBE trgKln CAEN DGTZ DPP PHA DIGITAL PROBE Armed CAEN DGTZ DPP PHA DIGITAL PROBE PkRun CAEN DGTZ DPP PHA DIGITAL PROBE PkAbort CAEN DGTZ DPP PHA DIGITAL PROBE Peaking CAEN DGTZ DPP PHA DIGITAL PROBE PkHoldOff CAEN D
95. le CAEN DGTZ TriggerMode t mode typedef enum CAEN DGTZ TRGMODE DISABLED 0 CAEN DGTZ TRGMODE EXTOUT ONLY 2 CAEN DGTZ TRGMODE ACQ ONLY il CAEN DGTZ TRGMODE ACQ AND EXTOUT 3 CAEN DGTZ TriggerMode t Arguments handle Device handler SW Trigger mode CAEN DGTZ TRGMODE DISABLED 0 mode CAEN_DGTZ_TRGMODE_EXTOUT_ONLY 2 CAEN_DGTZ_TRGMODE_ACQ_ONLY 1 CAEN_DGTZ_TRGMODE_ACQ_AND_EXTOUT 3 Return Values 0 Success Negative numbers are error codes see Return Codes Description This function decides whether the external trigger should only be used to generate the acquisition trigger only to generate the trigger output or both Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetExtTriggerInputMode int handle CAEN DGTZ TriggerMode t mode 1 CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetExtTriggerInputMode int handle CAEN DGTZ TriggerMode t mode typedef enum CAEN DGTZ TRGMODE DISABLED 0 CAEN DGTZ TRGMODE EXTOUT ONLY 2 CAEN DGTZ TRGMODE ACQ ONLY i CAEN DGTZ TRGMODE ACQ AND EXTOUT 3 CAEN DGTZ TriggerMode t Arguments handle Device handler External Trigger mode CAEN DGTZ TRGMODE DISABLED 0 mode CAEN DGTZ TRGMODE EXTOUT ONLY 2 CAEN_DGTZ_TRGMODE_ACQ_ONLY 1 CAEN DGTZ TRGMODE ACQ AND EXTOUT 3 Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Elec
96. lev Set the digitizer s behaviour when an external trigger arrives CAEN DGTZ TRGMODE DISABLED do nothing CAEN DGTZ TRGMODE EXTOUT ONLY generate the Trigger Output signal CAEN DGTZ TRGMODE ACQ ONLY generate acquisition trigger CAEN DGTZ TRGMODE ACQ AND EXTOUT generate both Trigger Output and acquisition trigger See CAENDigitizer user manual chapter Trigger configuration for details ret CAEN DGTZ SetExtTriggerInputMode handle CAEN DGTZ TRGMODE ACQ ONLY Set the enabled channels ret CAEN DGTZ SetChannelEnableMask handle Params ChannelMask Set how many events to accumulate in the board memory before being available for readout ret CAEN DGTZ SetDPPEventAggregation handle Params EventAggr 0 Set the mode used to syncronize the acquisition between different boards In this example the sync is disabled ret CAEN DGTZ SetRunSynchronizationMode handle CAEN DGTZ RUN SYNC Disabled Set the DPP specific parameters for the channels in the given channelMask ret CAEN DGTZ SetDPPParameters handle Params ChannelMask amp DPPParams for i 0 i MaxNChannels i if Params ChannelMask amp 1 i Set a DC offset to the input signal to adapt it to digitizer s dynamic range ret CAEN DGTZ SetChannelDCOffset handle i 0x8000 Set the Pre Trigger size in samples ee CONAN WEIN See egenen anecht al sil 2 Set the polarity for the g
97. locs MUST be done after the digitizer programming because the following functions needs to know the digitizer configuration to allocate the right memory amount Allocate memory for the readout buffer ret CAEN DGTZ MallocReadoutBuffer handle 0 amp buffer amp AllocatedSize Allocate memory for the events ret CAEN DGTZ MallocDPPEvents handle 0 Events amp AllocatedSize Allocate memory for the waveforms ret CAEN DGTZ MallocDPPWaveforms handle 0 amp Waveform amp AllocatedSize if ret printf Can t allocate memory buffers Win UM1935 CAENDigitizer User amp Reference Manual 88 goto KKKKK Reado KKKKK Clear for b 0 for CAEN DI Electronic Instrumentation QuitProgram KKEKKKKKKKKKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK kkkk ut Loop E kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk Histograms and counters b lt MAXNB b ch 0 ch lt MaxNChannels ch Allocate Memory for Histos and set them to 0 BEES TOs onto rie 9 P lge ee Lee Eege aem 2 MEE MEET memset EHistoShort b ch 0 1 lt lt MAXNBITS sizeof uint32 t BH stohong biilch uinea2 ee malloc iGl lt lt MAXNBIstS Asa zeor units elt Ae memset EHistoLong b ch 0 1 lt lt MAXNBITS sizeof uint32_t EHistoRatio b ch float malloc 1 lt lt MAXNBITS sizeof float memset E
98. ments handle Device handler event The pointer to the event waveforms The pointer to the preallocated waveform list Return Values 0 Success negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Description Sets event aggregation parameters P Note This function has to be used only after the record length parameter has been set by the Set function of the Set GetRecordLength Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetDPPEventAggregation int handle int threshold int maxsize D Arguments handle Device handler Specifies how many events to let accumulate in the board memory before they are rendered available for readout A low number maximizes responsiveness since data are threshold read as soon as they are stored in memory while a high number maximizes efficiency since fewer transfers are made Supplying 0 will let the library choose the most reasonable value depending on acquisition mode and other parameters Specifies the maximum size in bytes of the event buffer on the PC side This parameter might be useful in case the computer has very low RAM Normally though it is safe to supply 0 as this parameter so that the library will choose an appropriate value automatically maxsize Return Values 0 Success negative numbers are error codes see Return Codes Descripti
99. n the given channelMask ret CAEN DGTZ SetDPPParameters handle Params ChannelMask amp DPPParams for i 0 i MaxNChannels i if Params ChannelMask amp 1 i Set a DC offset to the input signal to adapt it to digitizer s dynamic range ret CAEN DGTZ SetChannelDCOffset handle i 0x8000 Set the Pre Trigger size in samples Wee NHN JEE See egenen Una al sil 4 Set the polarity for the given channel CAEN DGTZ PulsePolarityPositive or CAEN DGTZ PulsePolarityNegative net Je ASNEDSDZNSStehoannelspusebBollamit vendere i Parani RUSE Rolar iey Set the virtual probes settings IDEE CSDESQU GS 2 analog waveforms Analog Trace 1 it is always the input signal Analog Trace 2 it can be specified with the VIRTUALPROBE parameter 4 digital waveforms Digital Trace 1 it is always the trigger Digital Trace 2 it is always the gate Digital Trace 2 3 they can be specified with the DIGITALPROBE 1 and 2 parameters CAEN DGTZ DPP VIRTUALPROBE SINGLE Save only the Input Signal waveform CAEN DGTZ DPP VIRTUALPROBE DUAL gt cave keen che race sspeci riled Ving VIRTUALPROBE interleaved Probes types for Analog Trace 2 CAEN DGTZ DPP CI VIRTUALPROBE Baseline Probes types for Digital Trace 3 Virtual Probes only for FW gt 130 21 CAEN DGTZ DPP CI DIGITALPROBE1 R21 ExtTrg CAEN DGTZ DPP CI TALPROBEl R21 OverThr CAEN DGTZ DPP CI TALPROBEl R21 TrigOut CAEN DGTZ DPP C TALPROBE1 R21 Coi
100. ncWin CAEN DGTZ DPP C TALPROBE1 R21 Coincidence Virtual Probes y for FW lt 130 20 CAEN DGTZ DPP_CI_ TALPROBE1 BlOutSafeBand CAEN DGTZ DPP CI DIGITALPROBE1 BlTimeout CAEN DGTZ DPP CI _DIGITALPROBE1 CoincidenceMet CAEN DGTZ DPP CI DIGITALPROBE1 Tvaw QArPAAARAA Probes types for Digital Trace 4 Virtual Probes only for FW gt 130 21 CAEN DGTZ DPP CI DIGITALPROBE2 R22 OverThr CAEN DGTZ DPP C TALPROBE2 R22 TrgVal CAEN DGTZ DPP C TALPROBE2 R22 TrgHO CAEN DGTZ DPP C TALPROBE2 R22 Coincidence Virtual Probes for FW lt 130 20 CAEN DGTZ DPP CI TALPROBE2 R22 OverThr CAEN DGTZ DPP CI TALPROBE2 R22 TrgVal CAEN DGTZ DPP C TALPROBE2 R22 TrgHO CAEN DGTZ DPP CI TALPROBE2 R22 Coincidence ret CAEN DGTZ SetDPP CI VirtualProbe handle CAEN DGTZ DPP VIRTUALPROBE SINGLE CAEN DGTZ DPP CI VIRTUALPROBE Baseline CAEN DGTZ DPP CI DIGITALPROBEl BlOutSafeBand CAEN DGTZ DPP CI DIGITALPROBE2 Tvaw el lo e oj ees EE Oe oF oe oO alse aee 2 printf Warning errors found during the programming of the digitizer nSome settings may not be executed Wn return ret else UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Z return 0 FEAE HEH AE FE AE FE FE FE FE aE AE FE HE AE AE Ef MAIN Si fog int HET AE EE HEE HAE HEH REE HAE dE main int argc char argv The following variable is t
101. nnelTriggerThreshold 30 Set GetGroupTriggerThreshold 3 Set GetChannelPulsePolarity 3 Set GetRunSynchronizationMode EK Set GetlOL eye EEN 32 Set GetTriggerPolarity AAA 33 Set GetGroupFastTriggerThreshold 133 Set GetGroupFastTriggerDCOffset 134 Set GettastfriogerDioittzing EEN Set GetFastTriggerMode sessi tentent nennen eniti retener eter tenente nennen Set GetDRS4SamplingFrequency e Set GetOutputSignalMode 2 ee ce EES ier sche ea scenes e Pt eee Sn ohne Due ente EE 3 UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation 4 5 PCQUISIION Pe 37 Set GetChannelEnableMask eter tene aer aen sos eie inae pent ajeavacestaveed ses ruere e pe Ea Pea eg 37 Set GetGroupEnableMask sse nennen nnne nennen tnter tenete nennen entente nnne 37 SWStartAcquisition SWStopAcquisition Set GetRecordLenglth 1 ite ne eia erdt cie re ERE iinet ph RE SR RR REX ae DUREE eR Xe save gr e NEE 38 Set GetPostTriggerSize AAA 39 Set GetAcquisitionMode sss 39 Set GetChannelDCOffset sss 40 Set GetG
102. nstrumentation Description This function resets the Digitizer All internal registers and states are restored to default Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ Reset int handle Arguments handle Device handler Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Description The function reads from the board some information such as serial number model number of channels firmware release and other parameters of the device Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetInfo int handle B B CAEN DGTZ BoardInfo t BoardInfo typedef struct char ModelName 12 Memes t Model Wage E Channels panim Mts FormFactor uint32 t FamilyCode char ROC FirmwareRel 20 char AMC_FirmwareRel 20 iubes E SerialNumber panem Mts PCB Revision abge E ADC NBits CAEN DGTZ BoardInfo t typedef enum CAEN DGTZ V1724 ESO CAEN DGTZ V1721 zl CAEN DGTZ V1731 CI CAEN DGTZ V1720 i CAEN DGTZ V1740 4L CAEN DGTZ V1751 Se CAEN DGTZ DT5724 ft CAEN DGTZ DT5721 Tk CAEN DGTZ DT5731 8L CAEN DGTZ DT5720 9L CAEN DGTZ DT5740 l t CAEN DGTZ DT5751 EIER CAEN DGTZ N6724 om CAEN DGTZ N6721 SE CAEN DGTZ N6731 14L CAEN DGTZ N6720 sl EI CAEN DGTZ N6740 ZNA CAEN_DGTZ_N6751 i T CAEN DGTZ DT5742 sl EN CAEN DGTZ N6742 19L CAEN DGTZ V1742 20L CAEN DGTZ DT5
103. nt the number of enabled channels and the maximum number of events transferred by each block transfer see previous function For this reason the function must be called after having programmed the digitizer if the parameters that determine the size of the buffer change it is necessary to free it by calling the FreeReadoutBuffer function and then reallocated A Note the buffer pointer must be initialized to NULL Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ MallocReadoutBuffer int handle baue OUFFeEr IER elt p Arguments handle Device handler buffer Pointer to the readout buffer allocated WARNING buffer MUST be initialized to NULL size The size in byte of the buffer allocated Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 20 CAEN DI Electronic Instrumentation Description Frees memory allocated by the MallocReadoutBuffer function Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ FreeReadoutBuffer char buffer Arguments buffer Pointer to the readout buffer to free returned by the MallocReadoutBuffer function Return Values 0 Success Negative numbers are error codes see Return Codes Description This function performs a block transfer of data from the digitizer to the computer The size of the block to be transferred is determined by the function according to parameters set and the mode of
104. on Sets Gets the number of events that each aggregate will contain Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetNumEventsPerAggregate int handle uint32 t numEvents CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetNumEventsPerAggregate int handle uint32 t numEvents g Arguments handle Device handler numEvents Number of events per aggregater Optional parameter in the form of an int to specify the channel required for DPP PSD and h l GE DPP CI ignored by DPP PHA Return Values 0 Success negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 58 CAEN DI Electronic Instrumentation Description Sets Gets the maximum number of aggregatess for each transfer A Note with DPP PHA DPP PSD and DPP CI also the maxsize parameter of SetDPPEventAggregation can be used Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetMaxNumAggregatesBLT int handle uint32 t numAggr CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetMaxNumAggregatesBLT int handle uint32 t numAggr i Arguments handle Device handler numAggr Max number of aggregates per block transfer BLT Return Values 0 Success negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation Description Sets DPP configuration parameters for DPP PHA DPP PSD or DPP CI
105. on int handle Arguments handle Device handler Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation 3 Trigger configuration The acquisition in the digitizer is ruled by the trigger which is a signal that decides when to start the acquisition window and save samples of the ADC or the values of interest calculated on line DPP in the digitizer memory The digitizer can have the following trigger sources External Trigger digital signal from the panel Software Trigger write access to the specific register Self Trigger Channel internal signal generated by a digitizer channel under certain conditions for example when the input signal exceeds a programmable threshold All trigger sources can be enabled or not to generate the acquisition trigger for the channels Similarly it is possible to decide what triggers should participate in the generation of the Trigger Output NIM or TTL digital output of the digitizer panel Trigger Output can not necessarily coincide with the acquisition trigger for example in order to trigger multiple cards at once as one of their channel has auto triggered for this purpose the auto triggering channel is used only to generate the Trigger Outputs but not for the acquisition trigger all Trigger Outputs are ORed externally to the cards and the resulting signal is sent in parallel
106. onnection to link optical digitizer in the case of communication via the VME use VMEIRQWait The timeout parameter indicates the maximum waiting time before being forced to wake up even without interrupt In this case the value returned by the function is 18 Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ IRQWait int handle uint32 t timeout Arguments handle Device handler timeout Timeout max wait time in ms Return Values 0 Success Negative numbers are error codes see Return Codes Description This function as the one described above implements the passive waiting from which the waking occurs up in response to an interrupt request from the digitizer The main difference is that in this case the digitizer asserts a IRQ 1 to 7 on the VME bus and this is transferred to the PC by the master VME V2718 Since other digitizers could be on the VME bus and therefore different handles that identify them within the program and each one can generate interrupts even on the same IRQ line the management of interrupts cannot take place through the handle of the digitizer which cannot be uniquely associated with the request arrived at the PC but must be performed through the handle of the master VME V2718 which is the unique collector of interrupt requests to the PC Once awakened from the waiting status the process of reading can understand what digitizer has actually sent the request via the interrupt acknowledge
107. or CAEN DGTZ DPP ACQ MODE Oscilloscope Params b RecordLength 400 Num of samples of the waveforms only for Oscilloscope mode Params b ChannelMask OxFF Channel enable mask Params b EventAggr 0 number of events in one aggregate 0 automatic Params b PulsePolarity CAEN DGTZ PulsePolarityNegative Pulse Polarity this parameter can be individual SEEK KKK KKK KKK KK KK KK KK KK KK KK KK b DPP parameters m FRR RK KKK RRR ke ke ke ke ke ke ke ke ke ke ke e e e KK d for ch 0 ch MaxNChannels ch UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation DPPParams b thr ch 200 Trigger Threshold DPPParams b k ch 1000 Trapezoid Rise Time N 10ns DPPParams b m ch 500 Trapezoid Flat Top N 10ns DPPParams b M ch 200 Decay Time Constant N 10ns HACK FPEP the one expected from fitting algorithm DPPParams b ftd ch 30 Flat top delay peaking time N 10ns DPPParams b a ch 2 Trigger Filter smoothing factor DPPParams b b ch 100 Input Signal Rise time N 10ns DPPParams b trgho ch 600 Trigger Hold Off DPPParams b nsbl ch 2 3 bx10 64 samples DPPParams b nspk ch 2 DPPParams b pkho ch 770 DPPParams b blho ch 100 DPPParams b enf ch 1 0 Energy Normalization Factor DPPParams b tsampl ch 10 DPPParams b dgain
108. ponds to a DC offset of Vpp 2 where Vpp is the voltage range peak to peak of the ADC This means that the input signal can range from Vpp 2 to Vpp 2 If the DAC is set to 0x0000 then no DC offset is added and the range of the input signal goes from D to Vpp Conversely when the DAC is set to OxFFFF the DC offset is Vpp and the range goes from Vpp to 0 The DC offset can be set on channel basis except for the x740 in which it is set on group basis in this case you must use the Set GetGroupDCOffset functions Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetChannelDCOffset int handle uint32 t channel pnmo Mate D CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetChannelDCOffset int handle uint32 t channel euer ie tte Arguments handle Device handler channel Channel to which the DAC setting is applied Use 1 for all channels Tvalue DAC value from 0x0000 to OxFFFF Return Values 0 Success Negative numbers are error codes see Return Codes Description The same as Set Get ChannelDCoffset but in this case it is applied to the groups of the x740 series A Note to be used only with x740 series Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetGroupDCOffset int handle uint32 t group umo E allie CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetGroupDCOffset int handle nme E Geop Uint32 amp oe 1 Arguments handle Device handler group Group to which the
109. psis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ VMEIACKCycle int VMEHandle tiac Jewel Lotsa Mlyeeuccl Lel Arguments VMEHandle Device handler of the CAEN VME bridge that handles the interrupts level IRQ level from 1 to 7 on which to perform the interrupt acknowledge cycle board id Data status id returned by the digitizer that asserted the interrupt request Return Values 0 Success Negative numbers are error codes see Return Codes Examples WAVEDUMP Code To be implemented Description Rearm the Interrupt Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ RearmInterrupt int handle Arguments handle Device handler Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 18 CAEN DI Electronic Instrumentation Data Readout The data reading from the memories of the digitizer is done through BlockRead cycles although it is possible also to run cycles to read each buffer In the case of direct communication via USB or optical link the protocol that manages the blocks transfer is CAEN proprietary and therefore there are no ambiguities or special options to be decided Conversely if reading takes place through the VME bus since the standard provides different types of access and not all VME masters support all modes or do it differently the reading mode may need to be adapted according to the master featu
110. r Synopsis int32 t X742 DecodeEvent char evtPtr void Ewvt Arguments evtPtr Pointer to the requested event in the acquisition buffer Evt Pointer to the event structure with decoded event MUST BE NULL Return Values 0 Success UM1935 CAENDigitizer User amp Reference Manual 52 CAEN DI Electronic Instrumentation 5 DPP specific functions In order to handle acquisitions with the DPP firmware PHA PSD Cl the C functions described in this chapter can be used 53 Description Sets gets the pre trigger size which is the portion of acquisition window visible before a trigger Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetDPPPreTriggerSize int handle inb cu uint32 t samples i CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetDPPPreTriggerSize int handle Tut ch Wints2 tt Asampilles i Arguments handle Device handler samples samples The size of the record in samples ch The channel whose pre trigger has to be set get ch 1 writes the same value for all channels DPP CI only supports ch 1 different channels must have the same pre trigger Return Values 0 Success negative numbers are error codes see Return Codes Description Decodes and returns all the DPP events stored in the acquisition buffers Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetDPPEvents int handle char buffer ums E timc void events uint32 t numEventsArray
111. r returned by function Open Dev 3 V1724 first device in Daisy chain of A2818 1 CAEN DGTZ OpenDigitizer CAEN DGTZ PCI OpticalLink LinkType physical communication channel Optical Link via A2818 PCI Controller ie LinkNum Link number 1 second device OF ConetNode first device in the chain O de VMEBaseAddress must be 0 amp handleV1724 3 Pointer to the handler returned by function Open Dev 4 V1724 second device in Daisy chain of A2818 1 CAEN DGTZ OpenDigitizer CAEN DGTZ PCI OpticalLink LinkType physical communication channel Optical Link via A2818 PCI Controller Ly LinkNum Link number 1 second device Je ConetNode second device in the chain 1 OF VMEBaseAddress must be 0 amp handleV1724 4 Pointer to the handler returned by function UM1935 CAENDigitizer User amp Reference Manual CAEN DI Electronic Instrumentation Arguments description LinkType CAEN DGTZ PCI OpticalLink Indicates A2818 gt Optical Link either direct connection or VME through V2718 as the physical communication channel LinkNum Link number For the CONET the link number indicates which link of A2818 or A3818 is used For A2818 refers to the PCI slot and depends on the motherboard of the PC used Link index start from 0 1 link in the 1 slot used It is not known a priori which is the first slot used ConetNode The CONET node identifies which device in the Daisy chain is being addressed The node is O for t
112. re error codes see Return Codes Description Generic write access to one register of the digitizer The CAENDigitizer library provides specific functions for most of the parameters settings in the case where there is not a specific function for accessing a particular register or the user wants to force the writing of a datum this function makes it possible to perform a direct access to the registers It is worth noticing that the overwriting of some settings can cause inconsistency of the operations Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ WriteRegister int handle uiatz e Agkhcass uint32 t Data Arguments handle Device handler Address Register address For the VME access this is the lower 16 bit part of the VME address bus Data 32 bit data to write Return Values 0 Success Negative numbers are error codes see Return Codes Description Generic read access to one register of the digitizer see WriteRegister for more details Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ ReadRegister int handle len Aclehnesis Unis AE Datta Arguments handle Device handler Address Register address For the VME access this is the lower 16 bit part of the VME address bus Data Data read from the board 32 bit Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 10 11 CAEN DI Electronic I
113. readout The block can contain one or more events The data is transferred into the buffer memory previously allocated by MallocReadoutBuffer function The function returns in bufferSize the size of the data block read from the card expressed in long words Note L CAEN_DGTZ_SLAVE_TERMINATED_READOUT_MBLT for VME accesses In this case the digitizer is programmed to assert the VME Bus Error during a Block Transfer cycle to prematurely end the cycle when it no longer has data to transfer or has completed the transfer of the maximum number of events planned see BLT_EVENT_NUM register or Set GetMaxNumEventsBLT function This use of the Bus Error though not specifically provided by the VME standard for this purpose it is actually very common However some VME masters have a Bus Error management not suitable for this purpose CAEN_DGTZ_POLLING_MBLT for VME accesses The VME Bus Error generation is disabled the transfer always continues until the completion of the number of bytes required and if there are no data to be transferred the digitizer will insert filler words OxFFFFFFFF Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ ReadData int handle CAEN DGTZ ReadMode t mode char buffer PALME qe lee e typedef enum CAEN DGTZ SLAVE TERMINATED READOUT MBLT 0 CAEN DGTZ SLAVE TERMINATED READOUT 2eVME 1 CAEN DGTZ SLAVE TERMINATED READOUT 2eSST 2 CAEN DGTZ POLLING MBLT 3 CAEN DGTZ POLLING 2eVME 4 CAE
114. requires the CAENVMELib library access to the VME bus even in the cases where the VME is not used For this reason the CAENVMELib and CAENComm libraries must be already installed on the host PC before installing the CAENDigitizer however both CAENVMELib and CAENComm libraries are completely transparent to the user Concerning the access through the VME bus the CAENComm and the CAENDigitizer libraries have been designed to work with CAEN s VME bridges V1718 and V2718 It is possible to make the CAENDigitizer compatible for different types of VME controllers such as a SBC for this purpose the user must provide a library that exports the functions used by the CAENComm Refer to RD1 for documentation Currently the CAENComm and so the CAENDigitizer supports the following communication channels e PC USB gt Digitizer either Desktop or NIM models e PC USB gt V1718 gt VME gt Digitizers VME models only e PC gt PCI A2818 gt CONET gt Digitizers all models e PC PCI A2818 gt CONET gt V2718 gt VME gt Digitizers VME models only e PC gt PCle A3818 gt CONET gt Digitizers all models e PC gt PCle A3818 gt CONET gt V2718 gt VME gt Digitizers VME models only CONET Chainable Optical NETwork indicates the CAEN proprietary protocol for communication on Optical Link Refer to RD2 for useful information CAENComm Library USB 2 0 USB 2 0 CONET2 Optical Link Fig 1 1 Hardware and Soft
115. res The library foresees the use of master CAEN V1718 and V2718 and the readout mode is optimized for these modules Description This function Clears the data stored in the buffers of the Digitizer Note generally it is not necessary to call this function because the digitizer runs automatically a clear cycle when an A acquisition starts The function can be used during an acquisition when aware that the data stored in memory are not interesting and not going to be read Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ ClearData int handle Arguments handle Device handler Return Values 0 Success Negative numbers are error codes see Return Codes Description By default in the data transfer from the memory of the digitizer to the PC regardless of the type of link used events are aligned the digitizer stop the transfer after transferring an integer number Ne of events where Ne is user programmable through the Set function of Set GetMaxNumEventsBLT even if the user has requested the transfer of more data In the case of communication via USB and optical links the premature termination of the transfer is foreseen by the protocol instead for the VME Block Transfer the transfer is interrupted by the digitizer asserting the bus error if enabled see above Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ DisableEventAlignedReadout int handle Arguments handle Device handler Return Values 0 Success N
116. roupDCOffset ANN 40 Set GetDtzMode eese Al Set GetZeroSuppressionMode 42 Set GetChannelZSParams sess EE Set GetAnalogMonOutput sss eee 144 Set GetAnaloglnspectionMonbParamss essent eee nennen nnne tenete nennen nene 45 Set GetEventPackaging inen enit dice Iber e TAE Eee NR eene TEE Re dn EL een dne Eua 46 ACQUISITION XAMPIO me 47 x742 Offline data correction FUNCTIONS cseesessessecsssssessessessesssessensessessscseeseesseesseseessesseseaeseeseesseess 50 LoadCorrectionTables une tto y e inane dein DRE E VIEN EY DERE Nu Da nore 50 ApplyDataCorrection BI GetNumEvents BI GetEventPtr 5 52 X742 DecodeEVent eelere E ie ei Ie 52 DPP specific functions eise erri rr oret nk ROGO IER RENE DIE EX HMEEN UK ER EIUO UE N EE GENEE 53 Set GetDPPPreTriggerSize GetDPPEvents MallocDPPEvents FreeDPPEvents in MalloGCDPPWaAveTOrims EE FrEGDPPWavelOninS ECC X V DecodeDPPWaveforms es SetDPPEventAggregation sse netten nennen tnnt nennen enini tete tetn teni treten tenete tnter 58 Set GetNumEventsPerAggregate sse nennen netten treten tenete tn tn eene tn entree tenens 58 Set GetMaxNumAggregatesBLT SetDPPParamelers eebe eurn etie desde i F
117. rrays for data analysis uint64 t PrevTime MAXNB MaxNChannels uint64 t ExtendedTT MAXNB MaxNChannels uint32 t EHisto MAXNB MaxNChannels Energy Histograms UM1935 CAENDigitizer User amp Reference Manual 70 CAEN DI Electronic Instrumentation int ECnt MAXNB MaxNChannels int TrgCnt MAXNB MaxNChannels int PurCnt MAXNB MaxNChannels The following variable will be used to get an handler for the digitizer The handler will be used for most of CAENDigitizer functions to identify the board int handle MAXNB Other variables aime aly Jew Clap ND int Quit 0 int AcqRun 0 UanesZzye Allocatedsize EE int Nb 0 int DoSaveWave MAXNB MaxNChannels int MajorNumber int BitMask 0 uint64 t CurrentTime PrevRateTime ElapsedTime uint32 t NumEvents MaxNChannels CAEN DGTZ BoardInfo t BoardInfo memset DoSaveWave 0 MAXNB MaxNChannels sizeof int for i20 i lt MAXNBITS i BitMask 1 lt lt i Create a bit mask based on number of bits of the board Ok ck ckckckckckckckckck ck ck ck ck ck ck ck ck ck ck ck ck ck ck ck ck ck ck kok ck ck ck ck ck KKK ck ck ck KKK kk kk ck ck ck ck ck ok ck ck ck ck ck ck ck ck kc k kk kk kk kk kk kk kk kkkkk Set Parameters oy ck koe KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK ko ko ko ko Sk ko Sk ko ko ko ko ko ko memset amp Params 0 MAXNB sizeof DigitizerParams t memset amp DPPParams 0 MAXNB sizeof
118. rt number41 to A2818 is assigned the first link 0 OF ConetNode unique device in the chain O 0x55010000 VMEBaseAddress amp handleV1724 1 Pointer to the handler returned by function Open Dev 2 V1724 VME base address 0x55020000 accessed via VMEbus through the V2718 connected to A3818 port 2 CAEN DGTZ OpenDigitizer CAEN DGTZ PCIE OpticalLink LinkType physical communication channel Optical Link via A3818 PCle Controller m LinkNum 3 A3818 port number 1 to A2818 is assigned the first link 20 OF ConetNode unique device in the chain O 0x55020000 VMEBaseAddress amp handleV1724 1 Pointer to the handler returned by function Open Dev 3 DT5751 first device in Daisy chain of A2818 CAEN DGTZ OpenDigitizer CAEN DGTZ PCI OpticalLink LinkType physical communication channel Optical Link via A2818 PCI Controller 0 LinkNum A2818 has lower index assigned 0 OF ConetNode unique device in the chain O de VMEBaseAddress must be 0 amp handleDT5751 3 Pointer to the handler returned by function UM1935 CAENDigitizer User amp Reference Manual Dev 1 V1724 Base Address 55010000 Dev 2 V1724 Base Address 55020000 CAEN DI Electronic Instrumentation Arguments description LinkType CAEN_DGTZ_PCIE_OpticalLink Indicates A3818 gt Optical Link either direct connection or VME through V2718 as the physical communication channel CAEN DGTZ PCI OpticalLink Indicates A2818 gt Optical L
119. rust them to help achieve their goals faster and more effectively CAEN S p A CAEN GmbH CAEN Technologies Inc Via Vetraia 11 KlingenstraRe 108 1140 Bay Street Suite 2 C 55049 Viareggio D 42651 Solingen Staten Island NY 10305 Italy Germany USA Tel 39 0584 388 398 Tel 49 0 212 254 4077 Tel 1 718 981 0401 Fax 39 0584 388 959 Mobile 49 0 151 16 548 484 Fax 1 718 556 9185 info caen it Fax 49 0 212 25 44079 info caentechnologies com www caen it info caen de com www caentechnologies com www caen de com CAEN GmbH CAEN Qo Electronic Instrumentation Tools for Discovery Guide GD1935 CAENDigitizer User amp Reference Manual rev 5 08 May 2013 00117 10 DGT11 MUTX Copyright CAEN SpA All rights reserved Information in this publication supersedes all earlier versions Specifications subject to change without notice 101 UM1935 CAENDigitizer User amp Reference Manual
120. s ami o E ESID mace CAEN DGTZ DPP PHA Waveforms t typedef struct gulESZ ic Nap EE uint8 t anlgProbe udmtemtodgtErobel DEER o dgtProbe2 taimele Een race ik imei E Ube Vers Wines ce Spaces Ieper EE EE uinte t Dlrace4 CAEN DGTZ DPP PSD Waveforms t define CAEN DGTZ DPP CI Waveforms t CAEN DGTZ DPP PSD Waveforms t lt brief Waveform types for DPP CI and DPP PSD are the same hence this define Arguments handle Device handler The pointer to the waveform buffer which shall be of type ER CAEN_DGTZ_DPP_PHA_Waveforms_t for DPP PHA waveforms CAEN DGTZ DPP PSD Waveforms t for DPP PSD CAEN DGTZ DPP CI Waveforms t for DPP CI allocatedSize The size in bytes of the waveform buffer Return Values 0 Success negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 56 CAEN DI Electronic Instrumentation Description Deallocates the waveform buffer Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ FreeDPPWaveforms int handle void waveforms Arguments handle Device handler waveforms The pointer to the waveform buffer Return Values 0 Success negative numbers are error codes see Return Codes Description Decodes the waveforms contained inside an event Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ DecodeDPPWaveforms int handle void event void waveforms Argu
121. seAddress OxXXXXXXXX address of first board Params 1 VMEBaseAddress 0OxYYYYYYYY address of second board etc cet CAEN DGTZ OpenDigitizer Params b LinkType 0 0 Params b VMEBaseAddress amp handle b if ret printf Can t open digitizer n goto QuitProgram Once we have the handler to the digitizer we use it to call the other functions 5 ret CAEN DGTZ GetInfo handle b amp BoardInfo sb iae 2 printf Can t read board info n goto QuitProgram printf nConnected to CAEN Digitizer Model Sa recognized as board d n BoardInfo ModelName b printf ROC FPGA Release is s n BoardInfo ROC FirmwareRel printf AMC FPGA Release is s n BoardInfo AMC FirmwareRel Check firmware revision only DPP firmware can be used with this Demo sscanf BoardInfo AMC FirmwareRel sd amp MajorNumber if MajorNumber 131 amp amp MajorNumber 132 printf This digitizer has not a DPP PSD firmware n goto QuitProgram KKK KKK KKK KKK KKK KKK KKK KKK KK KK KKK KK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK Program the digitizer see function ProgramDigitizer Su KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK for b 0 b MAXNB b ret ProgramDigitizer handle b Params b DPPParams b if ret printf Failed to program the digitizer n goto QuitProgram WARNING The mal
122. see CAENDigitizer user manual chapter Trigger configuration for details ret CAEN DGTZ SetExtTriggerInputMode handle CAEN DGTZ TRGMODE ACQ ONLY Set the enabled channels ret CAEN DGTZ SetChannelEnableMask handle Params ChannelMask Set how many events to accumulate in the board memory before being available for readout ret CAEN DGTZ SetDPPEventAggregation handle Params EventAggr 0 Set the mode used to syncronize the acquisition between different boards In this example the sync is disabled ret CAEN DGTZ SetRunSynchronizationMode handle CAEN DGTZ RUN SYNC Disabled Set the DPP specific parameters for the channels in the given channelMask ret CAEN DGTZ SetDPPParameters handle Params ChannelMask amp DPPParams for i 0 i lt MaxNChannels i if Params ChannelMask amp 1 i Set the number of samples for each waveform you can set different RL for different channels ret CAEN DGTZ SetRecordLength handle Params RecordLength i Set a DC offset to the input signal to adapt it to digitizer s dynamic range ret CAEN DGTZ SetChannelDCOffset handle i 0x8000 Set the Pre Trigger size in samples Ret E EE EE nem Set the polarity for the given channel CAEN DGTZ PulsePolarityPositive or CAEN DGTZ PulsePolarityNegative ret CAEN DGTZ SetChannelPulsePolarity handle i Params PulsePolarity Set the virtual probes DPP PSD for x
123. t Signal SaveWaveform b ch 1 size WaveLine WaveLine Waveform gt Trace2 Second Trace if single trace mode it is a sequence of zeroes SaveWaveform b ch 2 size WaveLine DoSaveWave b ch 0 DigitalWaveLine Waveform gt DTracel First Digital Trace Trigger SaveDigitalProbe b ch 1 size DigitalWaveLine DoSaveWave b ch 0 DigitalWaveLine Waveform DTrace2 Second Digital Trace Gate SaveDigitalProbe b ch 2 size DigitalWaveLine DoSaveWave b ch 0 DigitalWaveLine Waveform gt DTrace3 Third Digital Trace DIGITALPROBE1 set with CAEN DGTZ SetDPP PSD VirtualProbe SaveDigitalProbe b ch 3 size DigitalWaveLine UM1935 CAENDigitizer User amp Reference Manual 82 83 CAEN DI Electronic Instrumentation DoSaveWave b ch 0 DigitalWaveLine Waveform gt DTrace4 Fourth Digital Trace DIGITALPROBE2 set with CAEN DGTZ SetDPP PSD VirtualProbe SaveDigitalProbe b ch 4 size DigitalWaveLine DoSaveWave b ch 0 printf Waveforms saved to Waveform board channel lt trace gt txt n loop to save waves loop on events loop on channels loop on boards End of readout loop QuitProgram stop the acquisition close the device and free the buffers for b 0 b lt MAXNB btt CAEN DGTZ SWStopAcquisition handle b CAEN DGTZ CloseDigitizer handle b for ch 0 ch MaxNChannels c
124. t64 t CurrentTime PrevRateTime ElapsedTime uint32 t NumEvents MaxNChannels CAEN DGTZ BoardInfo t BoardInfo memset DoSaveWave 0 MAXNB MaxNChannels sizeof int f r 1 0 i lt MAXNBITS 1 Ff BitMask 1 lt lt i Create a bit mask based on number of bits of the board KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Set Parameters Sy kkxkxkxkxkxkxkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkxkxkkkkkkkkkkkkkkkkxk memset amp Params 0 MAXNB sizeof DigitizerParams t memset amp DPPParams 0 MAXNB sizeof CAEN DGTZ DPP CI Params t for b 0 b MAXNB btt for ch 0 ch MaxNChannels ch EHisto b ch NULL set all histograms pointers to NULL we will allocate them later SEEK K KK KKK KK KKK KK k k k k k k KK KK KK Communication Parameters 5 NOE RK KR eK d Direct USB connection Params b LinkType CAEN DGTZ USB Link Type Params b VMEBaseAddress 0 For direct USB connection VMEBaseAddress must be 0 Direct optical connection Params b LinkType CAEN DGTZ PCI OpticalLink Link Type Params b VMEBaseAddress 0 For direct CONET connection VMEBaseAddress must be 0 UM1935 CAENDigitizer User amp Reference Manual 78 79 CAEN Electronic Instrumentation Optical connection to A2818 or A3818 and access to the board with VME bus Params b LinkType CAEN DGTZ PCI Optical
125. the optical link in one of the following ways e Direct connection to the optical link all models the digitizer sends the interrupt request on the optical link to the A2818 PCI or A3818 PCle connected to the PC and these in their turn assert the interrupt request on the PCI bus or PCle respectively In this case the interrupt request coming to the PC is uniquely associated with the digitizer which sent it e Connection via VME bus in this case the digitizer asserts the interrupt request on the VME bus on one of the 7 IRQ lines and this request is detected by the VME master V2718 which sends it via optical link to the PC in the same manner described above In this case since the lines IRQ 7 1 of the VME are shared with all modules on VME bus it is necessary to identify the module that sent the request as explained farther L Note interrupts cannot be used in case of communication via USB either directly or through V1718 and VME UM1935 CAENDigitizer User amp Reference Manual 14 15 CAEN DI Electronic Instrumentation Description Enable Disable the digitizer to generate an interrupt request when the memory contains at least Ne events ready for reading where Ne is the parameter event_number e Inthe case of VME models the IRQ level to be activated on VME bus can be set from 1 to 7 e inthe case of the optical link level should be 1 The status_id according to the specifications of the VME bus is the value re
126. tion Stopped for Board d n b AcqRun 0 if AcqRun Sleep 10 continue Calculate throughput and trigger rate every second Ett e EE AE s ElapsedTime CurrentTime PrevRateTime milliseconds if ElapsedTime gt 1000 system CLEARSCR PrintInterface printf Readout Rate 2f MB n float Nb float ElapsedTime 1048 576f for b 0 b lt MAXNB btt artati 4 aoard Sele Wo 19 e for i 0 i lt MaxNChannels i aie kee Crave Hol Tat IS printf tCh d tTrgRate 2f KHz tPileUpRate 2f n i float TrgCnt b i float ElapsedTime float PurCnt b i 100 float TrgCnt b i else joule Veen Gels Wege Decale as Deene Del Lat leg PurCnt b i 0 Nb 0 PrevRateTime CurrentTime Eeer Hain e Read data from the boards for b 0 b lt MAXNB b Read data from the board ret CAEN DGTZ ReadData handle b CAEN DGTZ SLAVE TERMINATED READOUT MBLT buffer amp BufferSize T ret T printf Readout Error Nn goto QuitProgram if BufferSize 0 continue Nb BufferSize ret DataConsistencyCheck uint32 t buffer BufferSize 4 ret CAEN DGTZ GetDPPEvents handle b buffer BufferSize Events NumEvents abe ae 2 ormone Ufer Biereg Glin idee B goto QuitProgram Analyze data for b 0 b lt MAXNB b printf d now d n b Params b ChannelMask for ch 0 ch lt MaxNChannels
127. to all cards Trigger Inputs which are programmed to enable only the Trigger Input to generate the acquisition Trigger Note in digitizer series X740 the auto trigger channel is divided into two levels each 8 channel group generates a A group local trigger given by the OR a of channel triggers enabled to generate them The group triggers in their turn may participate or not to generate the acquisition trigger and or trigger output Description This function sends a Software trigger to the Digitizer The SW trigger can be used to save an acquisition window on all channels at the same time and or to generate a pulse on the Trigger Output of the board according to the SW trigger mode set by the Set function of the Set GetSWTriggerMode Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SendSWtrigger int handle Arguments handle Device handler Return Values 0 Success Negative numbers are error codes see Return Codes Examples WAVEDUMP Code To be implemented UM1935 CAENDigitizer User amp Reference Manual 26 CAEN DI Electronic Instrumentation Description This function decides whether the trigger software should only be used to generate the acquisition trigger only to generate the trigger output or both Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetSWTriggerMode int handle CAEN DGTZ TriggerMode t mode CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetSWTriggerMode int hand
128. tronic Instrumentation Description This function decides whether the trigger of a channel should be used only to generate the acquisition trigger only to generate the trigger output or both For the x740 series use the Set GetGroupSelfTrigger function Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetChannelSelfTrigger int handle CAEN DGTZ TriggerMode t mode uint32 t channelmask CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ GetChannelSelfTrigger int handle uint32 t channel CAEN DGTZ TriggerMode t mode typedef enum 1 CAEN DGTZ TRGMODE DISABLED 0 CAEN DGTZ TRGMODE EXTOUT ONLY 2 CAEN DGTZ TRGMODE ACQ ONLY i CAEN DGTZ TRGMODE ACQ AND EXTOUT 3 CAEN DGTZ TriggerMode t Arguments handle Device handler Channel Self Trigger mode CAEN DGTZ TRGMODE DISABLED 0 mode CAEN_DGTZ_TRGMODE_EXTOUT_ONLY 2 CAEN_DGTZ_TRGMODE_ACQ_ONLY 1 CAEN_DGTZ_TRGMODE_ACQ_AND_EXTOUT 3 only for Set the function applies only to those channels that have the relevant bit in the channelmask mask equal to 1 channel only for Get channel for which the mode is get Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual 28 CAEN DI Electronic Instrumentation Description This function is valid only for the x740 series In fact in this type of digitizer the channels are grouped 8 by 8 The trigger properties are r
129. turned by the card during the interrupt acknowledge cycle and allows the operator to see which digitizer has asserted the interrupt request on the VME bus in the programming stage the user must set different status_id values for each digitizer In the case of the optical link the status_id is meaningless The mode parameter sets the interrupt release policy of the digitizer in particular Roak Release On Acknowledge mode foresees that the request is issued immediately after the interrupt acknowledge cycle IACK while in the case of Rora Release on Register Access mode the interrupt request is not released by the digitizer until the user accesses a particular registry to disable it in the case of the digitizer the release occurs by setting to zero the level in the VME Control register by calling the Set function of Set GetInterruptConfig with status disabled The methods Rora and Roak arising from the VME specifications are implemented also in the CONET protocol of the optical link with the exception that the Interrupt Acknowledge cycle with CONET is required only to release the interrupt and not to identify the device that has generated it since this information is already determined from the handle Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetInterruptConfig int handle CAEN DGTZ EnaDis t state wire 1 level bubs tee ridi uintl6 t event number CAEN DGTZ IRQMode t mode CAEN DGTZ ErrorCode CAENDGTZ API
130. ual CAEN DI Electronic Instrumentation x742 Offline data correction functions In the installation package of CAENDigitizer library additional functions are provided inside the Sample folder to let the user perform offline the correction of raw data acquired with x742 digitizers A Note The functions are not included in the CAENDigitizer run time library and are intended also for offline use Description Loads the correction table stored onto the board into a user defined structure Synopsis int32 t LoadCorrectionTables int handle DataCorrection t Table ULM i Groo UiInts2 t frequency typedef struct inele t cell MAX _X742_CHANNELS 1 1024 int8 t nsample MAX X742 CHANNELS 1 1024 float time 1024 uDataCorrectionWtr Arguments handle Device handle Table Pointer to the structure to be filled with the correction table values group Channel group frequency DSR4 sampling frequency Return Values 0 Success UM1935 CAENDigitizer User amp Reference Manual 50 CAEN DI Electronic Instrumentation Description Applies the desired correction data configured through a mask to the raw data acquired by the user Synopsis void ApplyDataCorrection DataCorrection t CTable CAEN DGTZ DRS4Frequency t frequency int CorrectionLevelMask CAEN DGTZ X742 GROUP t data typedef struct intl6 t cell MAX X742 CHANNELS 1 1024 int8 t nsample MAX X742 CHANNELS 1 1024 float time 102
131. ualProbe t mode CAEN DGTZ DPP PHA VirtualProbel t vpl CAEN DGTZ DPP PHA VirtualProbe2 t vp2 CAEN DGTZ DPP PHA DigitalProbe t dp i CAEN DGTZ ErrorCode CAENDGTZ APTI CAEN DGTZ GetDPP PHA VirtualProbe int handle CAEN DGTZ DPP VirtualProbe t mode CAEN DGTZ DPP PHA VirtualProbel t vpl CAEN DGTZ DPP PHA VirtualProbe2 t vp2 CAEN DGTZ DPP PHA DigitalProbe t dp i typedef enum CAEN DGTZ DPP VIRTUALPROBE SINGLE CAEN DGTZ DPP VIRTUALPROBE DUAL 1L I o CAEN DGTZ DPP VirtualProbe t typedef enum CAEN DGTZ DPP PHA VIRTUALPROBE1 Input CAEN DGTZ DPP PHA VIRTUALPROBE1 Delta CAEN DGTZ DPP PHA VIRTUALPROBE1 Delta2 CAEN DGTZ DPP PHA VIRTUALPROBE1 trapezoid CAEN DGTZ DEP PHA VirtualProbel t i qe em typedef enum CAEN DGTZ DPP PHA VIRTUALPROBE2 Input 0 CAEN DGTZ DPP PHA VIRTUALPROBE2 8S3 1 CAEN DGTZ DPP PHA VIRTUALPROBE2 DigitalCombo 2L CAEN DGTZ DPP PHA VIRTUALPROBE2 trapBaseline 3 CAEN DGTZ DPP PHA VIRTUALPROBE2 None 4 CAEN DGTZ DPP PHA VirtualProbe2 t typedef enum 1 CAEN DGTZ DPP PHA DIGITAL PROBE trgKln CAEN DGTZ DPP PHA DIGITAL PROBE Armed CAEN DGTZ DPP PHA DIGITAL PROBE PkRun CAEN DGTZ DPP PHA DIGITAL PROBE PkAbort CAEN DGTZ DPP PHA DIGITAL PROBE Peaking CAEN DGTZ DPP PHA DIGITAL PROBE PkHoldOff CAEN DGTZ DPP PHA DIGITAL PROBE Flat CAEN DGTZ DPP PHA DIGITAL PROBE trgHoldOff CAEN DGTZ DPP PHA DigitalProbe t ll Shon Or x Qe BO dI S
132. uint32 t channel CAEN DGTZ ThresholdWeight t weight int32 tt thresholdy int32 t nsamp i typedef enum CAEN DGTZ ZS FINE 0 CAEN DGTZ ZS COARSE 1 CAEN DGTZ ThresholdWeight t Arguments handle Device handler channel Channel to which the ZS settings are applied Use 1 for all channels Zero Suppression weight Used in Full Suppression based on the integral of the signal supported only by x724 series CAEN DGTZ ZS FINE 0 Fine threshold step the threshold is the threshold weight parameter CAEN DGTZ ZS COARSE 1 Coarse threshold step the threshold is threshold x 64 For Full Suppression based on the signal amplitude and Zero Length Encoding algorithms the value of weight doesn t affect the function working threshold Zero Suppression Threshold to be used depending on the ZS algorithm nsamp Number of samples to be used by the ZS algorithm Refer to the digitizer User Manual for definition and representation Return Values 0 Success Negative numbers are error codes see Return Codes UM1935 CAENDigitizer User amp Reference Manual CAEN DI Electronic Instrumentation Description Sets Gets the signal to output on the Analog Monitor Front Panel output in VME digitizers running standard firmware A Note the function is not supported by V1742 and digitizers running DPP firmware Synopsis CAEN DGTZ ErrorCode CAENDGTZ API CAEN DGTZ SetAnalogMonOutput int handle CAEN DGTZ
133. uitProgram KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Readout Loop SCH KEK KKK KKK KKK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK ko ko ko ko ko ko ko ko Clear Histograms and counters for b 0 b MAXNB b for ch 0 ch lt MaxNChannels ch Wheto lew wihrcsz mme Were leieren tbe sie ww 2 memset EHisto b ch 0 1 lt lt MAXNBITS sizeof uint32 t Hasg emt cT ECnt b ch 0 PrevTime b ch ire 0 ExtendedTT b h Us UM1935 CAENDigitizer User amp Reference Manual 80 CAEN DI Electronic Instrumentation PrevRateTime get_time AcqRun 0 PrintInterface printf Type a command while Quit Check keyboard if kbhit echarte c getch if c tgi Quit 1 aie te for b 0 b MAXNB b CAEN DGTZ SendSWtrigger handle b Send a software trigger to each board ie C in for b 0 b MAXNB b for ch 0 ch MaxNChannels ch LEI Beotio em Y 0 SaveHistogram Histo Ier elie EHistolb cn Save Histograms to file for each board if c w for b 0 b MAXNB b for ch 0 ch MaxNChannels ch DoSaveWave b ch 1 save waveforms to file for each channel for each board at next trigger if c r for b 0 b MAXNB b CAEN DGTZ SWStopAcquisition handle b printf Restarted Nn CAEN DGTZ ClearD
134. veWave MAXNB MaxNChannels int MajorNumber int BitMask 0 uint64 t CurrentTime PrevRateTime ElapsedTime uint32 t NumEvents MaxNChannels CAEN DGTZ BoardInfo t BoardInfo memset DoSaveWave 0 MAXNB MaxNChannels sizeof int for tel l t e FFF BitMask 1 i Create a bit mask based on number of bits of the board KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Set Parameters 4 Wes kkxkxkxkxkxkxkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkxkxkkkkkkkkkkkxkkkkkkkkkkkkkkkkkxk memset amp Params 0 MAXNB sizeof DigitizerParams t memset amp DPPParams 0 MAXNB sizeof CAEN DGTZ DPP PSD Params t for b 0 b lt MAXNB b for ch 0 ch lt MaxNChannels ch EHistoShort b ch NULL Set all histograms pointers to NULL we will allocate them later EHistoLong b ch NULL EHistoRatio b ch NULL RR K K K K KKK KKK KK KK KK KK KK KK KK KK Communication Parameters NOE ok ko ke koe ke ke kk eek ke ke ke eee ee d Direct USB connection Params b LinkType CAEN DGTZ USB Link Type Params b VMEBaseAddress 0 For direct USB connection VMEBaseAddress must be 0 Direct optical connection UM1935 CAENDigitizer User amp Reference Manual 86 87 CAEN DI Electronic Instrumentation Params b LinkType CAEN DGTZ PCI OpticalLink Link Type Params b VMEBaseAddress 0 For direct CONE
135. ware layers UM1935 CAENDigitizer User amp Reference Manual 6 CAEN DI Electronic Instrumentation System requirements amp installation setup OS version CAEN Library required Third party software required Py Ay 2000 XP Vista 7 n a Windows CAENComm CAENVMELib Linux kernel Rel 2 4 2 6 with gnu C C n a Linux E compiler Tab 1 Host PC requirements Follow the next steps for the installation of CAENDigitizer library e Goto CAEN web site in the Download area of CAENDigitizer page e Download the CAENDigitizer installation package related to your OS and unpack it e Click on the red link under the library links and download the CAEN required libraries Software Libranes Ay CAENDigitizer library 2 2 1 June 2012 XP Vista 7 32 64 bit C LABVIEW Library 10 69 MB Type zip L Release Notes 5 33 KB Type txt E D A H CAENDigitizer library requires additional Libraries CAENComm Library Library 8 67 MB Type zip iS CAENVMELib Library 13 54 MB Type zip ig e A CAENDigitizer library 2 2 1 June 2012 Kernel 2 4 Kernel 2 6 C LABVIEW Library 158 59 KB Type tgz D Release Notes 5 23 KB Type txt i5 AX tH CAENDigitizer library requires additional Libraries CAENComm library Library 21 64 KB Type toz E D CAENVMELib amp demo Library amp Demo 412 18 KB Type tgz Ce e Install the required libraries starting from CAENVMELib e For Windows users run the CAENDi
136. ze DigitalWaveLine DigitalWaveLine Waveform gt DTrace2 Second Digital Trace for DPP PHA it is ALWAYS Trigger SaveDigitalProbe b ch 2 size DigitalWaveLine DoSaveWave b ch 0 printf Waveforms saved to Waveform board channel lt trace gt txt n loop to save waves loop on events loop on channels loop on boards End of readout loop QuitProgram stop the acquisition close the device and free the buffers for b 0 b MAXNB BFI CAEN DGTZ SWStopAcquisition handle b CAEN DGTZ CloseDigitizer handle b for ch 0 abre ch lt MaxNChannels ch EHisto b ch NULL free EHisto b ch CAEN DGTZ FreeReadoutBuffer amp buffer CAEN DGTZ FreeDPPEvents handle 0 Events CAEN DGTZ FreeDPPWaveforms handle 0 Waveform return ret UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation DPP CI EXAMPLE CODE include lt CAENDigitizer h gt include lt stdio h gt include lt stdlib h gt define MANUAL BUFFER SETTING 0 The following define must be set to the actual number of connected boards define MAXNB il NB the following define MUST specify the ACTUAL max allowed number of board s channels it is needed for consistency inside the CAENDigitizer s functions used to allocate the memory define MaxNChannels 8 define MAXNBITS 12 include some useful functions from f
137. zer s initial configuration imne abs een Op Reset the digitizer ine NMDCIZNEe Ser melilte Nm af iret 4 printf ERROR can t reset the digitizer Nin UM1935 CAENDigitizer User amp Reference Manual CAEN Electronic Instrumentation reece cds Set the DPP acquisition mode This setting affects the modes Mixed and List see CAEN DGTZ DPP AcqMode t definition for details CAEN DGTZ DPP SAVE PARAM EnergyOnly Only energy DPP PHA or charge DPP PSD DPP CI v2 is returned CAEN DGTZ DPP SAVE PARAM TimeOnly Only time is returned CAEN DGTZ DPP SAVE PARAM EnergyAndTime Both energy charge and time are returned CAEN DGTZ DPP SAVE PARAM None No histogram data is returned ret CAEN DGTZ SetDPPAcquisitionMode handle Params AcqMode CAEN DGTZ DPP SAVE PARAM EnergyAndTime Set the digitizer acquisition mode CAEN DGTZ SW CONTROLLED or CAEN DGTZ S IN CONTROLLED ret CAEN DGTZ SetAcquisitionMode handle CAEN DGTZ SW CONTROLLED Set the I O level CAEN DGTZ IOLevel NIM or CAEN DGTZ IOLevel TTL ret CAEN DGTZ SetIOLevel handle Params IOlev Set the digitizer s behaviour when an external trigger arrives CAEN DGTZ TRGMODE DISABLED do nothing CAEN DGTZ TRGMODE EXTOUT ONLY generate the Trigger Output signal CAEN DGTZ TRGMODE ACQ ONLY generate acquisition trigger CAEN DGTZ TRGMODE ACQ AND EXTOUT generate both Trigger Output and acquisition trigger
138. zeroes SaveWaveform b ch 2 size WaveLine DoSaveWave b ch 0 DigitalWaveLine Waveform gt DTracel First Digital Trace Gate Short SaveDigitalProbe b ch 1 size DigitalWaveLine DoSaveWave b ch 0 DigitalWaveLine Waveform gt DTrace2 Second Digital Trace Gate Long SaveDigitalProbe b ch 2 size DigitalWaveLine DoSaveWave b ch 0 DigitalWaveLine Waveform gt DTrace3 Third Digital Trace DIGITALPROBE1 set with CAEN DGTZ SetDPP PSD VirtualProbe SaveDigitalProbe b ch 3 size DigitalWaveLine DoSaveWave b ch 0 DigitalWaveLine Waveform gt DTrace4 Fourth Digital Trace DIGITALPROBE2 set with CAEN DGTZ SetDPP PSD VirtualProbe SaveDigitalProbe b ch 4 size DigitalWaveLine DoSaveWave b ch 0 printf Waveforms saved to Waveform board channel lt trace gt txt n loop to save waves loop on events loop on channels loop on boards End of readout loop QuitProgram stop the acquisition close the device and free the buffers for b 0 b MAXNB btt CAEN DGTZ SWStopAcquisition handle b CAEN DGTZ CloseDigitizer handle b for ch 0 ch lt MaxNChannels ch free EHistoShort b ch free EHistoLong b ch free EHistoRatio b ch CAEN DGTZ FreeReadoutBuffer amp buffer CAEN DGTZ FreeDPPEvents handle 0 Events CAEN DGTZ FreeDPPWaveforms handle 0 Waveform r
Download Pdf Manuals
Related Search
Related Contents
Atmel AVR1925: XMEGA-C3 Xplained Hardware User's Guide Toshiba 2330C All in One Printer User Manual Monacor EDL-28W/WS 取扱説明書 Ver.1.3 Omega OMNCPCBR notebook cooling pad DeLOCK Bridge Board SATA > USB 2.0-B female Bouchon - r. stahl home KitchenAid KECM860T User's Manual Informations sur le MacBook Pro General Terms and Conditions of Use of Electronic Copyright © All rights reserved.
Failed to retrieve file