source
Syntax
- source: identifier or expression
Description
The source operation is one of the few operations that can be used to start the chain of operations that make up a variable.
The source line identifies the data source that will feed the sequence of operations that follows. A valid data source can be a pin, register, or tag name depending on the device being configured. A source can also be another variable name, in which case the final output of the named variable will feed into the start of the new variable's operation chain.
A source can be:
- A simple name (identifier)
- A complex expression referencing one or more valid data source identifiers — when any referenced source is updated, the expression is evaluated and the result passed to the next stage
- A constant (number, boolean, or string) — evaluated once at engine initialization; no updates are emitted from the source
For string constants, use YAML quoting as needed (e.g. 'ACTIVE' or "'ACTIVE'").
Examples
- AdapterScript
var1:
- source: AIN0
var2:
- source: var1
var3:
- source: AIN0 + AIN1
info
In the above example, AIN0 and AIN1 are identifiers available in LabJack data sources.