Index: trunk/FACT++/src/EventBuilder.cc
===================================================================
--- trunk/FACT++/src/EventBuilder.cc	(revision 16618)
+++ trunk/FACT++/src/EventBuilder.cc	(revision 16619)
@@ -74,4 +74,6 @@
 
 size_t g_maxMem;                //maximum memory allowed for buffer
+
+uint16_t g_evtTimeout;           // timeout (sec) for one event
 
 FACT_SOCK g_port[NBOARDS];      // .addr=string of IP-addr in dotted-decimal "ddd.ddd.ddd.ddd"
@@ -1365,5 +1367,5 @@
             // The first event is the oldest. If the first event within the
             // timeout window was received, we can stop searchinf further.
-            if (evt->time.tv_sec>=actTime - 30)
+            if (evt->time.tv_sec+g_evtTimeout>=actTime)
                 break;
 
Index: trunk/FACT++/src/EventBuilder.h
===================================================================
--- trunk/FACT++/src/EventBuilder.h	(revision 16618)
+++ trunk/FACT++/src/EventBuilder.h	(revision 16619)
@@ -19,4 +19,5 @@
 extern int  g_reset     ;  //>0 = reset different levels of eventbuilder
 extern size_t g_maxMem  ;  //maximum memory allowed for buffer
+extern uint16_t g_evtTimeout;  //timeout (sec) for one event
 
 extern FACT_SOCK g_port[NBOARDS] ;  // .port = baseport, .addr=string of IP-addr in dotted-decimal "ddd.ddd.ddd.ddd"
Index: trunk/FACT++/src/EventBuilderWrapper.h
===================================================================
--- trunk/FACT++/src/EventBuilderWrapper.h	(revision 16618)
+++ trunk/FACT++/src/EventBuilderWrapper.h	(revision 16619)
@@ -225,5 +225,5 @@
                                                            "|roi:Region of interest of secondary baseline"
                                                            "|run:Run numbers of DRS runs (0=none)"),
-        fDimStatistics1 ("FAD_CONTROL/STATISTICS1",        "I:5;X:3;I:1;I:2;C:40;I:40;X:40",
+        fDimStatistics1 ("FAD_CONTROL/STATISTICS1",        "I:5;X:3;I:1;I:2;C:40;I:40;I:40",
                                                            "Event Builder status for GUI display"
                                                            "|bufferInfo[int]:Events in buffer, incomp., comp., write, proc., tot."
@@ -232,6 +232,6 @@
                                                            "|rateNew[int]:Number of new start events received"
                                                            "|numConn[int]:Number of connections per board"
-                                                           "|rateBytes[int]:Bytes read this cycle"
-                                                           "|totBytes[int]:Bytes read (counter)"),
+                                                           "|rateBytes[int]:Bytes read during last cylce"
+                                                           "|relBytes[int]:Relative number of total bytes received (received - released)"),
         fDimFileFormat("FAD_CONTROL/FILE_FORMAT",          "S:1", "|format[int]:Current file format"),
         fDimIncomplete("FAD_CONTROL/INCOMPLETE",           "X:1", "|incomplete[bits]:One bit per board"),
@@ -307,4 +307,8 @@
     {
         g_maxMem = size_t(mb)*1000000;
+    }
+    void SetEventTimeout(uint16_t to) const
+    {
+        g_evtTimeout = to;
     }
 
Index: trunk/FACT++/src/fadctrl.cc
===================================================================
--- trunk/FACT++/src/fadctrl.cc	(revision 16618)
+++ trunk/FACT++/src/fadctrl.cc	(revision 16619)
@@ -804,4 +804,24 @@
 
         SetMaxMemory(mem);
+
+        return T::GetCurrentState();
+    }
+
+    int SetEventTimeoutSec(const EventImp &evt)
+    {
+        if (!CheckEventSize(evt.GetSize(), "SetEventTimeoutSec", 2))
+            return T::kSM_FatalError;
+
+        const int16_t sec = evt.GetShort();
+
+        if (sec<=0)
+        {
+            ostringstream msg;
+            msg << hex << "Value " << sec << " out of range.";
+            T::Error(msg);
+            return T::GetCurrentState();
+        }
+
+        SetEventTimeout(sec);
 
         return T::GetCurrentState();
@@ -1749,4 +1769,9 @@
              "|memory[short]:Buffer size in Mega-bytes.");
 
+        T::AddEvent("SET_EVENT_TIMEOUT", "S:1")
+            (bind(&StateMachineFAD::SetEventTimeoutSec, this, placeholders::_1))
+            ("Set the timeout after which an event expires which was not completely received yet."
+             "|timeout[sec]:Timeout in seconds [1;32767]");
+
         T::AddEvent("SET_REGISTER", "I:2", FAD::State::kConnecting, FAD::State::kConnected, FAD::State::kRunInProgress)
             (bind(&StateMachineFAD::SetRegister, this, placeholders::_1))
@@ -1978,4 +2003,5 @@
         // ---------- Setup event builder ---------
         SetMaxMemory(conf.Get<unsigned int>("max-mem"));
+        SetEventTimeout(conf.Get<uint16_t>("event-timeout"));
 
         if (!InitRunNumber(conf.Get<string>("destination-folder")))
@@ -2163,4 +2189,5 @@
     builder.add_options()
         ("max-mem,m",          var<unsigned int>(100), "Maximum memory the event builder thread is allowed to consume for its event buffer")
+        ("event-timeout",      var<uint16_t>(30),      "After how many seconds is an event considered to be timed out? (<=0: disabled)")
         ("destination-folder", var<string>(""),        "Destination folder (base folder) for the event builder binary data files.")
         ;
