Get Started
Blocks

Blocks

The toolbox consists of 18 functional categories. Typing a name or description into the search box at the top of the editor narrows the view to the matching blocks, and each block's description is shown as a tooltip when hovering over it.

CategoryContents
VariablesBlocks that read and write project variables.
LogicConditional statements (if), comparison, and boolean operations.
LoopsCount, condition, counting, and list loops, plus break/continue.
MathArithmetic and mathematical functions.
Date/TimeDate and time calculations and conversions.
TextString manipulation.
Byte ArraysBinary data manipulation.
ListsList creation, lookup, and manipulation.
Type ConversionConversion between variable types.
Unit ConversionLength, pressure, energy, speed, temperature, astronomical distance, angle, coordinate (deg/min/sec), and compass conversions.
ScienceSun and moon rise/set times, azimuth and altitude, psychrometric properties, and standard atmospheric pressure.
Bits/BytesBitwise operations.
Complex/VectorComplex number and vector operations.
JSONJSON parsing and generation.
XMLXML parsing and generation.
ColorColor value manipulation and conversion.
Local VariablesTemporary variables scoped to this block editor.
Local FunctionsFunctions defined and called within this block editor.

Local Variables and Local Functions

Local variables exist only inside the block editor that defines them and are used to hold intermediate results. They are separate from project variables, so other logic and dashboards cannot see them. Blocks are provided to create a variable, write a value, read a value, and add a number. The counting and list loops in the Loops category work by storing the index or item in a local variable.

Local functions are for calculations repeated in several places. Functions with and without a return value can be defined, and input parameters are added with the block's gear button. A defined function is run from another block in the same editor using a call block, which also comes in two forms depending on whether a value is returned. To return a value part-way through a function, use the return if block.

Caution Local variables and local functions are valid only inside the block editor that defines them. They are not available in the block editor of another value input, so make values that must be shared into project variables instead (Part 6).