0.60

ReferenceChannelsCreate

Create channels

Create index, data, and virtual channels.

Create a channel when no task creates it for you: to store data from a script, to send a live signal, or to compute a value from other channels.

When to create a channel

Channels that tasks create

When you click Start in the tab of a task that you configured in the Console, the Console creates the channels of the task. A read task gets a data channel for each input, and a write task gets a command channel for each output. You do not create these channels yourself. For their names, see channels that tasks create.

Channels that you create

To Create Where
Store data from a script An index channel and data channels In the script, before it writes the data
Configure a hardware task in a script The channels of the task In the script, before you configure the task
Send a live signal A virtual channel In the Console or in a script
Compute a value from other channels A calculated channel In the Console or in a script

A virtual channel suits a value that only live views and automations use, such as a setpoint, or a start_cmd button that starts an Arc sequence. Synnax does not store its values, so you cannot plot them later or find them in a range. To keep a record of each value, such as each time an operator starts a test, create a data channel with its own index.

In the Console or in a script

  • Use the Console for a few channels that you set up once, such as the virtual channel of a schematic button.
  • Use Python or TypeScript when a script writes the data, such as data from a device that the Driver does not support or from an analysis. Create the channels at the start of the script, so the script also works on a new Core. One call can also create many channels.

Choose an index

Each data channel needs an index channel for its timestamps. Create the index channel first, then set it when you create the data channel. You cannot change the index later.

  • Data channels that you write at the same times can share one index. For example, sensors that one script reads in the same loop.
  • Data channels that you write at different times need different indexes. Give each command channel its own index.
  • Virtual channels have no index.

Create index and data channels

Enterprise
  1. Click in the channels toolbar, or run the “Create channel” command in the command palette.
  2. Enter a name.
  3. For an index channel, turn on Is index. The data type changes to timestamp.
  4. For a data channel, select the data type and the index channel.
  5. Click Create. To keep the dialog open for the next channel, turn on Create more first.

Create a virtual channel

A virtual channel has no index, so you can create it at any time.

Enterprise

Open the Create channel dialog, enter a name, and select the data type. Turn on Virtual, then click Create.

Create a calculated channel

A calculated channel computes its values from other channels with an Arc expression, such as return inlet_pressure - outlet_pressure. To create one in the Console or in a script, see create a calculated channel.

Next steps

  • Channel properties -> each property that you can set.
  • Write data -> write samples to the new channels with the Python or TypeScript client.