Files
ch.psi.fda.cdump/ch.psi.fda.cdump
2013-12-18 12:43:02 +01:00
..
2013-12-18 12:43:02 +01:00
2013-12-18 12:43:02 +01:00
2013-12-18 12:43:02 +01:00
2013-12-18 12:43:02 +01:00
2013-12-18 12:43:02 +01:00
2013-12-18 12:43:02 +01:00
2013-12-18 12:43:02 +01:00

Overview

Cdump enables users to record data via an ADC in a continuous way. Cdump requires a special IOC based configuration.

Usage

To start the cdump client use the provided bin/cdump executable.

Usage:

bin/cdump
Usage: cdump <samplingRate> <datafilename>
Supported rates: 1Hz 2Hz 5Hz 10Hz 20Hz 50Hz 100Hz 200Hz 500Hz 1kHz 2kHz 5kHz 10kHz 20kHz 50kHz 100kHz

Installation

Client

Cdump is provided as a single zip file. To install extract the file at any location on your file system. The zip will include a bin and lib directory holding the executable and required libraries.

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)

Development

To build and package the cdump code use mvn clean compile assembly:assembly . This will generate a all in one zip file in the /target directory.