From OpenSCADAWiki
Jump to: navigation, search
Other languages:
English • ‎mRussian • ‎Українська
Module Name Version License Source Languages Platforms Type Author Description
FLibMath Math functions 0.7 GPL2 spec_FLibMath.so en,uk,ru,de x86,x86_64,ARM Special Roman Savochenko
  Maxim Lysenko (2009-2010) — the page translation
Provides a library of the standard mathematical functions.

The module provides OpenSCADA for a static standard mathematical functions library.

To address the functions of the library you can use the static call address Special.FLibMath.{Func}() or dynamic SYS.Special.FLibMath["{Func}"].call(), SYS.Special.FLibMath.{Func}(). Where {Func} — function identifier in the library.

1 Functions

Table 1 provides a description of each function of the library.

Table 1: Functions of the standard mathematical functions library

Identifier Name Description
abs Absolute Absolute math function.
acos Arccosine Arccosine math function.
asin Arcsine Arcsine math function.
atan Arctangent Arctangent math function.
ceil Ceil Math function of rounding up to the largest integer.
cos Cosine Cosine math function.
cosh Cosine hyperbolic Cosine hyperbolic math function.
exp Exponent Exponent math function.
floor Floor Math function of rounding down to the lowest integer.
if IF condition Function of the type 'if'-condition.
lg Decimal logarithm Decimal logarithm math function.
ln Natural logarithm Natural logarithm math function.
pow Power Power math function.
rand Random number Math function of the random numbers generation.
sin Sine Sine math function.
sinh Sine hyperbolic Sine hyperbolic math function.
sqrt Square root Square root math function.
tan Tangent Tangent math function.
tanh Tangent hyperbolic Tangent hyperbolic math function.

2 User programming API

The module, as an object, provides user programming functions.

The object "Functions library" (SYS.Special.FLibMath)

  • ElTp {funcID}(ElTp prm1, ...) — call the library function {funcID}. Return result of the called function.

The object "User function" (SYS.Special.FLibMath["funcID"])

  • ElTp call(ElTp prm1, ...) — call the function with parameters prm{N}. Return result of the called function.