With nearly30years development, the working way of laser marking systems istransferring from manual operation to cooperation with complex Automatic Production Line.This thesis focuses on a line producing electrical parts controlled by PLC(ProgrammableLogic Controller),which needs to design a on-line laser marking system. Including manyparts such as laser processing, vision recognition, barcode reading, data management,manufacturing statistics, the on-line laser marking system can assist to realize a series ofproduction process. The main contents can be summarized as follows:(1) Considering the production requirement and the possibility of cooperation betweenPLC Automatic Line and laser processing, a new method is proposed using PLC data registerand user-defined protocol as medium between PLC and laser marking system.(2) According to the system demands of data management, a database is designed onSQL Server platform. Using remote login on data-server by ODBC (Open DatabaseConnectivity), the on-line laser marking system realize managing manufacture data, such asadd, modify.(3) Using serial port and multithread programming technique, communication betweenon-line laser marking system and PLC, vision devices is realized. In system, there are twoimportant parts manipulating serial ports: querying serial port state in thread function anddeal with information in message handler function. In system, it is realized that multi-serialport do parallel working.(4) By handling information from vision devices, system can make statistics ofproduction, which means that on-line laser marking system has a function of storagemanagement(5) Based on MFC, the easily used software is developed, stability and reliability of thesoftware is validated by test. |