- Table of contents
- DCOD system
- Corto system
- CORTO data format
- Troubleshooting
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 parametersThe commands are the following :
- GetWaveCatDevices - Function_Not_Yet_Implemented
- OpenDevice
- OpenSelectedDevice
- CloseDevice
- WriteAccess - Function_Not_Yet_Implemented
- ReadAccess- Function_Not_Yet_Implemented
- ResetDevice
- SetDefaultParameters
- LoadCalibrationParametersFromEEPROM
- GetDeviceInfo
- SetChannelState
- GetChannelState
- SetTriggerMode
- GetTriggerMode
- SetTriggerSourceState
- GetTriggerSourceState
- SetExternalSignalNorm
- SetTriggerEdge
- GetTriggerEdge
- SetTriggerThreshold
- GetTriggerThreshold
- SetExternalSignalEdge
- GetExternalSignalEdge
- SetTriggerDelay - Function_Not_Yet_Implemented
- GetTriggerDelay - Function_Not_Yet_Implemented
- SetTriggerPrimitivesGateLength
- GetTriggerPrimitivesGateLength - Function_Not_Yet_Implemented
- SetTriggerPrimitivesPairedOption
- GetTriggerPrimitivesPairedOption
- SetTriggerPrimitivesOnExtTrigOutOption
- GetTriggerPrimitivesOnExtTrigOutOption
- SendSoftwareTrigger
- SetRecordingDepth - Function_Not_Yet_Implemented
- GetRecordingDepth - Function_Not_Yet_Implemented
- SetSamplingFrequency
- GetSamplingFrequency
- SetReadoutLatency - Function_Not_Yet_Implemented
- GetReadoutLatency - Function_Not_Yet_Implemented
- SetExternalClockOption
- GetExternalClockOption
- SetChannelDCOffset - Function_Not_Yet_Implemented
- GetChannelDCOffset - Function_Not_Yet_Implemented
- EnablePulsers
- DisablePulsers
- SetPulsePattern - Function_Not_Yet_Implemented
- GetPulsePattern - Function_Not_Yet_Implemented
- SetFirmwareMeasurementParameters - Function_Not_Yet_Implemented
- GetFirmwareMeasurementParameters - Function_Not_Yet_Implemented
- EnableRateCounters
- DisableRateCounters
- SetRateCounterCoincidenceMask - Function_Not_Yet_Implemented
- GetRateCounterCoincidenceMask - Function_Not_Yet_Implemented
- StartRateCounters - Function_Not_Yet_Implemented
- ReadRateCounters - Function_Not_Yet_Implemented
- EnableRateCounterVeto
- DisableRateCounterVeto
- SetRateCounterVetoLength - Function_Not_Yet_Implemented
- GetRateCounterVetoLength - Function_Not_Yet_Implemented
- SetCorrectionMode - Function_Not_Yet_Implemented
- GetCorrectionMode - Function_Not_Yet_Implemented
- AllocateEventStructure - Function_Not_Yet_Implemented
- StartRun
- PrepareEvent
- ReadEventBuffer
- DecodeEvent - Function_Not_Yet_Implemented
- StopRun
- FreeEventStructure - Function_Not_Yet_Implemented
- Init_Acq
- Close_Acq
- Start_Acq
- Stop_Acq
- Set_Buffer_Name
- 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