
5.PROGRAM INPUT NC FUNCTION B-63942EN/02
- 210 -
Example
r
b
a
Bolt hole circle as shown above can be programmed easily. Program a
custom macro body of a bolt hole circle; once the custom macro body
is stored, operation can be performed as if the CNC itself has a bolt
hole circle function. The programmer need only to remember the
following command, and the bolt hole circle can be called any time.
- Format
G65 Pp Rr Aa Bb Kk ;
p : Macro number of the bolt hole circle
r : Radius
a : Initial angle
b : Angle between holes
k : Number of holes
With this function, the CNC can be graded up by the user himself.
Custom macro bodies may be offered to the users by the machine tool
builder, but the users still can make custom macro himself.
The following functions can be used for programming the custom
macro body.
Explanation
- Use of Variable
Variables : #i (i=1, 2, 3, . . . )
Quotation of variables : F#33 (#33: speed expressed by variables)
Various operation can be done between variables and constants.
The following operands, and functions can be used:
+ (sum), - (difference), * (product), / (quotient), OR (logical sum),
XOR (exclusive logical sum), AND (logical product), SIN (sine),
ASIN (arc sine), COS (cosine), ACOS (arc cosine), TAN (tangent),
ATAN (arc tangent), SQRT (square roots), ABS (absolute value), BIN
(conversion from BCD to binary), BCD (conversion from binary to
BCD), FIX (truncation below decimal point), FUP (raise fractions
below decimal point), ROUND (round), LN (natural logarithm), EXP
(exponential function), POW (power), ADP (decimal point addition)
Example) #5=SIN [[#2+#4]*3.14+#4]*ABS[#10]