The RMC expressions support many built-in standard functions, as listed below. You can also create custom User Functions.
General Math Functions |
Description |
Returns the absolute value of a. |
|
Returns natural (e) raised to the ath power. |
|
Returns the natural logarithm (base e) of a. |
|
Returns the logarithm (base 10) of a. |
|
Returns the square root of a. |
|
Returns the polynomial calculation up to 8 coefficients a + bt + ct2 + dt3... |
|
Returns -1 if a is negative, +1 if a is positive, and 0 if a is zero. |
Rounding Functions |
Description |
Rounds a to n decimal places. |
|
Rounds a to the desired multiple. |
|
Rounds a to an integer towards zero. Return type is DINT. |
|
Rounds a to an integer towards zero. Return type is REAL. |
|
Rounds a to the next greater (most positive) integer. |
|
Rounds a to the next lesser (most negative) integer. |
Selection Functions |
Description |
Returns the smallest value of the parameters (up to 10 operands). |
|
Returns the largest value of the parameters (up to 10 operands). |
|
Limits InVal to the lower limit Min and the upper limit Max. |
|
In-line IF statement. If cond is true, returns a, otherwise returns b. |
Trigonometric and Hyperbolic Functions |
Description |
Returns the sine of a. |
|
Returns the cosine of a. |
|
Returns the tangent of a. |
|
Returns the arcsine of a. |
|
Returns the arccosine of a. |
|
Returns the arctangent of a. |
|
Returns the hyperbolic sine of a. |
|
Returns the hyperbolic cosine of a. |
|
Returns the hyperbolic tangent of a. |
Bit String Functions |
Description |
Shifts the bits in a to the right n times. Zeros are shifted in. |
|
Shifts the bits in a to the left n times. Zeros are shifted in. |
|
Shifts the bits in a to the right n times. The sign bit is shifted in on the left. |
|
Rolls the bits in a to the right n times. |
|
Rolls the bits in a to the left n times. |
Curve Functions |
Description |
Returns the x value for the first point in the curve with the specified id. |
|
Returns the x value for the last point in the curve with the specified id. |
|
Interpolates the curve with the specified id at the given value of x, and returns the Y value of the curve at that point. |
|
Interpolates the curve with the specified id at the given value of x, and returns the V (velocity) value of the curve at that point. |
|
Interpolates the curve with the specified id at the given value of x, and returns the A (acceleration) value of the curve at that point. |
|
Returns TRUE if the curve with the specified id exists, otherwise returns FALSE. |
Array Functions |
Description |
Returns the number of elements in the array. |
|
Fill len values with val starting at to. |
Type Conversion Functions |
Description |
Rounds a to the nearest integer. |
|
Converts the type of a to a DINT type without changing the underlying bit pattern. |
|
Converts the type of a to a DWORD type without changing the underlying bit pattern. |
|
Converts the type of a to a REAL type without changing the underlying bit pattern. |
|
Returns a in REAL type. |
|
a and its bit order remains the same, but type is changed to DINT. |
|
a and its bit order remains same, but type is changed to DWORD. |
|
Rounds a to an integer towards zero. |
Other Functions |
Description |
Returns the address of the ith register after the register loc. |
|
Copies up to 32 variables from src to dst. |
|
Logs the values of the operands a, ... in the Event Log. From 1 to 3 operands. |
|
Represents the register at the specified address %MDf.e. |
|
See Also
Expressions Overview | User Functions | Operators | Data Types
Copyright © 2024 Delta Computer Systems, Inc. dba Delta Motion