Embodiment
Fig. 1 is in the embodiment of the invention being the system chart that the EXCEL data are directly created the method realization of NC program.This system comprises:
The initialization of system: data source module: the data source module is the data of the EXCEL table of every kind of U-shaped beam, comprises that two files are EXCEL longeron Parameter File and EXCEL longeron aperture file, supplies EXCEL read module reading of data.
By the data definition module: various arrays of data definition module definition and public variable; And pass to EXCEL read module, mould storehouse read module, parameter to array and public variable module, the automatic adaptive die module of five main frames, optimal module, NC program creation module be set, concrete definition as follows:
PDATA (600,7) conversion array is that two-dimensional array is deposited towards point data, and data item has:
0: detected value, 1: the X value of centre point, 2: the Y value of centre point; 3: mould number, 4: the X value of mould blocks insertion point+mould directions X biasing, 5: diameter; The 6:WTB index face selects 7:TB mark outside of belly reference field to select, and is used for whole modules;
Public variable: Public PROGNUM As String ' program number
Public BANLENTH As String ' sheet material length
Public BANWIDTH As String ' sheet material width
Public GAODU As String ' aerofoil height
Public HOUDU As String ' thickness
Public CLQD As Double ' the strength of materials
Public PNum As Integer ' is the hole counting effectively
The total hole count of Public G_Num As Integer '
' wait more than 100, be respectively applied for each functional module.
Parameter is provided with module:Parameter is provided with the data in the module Read EXCEL beam parameter or the parameter of forms is set, and is stored in the public variable of data definition module definition, and parameter is set; Beam length; Cantilever thickness, aerofoil height, outside of belly width; The title of output NC program, the minor increment between two main frames also passes to this part public variable each functional modules such as the automatic adaptive die module of five main frames, optimal module, NC program creation module;
Mould storehouse read module: mould storehouse read module is reading of data (1-61 station) from the outer mold library file; Put into mould storehouse array to the data of each mould, and the automatic adaptive die module of output mask storehouse array to five main frame, optimal module and NC program creation module;
The EXCEL read module, the data in reading of data source.Data source is the EXCEL data file; The EXCEL that describes the U-shaped beam has two files; One of which be the beam Parameter File referring to Fig. 6, read the beam Parameter File and put into the corresponding text frame, content: beam length, outside of belly width, aerofoil height, cantilever thickness; These parameters are used in transfer process, in binary channels, also need;
It two is the aperture file, referring to Fig. 5; The Read EXCEL data are put into conversion array PDATA, the aperture file content:
The 1st row A 2801021_k0101: 101 production numbers, 1021 odd numbers: left beam (even number is right beam),
The 2nd row N 310 total hole counts,
Be aperture since the 3rd row, six association arranged,
First mark H H: the hole that the hole * H of communications centre does not dash
Second three identify the WTB W:U ellbeam outside of belly, T: top airfoil, B: lower aerofoil
Compose the 6th that gives PDATA
The X coordinate figure at center, the 3rd X coordinate figure hole is composed the 1st that gives PDATA
The Y coordinate figure at center, the 4th Y coordinate figure hole compose to be given the of PDATA, 2
The reference field of the 5th reference field sign TB when WTB is the outside of belly (W), T is reference field with the top airfoil, and B is reference field with the lower aerofoil, and promptly Y value is which face to be measuring basis with, and tax is to the 7th of PDATA
The diameter in the diameter D hole in the 6th hole is not changed less than 1mm, to the punch die tool of pretending less than the thickness of slab choosing, greater than the mould that the thickness of slab choosing equates with size, composes the 5th that gives PDATA greater than 1mm
Aperture form: H WTB X Y TB D
The detailed step that EXCEL reads the aperture file is:
(1) creates the EXCEL object
(2) open workbook
(3) open worksheet
(4) obtain total line number
(5) read first row and take out Part No.,
(6) read second row
7) read 1 to 6 of the third line and be listed as PDATA (1,1)=X PDATA (1,2)=Y
PDATA(1,5)=D PDATA(1,6)=WTB PDATA(1,7)=TB
(8) and the like read 1 to 6 capable row of i and put into conversion array PDATA (i, 1) respectively to (i, 7);
(9) till i is greater than total line number
(10) close workbook, finish the EXCEL object, discharge worksheet, discharge workbook, discharge the EXCEL object;
And the automatic adaptive die module of data to five main frame of output conversion array PDATA;
The algorithm of EXCEL read module:
1. judge that the left and right beam algorithm is following: defining variable FA; First row, first row of FA=worksheet
FA removes the space and converts capitalization to; Get character " _ " 4 characters before among the FA; Convert FA to numeric type; If remming divided by 2, FA equals 1 for left beam; If remming divided by 2, FA equals 0 for right beam.
2. screen the algorithm in effective hole:
Capable the 1st row of the i of FA=worksheet
FA removes the space and converts capitalization to
If comprise character " # " among the FA, then be invalid hole
If do not comprise character " # " among the FA, get capable the 6th row of i of FA1=worksheet again
If FA1 is invalid hole less than 1
If FA1 is effective hole more than or equal to 1
3.
Convert the data line of EXCEL into the algorithm of conversion arrayIf in the time of effectively, capable the capable j that puts into the conversion array of the i of EXCEL, establishing the conversion array is PDATA
Capable the 3rd row of the i of PDATA (j, 1)=EXCEL
Capable the 4th row of the i of PDATA (j, 2)=EXCEL
Capable the 6th row of the i of PDATA (j, 5)=EXCEL
Capable the 2nd row of the i of PDATA (j, 6)=EXCEL
Capable the 5th row of the i of PDATA (j, 7)=EXCEL
The automatic adaptive die module of five main frames: the nucleus module that the automatic matched mold module of five main frames is a transfer algorithm.
Five main frames are selected module: five main frames select module from the conversion array PDATA of EXCEL read module output, to obtain data, by the 6th the WTB mark of PDATA carry out top airfoil, the outside of belly, lower aerofoil is selected and output conversion array PDATA selects module, the adaptive die module of top airfoil, the adaptive die module of lower aerofoil for outside of belly reference field;
The adaptive die module of top airfoil: the adaptive die module of top airfoil obtains data from the conversion array PDATA that five main frames select module to export; According to the 5th of diameter value PDATA the adaptive mould of equal diameters with the mould 45-50 of top airfoil; To the 3rd of conversion array PDATA, setover tax to mould number tax to the x+ mould to changing the 4th of array PDATA and also exporting and change extremely adaptive mould module of array PDATA;
The adaptive die module of lower aerofoil: the adaptive die module of lower aerofoil obtains data from the conversion array PDATA that five main frames select module to export; The adaptive mould of equal diameters according to the mould 51-56 of diameter value and lower aerofoil; Give the 3rd of conversion array PDATA mould number tax, change extremely adaptive mould module of array PDATA to x+ mould biasing tax to the 4th of conversion array PDATA and output;
Outside of belly reference field is selected module: outside of belly reference field selects module from the conversion array PDATA that five main frames select module to export, to obtain data; Distinguishing the outside of belly according to the TB marker bit is that reference field is a reference field with the lower aerofoil still with the top airfoil, and output conversion array PDATA is to outside of belly main frame selection module;
Outside of belly main frame is selected module: outside of belly main frame selects module from the conversion array PDATA that outside of belly reference field selects module to export, to obtain data; Confirm big main frame punching according to diameter value more than or equal to 25; Diameter value is less than 25 little main frame punchings; According to X less than first section or X greater than first section and deduct first section distance and Y value less than plate length and confirm No. 2 little main frame punchings less than aerofoil width half the, according to X greater than deducting first section distance or X in plate length greater than first section and deduct first section distance and Y value less than plate length and confirm that more than or equal to aerofoil width half the No. 1 little main frame punching and output conversion array PDATA are to the adaptive die module of main frame, No. 1 adaptive die module of little main frame, No. 2 adaptive die modules of little main frame greatly;
The big adaptive die module of main frame: the big adaptive die module of main frame obtains data from the conversion array PDATA that outside of belly main frame selects module to export; According to the equal diameters adaptive mould of diameter value with the mould 37-44 of big main frame; Give the 3rd of conversion array PDATA mould number tax, change extremely adaptive mould module of array PDATA to x+ mould biasing tax to the 4th of conversion array PDATA and output;
No. 1 adaptive die module of little main frame: No. 1 the adaptive die module of little main frame obtains data from the conversion array PDATA that outside of belly main frame selects module to export; Confirm the punching scope that No. 1 little main frame dashes according to the back segment of L shaped interval fixed allocation and top; Be X greater than deducting first section distance or X in plate length greater than first section and deduct half the more than or equal to the aerofoil width of first section distance and Y value less than plate length; If dist is two minor increments between the little main frame, plate length=L, plate is wide to be=W
No. 1 little main frame: (1) X>L-dist
(2) work as X>dist and x L-dist, and when mark 1 is B, Y>W/2, when mark 1 is T, Y < w/>2; Be the little main frame of #1 towards last 1134.05 with the breadth first half;
And output conversion array PDATA selects module to arranging mould up and down;
No. 2 adaptive die modules of little main frame: No. 2 the adaptive die module of little main frame obtains data from the conversion array PDATA that outside of belly main frame selects module to export; Confirm the punching scope that No. 2 little main frames dash according to the leading portion of L shaped interval fixed allocation and bottom; Be X less than first section or X greater than first section and deduct half the less than the aerofoil width of first section distance and Y value less than plate length; If dist is two minor increments between the little main frame, plate length=L, plate is wide to be=W
No. 2 little main frames: (1) X≤dist
(2) X>dist and x during L-dist, and when mark 1 is B, Y≤W/2, when mark 1 is T, Y value>=w/2; Be that the little main frame of #2 is towards leading portion 1134.05 and breadth bottom;
And output conversion array PDATA selects module to arranging mould up and down;
Arrange mould up and down and select module: arrange mould up and down and select module from the conversion array PDATA of No. 1 adaptive die module of little main frame and No. 2 adaptive die module outputs of little main frame, to obtain data; Confirm that according to the relation of Y Value Data and beam parameter the row's of going up mould still is to arrange die punching down; Arrange selection up and down according to the Y value
It is following to select to arrange up and down the mould condition
The Y value>the following row of outside of belly width-(22+thickness of slab+70) A station mould
The Y value < is arranged mould on 22+thickness of slab+70 A stations
The Y value>the following row of outside of belly width-(26+thickness of slab+62) B station mould
The Y value < is arranged mould on 26+thickness of slab+62 B stations
No. 1 little main frame:
1,3,15,17 ' the following row of A station mould
2,4,16,18 ' arrange mould on the A station
5,7,9,11,13 ' the following row of B station mould
6,8,10,12,14 ' arrange mould on the B station
No. 2 little main frames
19,21,33,35 ' the following row of A station mould
20,22,34,36 ' arrange mould on the A station
23,25,27.29,31 ' the following row of B station mould
24,26,28,30,32 ' arrange mould on the B station
According to the equal diameters adaptive mould of diameter value with the mould number of choosing main frame,
PDATA(I,5)=muju(j,5)
Give the 3rd of conversion array PDATA mould number tax, change extremely adaptive mould module of array PDATA to x+ mould biasing (MOJU (Ti, 7)) tax to the 4th of conversion array PDATA and output;
Adaptive mould module: adaptive mould module from the adaptive die module of top airfoil, the adaptive die module of lower aerofoil, the big adaptive die module of main frame, arrange mould up and down and select to obtain data the conversion array PDATA of module output; Numerical value each item the (the 1st to conversion array PDATA; 2,3,4; 5) keep the processing that rounds up of two-decimal; To the character item (the 0th, 6,7) of conversion array PDATA remove convert that capitalization is handled behind the space to and output conversion array PDATA to the small opening detection module;
The small opening detection module: the small opening detection module obtains data from the conversion array PDATA of ordering processing module output; Press X+ mould biasing (PDATA (i; 4)) ascending ordering; Small opening detection mode according to choosing is handled accordingly, and generalized case only detects the conversion array PDATA that handle in last hole and output is sorted of each mould to optimal module.
The automatic adaptive mould algorithm of five main frames: establishing the conversion array is PDATA, i hole, and dist: the minor increment between two little main frames, L: plate is long, W: outside of belly width
The condition PDATA of the adaptive mould of top airfoil main frame (i, 6)=" T "
If PDATA (i, 6)=" B " then be the adaptive mould of lower aerofoil main frame
If PDATA (i, 6)=" W " then be the hole of the outside of belly
If PDATA (i, 6)=" W " and PDATA (i, 5) 25 items select the adaptive mould of big main frame
If PDATA (i, 6)=" W " and PDATA (i, 5) ≤25 and satisfy No. 1 adaptive mould of little main frame of one of following two conditions
(1)PDATA(i,1) >L-dist
(2) when PDATA (i, 1)>dist and PDATA (i, 1) < L-dist, when PDATA (i, 7)=" B ", PDATA (i, 2)>W/2, when PDATA (i, 7)=" T ", PDATA (i, 2) < w/2
Be the little main frame of #1 towards last 1134.05 with the breadth first half;
If PDATA (i, 6)=" W " and PDATA (i, 5) ≤25 and satisfy No. 2 adaptive moulds of little main frame of one of following two conditions
(1)PDATA(i,1)≤dist
(2) PDATA (i, 1)>dist and PDATA (i, 1) during L-dist, and PDATA (i, 7)=" B ", Y≤W/2, when PDATA (i, 7)=" T ", PDATA (i, 7) value>=w/2; Be that the little main frame of #2 is towards leading portion 1134.05 and breadth bottom;
Two little main frames are arranged the mould selection algorithm up and down:
The Y value>the following row of outside of belly width-(22+thickness of slab+70) A station mould
The Y value < is arranged mould on 22+thickness of slab+70 A stations
The Y value>the following row of outside of belly width-(26+thickness of slab+62) B station mould
The Y value < is arranged mould on 26+thickness of slab+62 B stations
No. 1 little main frame:
1,3,15,17 ' the following row of A station mould
2,4,16,18 ' arrange mould on the A station
5,7,9,11,13 ' the following row of B station mould
6,8,10,12,14 ' arrange mould on the B station
No. 2 little main frames
19,21,33,35 ' the following row of A station mould
20,22,34,36 ' arrange mould on the A station
23,25,27.29,31 ' the following row of B station mould
24,26,28,30,32 ' arrange mould on the B station
According to the equal diameters adaptive mould of diameter value with the mould number of choosing main frameFormula
PDATA(I,5)=MOJU(j,5)
Optimal module: optimal module reads among the conversion array PDATA of the automatic adaptive die module output of five main frames and obtains data; PDATA is divided into two formations of principal and subordinate the conversion array; Big main frame punching, top airfoil, lower aerofoil, No. 2 little host datas are major queue; No. 1 little main frame punching data are from formation, and individual queue is by the ascending ordering of setovering of X+ mould, the concrete realization as follows:
In conversion array PDATA, look for first jc2 capable smaller or equal to 18 mould number
The 1st row of then changing array PDATA is to jc2-1 behavior major queue
The jc2 that then changes array PDATA is capable of the g_num behavior from formation, and g_num is the total hole count by the data definition module definition;
The 1st row of conversion array PDATA is pressed the ascending ordering of PDATA (i, 4) to jc2-1 is capable
Then change the jc2 of array PDATA capable to the g_num behavior from formation also by the ascending ordering of PDATA (i, 4),
And the conversion array PDATA data that the output ordering is accomplished are to NC program creation module;
The optimal module algorithm: establishing the conversion array is PDATA, i hole, and dist: the minor increment between two little main frames, L: plate is long, W: outside of belly width
1. < content of two conversions of PDATA (j, 3) exchange array row realizes with dual circulation to press mould number ordering PDATA (I, 3).
2. the algorithm that is divided into two formations of principal and subordinate
Search from whole conversion array if PDATA (i, 3) (1) that ≤18 jc2=i look for first jc2 smaller or equal to 18 mould number capable in conversion array PDATA by mould number ordering;
(2) the 1st row of then changing array PDATA is to jc2-1 behavior major queue, and the 1st row of conversion array PDATA is pressed the ascending ordering of PDATA (i, 4) to jc2-1 is capable; PDATA (I; 4) >=and two contents of changing the array row of PDATA (j, 4) exchange, realize with dual circulation.
(3) it is capable of the g_num behavior from formation then to change the jc2 of array PDATA, and g_num is the total hole count by the data definition module definition; Then change the jc2 of array PDATA capable to the g_num behavior from formation also by the ascending ordering of PDATA (i, 4), PDATA (I, 4)=contents of two conversions of PDATA (j, 4) exchange array row, with dual circulation realization.
NC program creation module: NC program creation module is according to the data of two orderly formations of ordering principal and subordinate of optimal module output, the head from two formations fetches data respectively; Get one group of data (the mould scopes of No. 2 little main frames of the outside of belly) the biasing of this mould of X+ (PDATA (i from the head of major queue; 4)) compose to variable Pz1; Compose the biasing of this mould of X+ (PDATA (j, 4)) to variable Pz2 from from formation, getting one group of data again, relatively the condition of the biasing of this mould of coordinate figure X+ in these two groups of data; X3xc is that little main frame moves horizontally along directions X, and displacement is 500mm;
If satisfy simultaneously towards condition: Pz2-Pz1 >=0 and Pz2 – Pz1 ≤X3xc dashes simultaneously;
Pz1>No. 1 little main frame one-shot of Pz2;
≤Pz2 is when mould number < 36 No. 2 main frame one-shots for Pz1;
When mould number < 44 big main frame one-shots
When mould number < aerofoil one-shot before 51
When mould number < aerofoil one-shot after=56
When mould number>56 small openings detect
Form six kinds of basic punching mode statements: No. 1 little main frame one-shot, No. 2 main frame one-shots, two little main frames dash simultaneously, big main frame one-shot, top airfoil main frame one-shot, lower aerofoil main frame one-shot; The array of two formations of principal and subordinate judges all and finishes that output forms the NC program, is sent to three on automobile U-shaped beam and dashes in the five main frame numerical control production lines and carry out processing.
The algorithm of NC program creation module:
Because following algorithm is relevant with the statement form, the form of punching statement:
M5Q X
x Y
y T
t A
a B
b C
c D
d E
e F
f H
h
Instruction definition:M5Q-M56 M57 M58 representes x1, x4, x2 clamping longeron punching respectively
The distance of wrench, the mm. of unit are arrived in x-hole to be punched at the center, hole of directions X
Y-hole to be punched at Y to the center, hole the distance to the limit, the mm. of unit
T-No. 2 little main frames, big main frame, preceding aerofoil main frame, the selected mould of back aerofoil main frame number
Detect behind a-main detecting position 0:2 number little main frame, the big main frame and the front and back aerofoil detects, detect before 1:2 number little main frame, the big main frame
The distance of wrench, the mm. of unit are arrived in b-hole to be punched at (No. 1 little main frame) center, directions X hole
The distance of edges of boards, the mm of unit are arrived in c-hole to be punched at (No. 1 little main frame) center, Y direction hole
D-(No. 1 little main frame) selected mould number
E-behind detecting position 0:1 number little main frame, detect, detect before the 1:1 number little main frame
F-1: preceding aerofoil, 2: the back aerofoil, 3:1 number little main frame, 4:2 number little main frame, 5: big 6: two little main frames of main frame dash simultaneously
H-channel number 1:1 passage dashes, and the 2:2 passage dashes
1. three clamps NC code of sending establishment to is respectively
X1 sends clamp to and send plate: M56
X4 sends clamp to and send plate: M57
X2 sends clamp to and send plate: M58
2. create the host number of NC program by mould number
PDATA (i, 3)>56 host numbers=7
PDATA (i, 3)>50 and PDATA (i, 3) < 57 host numbers=2
PDATA (i, 3)>44 and PDATA (i, 3) < 51 host numbers=1
PDATA (i, 5) >=25 and (PDATA (i, 3)>36 and PDATA (i, 3) 45) host number=5
PDATA (i, 5) < 25 and (PDATA (i, 3)>19 and PDATA (i, 3) 36) host number 4
PDATA (i, 5) < 25 and (PDATA (i, 3) >=1 and PDATA (i, 3) 19) host number 3
Satisfy simultaneously towards condition host number 6
3. host number converts the algorithm of punching statement to
The host number mathematical model
1 output Y value=PDATA (i, 2)-outside of belly width host number=F1
2 output Y values=-PDATA (i, 2) host number=F2
3 PDATA (j, 2)=" WB " from detecting position=1 host number=F3
PDATA (j, 2)=" " from detecting position=0 host number=F3
4 PDATA (i, 2)=" WB " main detecting position=1 host number=F4
PDATA (i, 2)=" " main detecting position=0 host number=F4
5 PDATA (i, 2)=" WB " main detecting position=1 host number=F5
PDATA (i, 2)=" " main detecting position=0 host number=F5
6 if PDATA (i, 2)=" " and PDATA (j, 2)=" "
Then main detecting position=0 is from detecting position=0 host number=F6
If PDATA (i, 2)=" WB " and PDATA (j, 2)=" WB "
Then main detecting position=1 is from detecting position=1 host number=F6
If PDATA (i, 2)=" WB " and PDATA (j, 2)=" "
Then main detecting position=1 is from detecting position=0 host number=F6
If PDATA (i, 2)=" " and PDATA (j, 2)=" WB "
Then main detecting position=0 is from detecting position=0 host number=F6
Fig. 2For the automatic adaptive mould of punched hole processing method five main frame production lines of three strokes per minute controls of five main frames production line in the embodiment of the invention
Program flow diagram
Step 301: the initialization of system: by
The data definition module:Various arrays of data definition module definition and public variable; And pass to EXCEL read module, mould storehouse read module, parameter to array and public variable module, the automatic adaptive die module of five main frames, optimal module, NC program creation module be set, concrete definition as follows:
PDATA (600,7) conversion array is that two-dimensional array is deposited towards point data, and data item has:
0: detected value, 1: the X value of centre point, 2: the Y value of centre point; 3: mould number, 4: the X value of mould blocks insertion point+mould directions X biasing, 5: diameter; The 6:WTB index face selects 7:TB mark outside of belly reference field to select, and is used for whole modules;
Parameter is provided with module:Parameter is provided with the data in the module Read EXCEL beam parameter or the parameter of forms is set, and is stored in the public variable of data definition module definition, and parameter is set; Beam length; Cantilever thickness, aerofoil height, outside of belly width; The title of output NC program, the minor increment between two main frames also passes to this part public variable each functional modules such as the automatic adaptive die module of five main frames, optimal module, NC program creation module;
Mould storehouse operational module: mould storehouse operational module reads the data of outer mold library file, puts into the data of each mould (1-61) mould storehouse array and the automatic adaptive die module of output mask storehouse array to five main frame, optimal module and the NC program creation module of data definition module definition; Mould storehouse array (61,7) character type, the data item in mould storehouse has: station, shape, diameter, placement angle, X to the biasing etc.; Code name according to beam obtains automatically, and code name is that odd number is to get left beam, gets right beam when code name is even number;
The Read EXCEL data module, the EXCEL that describes the U-shaped beam has two files, and one of which is the aperture file, referring to Fig. 6; It two is the beam Parameter File, referring to Fig. 7; Reading file is accomplished by computing machine.
Step 302: five main frames select module from the conversion array PDATA of EXCEL read module output, to obtain data, by the 6th the WTB mark of PDATA carry out top airfoil, the outside of belly, lower aerofoil is selected and output conversion array PDATA selects module, the adaptive die module of top airfoil, the adaptive die module of lower aerofoil for outside of belly reference field;
Step 303 306 3013 is formed the adaptive die module mould of top airfoil, adaptive scope 45-50
Step 304 307 3014 is formed the adaptive die module of lower aerofoil, the adaptive scope 51-56 of mould
Step 305 outside of belly punching main frame is judged, is TB position (PDATA (I, 7)) judgment standard face by mark 1 (bj1), and distinguishing the outside of belly according to the TB marker bit is that reference field is a reference field with the lower aerofoil still with the top airfoil, when PDATA (I, 7)=" T "
PDATA (I, 0)=" WB " then
When PDATA (I, 7)=" B "
PDATA (I, 0)=" " then
Step 3051: confirm big main frame punching according to diameter value more than or equal to 25, diameter value is less than 25 little main frame punchings
Step 3,052 3,055 3015: form the adaptive die module of big main frame, the adaptive scope 37-44 of mould;
Step 3053 is distinguished two little main frames, if which main frame little main frame selects, alternative condition is following:
If dist is two minor increments between the little main frame, plate length=L, plate is wide to be=W
The little main frame of 1#: (1) X>L-dist
(2) work as X>dist and x L-dist, and when mark 1 is B, Y>W/2, when mark 1 is T, Y < w/>2; Be the little main frame of #1 towards last 1134.05 with the breadth first half; The adaptive scope 1-18 of mould
The little main frame of 2#: (1) X≤dist
(2) X>dist and x during L-dist, and when mark 1 is B, Y≤W/2, when mark 1 is T, Y value>=w/2; Be that the little main frame of #2 is towards leading portion 1134.05 and breadth bottom;
Step 3,054 3,056 3,011 3058 505A 305C 305E 305F 305G form No. 1 adaptive die module of little main frame, the adaptive scope 1-18 of mould;
Step 3,012 3059 305b 305d 305h 305i 305j form No. 2 adaptive die modules of little main frame, the adaptive scope 19-36 of mould;
Step 308 is returned master routine and is optimized processing: optimizing its purpose has following 3 one of which, because the processing of u ellbeam adopts filtering type method (only advance, stand fast) in order to guarantee the enforcement of this method, must optimize; Its two, be divided into two to program, a passage and two passages are so that realize beam root U-shaped beam on-line machining simultaneously; It three, three replaces feeding to clamp and two relocation devices, feeding interval with also need optimization cooperating of punching; Create the NC program at last, this is the final purpose that EXCEL data of the present invention are directly created the method for NC program, and program routine is referring to Fig. 8 and Fig. 9, and Fig. 8 is the subprogram of a passage, and Fig. 9 is the subprogram of 2 passages.
Fig. 3Be five main frame production lines in the punched hole processing method of three strokes per minute controls of five main frames production line in the embodiment of the invention
DFD
Mainly contain two data stream, first data stream through reading the beam parameter, converts data line from EXCEL beam Parameter File to, gives public variable to assignment.
Second data stream is from EXCEL aperture file, converts character string to through reading first row, first row, removes first letter; Become Part No.,, convert numerical variable to through taking off four characters on the line left side; The parity of judging this value is divided into Zuo Liang and You Liang, through reading the later whole aperture of the third line, puts in the array; Carrying out left beam processing and right beam handles; In the notebook data flow graph, only drawn the data stream that left beam is handled, right beam is handled with left beam similar, and difference is following:
During outside of belly TB=" T " as PDATA (I, 7)=" T "
PDATA (I, 0)=" " then
When PDATA (I, 7)=" B "
PDATA (I, 0)=" WB " then
2. top airfoil y=-y
3. lower aerofoil y=y+ outside of belly width
The data stream that left side beam is handled: the value according to WTB is divided into top airfoil processing, lower aerofoil processing, outside of belly processing; Top airfoil is handled adaptive mould scope 45-50, when PDATA (I, 5)=MOJU (j, 5) is a diameter value and the adaptive mould of equal diameters of the mould of choosing main frame number, then: y=y+ outside of belly width
PDATA (I, 3)=mould number
PDATA(I,4)=X+MOJU(j,7)
The conversion array sends optimal module to.
Lower aerofoil is handled adaptive mould scope 51-56, when PDATA (I, 5)=MOJU (j, 5) is a diameter value and the adaptive mould of equal diameters of the mould of choosing main frame number, then:
Y=-y
PDATA (I, 3)=mould number
PDATA(I,4)=X+MOJU(j,7)
The conversion array sends optimal module to.
The outside of belly is handled, when PDATA (I, 7)=" T " is TB=" T "
PDATA (I, 0)=" WB " then
When PDATA (I, 7)=" B "
PDATA (I, 0)=" " then
When mould diameter PDATA (I, 5)>the adaptive mould scope of the big host process of 25mm 37-44, when PDATA (I, 5)=MOJU (j, 5) is a diameter value and the adaptive mould of equal diameters of the mould of choosing main frame number, then:
PDATA (I, 3)=mould number
PDATA(I,4)=X+MOJU(j,7)
The conversion array sends optimal module to.
As mould diameter PDATA (I; 5) two adaptive moulds of little main frame of=25mm, according to L shaped interval fixed allocation, No. 1 the adaptive mould of little main frame interval is back segment and top; Be X greater than deducting first section distance or X in plate length greater than first section and deduct half the more than or equal to the aerofoil width of first section distance and Y value less than plate length; If dist is two minor increments between the little main frame, plate length=L, plate is wide to be=W
No. 1 little main frame: (1) X>L-dist
(2) work as X>dist and x L-dist, and when mark 1 is B, Y>W/2, when mark 1 is T, Y < w/>2; Promptly No. 1 little main frame towards last 1134.05 with the breadth first half; No. 1 adaptive mould scope of little host process 1-18, when PDATA (I, 5)=MOJU (j, 5) is a diameter value and the adaptive mould of equal diameters of the mould of choosing main frame number, then:
PDATA (I, 3)=mould number
PDATA(I,4)=X+MOJU(j,7)
The conversion array sends optimal module to.
The adaptive mould of No. 2 little main frames is interval for leading portion and bottom confirming the punching scope that No. 2 little main frames dash; Be X less than first section or X greater than first section and deduct half the less than the aerofoil width of first section distance and Y value less than plate length; If dist is two minor increments between the little main frame; Plate length=L, plate is wide to be=W
No. 2 little main frames: (1) X≤dist
(2) X>dist and x during L-dist, and when mark 1 is B, Y≤W/2, when mark 1 is T, Y value>=w/2; Be that the little main frame of #2 is towards leading portion 1134.05 and breadth bottom; No. 2 adaptive mould scope of little host process 19-36, when PDATA (I, 5)=MOJU (j, 5) is a diameter value and the adaptive mould of equal diameters of the mould of choosing main frame number, then:
PDATA (I, 3)=mould number
PDATA(I,4)=X+MOJU(j,7)
The conversion array sends optimal module to.
Optimal module: optimal module reads among the conversion array PDATA of the automatic adaptive die module output of five main frames and obtains data; PDATA is divided into two formations of principal and subordinate the conversion array; Big main frame punching, top airfoil, lower aerofoil, No. 2 little host datas are major queue; No. 1 little main frame punching data are from formation, and individual queue is by the ascending ordering of setovering of X+ mould, the concrete realization as follows:
In conversion array PDATA, look for first jc2 capable smaller or equal to 18 mould number
The 1st row of then changing array PDATA is to jc2-1 behavior major queue
The jc2 that then changes array PDATA is capable of the g_num behavior from formation, and g_num is the total hole count by the data definition module definition;
The 1st row of conversion array PDATA is pressed the ascending ordering of PDATA (i, 4) to jc2-1 is capable
Then change the jc2 of array PDATA capable to the g_num behavior from formation also by the ascending ordering of PDATA (i, 4);
NC program creation module: NC program creation module is according to the data of two orderly formations of ordering principal and subordinate of optimal module output, the head from two formations fetches data respectively; Get one group of data (the mould scopes of No. 2 little main frames of the outside of belly) the biasing of this mould of X+ (PDATA (i from the head of major queue; 4)) compose to variable Pz1; Compose the biasing of this mould of X+ (PDATA (j, 4)) to variable Pz2 from from formation, getting one group of data again, relatively the condition of the biasing of this mould of coordinate figure X+ in these two groups of data; X3xc is that little main frame moves horizontally along directions X, and displacement is 500mm;
If satisfy simultaneously towards condition: Pz2-Pz1 >=0 and Pz2 – Pz1 ≤X3xc dashes simultaneously;
Pz1>No. 1 little main frame one-shot of Pz2;
≤Pz2 is when mould number < 36 No. 2 main frame one-shots for Pz1;
When mould number < 44 big main frame one-shots
When mould number < aerofoil one-shot before 51
When mould number < aerofoil one-shot after=56
When mould number>56 small openings detect
Form six kinds of basic punching mode statements: No. 1 little main frame one-shot, No. 2 main frame one-shots, two little main frames dash simultaneously, big main frame one-shot, top airfoil main frame one-shot, lower aerofoil main frame one-shot; The array of two formations of principal and subordinate judges all and finishes that output forms the NC program.The write operation of NC program creation module also comprises twin-channel punching mode: incorporate 1 passage into before the small opening that the plate tail leaves No. 2 little main frames detects mould, incorporate 2 passages into, computing method after the small opening that the plate tail leaves No. 2 little main frames detects mould
PZI>L-(L19-LL-Ld)
Wherein: the biasing of PZI:X+ mould
L:U ellbeam length
The L19:19 mould is to the distance at zero point
LL:18 number distance to No. 19 moulds
The stroke of Ld:1 number little main frame
≤L-(L19-LL-Ld) puts into 1 passage as PZI
Working as PZI>L-(L19-LL-Ld) puts into 2 passages
The NC program of two passages is put into two output files respectively; The filename of 1 passage is the filename of appointment on the forms, and the filename of 2 passages is that the filename of 1 passage adds letter " B ", and the NC program of 1 passage is carried out the NC program that last sentence " M78 " is transformed into 2 passages automatically; Continue the processing of this beam; Load another root U-shaped beam simultaneously and carry out the NC program processing U-shaped beam first half of 1 passage, circulation successively realizes two U ellbeams online punching processing simultaneously.