PRELIMINARY
Document type: Title: Revision date: Revision:
User's Manual (MUT) Mod. V1729 4 Channel 12 Bit Sampling ADC 22/06/2005 3
NPO: Filename: Number of pages: Page:
00109/04:V1729.MUTx/03 V1729_REV3.DOC 38 19
StartAcq();
Wait();
GetVernier(vernier);
//fwrite(vernier,sizeof(vernier),1,Fvernier);
for (i=0;i<V1729_VERNIER_DEPH;i++){
sprintf(s,"%d\n",vernier[i]);
fwrite(s,1,strlen(s),Fvernier);}
printf("Vernier results saved\n");
}
void TCAENADC::GetVernier(unsigned short *vernier)
{
printf("TCAENADC::GetVernier()\n");
unsigned short buffer[V1729_VERNIER_DEPH];
int readed;
vme_adr = CAENBASEADDRESS + V1729_RAM_DATA_VME;
CAENVME_SetFIFOMode(Crate,1);
if (CAENVME_BLTReadCycle(Crate, vme_adr , (unsigned char*) buffer,
V1729_VERNIER_DEPH*2,cvA32_U_BLT,cvD32 , &readed )!= cvSuccess)
printf("TCAENADC::GetVernier() - Errore di Accesso\n");
CAENVME_SetFIFOMode(Crate,0);
for (int j = 0; j < V1729_VERNIER_DEPH; j++) vernier[j] = buffer[j] & 0xFFFF;
}
The RAM (buffer[i]) is then filled with 65536 vernier values corresponding to 16384
random triggers. For each trigger one finds only 4 values, arranged in the following
order :
Channel 3 vernier, channel 2 vernier, channel 1 vernier, channel 0 vernier.
It is then necessary to rearrange the buffer in order to obtain 4 arrays (one per channel)
of 16384 samples each.
With such settings we send on each channel a slope signal with 1/Fp duration in such a
way that, if we make an histogram of the channel data, we obtain a “square” signal,
whose edeges correspond (in time) to the Fp ramp-up fronts. The leftmost value
correspond to MINVER, the rightmost to MAXVER.
The result is similiar to a differential non linearity measure and is used in the calibration
in order to weigh the Venier single datum obatined during acquisition; this allows to
measure on which percentage of the clock period the time correction must be performed.
At the end of this calibration, an interruption is generated in order to permit the user to
launch a reading. This reading can be realized in block mode, which permits realization
of the calibration of the vernier in less than one second.
One must note that for this particular method of calibration, the distributions obtained are
not necessarily uniform. Nevertheless, the MAXVER and MINVER boundaries are
extremely well-defined and therefore perfectly exploitable for corrections.
Our experience showed us that this calibration remains valid several weeks, even
several months.