Abstract
Aiming at problems that it's hard to control the movement in numerical control application uniformly and effectively result from movement control instructions are various in different movement control platforms,one algorithm of G-code analysis based on regular expression in VC++ is proposed. According to the control hardware and software of existing mechanism,cooperated with the motion control card,the analytical mechanism with ability of examination,translation and transform between motion control card and NC G-code is designed. The compile of G-code which is input and executed is realized and the G-code is transformed into the instruction can be recognized by motion control card. Meanwhile the motion parameters are transformed to control the mechanism for controlling machine. Through the experiment on the motor of 3-PRS-XY series-parallel mechanism,and records and diagrams of feedback pulses are used to verify the accuracy and effectiveness of the algorithm. The accuracy of G-code inspection is improved by