Repeat Actions without "every" or "n-times" etc

Question - How do I set up a repeat that way. ( no n-times, repeat interval etc). Just rely on the until to stop the loop.

According to the documentation you can Repeat Until expression

But I don't seem to be able to select this configuration

It forces me to select a time, or a repeat while ( which I dont want).

Am I missing something ?

Thanks.

J.

Change to a Repeat While Expression

Repeat while

image

and Repeat until are two different way to construct your loop depending on what you want to do or how you want to do it.

The condition is either evaluated at the begining - therefore the actions within the loop will not be executed or the condition will be evaluated at the end, so regardless of the trigger it will execute the actions/loop at least once.

Both are possible in HE. Just trying to see how I can get access to the Repeat Until, rather than Repeat While. I don't seem to be able to see where...

Thanks.

After you setup the Repeat you'll be given the option at add the Until (Expression). The Until will be used instead of the END-REP the While loop uses.
image

I'm having similar problems figuring this out. I'd like to do some actions until a switch reports closed. While seems to want a time. It drove me crazy the other night. Maybe I'll attempt again tonight.
PS: Relatively new to RM.

In your example you have to select "every minute". In the documentation there seem to be a way not to specify every minute. This is what I am trying see how to do.

Maybe it is just the way the documentation is written, and you have to specify an "every xxx sec" to trigger the repeat.

J

Maybe they implemented it that way to make sure the Loop goes to sleep for some time, otherwise you could get HE on its Knees executing an endless loop....

For the meantime I am doing "Repeat every 1 sec".... logic that does things and perform some wait condition..... Until (exit loop condition).... but I have to setup the "every 1 sec"...

See the post that talks about the issue of not having an interval defined

And from the documentation:
You must specify the time interval for the repetition, presented as the Repeat every... option when creating the repeat. Be careful not to make this interval too short, as you can consume your hub CPU resources by repeating too quickly.

1 Like

Came here to say that the doc's actually do mention that an interval is necessary, both where quoted above and in a box above the examples that you were looking at:

The idea was to keep the examples focused on the structure of repeats and the differences between them, not confuse things by demonstrating options that are common to all repeats (or specific values that are just an example but not the only way). But if this is also confusing, maybe generic text like "every 0:00:xx" could be added to hint at this?

Open to ideas, which I came here to ask about -- not blame anyone for missing anything. :slight_smile:

OK Sorry for rocking that boat. At least I know (I could have read it better) that it is by design. Agree that if the interval is too short it will consume HE CPU ressources.

In my case, neither the time to spend in the loop nor the number of time to execute the loop is known. Hence the actual logic of the loop should account for active wait "in order not to consume CPU ressource".

I can understand why HE developpers didnt want to make it available for a large audience.

In my case, i'll simulate what I want with repeat = 1,000,000 times or repeat each 1 sec, knowing that the actual loop logic accounts for active wait, until the exit condition is met.

Thanks to all and sorry for rocking that boat again.

J.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.