Control and Readout Software for GCT Camera

GCT Camera Control
and Readout
Andrea De Franco
University of Oxford
For the GCT
Andrea De Franco
University of Oxford
GCT Camera Software
Online
- Fast
- Low dead time
- Highly reliable Slow
control
Offline
- Flexible
- Easy
Andrea De Franco
University of Oxford
2 independent processes
for
Slow control and Readout
Analysis chain with
reusable basic blocks
CTA Consortium meeting
Turku May 2015
Language & external libraries
Language:
Target Platform : Scientific Linux 6.5
Compiler: gcc 4.9.2
FSM, Utilities:
BOOST 1.57.0
Socket:
ZeroMQ 4.0.5
Message serialisation:
Google Protobuf 2.6.0
Offline analysis
ROOT 6.02.04
Andrea De Franco
University of Oxford
CTA Consortium meeting
Turku May 2015
Online
Andrea De Franco
University of Oxford
CTA Consortium meeting
Turku May 2015
Camera Server - Readout
TARGET x 32
UDP Data
Events
- From TARGET (via DACQ):
RAW data
- From DACQ Board:
Event number +
Timestamp
-
-
Builds events and save on
a fits file
(Convert RAW to common
ACTL data format)
Andrea De Franco
University of Oxford
DACQ x 2
UDP Data + Timestamp
Events
Camera
Server
FITS
file
CTA Consortium meeting
Turku May 2015
Camera Server – Controller
- Google Protobuf message
via ZMQ sockets
- From Camera Controller:
Start New Run signal Run
Header
- To Camera Controller:
Server Heartbeat as a
slow control information
Andrea De Franco
University of Oxford
Camera
Controller
ZMQ Protobuf
New Run - Header
Camera
Server
ZMQ Protobuf
Heartbeat
Log
CTA Consortium meeting
Turku May 2015
Camera Controller – Hardware
Chiller
Peripherals
SPI
Backplane
TARGET x 32
PSU
TCP/IP
Slow Control
UDP
Slow Control
TCP/IP
Slow Control
- Send slow control signal to
all the hardware in the
camera, has to deal with
different communication
protocol
Andrea De Franco
University of Oxford
SPI
DACQ x 2
ZMQ Protobuf
Slow Control
Camera
Controller
CTA Consortium meeting
Turku May 2015
Camera Controller
Finite State
Machine
Implemented with Boost Statechart
Robust
Scalable
Camera
Controller
Slow Control
Monitoring
Andrea De Franco
University of Oxford
Customizable
Robust
Able to react
CTA Consortium meeting
Turku May 2015
Slow Control Monitor
- Keep reading interesting Slow Control values defined in configuration files
- Save to binary file read values for offline analysis (Protobuf)
- If needed react to abnormal values
Configuration
Hardware
Read Slow Control
Reaction (if needed)
Camera
Controller
Parameter to be
Monitored,
Reactions
Log
Andrea De Franco
University of Oxford
Slow Control info
Protobuf binary
CTA Consortium meeting
Turku May 2015
Monitor – Protobuf Message
TM TM_ASIC_0_Temperature
TM TM_ASIC_0_Temperature
ANY 2 >
ANY 2 >
75 WARNING
100 ERROR
DECREASE_TEMP
GO_TO_SAFE
PB PB_FAN_PWM_0
PB PB_TEMPERATURE_PCT2075
RUN 3 N
RUN 3 >
0
60
NONE
DECREASE_TEMP
Configuration
INFO
WARNING
Hardware
Read Slow Control
Reaction (if needed)
Camera
Controller
Parameter to be
Monitored,
Reactions
Log
Andrea De Franco
University of Oxford
Slow Control info
Protobuf binary
CTA Consortium meeting
Turku May 2015
Monitor – Protobuf Message
TM TM_ASIC_0_Temperature
TM TM_ASIC_0_Temperature
ANY 2 >
ANY 2 >
75 WARNING
100 ERROR
DECREASE_TEMP
GO_TO_SAFE
PB PB_FAN_PWM_0
PB PB_TEMPERATURE_PCT2075
RUN 3 N
RUN 3 >
0
60
NONE
DECREASE_TEMP
Configuration
INFO
WARNING
Hardware
Read Slow Control
Reaction (if needed)
Camera
Controller
Parameter to be
Monitored,
Reactions
Log
Andrea De Franco
University of Oxford
Slow Control info
Protobuf binary
CTA Consortium meeting
Turku May 2015
Monitor – Logging & Save data
TM TM_ASIC_0_Temperature
TM TM_ASIC_0_Temperature
ANY 2 >
ANY 2 >
75 WARNING
100 ERROR
DECREASE_TEMP
GO_TO_SAFE
PB PB_FAN_PWM_0
PB PB_TEMPERATURE_PCT2075
RUN 3 N
RUN 3 >
0
60
NONE
DECREASE_TEMP
INFO
WARNING
Ex. Measured Value 87
Configuration
Hardware
Read Slow Control
Reaction (if needed)
Camera
Controller
Parameter to be
Monitored,
Reactions
Log
Andrea De Franco
University of Oxford
Slow Control info
Protobuf binary
CTA Consortium meeting
Turku May 2015
Slow Control Monitor – Reaction
TM TM_ASIC_0_Temperature
TM TM_ASIC_0_Temperature
ANY 2 >
ANY 2 >
75 WARNING
100 ERROR
DECREASE_TEMP
GO_TO_SAFE
PB PB_FAN_PWM_0
PB PB_TEMPERATURE_PCT2075
RUN 3 N
RUN 3 >
0
60
NONE
DECREASE_TEMP
INFO
WARNING
Ex. Measured Value 87
Configuration
Hardware
Read Slow Control
Reaction (if needed)
Camera
Controller
Parameter to be
Monitored,
Reactions
Log
Andrea De Franco
University of Oxford
Slow Control info
Protobuf binary
CTA Consortium meeting
Turku May 2015
Offline
Data (Fits)
Run 1
Slow Control
(protobuf)
Data (Fits)
Run 2
Slow Control
(protobuf)
Analysis Chain
Data (Fits)
Run n
Remember Jon’s Talks??
Slow Control
(protobuf)
Andrea De Franco
University of Oxford
CTA Consortium meeting
Turku May 2015
Offline Analysis Chain
Link 1
Link 2
Analysis Chain
Link 3
•
•
•
•
•
AnalysisBegin()
RunBegin()
Event()
RunEnd()
AnalysisEnd()
Return {Failure, Success, Stop}
Link 4
Link n
Andrea De Franco
University of Oxford
CTA Consortium meeting
Turku May 2015
Offline Analysis Chain
Signals
Analysis
Begin
Run 1,2,…,n
Begin
Event
1,2,…,n
Run 1,2,…,n Analysis
End
End
Link 1
Link1::AnalysisBegin(){
Open Calibration File;
Return Success;
}
Link1::RunBegin(){
If(Open Run File)
Return Success;
Return Stop;
}
Link1::Event(){
Correct Pedestal;
Return Success;
}
Link1::RunEnd(){
Close(Run File);
Return Success;
}
Link 2
Link2::AnalysisBegin(){
Allocate memory;
Return Success;
}
Link2::RunBegin(){ Link2::Event(){
Integrate charge;
Return Success;
Return Success;
}
}
Link2::RunEnd(){
Return Success;
}
Link 3
Link3::AnalysisBegin(){ Link3::RunBegin(){
Return Success;
Return Success;
Open Canvas;
}
}
Andrea De Franco
University of Oxford
Link3::Event(){
Plot Waveform;
Return Success}
Link3::RunEnd(){
Return Success}
CTA Consortium meeting
Turku May 2015
Camera commissioning
Commissioning undergoing in
the lab in UK at the moment.
Many small quick partial redesign and
addition to catch up with the fast changing
needs for commissioning diagnostic tools
A consistent part of the work involved in
testing and commissioning.
Keeping in mind this effort is prototyping
oriented. Towards ACTL soon…
Andrea De Franco
University of Oxford
CTA Consortium meeting
Turku May 2015
Thank you !!
Andrea De Franco
University of Oxford
For the GCT
Andrea De Franco
University of Oxford
Any question??