On this page · 11 sections

60 node types. A terminal is written name type (default). A node's fields are set in the inspector; what is not set keeps the default shown. This page is generated from studio-dataflow.js, so it is the engine as built.

Constants

Number const-number

A number.

In: - · Out: value number

FieldTypeDefaultMeaning
valuenumber0The number the terminal gives out.

Boolean const-boolean

True or false.

In: - · Out: value boolean

FieldTypeDefaultMeaning
valuebooleanfalseTicked is true.

Text const-string

A text.

In: - · Out: value string

FieldTypeDefaultMeaning
valuetextThe text as written.

Array const-array

A list of numbers, written as JSON: [1, 2, 3].

In: - · Out: value array

FieldTypeDefaultMeaning
valuetext[]JSON; what does not parse is an empty array.

Enum const-enum

One of a list of names - an enum constant: the states of a machine, the modes of an instrument. Its output is the name chosen, a text a Case frame selects on.

In: - · Out: value string

FieldTypeDefaultMeaning
optionstextidle,running,doneThe names, comma-separated; the Case frame's cases should be the same list.
valueoptionidleThe name the constant gives out.

Notes

Note note

A free label on the diagram: text that documents what is around it; it runs nothing.

In: - · Out: -

FieldTypeDefaultMeaning
textcodeA noteThe text, as many lines as you like.

Devices

Tag tag-read

The latest value of a tag. Inside a loop it is read again every iteration.

In: - · Out: value number, quality string, timestamp number

FieldTypeDefaultMeaning
tagtagsource.tag, as the tag bar shows it.
defaultnumber0The value before the first sample arrives.

Write tag tag-write

Writes the value to a tag and passes it on. The confirmed value comes back through the tag.

In: value any · Out: value any

FieldTypeDefaultMeaning
tagtagsource.tag; on the agent, agent.flows.<name> publishes a tag of its own.

Panel

Panel value panel-get

A property of a component on the page, read when the node runs (each iteration inside a loop).

In: - · Out: value any

FieldTypeDefaultMeaning
componentcomponentA component of a page, by its id.
propertypropertyvalueThe property read.

Panel indicator panel-set

Sets a property of a component on the page to the value, or pushes it to a chart, and passes it on.

In: value any · Out: value any

FieldTypeDefaultMeaning
componentcomponentA component of a page, by its id.
propertypropertyvalueThe property set; push appends a record to a chart or a log.

Panel control panel-event

The value of the last event a component raised (a setpoint, a press), and whether it is new since the node last ran.

In: - · Out: value any, new boolean

FieldTypeDefaultMeaning
componentcomponentA component of a page, by its id.
eventeventThe event listened to, from the component's own list.
field (detail field)textvalueWhich field of event.detail is the value; empty takes the whole detail.

Math

Add add

a + b

In: a number (0), b number (0) · Out: result number

Subtract subtract

a - b

In: a number (0), b number (0) · Out: result number

Multiply multiply

a × b

In: a number (0), b number (0) · Out: result number

Divide divide

a ÷ b, as the Formula node divides: ±Infinity when b is 0, NaN for 0 ÷ 0

In: a number (0), b number (0) · Out: result number

Modulo modulo

The remainder of a ÷ b

In: a number (0), b number (0) · Out: result number

Power power

a to the b

In: a number (0), b number (0) · Out: result number

Minimum min

The smaller of a and b

In: a number (0), b number (0) · Out: result number

Maximum max

The larger of a and b

In: a number (0), b number (0) · Out: result number

Function unary

One function of x.

In: x number (0) · Out: result number

FieldTypeDefaultMeaning
fnselect: abs, sqrt, round, floor, ceil, negate, sin, cos, tan, log, log10, exp, signabsThe function applied; the trigonometric ones take radians.

Scale scale

Maps x from one range to another: raw counts to engineering units.

In: x number (0) · Out: result number

FieldTypeDefaultMeaning
inMin (from min)number0The input range: from min maps to to min.
inMax (from max)number100From max maps to to max.
outMin (to min)number0The output at from min.
outMax (to max)number1The output at from max.
clampbooleanfalseKeeps the output inside the to range.

Clamp clamp

x held between low and high.

In: x number (0), low number (0), high number (100) · Out: result number

Round round-to

x rounded to a number of decimals.

In: x number (0) · Out: result number

FieldTypeDefaultMeaning
decimalsnumber2Digits after the point, 0 to 10.

Formula formula

A formula node: named inputs on the left, named outputs on the right, a formula between them. One line is an expression: (a - 32) 5 / 9. Several lines assign the outputs: y = sqrt(a a + b * b); z = y / 2; - with if, while and for, and the functions of Math. The text is read by the formula language, never run as code.

In: a number (0), b number (0), c number (0), d number (0) · Out: result number · the terminals follow the fields; these are the defaults

