23.11.2012 Views

The FEE Server Control Engine of the ALICE-TRD - Westfälische ...

The FEE Server Control Engine of the ALICE-TRD - Westfälische ...

The FEE Server Control Engine of the ALICE-TRD - Westfälische ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Fee<strong>Server</strong> Core<br />

creates an instance <strong>of</strong><br />

calls in a separate thread<br />

5 <strong>The</strong> <strong>FEE</strong><strong>Server</strong> <strong>Control</strong> <strong>Engine</strong><br />

CEStateMachine<br />

calls its contructor<br />

constructor main tasks:<br />

− register DIM channels<br />

− initialize <strong>the</strong> logging system<br />

− sets <strong>the</strong> FSM state to STANDBY<br />

CEStatemachine::loopFunction()<br />

− contains an infinite loop<br />

− task: sensor monitoring<br />

Figure 5.2: <strong>Control</strong> flow during <strong>the</strong> initialisation <strong>of</strong> <strong>the</strong> control engine. <strong>The</strong> control flow is symbolized<br />

by <strong>the</strong> solid lines. <strong>The</strong> dashed line is for illustration purpose only.<br />

Second, <strong>the</strong> constructor initializes <strong>the</strong> logging system (for details see section 5.5). Third,<br />

it initializes <strong>the</strong> FSM and sets <strong>the</strong> state <strong>of</strong> <strong>the</strong> FSM to STDBY.<br />

When <strong>the</strong> control engine is initialized, <strong>the</strong> <strong>FEE</strong><strong>Server</strong> core creates a separate thread<br />

and calls <strong>the</strong> function int CEStateMachine::loopFunction(void). This function contains an<br />

infinite loop. <strong>The</strong> function reads <strong>the</strong> DCS board temperature sensor and <strong>the</strong> voltage sensors<br />

by calling float voltage_sensor::read_voltage(int) and float temp_sensor::read_temp(int)<br />

(see section 5.2.4) and updates <strong>the</strong> corresponding DIM data channels in regular intervals.<br />

If <strong>the</strong> MCMs are switched on later and <strong>the</strong> MCM temperature monitoring is activated<br />

this function triggers <strong>the</strong> regular readout <strong>of</strong> <strong>the</strong> MCM temperature sensors, too. After <strong>the</strong><br />

initialization is finished <strong>the</strong> system waits for incoming commands from <strong>the</strong> ICL.<br />

5.2.2 <strong>The</strong> Finite State Machine<br />

Figure 5.3 shows <strong>the</strong> state diagram <strong>of</strong> <strong>the</strong> <strong>TRD</strong> frontend readout electronics. <strong>The</strong> finite<br />

state machine (FSM) <strong>of</strong> <strong>the</strong> control engine implements all <strong>the</strong>se states execpt <strong>the</strong> states<br />

OFF and READY.<br />

Description <strong>of</strong> <strong>the</strong> finite state machine states<br />

In state OFF <strong>the</strong> supermodules have no power. <strong>The</strong> DCS boards are <strong>of</strong>f and <strong>the</strong> <strong>FEE</strong><strong>Server</strong><br />

with <strong>the</strong> control engine is not running. <strong>The</strong>refore OFF cannot be reached by <strong>the</strong> control<br />

engine itself.<br />

When <strong>the</strong> DCS board is powered up, <strong>the</strong> <strong>FEE</strong><strong>Server</strong> starts. <strong>The</strong> control engine is initialized<br />

and <strong>the</strong> FSM has <strong>the</strong> state STDBY. In this state only <strong>the</strong> DCS boards have power. All<br />

o<strong>the</strong>r parts <strong>of</strong> <strong>the</strong> chamber electronics including <strong>the</strong> MCMs and ORIs are still switched<br />

<strong>of</strong>f. Since <strong>the</strong> DCS board has power, <strong>the</strong> sensors on <strong>the</strong> DCS board are already active and<br />

52

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!