
18.CUSTOM MACRO NC FUNCTIONS B-63322EN/03
- 234 -
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.
Explanations
- Use of Variable
Variables: #1 (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), COS
(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)
Example: #5 = SIN [[#2 + #4] * 3.14 + #4] * ABS (#10)
- Control command
Program flow in the custom macro body is controlled by the following
command.
r
b
a