FieldTypeDefaultMeaning
inputstexta,b,c,dThe input terminals, comma-separated; each is a number in the expression.
outputstextresultThe output terminals, comma-separated; a body assigns them, an expression is the first.
expressioncodea + bThe formula over the inputs: arithmetic, comparisons, sqrt, sin, min, max and the rest of Math, if / while / for; an error gives NaN.

Compare and logic

Greater greater

a > b

In: a number (0), b number (0) · Out: result boolean

Less less

a < b

In: a number (0), b number (0) · Out: result boolean

Equal equal

a = b

In: a number (0), b number (0) · Out: result boolean

Not equal not-equal

a ≠ b

In: a number (0), b number (0) · Out: result boolean

In range in-range

low ≤ x ≤ high

In: x number (0), low number (0), high number (100) · Out: result boolean

And and

a and b

In: a boolean (false), b boolean (false) · Out: result boolean

Or or

a or b

In: a boolean (false), b boolean (false) · Out: result boolean

Not not

not a

In: a boolean (false) · Out: result boolean

Select select

The true input when the condition holds, else the false one.

In: condition boolean (false), true any, false any · Out: result any

Changed changed

True when x differs from the value the node saw last time.

In: x any · Out: result boolean

Text

Join text concat

a, b and c as one text.

In: a any (""), b any (""), c any ("") · Out: result string

FieldTypeDefaultMeaning
separatortextPut between the parts; empty joins them directly.

Format format

A text from a template: {a} at {b} {c}. A number takes the decimals given.

In: a any (""), b any (""), c any ("") · Out: result string

FieldTypeDefaultMeaning
templatetext{a}{a}, {b} and {c} are replaced by the inputs.
decimalsnumber2How a number input is written.

To number to-number

The first number in a text; NaN when there is none.

In: x any ("") · Out: result number

To text to-text

The value as text.

In: x any ("") · Out: result string

Arrays

Build array build-array

The connected inputs as one array.

In: a number, b number, c number, d number · Out: array array

Append append

The array with the value at its end; the last N kept when a size is set.

In: array array ([]), value any · Out: array array

FieldTypeDefaultMeaning
size (keep last)number0The array is trimmed to its last N; 0 keeps everything.

Bundle bundle

A record from its inputs, one field per name: { a, b }. The terminals follow the names.

In: a any, b any · Out: record record · the terminals follow the fields; these are the defaults

FieldTypeDefaultMeaning
typeId (type)typeA type of the project: its fields become the names below, and stay with it when the type changes.
names (field names)texta,bComma-separated; each becomes an input and a field of the record.

Unbundle unbundle

The fields of a record, one output per name. The terminals follow the names.

In: record record ({}) · Out: a any, b any · the terminals follow the fields; these are the defaults

FieldTypeDefaultMeaning
typeId (type)typeA type of the project: its fields become the names below, and stay with it when the type changes.
names (field names)texta,bComma-separated; each becomes an output; a field the record lacks gives null.

Index index

The element at i (rounded); a negative i counts from the end; outside the array the value is null.

In: array array ([]), i number (0) · Out: value any

Statistics array-stats

Mean, minimum, maximum, sum, standard deviation and length of the numbers in the array.

In: array array ([]) · Out: mean number, min number, max number, sum number, stdev number, length number

Time

Now now

The time, in milliseconds since the epoch and as text.

In: - · Out: ms number, text string

Elapsed elapsed

Seconds since the diagram started.

In: - · Out: seconds number

Wait wait

Passes the value on after the milliseconds; the nodes wired after it wait too.

In: value any, ms number (1000) · Out: value any

Structures

While loop while (a frame)

Runs the nodes inside its frame again and again, one iteration every period (ms), until the stop terminal (wired from inside) is true or the diagram stops. i is the iteration, from 0.

In: period number (1000), stop boolean (false) · Out: i number

FieldTypeDefaultMeaning
periodnumber1000Milliseconds between iterations; 0 runs as fast as the nodes allow.

For loop for (a frame)

