Technical Support
Nc machine tool
FWV-L850Design and application of parametric CNC programming for machining center
3.2 macro program local variable assignment
自變量(liang)的地(di)址 |
變(bian)量號 |
自變量的地(di)址 |
變(bian)量號 |
A |
#1 |
Q |
#17 |
B |
#2 |
R |
#18 |
C |
#3 |
S |
#19 |
D |
#7 |
T |
#20 |
E |
#8 |
U |
#21 |
F |
#9 |
V |
#22 |
H |
#11 |
W |
#23 |
I |
#4 |
X |
#24 |
J |
#5 |
Y |
#25 |
K |
#6 |
Z |
#26 |
M |
#13 |
? |
? |
? ? ? ? ? ? ? ? ? ? ? ? Table 1 local variable address and variable number
? ? ? The removal of the local variable can be done by the control panel, or by the use of the program code. When you press the reset or emergency stop button on the control panel, you can remove all local variables; you can also remove all local variables after executing the M30 or M99 code.
3.3 macro program function
? ?Macro program has a powerful function, the function can be divided into six groups: arithmetic functions, trigonometric function, integral function and auxiliary function, logic function, transform function. Arithmetic functions have the sum, difference, product and addition, and their arithmetic symbols are +, -, *, and /. The trigonometric sine, cosine function, tangent and arctangent function and its symbols were sin, cos, tan and atan.The integral function has four to five homes, the integral function rounding up and down function integral function,The symbols are ROUND, FUP, FIX. The auxiliary function has the square root function, the absolute value function, the natural logarithm function, the exponential function with E as the bottom, and the addition of the fractional function, whose sign is SQRT, LN, ABS, ADP, EXP. The logical function is equal to, not equal to, greater than, less than, no less than, no more than, the symbol of EQ, GE, NE, GT, LT, LE. The transformation function has BCD and BCD, the BIN function converts binary encoding's decimal format to binary format, and the BIN function converts the binary format into a binary encoding decimal format.
3.4 branches and loops
WHILE [Condition] DOn
……
ENDn
Execute the loop body as long as the specified condition is true. Don action and the end of the cycle of the establishment of a link, here n and ENDn expression in the n.
- Previous article: Nothing!
- Later article: Nothing!