# Your first run

> Create channels, write data to them with Arc, plot the data, and record a range.

This tutorial shows the main parts of Synnax without hardware. You create two channels, write a changing value to them with an Arc automation, plot the value, and record a range. It takes about ten minutes.

You need Synnax Desktop, or the Synnax Console connected to a Synnax Core. To choose one, see [Synnax editions](https://docs.synnaxlabs.com/reference/get-started/editions). Use any [project](https://docs.synnaxlabs.com/reference/visualize/projects). To start with an empty one, run the “Create project” command.

Most steps run a command from the [command palette](https://docs.synnaxlabs.com/reference/get-started/ui-overview#search-and-command-palette). To open it, press **Ctrl+Shift+P** (**Cmd+Shift+P** on macOS).

[](https://synnax.nyc3.cdn.digitaloceanspaces.com/docs/get-started/first-run-dark.mp4#t=0.001)

## Step 1Create the channels

A [channel](https://docs.synnaxlabs.com/reference/channels) stores one stream of time-ordered values. Each value has a timestamp, which Synnax keeps in an index channel. You create an index channel first, then a data channel that uses it.

1. Run the “Create channel” command.
2. Enter the name `ramp_time`, and turn on **Is index**.
3. Select **Create**.
4. Run the “Create channel” command again.
5. Enter the name `ramp`. Set **Data type** to `float64` and **Index** to `ramp_time`.
6. Select **Create**.

## Step 2Write data with Arc

[Arc](https://docs.synnaxlabs.com/reference/control/arc) is the Synnax language for automations. The automation below adds one to a value every 100 milliseconds and writes it to `ramp`. When the value gets to 100, it goes back to 0.

1. Run the “Create Arc automation” command.

2. Enter the name `Ramp`, select **Text** as the editor mode, and select **Create**.

3. Copy this program into the editor:

   ```arc
   import time

   func step() {
       value f64 $= 0
       value += 1
       if value > 100 {
           value = 0
       }
       ramp = value
   }

   time.interval{period=100ms} -> step{}
   ```

   * `time.interval{period=100ms}` runs `step` ten times each second. See [time](https://docs.synnaxlabs.com/reference/control/arc/standard-library/time).
   * `value f64 $= 0` makes a [stateful variable](https://docs.synnaxlabs.com/reference/control/arc/reference/variables#stateful). It keeps its value from one run of `step` to the next.
   * `ramp = value` writes the value to the `ramp` channel. Synnax writes the timestamp to `ramp_time`.

4. In the bar at the bottom of the editor, select **Node 1** from the **Driver** list. This entry runs the automation inside the Core.

5. Select the start button.

The automation is now running. To stop it, select the stop button.

## Step 3Plot the data

1. Run the “Create line plot” command.
2. Select the component button in the bottom-left corner, or press **V**, to open the component toolbar.
3. In **Y1**, select `ramp`.
4. Check that **Ranges** shows **Rolling 30s**. If it shows a different range, remove that range and select **Rolling 30s**.

The plot shows a line that climbs from 0 to 100 every ten seconds. For more about plots, see [line plots](https://docs.synnaxlabs.com/reference/visualize/line-plots).

## Step 4Record a range

A [range](https://docs.synnaxlabs.com/reference/ranges) marks a span of time, such as a test. You use it to find and compare data later.

1. Hold **Alt** (**Option** on macOS) and drag a box across part of the plot.
2. Right-click the box and select **Create range from selection**.
3. Enter the name `First run`, and select **Save to Core**.

The range is now in the ranges toolbar. To see its data again, right-click the range in the toolbar and select **Add to new plot**. Then add `ramp` to **Y1** of the new plot.

> `ramp` stores its data, so you can see the range after you stop the automation. A virtual channel stores no data, so a range on it would show nothing.

## Next steps

* [Channels](https://docs.synnaxlabs.com/reference/channels) -> learn about data types, index channels, and calculated channels.
* [Hardware](https://docs.synnaxlabs.com/reference/hardware) -> connect a LabJack, NI, Modbus, OPC UA, or other device.
* [Visualize](https://docs.synnaxlabs.com/reference/visualize/line-plots) -> build line plots, schematics, tables, and logs.
* [Ranges](https://docs.synnaxlabs.com/reference/ranges) -> add metadata and labels to ranges, and export their data.
* [Control](https://docs.synnaxlabs.com/reference/control) -> operate hardware by hand, or automate it with Arc.
* [Alarms](https://docs.synnaxlabs.com/reference/alarms) -> watch your data with statuses and redlines.
