From OpenSCADAWiki
< Modules
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 1: | Line 1: | ||
<languages/> | <languages/> | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 7: | Line 6: | ||
<section begin=info /> | <section begin=info /> | ||
| [[Special:MyLanguage/Modules/FLibMath|FLibMath]] || Math functions | | [[Special:MyLanguage/Modules/FLibMath|FLibMath]] || Math functions | ||
− | | 0. | + | | 0.7 || GPL2 || spec_FLibMath.so || en,uk,ru,de || x86,x86_64,ARM |
<section end=info /> | <section end=info /> | ||
| Special || Roman Savochenko<br/>Maxim Lysenko (2009-2010) — the page translation || Provides a library of the standard mathematical functions. | | Special || Roman Savochenko<br/>Maxim Lysenko (2009-2010) — the page translation || Provides a library of the standard mathematical functions. | ||
Line 14: | Line 13: | ||
__TOC__ | __TOC__ | ||
− | + | The module provides OpenSCADA for a static standard mathematical functions library. | |
− | To address the functions of the library you can use static call address | + | 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. |
== Functions == | == Functions == | ||
− | Table 1 provides a description of each function of the library | + | Table 1 provides a description of each function of the library. |
− | '''Table 1:''' | + | '''Table 1:''' Functions of the standard mathematical functions library |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! | + | ! Identifier !! Name !! Description |
|- | |- | ||
− | |abs|| | + | | abs || Absolute || Absolute math function. |
|- | |- | ||
− | |acos|| | + | | acos || Arccosine || Arccosine math function. |
|- | |- | ||
− | |asin|| | + | | asin || Arcsine || Arcsine math function. |
|- | |- | ||
− | |atan|| | + | | atan || Arctangent || Arctangent math function. |
|- | |- | ||
− | |ceil|| | + | | ceil || Ceil || Math function of rounding up to the largest integer. |
|- | |- | ||
− | |cos|| | + | | cos || Cosine || Cosine math function. |
|- | |- | ||
− | |cosh|| | + | | cosh || Cosine hyperbolic || Cosine hyperbolic math function. |
|- | |- | ||
− | |exp||Exponent|| | + | | exp || Exponent || Exponent math function. |
|- | |- | ||
− | |floor|| | + | | floor || Floor || Math function of rounding down to the lowest integer. |
|- | |- | ||
− | |if|| | + | | if || IF condition || Function of the type 'if'-condition. |
|- | |- | ||
− | |lg|| | + | | lg || Decimal logarithm || Decimal logarithm math function. |
|- | |- | ||
− | |ln||Natural logarithm|| | + | | ln || Natural logarithm || Natural logarithm math function. |
|- | |- | ||
− | |pow||Power|| | + | | pow || Power || Power math function. |
|- | |- | ||
− | |rand||Random number||Math | + | | rand || Random number || Math function of the random numbers generation. |
|- | |- | ||
− | |sin||Sine|| | + | | sin || Sine || Sine math function. |
|- | |- | ||
− | |sinh|| | + | | sinh || Sine hyperbolic || Sine hyperbolic math function. |
|- | |- | ||
− | |sqrt|| | + | | sqrt || Square root || Square root math function. |
|- | |- | ||
− | |tan||Tangent|| | + | | tan || Tangent || Tangent math function. |
|- | |- | ||
− | |tanh|| | + | | tanh || Tangent hyperbolic || Tangent hyperbolic math function. |
|} | |} | ||
== User programming API == | == User programming API == | ||
− | + | The module, as an object, provides user programming functions. | |
− | + | ||
<section begin=API /> | <section begin=API /> | ||
'''The object "Functions library" (SYS.Special.FLibMath)''' | '''The object "Functions library" (SYS.Special.FLibMath)''' | ||
Line 73: | Line 71: | ||
'''The object "User function" (SYS.Special.FLibMath["funcID"])''' | '''The object "User function" (SYS.Special.FLibMath["funcID"])''' | ||
− | * ''ElTp call(ElTp prm1, ...)'' — call the function with parameters '' | + | * ''ElTp call(ElTp prm1, ...)'' — call the function with parameters ''prm{N}''. Return result of the called function. |
<section end=API /> | <section end=API /> |
Revision as of 10:59, 28 October 2018
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. |
Contents
[hide]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.