In a CNC system, the use of CPU for each task is solved by a combination of loop rotation and interrupt first. Figure 3-10(c) is a time allocation diagram of a typical CNC system for each task sharing CPU.
After the initialization is completed, the system automatically enters the time allocation ring, and takes turns processing each task in the ring. For some tasks with strong real-time performance in the system, they are queued according to priority and placed on different interrupt priorities, and tasks outside the ring can interrupt the execution of each task in the ring at any time.
For some tasks that occupy more CPU time, such as interpolation preparation, breakpoints can be set in some places, when the program runs to the breakpoint, automatically give up the CPU, and then automatically jump to the breakpoint to continue execution at the next running time.
(4) Resource overlapping flow treatment. When the
CNC system is in the NC working mode, the data conversion process will be composed of four sub-processes: part program input, imputation preparation (including decoding, tool compensation and speed processing), interpolation, and position control. If the processing time for each subprocess is separate, then the data conversion time for a part program segment will be
If each part segment is processed sequentially, that is, the second segment is processed after the first part segment is processed, and so on, the temporal and spatial relationship of this sequential processing, if the second segment is processed after the first segment is processed, then there will be a time interval of time length t between the outputs of the two program segments. There is also a time interval between the output of the second and third segments, and so on. This time interval is reflected in the motor is the motor rotation and stop, reflected on the tool is the tool time to stop. No matter how small this time interval is, this kind of time and stop is not allowed in the processing process. The way to eliminate this interval is to use flow water treatment techniques.
Comments