Chapter 7 Macro TC-32B
2004/01/22 7 - 12 eTCOMNCPR7-1.doc
7
7.3 Calculation Function
7.3.1 Calculation type
Calculations such as those below are possible for variables and numerical values.
[Supplementary explanation]
• Numerical values are entered for i, j, and k of #i, #j, and #k (e.g. #10), indicating they are
macro variables.
• Instead of #j and #k, a constant can also be used for the right side of the equation.
Variable definition and
replacement
#i = #j Definition and replacement
Addition #i = #j + #K
#i = #j -#k
#i = #j OR #k
#i = #j XOR #k
Addition
Subtraction
Logical OR
Exclusive OR
Multiplication #i = #j * #k
#i = #j /#k
#i = #j AND #k
Multiplication
Division
AND
Function #i = SIN [#k]
#i = COS [#k]
#i = TAN [#k]
#i = ATAN [#k]
#i = SQRT [#k]
#i = ABS [#k]
#i = BIN [#k]
#i = BCD [#k]
#i = ROUND [#k]
#i = FIX [#k]
#i = FUP [#k]
Sine
Cosine
Tangent
Reverse tangent
Square root
Absolute value
BCD to BIN conversion
BIN to BCD conversion
Rounding off
Rounding down to nearest whole
number
Rounding off to nearest whole
number
7.3.2 Calculation order
The order that an expression is evaluated is as shown below.
1. Function
2. Multiplication
3. Addition
To replace the above order, use brackets [ ].
Brackets [ ] can be used up to five times, including the brackets for the function.