Fanuc Power Mate i-D/H Operator Manual

PROGRAMMING
(Common to Power Mate i–D and –H)
13. CUSTOM MACRO
B–63174EN/03
118
When the absolute value of the integer produced by an operation on a
number is greater than the absolute value of the original number, such an
operation is referred to as rounding up to an integer. Conversely, when
the absolute value of the integer produced by an operation on a number
is less than the absolute value of the original number, such an operation
is referred to as rounding down to an integer. Be particularly careful when
handling negative numbers.
Example:
Suppose that #1=1.2 and #2=–1.2.
When #3=FUP[#1] is executed, 2.0 is assigned to #3.
When #3=FIX[#1] is executed, 1.0 is assigned to #3.
When #3=FUP[#2] is executed, –2.0 is assigned to #3.
When #3=FIX[#2] is executed, –1.0 is assigned to #3.
When a function is specified in a program, the first two characters of the
function name can be used to specify the function. (See V–9.7)
Example:
ROUND RO
FIX FI
(1) Functions
(2) Operations such as multiplication and division (*, /, AND, )
(3) Operations such as addition and subtraction (+, –, OR, XOR)
Example) #1=#2+#3*SIN[#4];
(1)
(2)
(3)
(1), (2), and (3) indicate the order of operations.
Brackets are used to change the order of operations. Brackets can be used
to a depth of five levels including the brackets used to enclose a function.
When a depth of five levels is exceeded, alarm No.118 occurs.
Example) #1=SIN [ [ [#2+#3] *#4 +#5] *#6] ;
(1)
(2)
(3)
(4)
(5)
(1) to (5) indicate the order of operations.
Rounding up and down
to an integer
Abbreviations of
arithmetic and logic
operation commands
Priority of operations
Bracket nesting

Leave a Reply

Your email address will not be published. Required fields are marked *