Functions (sqrt, Abs, Bin, Bcd, Ln, Exp, Rnd, Fix, Fup) - Mitsubishi Electric Q172CPU Programming Manual

Melsecq series motion controller sv43.

7 MOTION PROGRAMS FOR POSITIONING CONTROL

7.16.9 Functions (SQRT, ABS, BIN, BCD, LN, EXP, RND, FIX, FUP)

SQRT, ABS, BIN, BCD,
Code
LN, EXP, RND, FIX,
FUP
Function
Functions
f
u
Format
[Explanation]
[Program Example]
n t o
c i n
[ ]
n
;
(1) Operation of the specified function is executed.
(2) Refer to Items (5), (6), (7) in Section 7.11.3 for the operation result.
#2010L = SQRT [100]
#2020L = ABS [-25]
#2030L = BIN [100]
#2040L = BCD [100]
#2050L = LN [1000000]
#2060L = EXP [20]
#2070F = RND [14/3]
#2080F = FIX [14/3]
#2090F = FUP [14/3]
#2170F = RND [-14/3]
#2180F = FIX [-14/3]
#2190F = FUP [-14/3]
Operations of SQRT (square root), ABS (absolute value), BIN (BCD to
BINARY conversion), BCD (BINARY to BCD conversion), LN (natural
logarithm), EXP (base e exponent), RND (round off), FIX (round down)
and FUP (round up) are executed.
Numerical value (Indirect setting is possible)
Function
(SQRT, ABS, BIN, BCD, LN, EXP, RND, FIX, FUP)
10 enters [D2011, D2010].
25 enters [D2021, D2020].
64 enters [D2031, D2030].
256 enters [D2041, D2040].
13 enters [D2051, D2050].
485165195 enters [D2061, D2060].
5 enters [D2073, D2072, D2071, D2070]
(64-bit floating-point type).
4 enters [D2083, D2082, D2081, D2080]
(64-bit floating-point type).
5 enters [D2093, D2092, D2091, D2090]
(64-bit floating-point type).
-5 enters [D2173, D2172, D2171, D2170]
(64-bit floating-point type).
-5 enters [D2183, D2182, D2181, D2180]
(64-bit floating-point type).
-4 enters [D2193, D2192, D2191, D2190]
(64-bit floating-point type).
7 - 142