Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  07 Apr 2020, Ivo Schulthess, Suggestion, Sequencer loop break 
    Reply  21 Apr 2020, Stefan Ritt, Suggestion, Sequencer loop break 
       Reply  23 Apr 2020, Ivo Schulthess, Suggestion, Sequencer loop break 
          Reply  23 Apr 2020, Stefan Ritt, Suggestion, Sequencer loop break 
       Reply  25 Apr 2020, Konstantin Olchanski, Suggestion, Sequencer loop break 
Message ID: 1876     Entry time: 23 Apr 2020     In reply to: 1875     Reply to this: 1877
Author: Ivo Schulthess 
Topic: Suggestion 
Subject: Sequencer loop break 
> You can do that with the "GOTO" statement, jumping to the first line after the loop.
> 
> Here is a working example:
> 
> 
> LOOP runs, 5
>      WAIT Seconds 3
>      IF $runs > 2
>          GOTO 7
>      ENDIF
> ENDLOOP
> MESSAGE "Finished", 1
> 
> Best,
> Stefan

Hoi Stefan

Thanks for your answer. As I understand it, this has to be in the sequence script before 
running. So, in the end, it is not different than just saying "LOOP runs, 2" and 
therefore the number of runs has do be known in advance as well. Or is there an option to 
change the script on runtime? What I would like, is to start a sequence with "LOOP runs, 
infinite" and when I come back to the experiment after falling asleep being able to break 
the loop after the next iteration, but still execute everything after ENDLOOP, i.e. the 
MESSAGE statement in your example. Because if I do a "Stop after current run", this seems 
not to happen. 

Best, Ivo
ELOG V3.1.4-2e1708b5