From e7a8c606169a260b6efff34f70b19d3c191a0f41 Mon Sep 17 00:00:00 2001 From: Simon Ebner Date: Wed, 16 Oct 2013 09:34:04 +0200 Subject: [PATCH] Update readme --- ch.psi.cdump/Readme.md | 137 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/ch.psi.cdump/Readme.md b/ch.psi.cdump/Readme.md index e69de29..a9f0850 100644 --- a/ch.psi.cdump/Readme.md +++ b/ch.psi.cdump/Readme.md @@ -0,0 +1,137 @@ +# Overview +Cdump enables users to record data via an ADC in a continuous way. Cdump requires a special IOC based configuration. + +# Installation +## IOC +There need to be a special IOC based installation/configuration for Cdump. +_The number of channels that the logic will read out is fixed in through the configuration in the substitution file. +Depending on the number of configured channels and the update rate chosen, this logic might bring a lot of load to +the IOC once it is started! Always monitor the IOC load while running a "scan". Also, only configure as many channels +as really needed for an experiment!_ + +Template (adcRT.template): +``` +record(waveform,"$(SYSTEM):convWf$(CARD)-0") { + field(DTYP,"Adc8401Rt") + field(INP, "#C$(SLOT) S0 @$(CARD)") + field(NELM,"327680") # Include first 5 channels (5*65536) in the waveform + field(FTVL,"USHORT") + field(SCAN,"I/O Intr") +} + +record(bo,"$(SYSTEM):SWTRIG$(CARD)") { + field(DESC,"soft trig") + field(DTYP,"Adc8401Rt") + field(OUT, "#C$(SLOT) S @$(CARD)ST") + field(SCAN,"Passive") + field(ONAM,"GO") + field(ZNAM,"READY") +} + +record(bo,"$(SYSTEM):ARMadc$(CARD)") { + field(DESC,"arm adc") + field(DTYP,"Adc8401Rt") + field(OUT, "#C$(SLOT) S @$(CARD)AR") + field(SCAN,"Passive") + field(ONAM,"GO") + field(ZNAM,"READY") +} + +# Record to set clock frequency of the ADC card - i.e. sampling rate +record(ao,"$(SYSTEM):CLOCK-SET$(CARD)") { + field(DESC,"sampling clock") + field(DTYP,"Adc8401Rt") + field(HOPR,"15") + field(LOPR,"0") + field(OUT, "#C$(SLOT) S @$(CARD)CK") + field(VAL,"13") + field(PINI,"YES") +} + +# Easy to use record to set clock frequency of the ADC card +record (mbbo,"$(SYSTEM):CLOCK-FREQ$(CARD)") +{ + field (DESC,"Sampling clock freq.") + field (DTYP,"Soft Channel") + field (NOBT,"4") + field (OUT,"$(SYSTEM):CLOCK-SET$(CARD) PP") + field (ZRVL,"1") + field (ZRST,"1 Hz") + field (ONVL,"2") + field (ONST,"2 Hz") + field (TWVL,"5") + field (TWST,"5 Hz") + field (THVL,"10") + field (THST,"10 Hz") + field (FRVL,"20") + field (FRST,"20 Hz") + field (FVVL,"50") + field (FVST,"50 Hz") + field (SXVL,"100") + field (SXST,"100 Hz") + field (SVVL,"200") + field (SVST,"200 Hz") + field (EIVL,"500") + field (EIST,"500 Hz") + field (NIVL,"1000") + field (NIST,"1 kHz") + field (TEVL,"2000") + field (TEST,"2 kHz") + field (ELVL,"5000") + field (ELST,"5 kHz") + field (TVVL,"10000") + field (TVST,"10 kHz") + field (TTVL,"20000") + field (TTST,"20 kHz") + field (FTVL,"50000") + field (FTST,"50 kHz") + field (FFVL,"100000") + field (FFST,"100 kHz") + field (PINI,"YES") +} +``` + + +Substitution File (adc.subs) +``` +file adcRT_continuous.template +{ pattern + { SYSTEM, SLOT, CARD} + { "X10DA-ES1-DMA", "6", "2"} # SLOT is VME slot = 1,2,3,4... CARD is A,B,C,D position on the IP carrier +} +``` + +Startup Script +``` +require "ADC8401RT", "test" + +#vicb8002* configCarrier8004( +# int vmeSlot, /* = carrierCardNumber */ +# unsigned long memBaseAddr, +# unsigned short intrLevel) + +#adc8401rt* addADC8401RTipac( +# unsigned short ipacArea, /* A=0, B=1, C=2, D=3 as after @ of INP/OUT field */ +# int vmeSlot, +# int intrVector, /* interrupt vector */ +# unsigned short trigMode, /* 0 = free-running, 1 = triggered */ +# unsigned short clkSrc, /* 0 = internal, 1 = external */ +# unsigned short clockRate, /* +# 0 = 1Hz, 1 = 2Hz +# 2 = 5Hz, 3 = 10Hz +# 4 = 20Hz, 5 = 50Hz +# 6 = 100Hz, 7 = 200Hz +# 8 = 500Hz, 9 = 1000Hz +# 10 = 2000Hz, 11 = 5000Hz +# 12 = 10000Hz, 13 = 20000Hz +# 14 = 50000Hz, 15 = 100000Hz */ +# unsigned short samples) /* number of samples for single-shot + NOTE: if continuous --> samples=64K --> 65536 */ + +# 8404 carrier board (with DMA) at VME slot #6 +configCarrier8004(6, 0x01800000, 4) + +# ADC at carrier pos. C (2) at VME slot #6 +# Configure for continuous waveform 64k bins +addADC8401RTipac(2, 6, 0xc2, 0, 0, 13, 65536) +```