Skip to main content

Math Blocks

In automation logics, math blocks are used for a wide range of common mathematical operations on numeric input data. With these blocks, you can easily perform addition, subtraction, multiplication, division, find maximum/minimum values, calculate averages, logarithms, exponents, trigonometric functions, and more. This enables flexible threshold judgement, data transformation, and dynamic computation—helping to address even complex requirements.

Math blocks are commonly used in the following scenarios:

  • Dynamic calculations and threshold checking for temperature, humidity, and other environmental data.
  • Aggregation and statistics with multiple data sources (for example, averaging, finding the maximum or minimum).
  • Proportional allocation, unit conversion, and other complex automation logic.
  • Advanced data processing and custom algorithms supported by trigonometric, logarithmic, and exponential functions.

By dragging and configuring math blocks, you can build a flexible and powerful data calculation system without any coding. This supports a broader set of advanced automation scenarios.

BlockDescription
AddAdds multiple numeric inputs and outputs the sum. Commonly used for adding data from multiple sensors, energy statistics, and more.
SubtractSubtracts the second input from the first and outputs Input AInput B\text{Input A} - \text{Input B}. Useful for monitoring temperature/humidity differences, energy changes, or trends.
MultiplyMultiplies up to 4 inputs. Suitable for area calculation, power amplification, or ratio conversion.
DivideDivides two values and outputs Input AInput B\frac{\text{Input A}}{\text{Input B}}. Often used for per capita energy use or proportional allocation. Note: Divisor cannot be zero.
MaximumCompares up to 4 inputs and outputs the largest value. Useful for multi-zone monitoring or maximum threshold detection.
MinimumCompares up to 4 inputs and outputs the smallest value. Good for detecting lowest points or alerting on minimum values.
AverageCalculates the average of up to 4 inputs. Ideal for environmental analysis or unified strategies across sensors.
NegativeOutputs the negative of the input value. Used for getting relative values.
Abs ValueOutputs the absolute value of the input. Useful for analyzing data magnitude uniformly.
SineOutputs the sine value of the input number (sinX°\sin X°).
CosineOutputs the cosine value of the input number (cosX°\cos X°).
TangentOutputs the tangent value of the input number (tanX°\tan X°).
Arc SineAccepts input in [1,1][-1, 1] and outputs the angle (arcsinX\arcsin X).
Arc ConsineAccepts input in [1,1][-1, 1] and outputs the angle (arccosX\arccos X).
Arc TangentOutputs the arctangent angle of the input (arctanX\arctan X).
ExponentialCalculates the exponential value using base ee (exe^x).
FractorialCalculates the factorial for a positive integer input (!x!x).
Log Base 10Calculates log10x\log_{10} x, commonly used for level judgement or value grouping.
Log NaturalCalculates the natural logarithm of the input (lnx\ln x).
ModulusOutputs the remainder of dividing two inputs (Input AmodInput B\text{Input A} \bmod \text{Input B}).
PowerOutputs Input AInput B\text{Input A}^\text{Input B}, that is, base to the power of exponent.
Square RootOutputs the square root of the input (x\sqrt{x}).