# Setpoint slider

> A handle between two ends: the drag arms the value, the key writes it, and the handle otherwise follows the plant.

**Setpoint slider** moves a setpoint by gesture instead of typing. Its protection
against the one accident a slider can have is the two-step rule: **the drag arms, the
key writes**. Moving the handle changes nothing outside the screen (it only states the
value being asked for), and the plant is touched when the operator presses the send key
beside it. A sleeve crossing a touch screen ends in a release like any other drag, so
writing on release would send exactly the gesture nobody meant. It is a *Control*
component; a new one occupies 6 × 1 cells.

The control draws no reading of its own; compose a [Value](component-value) beside the
travel if the number should be on screen.

## Data {#data}

| Field | What it does | Values | Default |
|---|---|---|---|
| Address | The rooted Logic address the setpoint lands in and is read back from: a memory variable or a writable tag. The list is narrowed to writable points. | Free text; writable-point suggestions | empty |

## Format {#format}

| Field | What it does | Values | Default |
|---|---|---|---|
| Decimals | Decimal places the armed value and the answer line are written with: the two places this control writes a number. Blank follows the station's decimal preference. Out-of-band counts are taken at the edge and the panel says so. | 0 to 15, or blank | blank |

## Travel {#travel}

Where the handle may go and where it may stop. The ends are the control's own
declaration, not a reading, which is why the handle still travels while the point says
nothing.

| Field | What it does | Values | Default |
|---|---|---|---|
| Minimum | Where the travel starts. | Any finite number | 0 |
| Maximum | Where the travel ends. At or below the minimum there is nothing to travel: the panel warns, and the slider is disabled because it would send nothing. | Any finite number | 100 |
| Step | The smallest move the handle makes. Every position it stops at is a whole number of steps off the minimum, so the value sent is always one of the declared stops. A step that does not divide the travel is allowed, and the panel says where the last stop falls: the maximum is then not a value this slider sends. | Any positive finite number | 1 |

Over a tag whose **Limits** stage is on, the panel also warns when the stops of the travel
reach past those limits, and names them: a value armed out there is refused at the send key
rather than taken at the edge.

## How it behaves {#how-it-behaves}

- **Following the plant.** With nothing armed, the handle stands at the point's own
  reading. A reading *outside* the declared travel (or no good reading at all) draws
  **no handle**: a thumb parked at the minimum would be a setpoint the screen invented.
- **Arming.** The first touch freezes the handle where the point last reported it and
  tints the control, which is the operator being told he is now holding it. Dragging
  snaps to the stops and clamps into the travel. The armed value is this screen's
  alone: it reaches no other circuit and nothing draws it as a reading.
- **The send key** names its consequence before the finger lands: it reads
  "Set 42.5" while a value is armed. A sent value hands the handle back to the point;
  one the funnel refused stays armed, so the correction is a nudge and not the whole
  gesture again. Its width never changes: from the start it holds room for the widest
  value the travel can put on it, so arming a value or releasing the handle moves
  neither the ✕ key nor the travel beside it.
- **The ✕ key** releases the handle back to the point: the way out of an arming nobody
  meant. It is always on the row (disabled while nothing is armed), so keys never move
  under the finger.
- To a screen reader the slider speaks the armed value ("42.5, not sent yet"), the
  point's own reading, or "No reading", never a number the point did not report.

## Write semantics {#write-semantics}

The send key writes the armed value through the station's single logic funnel. A point
that cannot hold a number answers with the refusal on the control's line; a successful
send answers "42.5 written". Values arrived at by stepping are tidied of binary residue
before sending, so a setpoint never reaches the plant as `0.30000000000000004`.
Authorization is re-checked at the press, and the answer line expires after a few
seconds. A new slider is one row tall, and under a corner title that row seldom has a line
left for the answer: the answer then takes the title's place while it shows. Where no title
stands over the row (none was written, or it gave its row up) and the cell still has no line
for the answer, it takes the send key's caption instead; the key keeps its width, so neither
the ✕ key nor the travel moves (see the
[dashboards page](home#commands-permissions-and-the-lock-mark)).

Over a tag whose **Limits** stage is on, an armed value outside those limits is refused the
same way, with a reason that names those limits, and stays armed: the tag
would otherwise take it at the edge, and the line would announce a value the plant never
got.

Over a point that holds integers (a tag of an integer type whose Scale and Calibration leave the value unchanged, or a memory variable holding integers), an armed value with a fraction is refused the same way rather than rounded ("This point takes an integer, so 2.5 is not written to it."), and stays armed: over such a point, a step with a fraction makes those stops values that are never sent.

## Permissions and the lock {#permissions-and-the-lock}

Sending needs the role permission to operate dashboards. Locked, the travel and the
send key are disabled and the component wears the shared lock mark with the reason in
its tooltip (see the [dashboards page](home)). A bound point that fails to read wears
the shared bad-reading mark; the control itself stays usable, since a setpoint is an
absolute value and asks for no reading first.

The shared Appearance, Identification, Position and layer and Actions sections are
described on the [components page](components#the-shared-property-sections).
