Numerical control emulates easy try to find out of function of error correction of program of the numerical control in software

  • Time:
  • Click:246
  • source:GERMAN CNC Machining
Summary: The numerical control code that emulates software how to can fill in to the user in the light of numerical control had simple grammar and function of accidence error correction to undertake simple introduction and exploration. Numerical control emulates software keyword: Emulation software of current numerical control of   of error correction of instruction of error correction of accidence of error correction of numerical control emulation grammar basically is applied at vocational school numerical control education and broad the personnel that pursues numerical control trade undertakes self-study and rise, the importance of its education function is self-evident, so emulation software of development numerical control should have emulation function not only, still need to have the function of simple error correction that inputs numerical control code to the user, improve the study efficiency of user   , the to this part tentative idea when developing oneself software now makes a simple introduction. CNC Machining program with * .

The form of Cld text file is deposited in hard disk, the ability after reading in memory undertakes handling. The program opens file of a text, use read take a statement ordinal read in program of a NC to arrive the Cstring string array of the setting kind in the object, 10 string are comprised for regulation of this string array. Every go to be an end in order to come up against carriage return symbol. Have the news in object of this string array explanatory next, store in object of style of a structure. Here has 2 kinds of methods to process data, a kind of method is direct circulate repeatedly, until read the document take end. Program of whole numerical control is read in CSrtingList kind the object became medium, every group of NC program became an element in this object. Have accidence and syntactic examination to whole NC program next, coding explains the program makes program of graphical simulative computer. But this kind of method is taller to the requirement of memory, make the program moves easily slow. And the 2nd kind of method is every read the examination that takes program of a numerical control to undertake grammar and accidence directly. If make mistake,sign up for a fault directly, continue to read without the mistake get off program of a numerical control. Circulate so, until complete the program till. 1.

Explanatory unit is with a block when the accidence of numerical control program checks accidence of program of   numerical control, explain a block. Above all, numerical control program is written according to rigid format, every G code, M code, F code, S code, T code has strict book to write a form. The form that the first step that makes here checks an order namely is proper, adopted method is to be being checked kind in define a rigid format for each G code and M code regular. The format of G00 is G00X... Z... .

Must catch up with X is mixed at the back of formulary G00 ever since numerical value and Z and ever since numeric, the format of G01 is G01X... Z... .

F... must catch up with X is mixed at the back of formulary G01 ever since numerical value and Z and ever since numerical value still has F address word and ever since numeric. The format of G02/G03 is G02 (G03) X... Z... .

R... must catch up with X is mixed at the back of formulary G00 ever since numerical value and Z and ever since numerical value and address word R and ever since numeric. As to regulation of other G code also be such regulation, differ one expatiatory, m code is same also for instance M03 format is M03 S... .

.

. Must catch up with from the back S address word and ever since numeric. After making strict provision to code of avery kind of, if appear,some G code or M code are done not have in afore-mentioned watches, the program can spot an error and sign up for a fault instantly. The code that if appeared,already set and ever since address numerical value is incorrect also sign up for a fault. If do not have check fish mistake to enter next examinations namely, what will check us to input suddenly next is wrong. If the address symbol that did not define was used in the program " E " , , the code such as the commonly used N in be program of this numerical control, G, M, F, S, T, X, Z built a character set warehouse, word of character of program of ordinal examination numerical control is N, M, G, F, S, T, X, Z... .

.

A medium. If be with respect to proceed, if not be, call function signing up for a fault to declare " character uses an error " . The fault can sign up for when the code words that encounters numerical control program to won't be used when us so. Additional, actually major code follows value of know exactly about sth ever since in program of every kinds of numerical control, if X100, Z100 is waited a moment, their representing should nod the coordinate value below this coordinate name, because the workpiece volume of treatment of place of numerical control machine tool has a regulation, of tool carrier moving also have certain limits. Be opposite so the numerical value after code of X, Z also demarcate limits, if X setting is in - 10 arrive 500 between, z setting is in - 300 to 200 between, if exceed this range, sign up for namely " exceed machine tool limit " mistake. When for instance we are inputted, make X200 input X-200, make Z-150 input it is OK that Z1500 waits a mistake a moment the examination comes out. Above checks a method 3 kinds to be able to discover what appear because of carelessness we are for the most part to lose clerical error by accident. 2.

The grammar of syntactic examination   of numerical control program checks grammar of code of main examination numerical control to whether accord with regulation. There basically is the solecism of the following respects in numerical control code: 2.

1.

We assign the G code that has close kind into a group, for instance G00, G01, G02, G03, G32 belongs to a group. Cannot be in with set code in a block in the meantime appear. Define a method so, this method is read when taking code of a numerical control if 2 appear with group G code,sign up for a fault, m code also is same, can realize a method that a moment ago defined to add same travel to appear the function that the fault can sign up for when 2 M code. Here, the G code that identifies need first or M code cent are a few groups, place the code that cannot appear in group at the same time in a group, when identifying if appeared in group,2 are the same as the code of the group namely systematic newspaper is wrong. 2.

2.

General requirement letter wants capitalization in G code, setting inspection program has identify function of big the ordinary form of a Chinese numeral, if appear,lowercase signs up for a fault namely. 2.

3.

The certain parameter of the instruction must want to be appointed clearly. Here involves the format issue of a few instructions, for instance code of G00 X100 Z100, g00 hind must have the coordinate value of X and Z. To here, undertake at the same time with the accidence examination in front actually, the catenary of format of accidence examination code that designs in front is code of every G, M, F, S, T in the watch had written detailed code regular, differentiate of the meeting when identifying these regulation, the circumstance that appears to differ with regulation namely the program signs up for a fault. 2.

4.

The program begins to the program begins character, the end has a program to end character. When checking an order most what check first is a program whether by % begin, if have,continue to be down an examination, if do not have a systematic newspaper fault " input program name please " . When whole process identifies M30 or M02 dictates, do not do first answer, continue to identify below one block. If issue a paragraph to be sky criterion to be outputted in the dialog box " program examination ends " , as follows one paragraph does not sign up for for sky criterion " end symbol uses an error " . If identify,M02 or M30 were not come up against namely when code for empty block, can sign up for " the program did not end a sign " . Because solecism is exceeding complex, this program undertakes these preliminary check-out only. The examination method of other development will come true gradually in follow-up version. Hope to be able to be helped somewhat to everybody. Bibliographical reference: [The development of module of coding of emulation system of numerical control of 1] plum peak shows acting production project 2004 (12)     [2] Guo Peiquan, wang Gongyan.

Process designing of numerical control machine tool and application.

Machinist trade publishing house.

  of 2000   [3] Xiao Zhongyue, zhou Yanhui, program of NC of emulation system of Liu Chaohui CNC Turning compiles implement research and journal of institute of development the Jinggang Mountains the 30th the 2nd period in Feburary 2009   author brief introduction: Xia Bairong (1978.

11- ) , male, hubei Wuhan person, instructor, master graduate student, pursue numerical control technology and Electromechanical technology research and teaching job now. CNC Milling