introduction
With the development of the economy and the improvement of people's living standards, consumers' demand for products and quality requirements are constantly increasing [1]. This requires that the processing accuracy of products become higher and higher, and the processing cycle becomes shorter and shorter. The cutting table in this design is mainly used for cutting soft materials in clothing and other related industries. The domestic automation level in this area is not high, and the production efficiency is low. With the continuous increase in labor costs, it is urgent to improve the automation level. At present, advanced CAD/CAM systems are basically occupied by foreign companies. The more famous companies are Gerber in the United States and Lectra in France. Imported equipment is expensive and the maintenance cost is high. Chinese clothing companies are in urgent need of cost-effective cutting tables.
1. Functional analysis of data processing system
The data processing system mainly includes PLT file data processing module and communication module. In order to ensure that the system has good data processing capabilities, the system is based on the ARM CortexA8 processor and the embedded operating system uses Microsoft's Windows CE6.0. The system needs to obtain PLT files from mobile storage devices. Currently, the mainstream mobile storage devices are USB interfaces, so the system needs to have USB communication function. The data processing system needs to communicate with the actuator controller PLC. Due to the large amount of data, it is more reasonable to use TCP/IP communication. Its functional block diagram is shown in Figure 1.
2 PLT file analysis and optimization design
PLT files contain graphic vector information and were originally used for user printing [2]. In this system, PLT files are used to store the coordinate information of the contour boundary points of the cutting table and the operation information of the knife pen. The file data read from the storage device is large and contains many commands. If this data is directly transmitted to the PLC, it will undoubtedly increase the data transmission volume and require the PLC to increase the data processing and calculation process, affecting the real-time performance of the system. Therefore, the PLT file data is first processed in the data processing system and appropriately optimized to reduce the data volume and improve the real-time performance of the PLC processing.
2.1 PLT file analysis
The file read into the data processing system is a PLT file. The PLT file originated from HP and was originally used as a printer command file. Its commands are used to describe 2D graphics information, represented by ASCII codes, and its content only contains the line information of the graphics. The path of the cutter during the cutting process is also composed of many line segments, so it is very appropriate to use PLT files to describe and store the information of the shape of the cutter pieces.
A PLT instruction in a PLT file consists of a command plus parameters. A semicolon indicates the end of the instruction. An instruction can have multiple parameters, separated by commas. Common instructions are listed in Table 1.
The following uses cutting a rectangular piece as an example to explain the format of the cutting table PLT file. Set the lower left corner of the cutting table as the coordinate origin, and the rectangular piece is located at the upper right corner of the origin. Its coordinate points are shown in Figure 2. The data of this graphic in the PLT file should be "IN; SP1; PU600, 600; PD600, 1 200; PD1 800, 1 200; PD1 800, 600; PD600, 600; PU; PG;". The conversion relationship between the length in the PLT file and the actual length unit is: 40 units in the PLT file = 1 mm.
Since the storage space of the actuator controller PLC is limited, the data processing system should reduce the total amount of data as much as possible. In the actual processing process, what the PLC needs is the coordinate point value during the processing. As long as a reasonable protocol is established between the upper and lower computers, the commands in the PLT file can be removed and the coordinate points can be sent directly to the PLC. This is beneficial to saving the storage space of the lower computer and reducing the calculation process of the lower computer. The upper and lower computers agree that the length of the x and y values of each coordinate value is a 16-bit binary number. Then the maximum effective cutting length and width of the cutting table is 65,536/40=1,638.4 mm, which is enough for ordinary cutting tables.
2.2 PLT file optimization processing
There are two main sources of PLT files for cutting pieces on cutting tables: one is to capture images of clothing samples with industrial cameras, extract digital information of the sample contours through image processing, and generate a vector diagram of the contours by fitting the original boundary point sequence with a quadratic curve. The fitted curve is then discretized and a PLT file is generated [3]; the other is generated by CAD software. The data from the first source is highly purposeful, so the actual application scenarios will be taken into consideration and the data will be simplified as much as possible. However, the PLT files generated by CAD software do not necessarily take into account the different requirements for accuracy of the specific application of the file, and the generated PLT files are generally fixed. The clothing industry's requirements for accuracy are generally not as high as those for mechanical parts. In cutting table equipment, there may be a large amount of redundant data in these PLT files, which increases the total amount of data. In addition, these data are definitely similar in coordinate points, which will cause the cutting table to need to frequently accelerate and decelerate during the actual cutting process, which will place higher requirements on the rigidity of the equipment and is also a considerable test for the performance of the motor.
The optimization idea of PLT file is to obtain the contour curve of the cutting piece by fitting the coordinate points in the PLT file generated by CAD through cubic B-spline, and use the linear approximation method to fit the curve with tiny line segments, so as to re-optimize the tool processing points and reduce the amount of data.
When programming B-spline curves, deBoor definition is often used. If the parameter t is fixed in the interval [tj, tj+1], the deBoor algorithm is derived as follows:
Formula (3) represents the recursive formula for a curve P (t) from K-order B-spline representation to K-1-order B-spline representation. By continuously calling this formula in the program, the fitted curve can be obtained.
Driven by the servo motor, the cutting head of the cutting machine is easy to realize a path composed of straight line segments, but not easy to go directly to a curve. Therefore, after refitting the data in the PLT file through the above algorithm, it is necessary to re-acquire the path coordinate points through straight line fitting, and reduce the amount of data as much as possible within the allowable range of processing error. The idea of straight line fitting is as follows: there are N coordinate points on the curve, and Kij (1
① Find the slope K12 between point 1 and point 2.
② Calculate the slope K1j of the 1st point and the jth point (j>2), and compare each K1j with K12. If the difference is less than the set error value, return to the second step to continue to calculate the next K1j, otherwise go to step 3.
③ Trace back to the coordinate value of point j-1. At this time, the line segment formed by connecting point 1 and point j-1 with a straight line can meet the accuracy requirements.
④ If j-1 After the fitting is completed, an optimized PLT file will be formed. The data in this file will be used as the data sent to the PLC and displayed on the human-machine interface. 2.3 Display of cutting process trajectory The upper computer human-machine interface of the cutting bed control system generally has the function of displaying the shape of the cutting piece (processing trajectory). This function has two main functions: it allows the operator to quickly and easily know whether the loaded PLT file is the data file that needs to be processed at present, avoiding material waste due to selecting the wrong processing data; the nesting of the cutting piece has a great influence on the material utilization rate of the clothing enterprise. Through the display of the cutting piece processing trajectory, the user can intuitively know whether the data in this data file is reasonable in terms of nesting. The data processing system uses WinCE 6.0 embedded operating system. In this system, the application software can be developed using the Visual Studio 2005 integrated development environment provided by Microsoft. After the coordinate values of the PLT file are converted proportionally in the program, the straight line drawing function in MFC is used to connect the coordinate points with straight line segments according to the established rules, so as to display the cutting piece processing trajectory in the human-computer interface. In order to facilitate users to intuitively understand the approximate size of the cutting piece, a coordinate ruler is added to the display page. The cutting piece display interface and its test effect are shown in Figure 3. 3 Implementation of communication functions The communication between the data processing system and the outside world consists of two parts: one is the USB communication that obtains the cutting information from the mobile storage device; the other is the TCP/IP communication between the lower computer PLC.
Previous article:Camera used in embedded Linux system
Next article:Design of a shortwave dynamic spectrum access system
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief discussion: Electromagnetic compatibility (EMC) radio frequency electromagnetic field radiation immunity test plan
- The biggest company in the Metaverse is also laying off employees. It is said to be bigger than Twitter.
- EEWORLD University Hall----Live Replay: ADI Multi-parameter Optical Water Quality Analysis Platform
- How to improve the frequency accuracy of the resonant circuit?
- [FS-IR02 + D1CS-D54] - 3: Electrical performance index detection (D1CS-D54)
- RF application scenarios——Q value
- Last three days! Apply for the free Zhongke Yihai Micro-Shenzhen series FPGA development board EQ6HL45
- http get weather + cjson print output
- Evaluate the TMDSCNCD280025C + TMDS HSECDOCK Kit for Free
- EEWORLD University Hall----Live Replay: ADI TOF (Time of Flight) Technology Introduction and Product Application