I'm having a hard time trying to program a relay output to cycle a sequence of on and off for a specific period of time.
Here's the background: I have an espresso machine that I want to control via relay closure to automatically turn on and off at specified times as well as to be able to do it via a "Button".
Here's the options for being able to control it via the contact closure:
Contact closure for 1 second = turn machine off
Contact closure for 4 seconds = turn machine on (if already in off state)
Contact closure for 4 seconds = enter programming mode (if already in on state)
Now, I can't simply close the contacts for 4 seconds as I need to first turn it off (in case it was on) so that I don't put it into programming mode.
My psuedo code would look like this:
1. Output off (in case it was on)
2. Output on for 1 second (this turns the machine off in case it was already on)
3. Output off for 1 second (delay before trying to turn on)
4. Output on for 5 seconds (this is to turn it on)
5. Output off (make sure we are back in the off state).
Now, in the OmniPro, I tried this:
WHEN Button - Espresso On
          THEN Espresso Relay Switch OFF
          THEN Espresso Relay Switch ON FOR 1 SECOND
          THEN Espresso Relay Switch OFF FOR 1 SECOND
          THEN Espresso Relay Switch ON FOR 5 SECONDS
          THEN Espresso Relay Switch OFF
Unfortunately, this runs through all lines immediatly turning it off/on/off/on/off without waiting the specified # of seconds. I now realize the controller does these actions immediately and schedules the corresponding off/on after the delay.
How can I get the controller to do the on/off sequence with the proper delay between steps?
Here's the background: I have an espresso machine that I want to control via relay closure to automatically turn on and off at specified times as well as to be able to do it via a "Button".
Here's the options for being able to control it via the contact closure:
Contact closure for 1 second = turn machine off
Contact closure for 4 seconds = turn machine on (if already in off state)
Contact closure for 4 seconds = enter programming mode (if already in on state)
Now, I can't simply close the contacts for 4 seconds as I need to first turn it off (in case it was on) so that I don't put it into programming mode.
My psuedo code would look like this:
1. Output off (in case it was on)
2. Output on for 1 second (this turns the machine off in case it was already on)
3. Output off for 1 second (delay before trying to turn on)
4. Output on for 5 seconds (this is to turn it on)
5. Output off (make sure we are back in the off state).
Now, in the OmniPro, I tried this:
WHEN Button - Espresso On
          THEN Espresso Relay Switch OFF
          THEN Espresso Relay Switch ON FOR 1 SECOND
          THEN Espresso Relay Switch OFF FOR 1 SECOND
          THEN Espresso Relay Switch ON FOR 5 SECONDS
          THEN Espresso Relay Switch OFF
Unfortunately, this runs through all lines immediatly turning it off/on/off/on/off without waiting the specified # of seconds. I now realize the controller does these actions immediately and schedules the corresponding off/on after the delay.
How can I get the controller to do the on/off sequence with the proper delay between steps?