Runs the nodes inside its frame count times, a period (ms) apart. i is the iteration, from 0. What is wired to collect (on the frame's right edge, from inside) is gathered, one value per iteration, into the array the loop gives out when it ends - the classic auto-indexing.

In: count number (10), period number (0), collect any · Out: i number, array array

FieldTypeDefaultMeaning
countnumber10Iterations, when the count terminal is not wired.
periodnumber0Milliseconds between iterations; 0 runs them back to back.

Feedback feedback

Inside a loop: gives out the value it was given in the previous iteration (the initial value on the first), so a running sum, a filter or a count can be built.

In: value any · Out: previous any

FieldTypeDefaultMeaning
initialtext0The value on the first iteration of the run; JSON is parsed, empty is null. A Feedback inside an inner loop keeps its value across the outer loop's iterations.

Case case (a frame)

Runs one of its cases: the one named like the selector (true or false, a number, a text), or the case named default. The frame shows one case at a time; a node placed inside belongs to the case shown. A value wired out of a case that did not run is the receiving terminal's default. Its output tunnels (the outputs field) carry a value out of whichever case ran: each case wires its own value to the tunnel on the frame's right edge - the classic output tunnel, the way a state machine hands on its next state.

In: selector any (false) · Out: case string · the terminals follow the fields; these are the defaults

FieldTypeDefaultMeaning
casestexttrue,falseThe case names, comma-separated: true,false for a boolean selector; 0,1,2,default for a number; running,stopped,default for a text.
outputs (output tunnels)textNames, comma-separated: each is a tunnel on the right edge that every case wires from inside and the diagram reads outside; a case that wires nothing gives null.

Sequence sequence (a frame)

Runs its frames one after another: everything in frame 1, then everything in frame 2, and so on - the flat sequence structure, for what must happen in an order the wires do not give (set up, then measure, then close). The frame shows one frame at a time; a node placed inside belongs to the frame shown. Wires may come in from outside and go out to the outside.

In: - · Out: frame number

FieldTypeDefaultMeaning
framesnumber2How many frames, run in order.

Event event (a frame)

Waits for an event of a component on the page - a setpoint, a press, a selection - then runs the nodes inside its frame once, with the event's value at its terminal. Inside a While loop it handles one event per iteration. With a timeout (ms) it gives up waiting and runs with timedOut true; without one it waits as long as the diagram runs. On the agent there is no panel: it times out, or reports an error when it has no timeout.

In: timeout number (-1) · Out: value any, timedOut boolean

FieldTypeDefaultMeaning
componentcomponentA component of a page, by its id.
eventeventThe event waited for, from the component's own list.
field (detail field)textvalueWhich field of event.detail is the value; empty takes the whole detail.
timeout (timeout (ms))number-1Milliseconds to wait when the terminal is not wired; -1 waits without limit.

Diagram input sub-input

A terminal of this diagram when a Subdiagram node calls it: the value the caller wired, or the default when run on its own. Terminals are ordered top to bottom.

In: - · Out: value any · the terminals follow the fields; these are the defaults

FieldTypeDefaultMeaning
name (terminal)textvalueThe terminal's name on the Subdiagram node.
typeselect: number, boolean, string, array, record, anyanyThe terminal's type.
defaulttextThe value when the caller leaves the terminal unwired, or the diagram runs on its own.

Diagram output sub-output

A terminal of this diagram when a Subdiagram node calls it: what is wired here comes out of the Subdiagram node. Terminals are ordered top to bottom.

In: value any · Out: - · the terminals follow the fields; these are the defaults

FieldTypeDefaultMeaning
name (terminal)textvalueThe terminal's name on the Subdiagram node.
typeselect: number, boolean, string, array, record, anyanyThe terminal's type.

Subdiagram call

Calls another diagram of the project as one node: its Diagram inputs are the terminals on the left, its Diagram outputs the terminals on the right. The diagram runs once per call, from its inputs to its outputs, here or on the agent.

In: - · Out: - · the terminals follow the fields; these are the defaults

FieldTypeDefaultMeaning
diagramdiagramThe diagram called; one with Diagram input and Diagram output nodes.

Outputs

Probe probe

Shows the value in the message strip and passes it on.

In: value any · Out: value any

FieldTypeDefaultMeaning
labeltextNames the value in the strip; empty writes probe.

Alarm alarm-if

Raises an alarm while active is true and clears it when it turns false; the value goes into the message.

In: active boolean (false), value any · Out: active boolean

FieldTypeDefaultMeaning
idtextalarmIdentifies the alarm: raised once while active, cleared when active goes false.
tagtextThe tag named in the alarm record and the message.
messagetext{tag} high ({value}){tag} and {value} are replaced.
priorityselect: 1, 2, 3, 421 is the most urgent (ISA-18.2).
component (on component)componentAn alarm banner or grid on a page; empty keeps the alarm in the runtime's list only.

Log log-record

Appends a record of the connected inputs, named by the fields, with the time.

In: a any, b any, c any, d any · Out: -

FieldTypeDefaultMeaning
name (log name)textlogThe file: logs/<app>/<name>.csv or .tdms on the agent, the download in the designer.
names (field names)texta,b,c,dColumn names for the inputs a to d, comma-separated.
formatselect: csv, tdmscsvCSV, or TDMS with a channel per column.

Notify notify-if

Posts the value as JSON to a webhook when send turns true.

In: send boolean (false), value any · Out: -

FieldTypeDefaultMeaning
urltextThe webhook; the body is { value, timestamp } as JSON.