beautypg.com

Standard functions, E functions, Functions – Delta RMC151 User Manual

Page 357: Function, N standard functions

background image

5 Programming

5.14.2. Standard Functions

5.14.2.1. Standard Functions

The RMC expressions support many built-in standard functions, as listed below. You can also

create custom User Functions.

General Math

Functions

Description

ABS(a)

Returns the absolute value of a.

EXP(a)

Returns natural (e) raised to the a

th

power.

LN(a)

Returns the natural logarithm (base e) of a.

LOG(a)

Returns the logarithm (base 10) of a.

SQRT(a)

Returns the square root of a.

POLY(t, a, b, c, d,...)

Returns the polynomial calculation up to 8 coefficients
a + bt + ct

2

+ dt

3

...

SIGNUM(a)

Returns -1 if a is negative, +1 if a is positive, and 0 if a is

zero.


Rounding Functions Description
ROUND(a)
ROUND(a, n)

Rounds a to n decimal places.

MROUND(a, multiple)

Rounds a to the desired multiple.

TRUNC(a)

Rounds a to an integer towards zero. Return type is DINT.

TRUNC_REAL(a)

Rounds a to an integer towards zero. Return type is REAL.

CEIL(a)

Rounds a to the next greater (most positive) integer.

FLOOR(a)

Rounds a to the next lesser (most negative) integer.


Selection Functions

Description

MIN(a, b, ...)

Returns the smallest value of the parameters (up to 10

operands).

MAX(a, b, ...)

Returns the largest value of the parameters (up to 10 operands).

LIMIT(Min, InVal,

Max)

Limits InVal to the lower limit Min and the upper limit Max.

SEL(cond, a, b)

In-line IF statement. If cond is true, returns a, otherwise returns

b.


Trigonometric and Hyperbolic Functions Description
SIN(a)

Returns the sine of a.

COS(a)

Returns the cosine of a.

TAN(a)

Returns the tangent of a.

ASIN(a)

Returns the arcsine of a.

ACOS(a)

Returns the arccosine of a.

deltamotion.com

337

This manual is related to the following products: