How to use the medium -sized stick or border search device to automatically find a positive part and enter automatic knife settings, here is a macro program to achieve it. (Fanuc 0i matt-mc system applicable)
1. Principle
When the part is placed and the coordinate system of the machine tool has a certain angle, in the traditional technical model of mechanical treatment, it is necessary to find first positive and re-transformation. The measurement diagram of the perspective and the position of the piece is illustrated in the figure. Take any point on each side of the Y1 axis in the coordinate system of part x1o1y1 (i.e. point e and f); On the side (that is to say the AAA point (that is to say the point aaa) harmonize b) measure.
The method proposed in this article consists in automatically finding the position and posture of the part through the division of the MOB or the edge search, and to enter the parameters obtained in the machine tool and to use the program for the Rear treatment. In order to carry out the automatic search, the main problem that must be solved is the angle required to find and automatically obtain the actual location after the part of the part and the ideal position defined by the processing program.
Second, programming
The automatic procedure is as follows:
%
O0001 automatically finds a positive program
# 101 = # 5021 to give value x to # 101
Manuel M00, move the border search in point F of part f
# 102 = # 5021 Automatic, give the × value of the FU machine value, to # 102
Manuel M00, move the border search in point D of the room
# 113 = # 5022 Automatic, give the coordinate of the Y machine y on # 113
M00 manually, move the edge search in the point of the room
# 104 = # 5021 automatic, give the XXX icon # 104
# 114 = # 5022 The value y of the point a machine-tool is given there at # 114
Manuel M00, move the border search in the work point B
# 105 = # 5021 Automatic, give the machine coordinate or value X of order B on # 105
# 115 = # 5022 The value Y of machine B point B is given to # L15
IF[#19 EQ #0]Then # 19 = 1; If the parameter is not attributed, it will be given 1 to S
# 3 =[#102-#101]/ 2 + # 101 The value x of points E and P and F.
# 4 =[#114-#l13]/ 2 + # 113 Look for the intermediate value of the value y of point D and point A, that is to say the coordinate Y to “divide”
# 5 = Atan[#l15-#114]/ /[#105-#l04] Looking for a rotation angle
#[250l+#19]= # 3 Write the X coordinates obtained in the coordinate system G54 ~ G59 corresponding
#[260l+#19]= # 4 Write the contact details obtained in the G54 ~ G59 coordinates system
# 515 = # 5 in the global variables of the angle value, so that the program calls
M02
%
After having executed the above program, the machine’s coordinates and the rotation angles of the original point of the part coordinate system are obtained. work room.
Daguang focuses on providing solutions such as precision CNC machining services (3-axis, 4-axis, 5-axis machining), CNC milling, 3D printing and rapid prototyping services.


















