Abs function, Acos function, Abs( a ) – Delta RMC151 User Manual
Page 359: Acos( a )
5 Programming
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.
5.14.2.2. ABS Function
ABS(a)
Returns the absolute value of a.
Parameters
a (REAL or DINT)
The input value.
Return Value
The absolute value of a. The data type will be the same as the a input parameter.
Examples
ABS(3) returns 3
ABS(-3.0) returns 3.0
5.14.2.3. ACOS Function
ACOS(a)
Returns the arccosine of a.
Parameters
a (REAL)
The input value.
Return Value
Returns a REAL in radians.
Remarks
Notice that the return value is in radians. To convert a value from radians to degrees,
multiply the radians value by 180/
π
. The RMC has an M_PI constant for
π
. For a < 1.0 or
a > 1.0, the task will fault. An error will be logged in the Event Log and the user program
running on the task will stop.
Examples
ACOS(0.5) returns 1.0471976
ACOS(0.5) * 180 / M_PI returns 60.0
deltamotion.com
339