This week, we’re diving into function block Math operations.

IoT sensors, controllers or cloud data processing often needs to do some numerical work to make them smart. Lucid makes these operations incredibly straightforward.

The most general maths function block allows algebraic expressions to be entered, or you can choose from individual operator function blocks, but let’s start with some simple algebra!

Single input single output or multivariate blocks are available, but here we are using a single input value doing a simple polynomial and you can see the results plotted.

Operators include  +, -, *, /, ^, sqrt,  sin, cos, tan, log, ln, and abs. All of these are also available as single-function block operators if you don’t like algebra!

You may also notice that this example shows integer inputs and outputs, where fixed-point arithmetic is required and supported within function operations for you. Or you can use floating point versions.