Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  29 Jan 2020, Pintaudi Giorgio, Info, Force triggering of idle routine of a frontend 
    Reply  02 Feb 2020, Konstantin Olchanski, Info, Force triggering of idle routine of a frontend 
       Reply  02 Feb 2020, Pintaudi Giorgio, Info, Force triggering of idle routine of a frontend 
    Reply  03 Feb 2020, Stefan Ritt, Info, Force triggering of idle routine of a frontend 
       Reply  04 Feb 2020, Pintaudi Giorgio, Info, Force triggering of idle routine of a frontend 
          Reply  07 Feb 2020, Stefan Ritt, Info, Force triggering of idle routine of a frontend 
             Reply  07 Feb 2020, Pintaudi Giorgio, Info, Force triggering of idle routine of a frontend 
                Reply  09 Feb 2020, Stefan Ritt, Info, Force triggering of idle routine of a frontend 
                   Reply  10 Feb 2020, Konstantin Olchanski, Info, Force triggering of idle routine of a frontend 
                Reply  12 Feb 2020, Stefan Ritt, Info, Force triggering of idle routine of a frontend 
Message ID: 1802     Entry time: 02 Feb 2020     In reply to: 1799     Reply to this: 1805
Author: Konstantin Olchanski 
Topic: Info 
Subject: Force triggering of idle routine of a frontend 
Hi, Giorgio - I think you encountered a fundamental problem with what to do at the begin of 
run. There are two ways of thinking about it.

Some experiments want to start the run as quickly as possible, so they do not want 
begin_of_run() to do too much stuff.

Other experiments want to record all the current settings and conditions before starting a 
run, their begin_of_run() will read all the slow controls, interrogate all the power supplies, 
read all the voltages, temperatures, pressures, etc. By necessity this will slow down the 
starting of the run quite significantly.

The best I understand the midas class driver structure, it is more geared for the first case - 
fast starting of runs.

The thinking behind this choice considers the nature of most slow control data in typical 
physics experiments:
- if the data does not change quickly (say, room temperature, atmospheric pressure, etc), 
and you read it say every 1 minute, then you do not need to read it again at begin run time - 
the 1 minute old measurement is still good enough - nothing changed much since then
- if the opposite is true, the data changes wildly (i.e. detector high voltage current goes up 
and down in response to the quickly changing beam current), measuring it at the start of 
the run does us no good - by the time the first event comes around, it has already changed 
completely.

Hopefully Stefan can help you with your specific problem, he has better understanding of 
the midas class drivers.


K.O.


[quote="Pintaudi Giorgio"]Hello!
As you know, the generic MIDAS frontend has a class driver, device driver, bus driver
structure. Assuming a slow device frontend, its class driver should have a routine of type   
[CODE]INT idle (EQUIPMENT * pequipment)[/CODE]
This routine is called with a rate controlled by the 
"[I]/Equipment/<frontend name>/Common/Event limit[/I]" parameter.
The idle routine usually reads one channel of the frontend and stores the results
in the "[I]/Equipment/<frontend name>/Variables[/I]" ODB folder.

[B]My question is: it is possible to force (from the code) the frontend to call the idle routine 
at a 
certain point. This is because I need to update the "[I]/Equipment/<frontend 
name>/Variables[/I]"
variables inside the "[I]begin_of_run[/I]" routine, at a very specific time.[/B]

One dirty solution would be to increase a lot the reading rate ... but I need this
increased reading rate only during the run start while I need a low reading rate
during the run. So the question: is it possible to increase and decrease the reading
rate (event limit) of a frontend without stopping and restarting it?

If you need more info, please let me know.
Thank you
Giorgio[/quote]
ELOG V3.1.4-2e1708b5