Project

General

Profile

DCOD system

Launching DCOD

  • Login as corto
  • Launch a terminal and type
$ start_corto
  • Then launch a web browser

Cleaning DCOD

  • In a terminal type
$ screen -r dcod_launch
  • Then do a Ctrl^C

The web interface

  • There are four button available
    • launch
    • start
    • stop
    • reset

Corto system

Controlling Wavecatcher

Each wavecatcher is controlled from a dedicated ENX server.
We have developped a ENX driver to provide card functionnality called wavecatcher.

During the setup step, each wavecatcher device load teh file called launch_CARD_NAME.enx.
To specify parameters for each cards, you can edit files in ~/config_enx.
The syntax of orders is the following :

COMMAND_NAME CARD_NAME parameters
The commands are the following :
  1. GetWaveCatDevices - Function_Not_Yet_Implemented
  2. OpenDevice
  3. OpenSelectedDevice
  4. CloseDevice
  5. WriteAccess - Function_Not_Yet_Implemented
  6. ReadAccess- Function_Not_Yet_Implemented
  7. ResetDevice
  8. SetDefaultParameters
  9. LoadCalibrationParametersFromEEPROM
  10. GetDeviceInfo
  11. SetChannelState
  12. GetChannelState
  13. SetTriggerMode
  14. GetTriggerMode
  15. SetTriggerSourceState
  16. GetTriggerSourceState
  17. SetExternalSignalNorm
  18. SetTriggerEdge
  19. GetTriggerEdge
  20. SetTriggerThreshold
  21. GetTriggerThreshold
  22. SetExternalSignalEdge
  23. GetExternalSignalEdge
  24. SetTriggerDelay - Function_Not_Yet_Implemented
  25. GetTriggerDelay - Function_Not_Yet_Implemented
  26. SetTriggerPrimitivesGateLength
  27. GetTriggerPrimitivesGateLength - Function_Not_Yet_Implemented
  28. SetTriggerPrimitivesPairedOption
  29. GetTriggerPrimitivesPairedOption
  30. SetTriggerPrimitivesOnExtTrigOutOption
  31. GetTriggerPrimitivesOnExtTrigOutOption
  32. SendSoftwareTrigger
  33. SetRecordingDepth - Function_Not_Yet_Implemented
  34. GetRecordingDepth - Function_Not_Yet_Implemented
  35. SetSamplingFrequency
  36. GetSamplingFrequency
  37. SetReadoutLatency - Function_Not_Yet_Implemented
  38. GetReadoutLatency - Function_Not_Yet_Implemented
  39. SetExternalClockOption
  40. GetExternalClockOption
  41. SetChannelDCOffset - Function_Not_Yet_Implemented
  42. GetChannelDCOffset - Function_Not_Yet_Implemented
  43. EnablePulsers
  44. DisablePulsers
  45. SetPulsePattern - Function_Not_Yet_Implemented
  46. GetPulsePattern - Function_Not_Yet_Implemented
  47. SetFirmwareMeasurementParameters - Function_Not_Yet_Implemented
  48. GetFirmwareMeasurementParameters - Function_Not_Yet_Implemented
  49. EnableRateCounters
  50. DisableRateCounters
  51. SetRateCounterCoincidenceMask - Function_Not_Yet_Implemented
  52. GetRateCounterCoincidenceMask - Function_Not_Yet_Implemented
  53. StartRateCounters - Function_Not_Yet_Implemented
  54. ReadRateCounters - Function_Not_Yet_Implemented
  55. EnableRateCounterVeto
  56. DisableRateCounterVeto
  57. SetRateCounterVetoLength - Function_Not_Yet_Implemented
  58. GetRateCounterVetoLength - Function_Not_Yet_Implemented
  59. SetCorrectionMode - Function_Not_Yet_Implemented
  60. GetCorrectionMode - Function_Not_Yet_Implemented
  61. AllocateEventStructure - Function_Not_Yet_Implemented
  62. StartRun
  63. PrepareEvent
  64. ReadEventBuffer
  65. DecodeEvent - Function_Not_Yet_Implemented
  66. StopRun
  67. FreeEventStructure - Function_Not_Yet_Implemented
  68. Init_Acq
  69. Close_Acq
  70. Start_Acq
  71. Stop_Acq
  72. Set_Buffer_Name
  73. Get_Line

An additional ENX server is needed to present a unique entry point to control all Wavecatchers.
To coordinate all WaveCatchers cards, we have develop a specific ENX driver called : corto.

Configuration files for WaveCatchers

Configurations files are in /home/corto/config_enx/
launch_1.1_A.enx, launch_1.2_A.enx, launch_1.3_A.enx and launch_1.7_A.enx

Example of a configuration file for a wavecatcher:

