User Keys
Set User Key
User keys can be used to store values for later use, and can be accepted by commands as input:
title: User Keys as Signal Aliases
suite:
- ident: ICT-T0
title: Set variables
steps:
- command: define probe.VBUS DATP01
- ident: ICT-T1
title: Measure VBUS
steps:
- command: measure voltageDMM %probe.VBUS% 3.25-3.35V
All user keys are included when making a webhook request:
title: User Keys with Webhook
suite:
- ident: ICT-T0
title: Set variables
steps:
- command: define work_order 1011X02
- ident: ICT-T1
title: Invoke webhook with work_order key
steps:
- command: webhook request
Commands
Extracting User Keys
Most commands support extracting the test value result
in a user key, by specifying name of the user key
as the value of an extractKey::
field.
Evaluate Expressions
title: Evaluate Expressions
suite:
- title: Eval
steps:
- command: define test "AC1D"
- command: eval "test != 'FOOBAR'"
- command: eval "test == 'AC1D'"
- command: define ONE 1
- command: eval "numeric(ONE)+2"
extractKey: SUM
- command: eval "SUM == 3"
Commands
Evaluating Measurements
Since measurement values stored in a user key
include the unit, the numeric(..)
function can be
used within expressions to cast the measurement
result stored in a user key, into a specific unit.
title: Evaluate Measurement
suite:
- title: Evaluate Measurement
steps:
- command: measure voltageDATP08 <4V
extractKey: VOLTAGE
- command: eval "numeric(VOLTAGE, 'mV') < 4000"
Commands