---
title: "Creating Program Steps with the Simple Program Interface"
canonical: "https://farmconnect.docs.rubiconwater.com/space/FCD/2015691280/Creating%20Program%20Steps%20with%20the%20Simple%20Program%20Interface"
format: markdown
---
> Macro (toc)

> ℹ️ **Note**
> ℹ️ 
> ℹ️ We are using the Simple Program Interface for this program but the Advanced Interface is more flexible. See [https://rubiconwater.atlassian.net/wiki/spaces/FCD/pages/2039873539](https://rubiconwater.atlassian.net/wiki/spaces/FCD/pages/2039873539) for a description of the different interface types and for an example of creating the same program using the Advanced Interface.

Creating an event-based program is similar to creating a time based program. The stages are:

1. Create the program.
2. Add the program steps.
3. Check the sequence of steps.
4. Synchronise the program to upload it to the gateway.

> ℹ️ **Example**
> ℹ️ 
> ℹ️ In this simple example program we will do the following. 
> ℹ️ 
> ℹ️ - Open BAY 2 when the water level in the supplying CHANNEL 1 reaches 500 mm. Wait for 60 minutes then close BAY 2.
> ℹ️ 
> ℹ️ We can do this by using an Irrigate Bay action group and using an event trigger to start the action group.

## Create the Program

**Step 1**

Hover over the **Irrigations** button from the Main Menu and choose *Irrigation Programs* from the drop-down menu.

**Step 2**

Choose the **Create New Event-Based Program** button :eventprog:  from the Irrigation Programs menu.

**Step 3**

Fill out the following program details:

| **Detail** | **Description** |
| --- | --- |
| Program Name | Give your program a meaningful name. This will make it easier to re-use the program later. |
| <span style="color: #97a0af">Program Type</span> | <span style="color: #97a0af">This will be prepopulated as </span><span style="color: #97a0af">*Event Based*</span> |
| Program start time | For an event-based program the start time is the time when the controller will start listening for events. In this program we assume that we will set the start time when we begin to fill the channel. The first step will begin after the start time when the level sensor in the channel reaches 500 mm. |

**Step 4**

Click **Save Program Changes** to continue.

Our example program looks like this:

## Add Program Steps

Now we need to add steps to the program. Each step will include an *action* or *group of actions *and (optionally) a starting and/or a finishing event. In this program we will only need one step.

**Step 1**

Our step will open BAY 2 when the water level in Channel 1 reaches 500 mm, wait for 60 minutes, then close Bay 2. Fill in the following details:

- For the **Program Action Group** select the *Irrigate Bay 2* action OR select Bay 2 on the map. Enter the irrigation duration (or accept the default duration).

- For the **Start Event** select the *LevelSensor - Water level exceeds* event and set the target level to 500 mm. Again, you can select the event from the list or click on the Level Sensor on the map and pick an action.

We don’t need a Finish Event because we are just going to irrigate for 60 minutes and the Irrigate action group will add this action automatically. 

**Step 2**

Click **Create Program Step**. This will save the program step and add it to the step list.

Our program step list looks like this:

![image](media://78c287f4-f106-45e5-b8e7-e41b20d7f913)

*Saved program step details*

You can make changes to the step details directly in the step. For example, you could change the water level depth that will trigger the starting action.

## Check the Program

**Step 1**

Click the **Edit Program Action Group** button in the event step to check the details of the events.

Notice that the **Event Timeout Delay** on the Level Sensor event is *30 minutes* and the **Event Timeout Action** is *Do action*. This means that if the water level hasn’t reached 500 mm within 30 minutes of the program start time, the event will timeout and perform the timeout action. In this case, the timeout action is just *Do action* so it will immediately perform the next action by opening the gate and starting the irrigation.

The program start time that we chose was when we planned to start filling the channel (for example, we may have placed an order with our Water Authority to do this at a specific time). If this timing seems reasonable, you can leave the settings as they are. Otherwise, you can adjust the **Event Timeout Delay** to a more realistic setting.

See [https://rubiconwater.atlassian.net/wiki/spaces/FCD/pages/2035351762](https://rubiconwater.atlassian.net/wiki/spaces/FCD/pages/2035351762) for more about event settings.

**Step 2**

You can also check the program Gantt chart which is a graphical representation of the program sequence with a separate timeline for each step. For a single-step program this is very simple.

Our finished program looks like this:

## Synchronize the Program

To use the program you must synchronize it. This uploads the program to the controller and confirms that it is valid. Click the **Synchronize Program** button in the program menu to begin the synchronization process. You’ll see the steps being uploaded and a success message is displayed when synchronization is complete.  See[https://rubiconwater.atlassian.net/wiki/spaces/FCD/pages/2066612281](https://rubiconwater.atlassian.net/wiki/spaces/FCD/pages/2066612281) for more details.

This will create a copy of the program with the start and finish date appended to the program name. You can make changes to this program within limits while it is pending or in progress. See [https://rubiconwater.atlassian.net/wiki/spaces/FCD/pages/2039742532](https://rubiconwater.atlassian.net/wiki/spaces/FCD/pages/2039742532) for details.

---