#!log_level debug
SetExternalClockOption wavecatcher_1.1_A WAVECAT64CH_STATE_ON
SetTriggerSourceState wavecatcher_1.1_A WAVECAT64CH_FRONT_CHANNEL ALL WAVECAT64CH_STATE_ON
SetTriggerMode wavecatcher_1.1_A external
SetTriggerPrimitivesPairedOption wavecatcher_1.1_A WAVECAT64CH_STATE_ON
SetExternalSignalNorm wavecatcher_1.1_A WAVECAT64CH_EXT_TRIG WAVECAT64CH_LVTTL
SetExternalSignalNorm wavecatcher_1.1_A WAVECAT64CH_EXT_SYNC WAVECAT64CH_LVTTL
SetTriggerPrimitivesOnExtTrigOutOption wavecatcher_1.1_A WAVECAT64CH_STATE_ON
SetTriggerPrimitivesGateLength wavecatcher_1.1_A 70
SetTriggerThreshold wavecatcher_1.1_A WAVECAT64CH_FRONT_CHANNEL ALL 0.02

For SetTriggerSourceState and SetTriggerThreshold function you can use the chan 'ALL' to configure all channels with only one command.

SetTriggerThreshold wavecatcher_1.1_A WAVECAT64CH_FRONT_CHANNEL ALL 0.4
SetTriggerThreshold wavecatcher_1.1_A WAVECAT64CH_FRONT_CHANNEL 13 0.6

Controlling Trigger

The trigger card control is done inside the ENX driver corto.

CORTO data format

The data format is based on MultiFrame Metaformat (MFM) specifications

Each CORTO event (max 599_200 bytes) is composed by one MFM header (16 bytes) followed by 3 wavecatcher events (3* max 199_728 bytes, one by wavecatcher card). max => full wavecatcher event (not incomplete event)

CORTO Event Type byte 1 byte 2 byte 3 byte 4 byte 5 byte 6 byte 7 byte 8 byte 9 byte 10 byte 11 byte 12 byte 13 byte 14 byte 15 byte 16
1 * MFM Header
16 bytes
metaType frameSize dataSource frameType
(0x53)
revision headerSize itemSize nItems
(in this case value is 3)
1 * Wave Catcher Event Card #1 199_728 bytes see next table...
1 * Wave Catcher Event Card #2 199_728 bytes see next table...
1 * Wave Catcher Event Card #3 199_728 bytes see next table...

if 4 wavecatchers are used you got :

CORTO Event Type byte 1 byte 2 byte 3 byte 4 byte 5 byte 6 byte 7 byte 8 byte 9 byte 10 byte 11 byte 12 byte 13 byte 14 byte 15 byte 16
1 * MFM Header
16 bytes
metaType frameSize dataSource frameType
(0x53)
revision headerSize itemSize nItems
(in this case value is 4)
1 * Wave Catcher Event Card #1 199_728 bytes see next table...
1 * Wave Catcher Event Card #2 199_728 bytes see next table...
1 * Wave Catcher Event Card #3 199_728 bytes see next table...
1 * Wave Catcher Event Card #3 199_728 bytes see next table...

A wavecatcher event (199_728 bytes) start with an other MFM header followed by an event header and after "number of channels" blocks composed by one channel header and one trace.
Frame type is 0x50 in case of full event, 0x51 in case of incomplete event and 0x52 if the event is created to replace a missing event (0 waveforms...).
If incomplete event then there is less nitems than in full case ! It can be 0!!!

WaveCatcher event Type byte 1 byte 2 byte 3 byte 4 byte 5 byte 6 byte 7 byte 8 byte 9 byte 10 byte 11 byte 12 byte 13 byte 14 byte 15 byte 16
1 * MFM Header
16 bytes
metaType frameSize dataSource frameType
(0x50 or 0x51 or 0x52)
revision headerSize itemSize nItems
1 * Event Header
32 bytes
EventID SamplingFreq (since 26 fev 2016) TDC
Unix_Time NbOfSAMBlocksInEvent ControllerBoardSerialNumber (since 12 fev 2016)
nItems * Channel Header
64 bytes
ChannelType Channel TrigCount TimeCount
WaveformDataSize NotUsed_4 NotUsed_5
Baseline Peak PeakCell Charge
CFDRisingEdgeTime CFDFallingEdgeTime FCR NotUsed_6
Wave Form
1024 * 4 bytes
first point second point third point fourth point
fifth point ... ... ...
... ... ... ...
... ... ... ...
typedef struct{
    int                    EventID;
    int                    SamplingFreq;  //since 26 fev 2016
    unsigned long long     TDC;
    long                   Unix_Time; //64bits
    int                    NbOfSAMBlocksInEvent; // 2 channels per SAMBlock
    int                    ControllerBoardSerialNumber; // since 12 fev 2016
} WAVECAT64CH_EventStruct;

typedef struct{
    WAVECAT64CH_ChannelType ChannelType;
    int                     Channel;
    int                     TrigCount;
    int                     TimeCount;
    int                     WaveformDataSize; // In samples
    int                     NotUsed_4;
    float                   *NotUsed_5; //64bits pointer
    float                   Baseline;
    float                   Peak;     // In ADC Counts
    int                     PeakCell;
    float                   Charge;
    float                   CFDRisingEdgeTime;
    float                   CFDFallingEdgeTime;
    int                     FCR;
    int                     NotUsed_6;
} WAVECAT64CH_ChannelDataStruct;

Troubleshooting

  • Check the network
$ /sbin/ifconfig