Mround function, Poly function, Poly( t, a, b, c, d,... ) – Delta RMC151 User Manual

Page 375: Mround( a, multiple )

Advertising
background image

5 Programming

MIN(8, 5, 10) returns 5
MIN(10, 2, -5,8) returns -5

5.14.2.29. MROUND Function

MROUND(a, multiple)
Rounds a to the desired multiple.

Parameters

a (REAL)
The input value.
multiple (REAL)
a
will be rounded to the closest multiple of this value.

Return Value

Returns a REAL.

Remarks

Rounds a to the desired multiple, away from zero if dividing gives a remainder greater

than or equal to half the value of the multiple.
multiple must be non-zero. If multiple is zero, the task will fault. An error will be logged

in the Event Log and the user program running on the task will stop.

Examples

MROUND(87,12) returns 84
MROUND(0.53,0.15) returns 0.6

5.14.2.30. POLY Function

POLY(t, a, b, c, d, ...)
Returns the polynomial calculation of the equation a + bt + ct

2

+ dt

3

..., with up to 8

coefficients (up to 7th order).

Parameters

t (REAL)
The polynomial variable.
a, etc. (REAL)
The polynomial coefficients, where a is the zero-order coefficient, b is the first order

coefficient, c is the third-order coefficient, etc.

Return Value

Returns a REAL.

Remarks

This function supports between 2 and 8 coefficients (3 and 9 total parameters). This

function is more efficient than entering the polynomial directly.

deltamotion.com

355

Advertising
This manual is related to the following products: