Back Midas Rome Roody Rootana
  Midas DAQ System, Page 89 of 143  Not logged in ELOG logo
Entry  29 Apr 2024, Musaab Al-Bakry, Forum, Midas Sequencer with less than 1 second wait 
Hello there,

I am working on a task that involves some ODB changes that happen within 20-500 
    Reply  29 Apr 2024, Stefan Ritt, Forum, Midas Sequencer with less than 1 second wait 
I guess the simplest way to do that without breaking with existing code is to change the 
second number to a float. So a
    Reply  30 Apr 2024, Scott Oser, Forum, Midas Sequencer with less than 1 second wait 
> I guess the simplest way to do that without breaking with existing code is to change the 
> second number to a float. So a
    Reply  30 Apr 2024, Stefan Ritt, Forum, Midas Sequencer with less than 1 second wait 
> This would work fine in principle, but isn't implemented in the current MIDAS sequencer as we understand it.  (We tried!) Is your proposal to rewrite
the sequencer 
> to allow fractional waits?  Right now the code seems to store the start_time as a DWORD and uses atoi to parse the wait time, and uses ss_time (which
    Reply  30 Apr 2024, Scott Oser, Forum, Midas Sequencer with less than 1 second wait 
> > This would work fine in principle, but isn't implemented in the current MIDAS sequencer as we understand it.  (We tried!) Is your proposal to rewrite
the sequencer 
> > to allow fractional waits?  Right now the code seems to store the start_time as a DWORD and uses atoi to parse the wait time, and uses ss_time (which
    Reply  30 Apr 2024, Stefan Ritt, Forum, Midas Sequencer with less than 1 second wait 
While I will do it, i'm not sure if this is what you want. If I understand correctly, some process gets triggered and then writes some values to the ODB,
then the sequencer 
should continue. Putting a wait there is dangerous. Maybe your process always takes like 10-20 ms, so you put a wait of let's say 100ms, and things are
    Reply  30 Apr 2024, Scott Oser, Forum, Midas Sequencer with less than 1 second wait 
> While I will do it, i'm not sure if this is what you want. If I understand correctly, some process gets triggered and then writes some values to the ODB,
then the sequencer 
> should continue. Putting a wait there is dangerous. Maybe your process always takes like 10-20 ms, so you put a wait of let's say 100ms, and things are
    Reply  02 May 2024, Stefan Ritt, Forum, Midas Sequencer with less than 1 second wait 
Ok, I implemented the float second wait function. Internally it works in ms, so the maximum resolution is 0.001 s.

Best,
    Reply  02 May 2024, Scott Oser, Forum, Midas Sequencer with less than 1 second wait 
> Ok, I implemented the float second wait function. Internally it works in ms, so the maximum resolution is 0.001 s.

> Best,
    Reply  05 May 2024, Musaab Al-Bakry, Forum, Midas Sequencer with less than 1 second wait 
> > Ok, I implemented the float second wait function. Internally it works in ms, so the maximum resolution is 0.001 s.
> > 
> > Best,
    Reply  06 May 2024, Stefan Ritt, Forum, Midas Sequencer with less than 1 second wait 
Indeed there was a sleep(100ms) in the sequencer in each loop. I reduced it now to 10ms. I need at least 10ms since otherwise 
the sequencer would run in an infinite loop during the wait and burn 100% CPU. The smallest time slice on Linux to sleep is 
10ms, so that's why I set it to that. Give it a try.
    Reply  06 May 2024, Stefan Ritt, Forum, Midas Sequencer with less than 1 second wait 
Actually I realized that a 1ms wait still works, so I reduced it to that.

Stefan
    Reply  07 May 2024, Musaab Al-Bakry, Forum, Midas Sequencer with less than 1 second wait 
> Actually I realized that a 1ms wait still works, so I reduced it to that.

> Stefan
Entry  04 Jul 2024, Nick Hastings, Forum, mfe.cxx with RO_STOPPED and EQ_POLLED 
Dear Midas experts,

I noticed that a check was added to mfe.cxx in 1961af0d6:
    Reply  04 Jul 2024, Nick Hastings, Forum, mfe.cxx with RO_STOPPED and EQ_POLLED 
I just discovered https://bitbucket.org/tmidas/midas/issues/338/mfec-ro_stopped-is-now-forbidden

> Dear Midas experts,
    Reply  06 Aug 2024, Stefan Ritt, Forum, mfe.cxx with RO_STOPPED and EQ_POLLED 
> I noticed that a check was added to mfe.cxx in 1961af0d6:

> +      /* check for consistent common settings */
Entry  15 Aug 2024, Scott Oser, Forum, "Safe" abort of sequencer scripts 
We often use the MIDAS sequencer to temporarily control detector settings, such as:

* <change some setting>
    Reply  19 Aug 2024, Stefan Ritt, Forum, "Safe" abort of sequencer scripts 
This request came more than once in the past. One thing I could implement is a "atexit" function similarly to the C funciton atexit().

Then we would have a function in the script which gets called whenever one does "stop immediately". This function can then restore
    Reply  22 Aug 2024, Scott Oser, Forum, "Safe" abort of sequencer scripts 
> This request came more than once in the past. One thing I could implement is a "atexit" function similarly to the C funciton atexit().

> Then we would have a function in the script which gets called whenever one does "stop immediately". This function can then restore
Entry  05 Sep 2024, Jack Carlton, Forum, Python frontend rate limitations? frontend.pyfrontend.cxx
I'm trying to get a sense of the rate limitations of a python frontend. I 
understand this will vary from system to system.
ELOG V3.1.4-2e1708b5