Fanuc Power Mate i-D/H Operation Maintenance Handbook 5. CUSTOM MACRO
107
5.4 Arithmetic Commands
Purpose Expression Contents
Definition and
substitution of
variables
#i=#j Definition, substitution
#i=#j #k Subtraction
#i=#jOR#k Logical sum
(at every bit of 32 bits)
#i=#jXOR#k Exclusive OR
(at every bit of 32 bits)
Multiplication #i=#j*#k Product
arithmetic
#i=#j/#k Quotient
#i=#jAND#k Logical product
(at every bit of 32 bits)
Functions #i=SIN [#j] Sine (degree unit)
#i=ASIN [#j] Arcsine (degree unit)
#i=COS [#j] Cosine (degree unit)
#i=ACOS [#j] Arccosine (degree unit)
#i=TAN [#j] Tangent (degree unit)
#i=ATAN [#j]/[#k] Arctangent (degree unit)
#i=SQRT [#j] Square root
#i=ABS [#j] Absolute value
#i=BIN [#j] Conversion from BCD to BIN
#i=BCD [#j] Conversion from BIN to BCD
#i=ROUND [#j] Rounding off
#i=FIX [#j] Discard fractions less than 1
#i=FUP [#j] Add 1 for fractions less than 1
#i=LN [#j] Logarithm
#i=EXP [#j] Index
Combination of
arithmetic operations
The above arithmetic operations
and functions can be combined.
The order of priority in an arithme-
tic operation is function, multi- 