set – write channel value

Writes a value to a channel — to control digital I/O, set DAC values and configure modes.

View as Markdown (for AI/KB)

Description

The set command writes a value to a specified channel. It’s used to configure hardware settings, control digital I/O, and modify channel states.

Syntax

set --channel <channel_name> --value <value>

Required Options

Option Short Description
--channel -c The name or alias of the channel to set
--value -v The value to write to the channel

Examples

set --channel "GPIO_PIN_5" --value "1"
set --channel "DAC_OUTPUT" --value "2.5"
set --channel "DEVICE_NAME" --value "TestDevice"
set --channel "MODE_SELECT" --value "AUTO"
set -c "ENABLE" -v "true"

Value Types

Channel Type Example Values
Boolean "true", "false", "1", "0"
Integer "0", "100", "-5"
Float/Double "3.14", "2.5", "-1.23"
String "any text", "DeviceName"
Enumeration "OPTION1", "MODE_A"
Hexadecimal "0xFF", "0x1A2B"

Behavior

  1. Resolves the channel name
  2. Converts the value to the appropriate type
  3. Sends the value to the hardware
  4. Value is applied immediately

Notes

  • Requires an active connection (use init first)
  • Values are applied immediately
  • Some channels may have restricted value ranges
  • Hardware validation may reject invalid values

Error Handling

  • Channel not found: Verify channel name with list
  • Invalid value: Check channel data type and valid range
  • Read-only channel: Some channels cannot be written
  • Value out of range: Hardware rejected the value
  • Not connected: Run init command first

Book a demo of Probe

Show us your board — we review it and go through the findings together.

Prefer to email? info@esharp.se