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.
| Category | Contents |
|---|---|
| Variables | Blocks that read and write project variables. |
| Logic | Conditional statements (if), comparison, and boolean operations. |
| Loops | Count, condition, counting, and list loops, plus break/continue. |
| Math | Arithmetic and mathematical functions. |
| Date/Time | Date and time calculations and conversions. |
| Text | String manipulation. |
| Byte Arrays | Binary data manipulation. |
| Lists | List creation, lookup, and manipulation. |
| Type Conversion | Conversion between variable types. |
| Unit Conversion | Length, pressure, energy, speed, temperature, astronomical distance, angle, coordinate (deg/min/sec), and compass conversions. |
| Science | Sun and moon rise/set times, azimuth and altitude, psychrometric properties, and standard atmospheric pressure. |
| Bits/Bytes | Bitwise operations. |
| Complex/Vector | Complex number and vector operations. |
| JSON | JSON parsing and generation. |
| XML | XML parsing and generation. |
| Color | Color value manipulation and conversion. |
| Local Variables | Temporary variables scoped to this block editor. |
| Local Functions | Functions 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.