Manufacturing execution oriented machining program collaborative control method and system

By parsing the machining program into program segments and binding them with equipment capabilities and spatial boundary windows, and generating locking markers, the problems of local parameter out-of-bounds and jumps out of the progress of the machining program are solved, thus realizing program segment-level safety control and execution security.

CN122331469APending Publication Date: 2026-07-03SHENYANG HUNHE IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610756558.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-29
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In the existing technology, the management of machining programs has difficulty in identifying local program segment parameter out-of-bounds, machining space interference, and internal program jumps that deviate from the progress constraints of the machining steps, resulting in execution risks.

Method used

By acquiring work orders, processes, steps, and equipment information, the processing program is parsed into program segment records, and bound to equipment capability windows, spatial boundary windows, and step continuation windows. Parameter, spatial, and flow direction lockout markers are generated to control the execution permission status of program segments.

Benefits of technology

It achieves safety control at the program segment level of the machining program, avoiding risks caused by local parameter out-of-bounds or unauthorized instructions, and ensuring the safe execution of the machining program.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122331469A_ABST
    Figure CN122331469A_ABST
Patent Text Reader

Abstract

This invention discloses a collaborative control method and system for machining programs oriented towards manufacturing execution, specifically relating to the field of intelligent manufacturing technology. By establishing a program call object, parsing the machining program segment by segment to generate program segment records, and solidifying equipment capability windows, spatial boundary windows, and step continuation windows, the method performs interlock checks on the effective parameters of the program segment, machine tool coordinate targets, tool envelopes, auxiliary action instructions, and jump, loop, and subroutine flow directions. Each interlock flag is synthesized into a program segment execution permission state, and the issuance, initiation, continuation, or blocking of the program segment is controlled accordingly. This invention can identify risks such as local program segment parameter out-of-bounds, tool space interference, cross-step jumps, unpermitted jumps, and abnormal loop counts after the machining program file-level matching is established, and can block these risks before the program segment is issued, started, continued, or before the first segment of the next step is released, thus improving the safety of machining program execution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent manufacturing technology, and in particular to a collaborative control method and system for manufacturing execution processes. Background Technology

[0002] Intelligent manufacturing technology is a manufacturing technology direction that combines manufacturing execution management, production process control, equipment operation management, process data management, and on-site operation management. In the manufacturing workshop, the manufacturing execution system is typically used to receive production plans, generate production execution data such as work orders, processes, equipment, personnel, materials, tools, fixtures, and inspection requirements, and manage production task issuance, process flow, machining preparation, process recording, and operation feedback. For application scenarios such as CNC machining, flexible manufacturing cells, and automated production lines, the machining program, as an important basis for equipment to execute machining actions, usually needs to maintain a correspondence with information such as part information, process routes, process content, equipment capabilities, tool configuration, and machining parameters to meet the requirements of the manufacturing site for organizing machining tasks and managing program calls.

[0003] In existing technologies, the management of machining programs typically revolves around stages such as program development, program review, program release, program invocation, program modification, and program archiving. During manufacturing execution, the system can establish a link between machining programs and production tasks based on information such as work order number, part code, process number, equipment number, program number, and program version number. It manages the issuance, invocation, locking, replacement, rollback, and record-keeping of machining programs through methods such as permission verification, version comparison, equipment adaptation, process status judgment, and operation logging. This approach allows machining programs to be integrated into the manufacturing execution process, forming a collaborative control object in the workshop machining process along with production tasks, process documents, equipment resources, and on-site operation records.

[0004] In existing technologies, file-level access permissions for the entire machining program are granted only based on the equipment number, operation number, program number, or program version number. This makes it difficult to identify execution risks caused by parameters exceeding limits in local program segments, interference in the machining space, and internal program jumps that deviate from the progress constraints of the work steps. Therefore, we propose a collaborative control method and system for machining programs oriented towards manufacturing execution. Summary of the Invention

[0005] The main objective of this invention is to provide a collaborative control method and system for manufacturing execution processes, which can effectively solve the problems in the background art.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A collaborative control method for manufacturing execution processes includes the following steps: Obtain work orders, processes, steps, equipment, and processing programs; when the processing program matches the verification values ​​of the processes, equipment, and documents, establish a program call object. The machining program is parsed segment by segment to generate program segment records containing valid parameters, instructions, jumps and subroutine information, and the program segment and process step attribution mapping is established according to the start and end segment numbers of the process steps; The device capability window, spatial boundary window, and step continuation window of the program calling object are fixedly bound. Based on the device capability window and spatial boundary window, the valid parameters of the program segment, machine tool coordinate target, tool envelope, and permission of auxiliary action instructions are checked, and parameter locking flags and spatial locking flags are generated. Based on the attribution mapping and the step continuation window, the step flow direction of the jump target segment number, the number of loops, the subroutine start and end segment numbers and the return segment number is checked, and a flow lock flag is generated. The parameter locking flag, spatial locking flag, and flow locking flag are combined into a program segment execution permission state. After the previous step's end segment is confirmed and before the next step's first segment enters the controller buffer, the program segment is controlled to be issued, started, continued, or blocked according to the program segment execution permission state.

[0007] Preferably, the generation of the program segment record containing valid parameters, instructions, jumps, and subroutine information includes: Read the segment number, spindle speed, feed rate, axial target position, rotary axis angle, tool number, tool compensation number, coordinate system number, auxiliary action instructions, jump instructions, number of loops, subroutine call number, subroutine start segment number, subroutine end segment number, and subroutine return segment number according to the line order of the program text; For parameters with a continuing effect attribute that are not recorded in the current program segment, write the corresponding valid parameters and their source markers that have taken effect in the previous program segment; For multiple auxiliary action instructions in the same program segment, generate auxiliary action instruction sub-records that are respectively bound to the program segment in the order of their appearance.

[0008] Preferably, the step of establishing the mapping between program segments and work steps according to the start and end segment numbers includes: comparing the program segment number with the start segment number and the end segment number of the work step, respectively. When the program segment number falls within the segment number range of the corresponding work step, write the work step number to which the program segment belongs and the execution sequence number of the work step to which it belongs. When the program segment number does not fall within the segment number range of any step, a segment number not belonging to step lock mark is generated as the flow lock mark.

[0009] Preferably, the equipment capability window includes the spindle allowable range, feed allowable range, axial travel limit, rotary axis angle limit, tool magazine capacity and effective tool position set, tool compensation allowable range and enabled tool compensation set, coordinate system allowable range and enabled coordinate system set, and auxiliary action command allowable set; The spatial boundary window includes tool extension, fixture occupancy boundary, blank boundary, coordinate system offset, and tool compensation. The step continuation window includes the current step number, the current step execution sequence number, the confirmation signal for the completion of the last segment of the previous step, the first segment number of the next step, the step access status, the rework permission identifier, the equipment pause status, and the spindle stop status.

[0010] Preferably, the parameter locking flag is generated based on the valid parameters of the device capability window verification program segment and the permission of auxiliary action instructions, specifically in the following manner: The effective spindle speed, effective feed rate, effective rotary axis angle, effective tool number, effective tool compensation number, and effective coordinate system number in the program segment are compared with the spindle allowable range, feed allowable range, rotary axis angle limit, tool magazine capacity, effective tool position set, tool compensation permitted range and enabled tool compensation set, and coordinate system permitted range and enabled coordinate system set in the equipment capability window, respectively. The auxiliary action command number in the program segment is matched with the auxiliary action command permitted set in the equipment capability window. If any comparison or match fails, a parameter lockout flag is generated for the corresponding program segment.

[0011] Preferably, the spatial locking mark is generated by verifying the machine tool coordinate target and tool envelope based on the equipment capability window and spatial boundary window, specifically in the following manner: The machine tool coordinate target is synthesized based on the axial target position of the program segment, coordinate system offset, and tool compensation. A tool envelope is formed based on the machine tool coordinate target and the tool extension amount; The machine tool coordinate target is compared with the axial travel limit, and the tool envelope is compared with the fixture occupancy boundary and the blank boundary. When there is boundary crossing or interference, a spatial locking mark is generated.

[0012] Preferably, the process flow for verifying the target segment number includes: Read the step number and execution sequence number of the jump source segment number and jump target segment number, and read the current step number, current execution sequence number, current step access status, rework permission identifier, equipment pause status and spindle stop status from the step continuation window. When the target segment number belongs to the step number that is equal to the current step number and the current step's access status is executable, write the jump flow permission flag. When the execution sequence number of the jump target segment number is greater than the execution sequence number of the current step, a cross-step forward jump lock mark is generated as the flow lock mark. When the jump target segment number belongs to the step execution sequence number which is less than the current step execution sequence number, and the rework permission flag, equipment pause status and spindle stop status are all valid, write the rework jump permission flag. When the jump target segment number belongs to the step execution sequence number which is less than the current step execution sequence number and the rework permission identifier, equipment pause status and spindle stop status are not simultaneously valid, a non-permissioned jumpback lock mark is generated as the flow direction lock mark.

[0013] Preferably, the workflow for verifying the number of loop iterations, subroutine start and end segment numbers, and return segment number includes: Read the subroutine call source segment number, and compare the corresponding step numbers of the subroutine start segment number, subroutine end segment number, and subroutine return segment number with the corresponding step number of the call source segment number. When the corresponding step numbers of the subroutine start segment number, subroutine end segment number, and subroutine return segment number are all consistent with the corresponding step number of the call source segment number, write the subroutine flow permission flag. If any comparison is inconsistent, a subroutine flow direction lock flag is generated as the flow direction lock flag; The program segment loop count is compared with the planned loop count recorded in the corresponding work step. When the program segment loop count is not greater than the planned loop count, a loop count permission flag is written. When the number of iterations in the program segment exceeds the planned number of iterations, a loop count lock flag is generated as the flow lock flag.

[0014] Preferably, the step of issuing, starting, continuing, or blocking the permission status control program segment according to the program segment includes: After the previous step is completed and confirmed, and before the first program segment of the next step enters the controller buffer, the execution permission status of the first program segment is read. If the execution permission status is allowed, the first program segment is issued. If the execution permission status is prohibited, the issuance is stopped and the locking reason is output. When the processing program has been received by the equipment, a list of locked segment numbers is generated based on the program segments in the prohibited execution state in the program segment execution permission state. Based on the list of locked segment numbers and the current execution segment number of the equipment, a pause execution instruction is written when the next execution segment number hits the locked segment number. When the processing program is re-uploaded or the program segment is modified, the affected program segment corresponding to the parameter with the attribute of continued effectiveness is determined from the program segment that has changed to the program segment before the program segment in which the same type of valid parameter is first recorded. If no valid parameter of the same type is recorded after the changed program segment, the program segment from the changed program segment to the end of the program segment is determined as the affected program segment, and parameter locking, spatial locking and flow locking checks are re-executed only on the affected program segment.

[0015] This invention also discloses a collaborative control system for manufacturing execution, comprising: The program call object creation module is used to obtain work orders, processes, steps, equipment, and processing programs, and to create a program call object when the processing program matches the verification values ​​of the processes, equipment, and files. The program segment record generation module is used to parse the machining program by segment, generate program segment records containing valid parameters, instructions, jumps and subroutine information, and establish the attribution mapping between program segments and machining steps according to the start and end segment numbers of the machining steps; The window fixing and parameter space verification module is used to fix and bind the device capability window, spatial boundary window and work step continuation window of the program call object, and generate parameter locking mark and spatial locking mark; The process flow verification module is used to verify the process flow direction of the jump target segment number, the number of loops, the start and end segment numbers of the subroutine, and the return segment number according to the belonging mapping and the process continuation window, and generate a flow lock flag. The execution permission control module is used to combine the parameter lockout flag, spatial lockout flag and flow direction lockout flag into a program segment execution permission state, and control the program segment to be issued, started, continued or blocked according to the program segment execution permission state. When the processing program is re-uploaded or the program segment is modified, the module identifies the affected program segment and triggers the lockout check.

[0016] Compared with the prior art, the present invention has the following beneficial effects: This invention, after matching the machining program with the verification values ​​of the process, equipment, and documents, further generates program segment records according to the line order of the program text, and solidifies the equipment capability data into the equipment capability window bound to the object of this program call. This transforms the machining program call control from a whole program file-level judgment to a program segment-level judgment. Therefore, the system can perform boundary comparison and member matching for each program segment based on the actual effective spindle speed, feed rate, rotary axis angle, tool number, tool compensation number, coordinate system number, and auxiliary action instructions. When a local program segment does not meet the equipment capability conditions, a parameter locking flag is formed, thereby preventing risky program segments from being issued or executed due to out-of-bounds parameters or inappropriate instructions in a local program segment, even when the overall machining program is correctly matched.

[0017] This invention incorporates both machining space constraints and manufacturing execution progress constraints into the program segment execution permission judgment by setting spatial boundary windows and step continuation windows. The system generates machine tool coordinate targets based on the axial target position of the program segment, coordinate system offset, and tool compensation. It then generates tool envelopes or tool sweep envelopes based on the machine tool coordinate targets, tool extension, and tool dimensions, thereby enabling the locking of axial overtravel, fixture interference, and blank boundary violations. Simultaneously, based on the mapping between program segments and steps, the system performs step flow direction checks on jump target segment numbers, subroutine start and end segment numbers, subroutine return segment numbers, and loop counts. This enables the locking of cross-step jumps, unpermitted back jumps, subroutine flow misalignment, and loop count exceeding limits, ensuring that the internal control flow of the machining program is constrained by the current step progress.

[0018] This invention synthesizes parameter locking, spatial locking, and flow direction locking into a program segment execution permission state, and uses this execution permission state for program segment issuance, equipment startup, continuation interception, and release control of the first segment of the next process step. This enables the blocking of risky program segments at multiple execution access points. Specifically, after the completion confirmation of the last segment of the previous process step and before the first segment of the next process step enters the controller buffer, the system establishes a release dependency between the confirmation result of the last segment of the previous process step and the parameter permission, spatial permission, and flow direction permission of the first segment of the next process step. This ensures that the release of the first segment of the next process step is simultaneously constrained by the process step state and physical space boundaries. Furthermore, when the processing program is re-uploaded or a program segment is modified, the system can determine the affected program segment based on the changed fields and the first explicit appearance of subsequent similar valid parameters, and only perform local verification on the affected program segment, thereby ensuring the security of program segment execution while reducing the scope of redundant verification. Attached Figure Description

[0019] Figure 1 The present invention discloses a process flow chart for collaborative control of manufacturing execution procedures. Figure 2 This is a flowchart illustrating the creation of the program calling object and the formation of basic data for the program segment in this invention. Figure 3 This is a flowchart of the equipment capability window fixing and parameter lockout verification process in this invention; Figure 4 This is a flowchart of the spatial locking verification process for machine tool coordinate targets and tool envelopes in this invention; Figure 5 This is a flowchart for verifying the workflow of jumps, subroutines, and loop counts in this invention; Figure 6 This is a flowchart of the program segment execution permission status synthesis and execution control process in this invention. Detailed Implementation

[0020] To more clearly illustrate the technical solutions of the embodiments in this specification, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely some examples or embodiments of this specification. For those skilled in the art, these drawings can be applied to other similar scenarios without creative effort. Unless obvious from the linguistic context or otherwise specified, the same reference numerals in the drawings represent the same structures or operations.

[0021] It should be understood that the terms "system," "device," "unit," and / or "module" as used in this specification are a method of distinguishing different components, elements, parts, sections, or assemblies at different levels. However, if other terms can achieve the same purpose, they may be replaced by other expressions.

[0022] As indicated in this specification and claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not specifically singular and may include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of explicitly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.

[0023] Flowcharts are used in this specification to illustrate the operations performed by the system according to embodiments of this specification. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, the steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes, or one or more steps can be removed from them.

[0024] The following describes in detail, with reference to the accompanying drawings, the manufacturing execution-oriented collaborative control method and system for machining processes provided in the embodiments of this specification.

[0025] like Figure 1 As shown, the manufacturing execution-oriented collaborative control method for machining processes disclosed in this invention includes the following steps: S1. Obtain work order, process, step, equipment and processing program; when the processing program matches the verification value of the process, equipment and document, establish a program call object. S2. Analyze the machining program by segment to generate program segment records containing valid parameters, instructions, jumps and subroutine information, and establish the attribution mapping between program segments and steps according to the start and end segment numbers of the steps; S3. Solidify and bind the device capability window, spatial boundary window, and step continuation window of the program call object. Based on the device capability window and spatial boundary window, verify the valid parameters of the program segment, machine tool coordinate target, tool envelope, and permission of auxiliary action instructions, and generate parameter locking mark and spatial locking mark. S4. Based on the attribution mapping and the step continuation window, verify the step flow direction of the jump target segment number, the number of loops, the subroutine start and end segment numbers and the return segment number, and generate a flow lock flag. S5. Combine the parameter locking flag, space locking flag and flow locking flag into a program segment execution permission state, and after the end of the previous step is confirmed and before the first step of the next step enters the controller buffer, control the program segment to be issued, started, continued or blocked according to the program segment execution permission state.

[0026] The present invention discloses a collaborative control method for machining programs oriented to manufacturing execution, which is applied to collaborative control scenarios among CNC machining program management platform, manufacturing execution system, equipment communication gateway and CNC equipment controller pre-verification module.

[0027] Among them, the Manufacturing Execution System is used to provide work orders, processes, steps and planned equipment information; the CNC machining program management platform is used to provide machining programs and their release information; the equipment communication gateway is used to read the equipment status and execution status of the CNC equipment controller; and the CNC equipment controller pre-verification module is used to perform segment number-level verification before the machining program enters the controller buffer, starts execution or continues execution.

[0028] It should be noted that this embodiment does not deal with the situation where the processing program and the equipment and process are completely mismatched. Rather, it further identifies situations where the parameters of local program segments within the processing program exceed the equipment capacity boundary or the processing space boundary, or where the program jumps, loops, and subroutines return from the current step progress constraint, when the processing program number, program version, applicable process, and planned equipment are all matched.

[0029] Therefore, this embodiment further decomposes the file-level call permission of the entire processing program into program segment-level execution permissions, and uses the program segment-level execution permission as the basis for issuing, starting, continuing or blocking program segments.

[0030] The following detailed embodiments further disclose steps S1-S5: In some embodiments of the present invention, the processes of establishing the program calling object, generating the program segment record, and forming the mapping between program segments and work steps are as follows: Figure 2 As shown. The specific implementation of step S1 in this embodiment is as follows: When establishing the program call relationship, the system reads the work order number, part number, process number, process sequence number and planned equipment number from the work order dispatch record, the program number, program version number, program file verification value and applicable process number from the program release record, and the equipment number, controller type, equipment online status, equipment current execution segment number, equipment pause status and equipment alarm status returned by the equipment communication channel.

[0031] It should be noted that the above data may originate from the manufacturing execution system, the CNC machining program management platform, and the equipment communication gateway, or from the database, interface service, or controller communication messages corresponding to the above systems.

[0032] The system compares the planned equipment number with the equipment number returned by the equipment communication channel, compares the process number with the applicable process number in the program release record, and compares the program file verification value in the program release record with the real-time verification value of the processing program file to be issued.

[0033] When the equipment number, process number, and program file verification value all match, the system establishes a program call object for this operation. This program call object records at least the work order number, process number, program number, program version number, equipment number, program file verification value, call time, call source, and call status. This program call object is used to bind subsequently generated program segment records, window data, lockout flags, and execution permission status to the same processing program call process.

[0034] When the planned equipment number does not match the equipment number returned by the equipment communication channel, the process number does not match the applicable process number in the program release record, or the program file verification value in the program release record does not match the real-time verification value of the processing program file to be issued, the system generates a file-level call blocking flag and stops proceeding to the subsequent segment-by-segment verification process. The file-level call blocking flag includes at least the blocking object, blocking field, current read value, target matching value, blocking reason code, and generation time. The blocking object includes at least one of the equipment number, process number, and program file verification value. Through this flag, the system can distinguish whether the inability to proceed to the subsequent segment-by-segment verification process is due to equipment inconsistency, process inconsistency, or program file version inconsistency.

[0035] It should be noted that a file-level match only indicates that the processing program can enter the current program segment-level verification process, and does not mean that any program segment in the processing program has obtained execution permission.

[0036] In some embodiments of the present invention, the specific implementation of S2 in this embodiment is as follows: After the program calling object is established, the system reads the processing program according to the line order of the program text and generates program segment records segment by segment.

[0037] Each program segment record includes at least the program segment number, segment sequence number, segment source text, segment source check value, spindle speed field, feed rate field, axial target position field, rotary axis angle field, tool number field, tool compensation number field, coordinate system number field, auxiliary action instruction field, jump instruction field, conditional jump flag, loop count, subroutine call number, subroutine start segment number, subroutine end segment number, and subroutine return segment number.

[0038] The segment sequence number indicates the position of the program segment within the machining program text, and the segment source check value is used to determine whether the program segment text has been altered when it is subsequently modified. The axial target positions include the X-axis target position, Y-axis target position, and Z-axis target position, and may also include additional linear axis target positions corresponding to specific controller types.

[0039] For parameters with a continuing effect attribute, the system sets the corresponding valid parameter field in the program segment record. The parameters with a continuing effect attribute include at least one of the following: spindle speed, feed rate, coordinate system number, tool compensation number, and rotary axis status.

[0040] When the corresponding parameter is explicitly recorded in the current program segment, the system writes the parameter value from the current program segment text into the valid parameter field of the program segment and sets the source mark to the explicit source of this segment. When the corresponding parameter is not explicitly recorded in the current program segment, the system reads the corresponding valid parameter value that has already taken effect in the previous program segment, writes the valid parameter value into the valid parameter field of the current program segment, and sets the source mark to the continuation source of the previous segment.

[0041] Through the above processing, the subsequent verification is based on the parameters that are actually effective in the current program segment, rather than just the parameters that appear explicitly in the current program segment text.

[0042] For the first program segment of the processing program, if the program segment does not explicitly record parameters with the attribute of continued effectiveness, the system reads the initial modal parameters registered in the program calling object or the initial modal state returned by the device controller; if the initial modal parameters do not exist, cannot be read, or do not match the current program calling object, the system generates a parameter default locking flag for the corresponding parameter.

[0043] The parameter default latch flag is used as a parameter latch field in the synthesis of the program segment execution permission state.

[0044] When there are multiple auxiliary action instructions in the same program segment, the system generates multiple auxiliary action instruction sub-records according to the order in which the auxiliary action instructions appear in the program segment text.

[0045] Each auxiliary action instruction sub-record is bound to the same program segment number and records an independent instruction sequence number, auxiliary action instruction number, and instruction source location. Through this process, the system can perform permission checks on multiple auxiliary action instructions within the same program segment, and when any auxiliary action instruction is not permitted, associate the corresponding locking result with that program segment.

[0046] After generating the program segment record, the system reads the step number, step execution sequence number, step start segment number, step end segment number, step admission status, planned cycle count, and step completion confirmation signal from the process route record. The system compares each program segment number with the step start segment number and step end segment number of each step. When a program segment number falls within the segment number range of a certain step, the system writes the step number and step execution sequence number of that step into the program segment record, forming a mapping between program segments and steps.

[0047] Specifically, when a program segment number does not fall within the segment number range of any work step, the system writes a segment number not assigned to a work step lockout flag into the program segment record. The mapping between program segments and work steps serves as the common basis for subsequent jump target segment number verification, loop count verification, subroutine start and end segment number verification, subroutine return segment number verification, and the release control of the first segment of the next work step.

[0048] In some implementations, when the same program segment number falls into two or more work step segment number ranges simultaneously, the system generates a work step range overlap blocking flag and writes the work step ownership status of that program segment as an abnormal ownership status. When the work step start segment number is later than the work step end segment number, the system generates a work step range configuration abnormal flag.

[0049] Both the overlapping lock flag and the abnormal configuration flag of the work step interval are used as work step attribution lock fields in the synthesis of the program segment execution permission status.

[0050] In one embodiment of the present invention, the specific implementation of S3 in this embodiment is as follows: After establishing a program call object, the system permanently binds the device capability window, spatial boundary window, and work step continuation window of that program call object. This "permanent binding" means that the system reads the data used for verification during the current program call and writes it into the corresponding window record, then binds this window record to the program call object. During the same round of program segment verification, the system reads the permanently bound window record for verification, instead of repeatedly reading potentially changing device capability data, spatial boundary data, or work step status data. By permanently binding the windows, a traceable relationship can be established between subsequent locking markers and specific window data, avoiding inconsistencies in judgment criteria due to changes in device or work step status during the verification process.

[0051] The equipment capability window includes at least the spindle's allowed starting speed, allowed ending speed, allowed starting feed value, allowed ending feed value, X-axis negative travel limit, X-axis positive travel limit, Y-axis negative travel limit, Y-axis positive travel limit, Z-axis negative travel limit, Z-axis positive travel limit, rotary axis negative angle limit, rotary axis positive angle limit, tool magazine capacity, effective tool position set, tool position occupancy status, tool compensation start number, tool compensation end number, enabled tool compensation set, coordinate system start number, coordinate system end number, enabled coordinate system set, and auxiliary motion command permission set. The equipment capability window can also record the equipment number, controller parameter version number, window read time, and window version number.

[0052] The spindle allowable range, feed allowable range, axial travel limit, and rotary axis angle limit in the equipment capacity window are read from the equipment controller parameter area; the tool magazine capacity value, effective tool position set, and tool position occupancy status are read from the tool magazine management register; the tool compensation permitted range and enabled tool compensation set are read from the tool compensation register registration area; the coordinate system permitted range and enabled coordinate system set are read from the coordinate system register registration area; and the auxiliary action command permitted set is read from the controller command permitted configuration.

[0053] The system writes the above data, along with the device number, controller parameter version number, window read time, and window version number, into the device capability window.

[0054] The spatial boundary window includes at least the tool extension, tool radius or tool diameter, fixture occupancy boundary, blank boundary, coordinate system offset value, tool length compensation value, and tool diameter compensation value. The fixture occupancy boundary and blank boundary can be represented by a set of boundary points, an envelope, a voxel boundary, or a polyhedron boundary in the machine tool coordinate system, as long as they can be used to determine whether the machine tool coordinate target and the tool envelope exceed the allowable machining space, or whether they interfere with the fixture occupancy space.

[0055] The step continuation window includes at least the current step number, the current step execution sequence number, the previous step number, the previous step end segment number, the previous step end segment completion confirmation signal, the next step number, the next step start segment number, the step access status, the rework permission identifier, the equipment pause status, the spindle stop status, and the equipment current execution segment number. The step continuation window is used to convert the step progress status in the manufacturing execution system into the basis for determining internal program jumps, subroutine calls, loop calls, and the release of the next step's first segment.

[0056] The process of fixing the equipment capability window and performing parameter locking verification based on the equipment capability window is as follows: Figure 3 As shown. After the window is fixed, the system verifies the valid parameters of the program segment and the permission of auxiliary action instructions segment by segment according to the device capability window.

[0057] The system reads the effective spindle speed from the program segment record according to the program segment number or the line order of the program text, and compares the effective spindle speed with the spindle allowable range in the equipment capability window. When the effective spindle speed is lower than the lower limit of the spindle allowable range, the system generates a spindle lower limit lock flag for that program segment; when the effective spindle speed is higher than the upper limit of the spindle allowable range, the system generates a spindle upper limit lock flag for that program segment; when the effective spindle speed is within the spindle allowable range, the system writes a spindle permission flag.

[0058] The system compares the effective feed rate recorded in the program segment with the allowable feed range, and compares the effective rotary axis angle with the rotary axis angle limit, using the same processing method. When the effective feed rate does not fall within the allowable feed range, the system generates a feed lockout flag; when the effective rotary axis angle does not fall within the rotary axis angle limit range, the system generates a rotary axis lockout flag.

[0059] For tool numbers, the system reads the valid tool numbers from the program segment record, compares the valid tool numbers with the tool magazine capacity value in the equipment capacity window, and matches the valid tool numbers with the set of valid tool positions. When a valid tool number is lower than the starting tool position, exceeds the tool magazine capacity, or does not appear in the set of valid tool positions, the system generates a tool locking flag.

[0060] For the knife compensation number, the system performs a boundary comparison between the valid knife compensation number and the knife compensation permitted range, and performs a member matching between the valid knife compensation number and the set of enabled knife compensation; when either the boundary comparison or the member matching fails, the system generates a knife compensation locking flag.

[0061] For the coordinate system number, the system compares the valid coordinate system number with the permitted coordinate system range and performs member matching with the set of enabled coordinate systems; when either the boundary comparison or the member matching fails, the system generates a coordinate system locking flag.

[0062] For auxiliary action instructions, the system reads each auxiliary action instruction sub-record one by one and matches the auxiliary action instruction number with the auxiliary action instruction permission set in the device capability window. When the auxiliary action instruction number does not appear in the auxiliary action instruction permission set, the system generates an auxiliary action instruction blocking flag for the program segment to which the auxiliary action instruction sub-record belongs.

[0063] When multiple parameters fail verification within the same program segment, the system generates corresponding lockout flags for each parameter and associates these flags with the same program segment. For parameters that pass verification, the system can also write corresponding permission flags to distinguish between unverified, permitted, and locked states when the execution permission status of subsequent synthesized program segments is determined. Each parameter lockout flag includes at least the program segment number, parameter name, program segment parameter value, device capability window field name, boundary value or permission set identifier, lockout reason code, and lockout generation time.

[0064] In one embodiment of the present invention, the system performs spatial verification of the machine tool coordinate target and tool envelope based on the equipment capability window and spatial boundary window, and generates a spatial locking mark. The processing procedure is as follows: Figure 4 As shown.

[0065] The system reads the axial target position from the program segment record, the coordinate system offset value corresponding to the valid coordinate system number of the program segment, and the tool length compensation value and tool diameter compensation value corresponding to the valid tool compensation number of the program segment. Following the CNC controller's processing order for coordinate system offset and tool compensation, the system synthesizes the axial target position, coordinate system offset value, and tool compensation value of the program segment into a machine tool coordinate target. The machine tool coordinate target includes at least an X-axis machine tool coordinate target, a Y-axis machine tool coordinate target, and a Z-axis machine tool coordinate target.

[0066] The system compares the X-axis machine coordinate target with the X-axis negative and positive travel limits in the equipment capability window; it compares the Y-axis machine coordinate target with the Y-axis negative and positive travel limits; and it compares the Z-axis machine coordinate target with the Z-axis negative and positive travel limits. When any axial machine coordinate target exceeds the corresponding axial travel limit, the system generates a corresponding axial spatial locking mark.

[0067] The system forms a tool envelope based on the machine tool coordinate target, tool extension, tool radius, or tool diameter. This tool envelope can be a cylindrical envelope based on the tool centerline, a swept envelope formed by the tool's movement path along a program segment, or other geometric envelopes that reflect the actual space occupied by the tool. When forming the tool envelope, the system reads the machine tool coordinate targets of the previous and current program segments and forms the tool swept envelope based on the movement path between them. For linear movement program segments, the system forms the tool swept envelope using the linear movement path; for circular or rotary movement program segments, the system forms the tool swept envelope using the interpolation path obtained from the controller's analysis.

[0068] The system performs spatial overlap judgment between the tool sweep envelope and the fixture occupancy boundary, and performs boundary violation judgment between the tool sweep envelope and the workpiece boundary or machining allowable boundary. When overlap exists, the system generates a fixture interference locking mark; when boundary violation occurs, the system generates a workpiece boundary violation locking mark. The spatial locking mark includes at least the program segment number, machine tool coordinate target, tool envelope identifier, spatial boundary window field name, boundary violation axis or interference object, locking reason code, and locking generation time.

[0069] Through the above processing, spatial locking not only judges a single target point, but also covers the relationship between the space occupied by the tool and the fixture, blank or machining allowable boundary during the program segment movement.

[0070] In one embodiment of the present invention, the process flow of jump instructions, subroutine call instructions, and loop calls is checked, and the processing procedure is as follows: Figure 5 As shown. The specific implementation of step S4 in this embodiment is as follows: The system verifies the flow of jump instructions within the program based on the mapping between program segments and work steps and the work step continuation window.

[0071] When a jump instruction exists in the program segment record, the system reads the jump source segment number and the jump target segment number, and determines the step number to which the jump source segment number belongs, the step execution sequence number to which the jump source segment number belongs, the step number to which the jump target segment number belongs, and the step execution sequence number to which the jump target segment number belongs, based on the mapping between program segments and work steps. Simultaneously, the system reads the current step number, the current step execution sequence number, the current step's access status, the rework permission flag, the equipment pause status, and the spindle stop status from the step continuation window.

[0072] When the target segment number matches the current step number, and the current step's access status is executable, the system writes a jump flow permission flag. When the target segment number is later than the current step's execution sequence number, the system determines that the jump will cause the machining program execution flow to enter the subsequent step ahead of time, and generates a cross-step forward jump lock flag. When the target segment number is earlier than the current step's execution sequence number, the system further checks whether the rework permission flag, equipment pause status, and spindle stop status are all valid; when all of the above statuses are valid, the system writes a rework jumpback permission flag; when the above statuses are not simultaneously valid, the system generates a non-permission jumpback lock flag.

[0073] Therefore, the system allows bounces under controlled repair conditions, but blocks unauthorized bounces that do not meet the repair permission and safety pause conditions.

[0074] For conditional jump instructions, the system reads the conditional jump flag and the possible jump target segment number during the program segment parsing phase, and pre-checks the process flow direction for the jump target segment number. Whether the condition is met during actual processing does not affect the system's admission judgment for the potential jump target segment number. When the jump target segment number does not exist in the program segment record, or when the jump target segment number has not formed a valid process step assignment mapping, the system generates a jump target invalid locking flag or a jump target unassigned process step locking flag. The jump target invalid locking flag and the jump target unassigned process step locking flag participate in the synthesis of the program segment execution permission state as flow locking flags.

[0075] In one embodiment of the present invention, when a subroutine call number exists in the program segment record, the system determines the corresponding subroutine start segment number and subroutine end segment number based on the subroutine call number, and determines the program segment where the subroutine call instruction is located as the call source segment number.

[0076] The correspondence between subroutine call numbers and subroutine start and end segment numbers is determined by the subroutine registration table, the subroutine index table generated during program parsing, or the subroutine definition information in the program segment record. When a subroutine call number cannot be mapped to a subroutine start or end segment number, the system generates a subroutine index missing blocking flag.

[0077] Based on the mapping between program segments and work steps, the system reads the work step number to which the calling source segment number, subroutine start segment number, subroutine end segment number, and subroutine return segment number belong.

[0078] The system performs a consistency comparison between the step number to which the subroutine's starting segment number, the step number to which the subroutine's ending segment number, and the step number to which the subroutine's returning segment number belong, and the step number to which the calling source segment number belongs.

[0079] When all three comparisons are consistent, the system writes a subroutine flow permission flag. When any comparison is inconsistent, the system generates a subroutine flow blocking flag. When the subroutine return segment number does not exist in the program segment record, the system generates a return segment number invalid blocking flag. The subroutine index missing blocking flag, the subroutine flow blocking flag, and the return segment number invalid blocking flag are all used to indicate that the subroutine call range or return position has deviated from the execution boundary of the step where the calling source segment is located.

[0080] In a loop-call scenario, the system reads the loop count recorded in the program segment and the planned loop count recorded in the corresponding work step.

[0081] The system compares the number of loops in the program segment with the planned number of loops: when the number of loops in the program segment does not exceed the planned number of loops, the system writes a loop count permission flag; when the number of loops in the program segment exceeds the planned number of loops, the system generates a loop count lock flag.

[0082] The cross-step forward jump blocking flag, non-permitted back jump blocking flag, invalid jump target blocking flag, jump target unassigned step blocking flag, missing subroutine index blocking flag, subroutine flow blocking flag, invalid return segment number blocking flag, loop count blocking flag, and segment number unassigned step blocking flag are all used as flow blocking flags and participate in the synthesis of the execution permission status of subsequent program segments.

[0083] In one embodiment of the present invention, the synthesis of the program segment execution permission state and the control process for issuing, starting, continuing, releasing the first segment of the next step, and performing partial verification based on the execution permission state are as follows: Figure 6 As shown, the specific implementation of step S5 in this embodiment is as follows: The system establishes parameter locking fields, spatial locking fields, flow direction locking fields, and step affiliation locking fields for each program segment. Before composing the execution permission status of a program segment, the system sets the parameter locking fields, spatial locking fields, flow direction locking fields, and step affiliation locking fields to an unverified state, a permitted state, or a locked state, respectively. When any locking field is in a locked state, the program segment's execution permission status is prohibited from execution; when... When there is no locked state but there is an unverified state, the program segment execution permission state remains in the pending admission state; when all locked fields are in the permission state, the program segment execution permission state is allowed to execute.

[0084] The system retains the program file-level matching status and stores the program file-level matching status and the program segment execution permission status separately.

[0085] The program file-level matching status indicates whether the machining program has the basic conditions to enter this segment-by-segment verification process, and the program segment execution permission status indicates whether a specific program segment is allowed to be issued, started, or continued under the current equipment capability window, spatial boundary window, and step continuation window.

[0086] When a program segment's execution permission status is prohibited, the system also retains the corresponding lockout reason set. The lockout reason set includes at least the lockout type, program segment number, parameter name or flow object, program segment parameter value, window field name, boundary value or permission set identifier, lockout reason code, and lockout generation time.

[0087] The operator can output the lockout segment number, lockout parameters, window criteria, and processing prompts based on the set of lockout reasons, enabling the operator to determine whether the blockage is caused by equipment capacity exceeding the limit, processing space exceeding the limit, unauthorized auxiliary action commands, abnormal process flow, or the segment number not belonging to the process step.

[0088] In one embodiment of the present invention, the system writes the processing program text into the distribution queue according to the program segment number or the line order of the program text.

[0089] Before distribution, the system reads the execution license status of the next program segment to be distributed: When the execution permission status is "execution allowed", the system sends the program segment text and segment number confirmation information to the device communication channel and records the received confirmation segment number returned by the device.

[0090] When the execution permission status is prohibited, the system stops sending the program segment text, writes a hold instruction to the device communication channel, and outputs the program segment number, latch type, latch parameters, program segment parameter values, window field name, and latch reason code to the operator.

[0091] When the execution permission status is pending, the system suspends the issuance of the program segment and triggers the lockout verification that has not yet been completed.

[0092] When the processing program has been fully received by the equipment, the system generates a list of locked segment numbers based on the program segments in the prohibited execution state of the program segment execution permission status. Before the equipment starts, the system reads the list of locked segment numbers; if there is a prohibited program segment in the list, the system prohibits direct startup or outputs a pre-start locked prompt. During equipment execution, the equipment communication gateway reads the current execution segment number and determines the next segment number to be executed based on the current execution segment number. When the next segment number to be executed matches the locked segment number list, the system writes a pause execution command to the equipment communication channel and outputs the corresponding locked reason code. Thus, even if the processing program has been received by the equipment as a complete file, the system can still intercept the execution of locked program segments at the segment number level during equipment continuation.

[0093] When a latching procedure segment has entered the controller buffer but has not yet been executed by the controller, the system writes a pause execution instruction or a buffer clear instruction to the controller through the device communication gateway, and outputs the latching reason code corresponding to the latching procedure segment. When the controller does not support buffer clearing, the system writes a pause execution instruction at least before the latching procedure segment is executed. Through the above processing, the procedure segment control covers multiple execution access positions before issuance, before startup, before execution in the buffer, and before continued execution.

[0094] In a preferred embodiment of the present invention, the system takes the moment after the completion confirmation of the last segment of the previous step and before the first segment of the next step enters the controller buffer as the release node of the first segment of the next step.

[0095] The confirmation of completion of the last step means that the current execution segment number of the equipment reaches the last segment number of the previous step, and the equipment communication channel or manufacturing execution system receives the confirmation signal of completion of the last step.

[0096] Before the first segment of the next step enters the controller buffer, it means that the program text of the first segment of the next step has not yet been written into the controller pre-read buffer, or has not yet been confirmed as executable cached content of the controller.

[0097] At the next step's first segment release node, the system reads the previous step's final segment completion confirmation signal and the next step's first segment number from the step continuation window, and reads the execution permission status of the corresponding program segment. Simultaneously, at this node, the system triggers a spatial locking check for the next step's first segment, or reviews the existing spatial locking result. This review is based at least on the currently fixed spatial boundary window, the previous step's final segment completion confirmation result, the machine tool coordinate target, and the tool envelope of the next step's first segment. Only when the previous step's final segment completion confirmation signal is valid, and the next step's first segment has not formed parameter locking, spatial locking, or flow locking, will the system release the next step's first segment into the controller buffer.

[0098] When the confirmation signal for the completion of the previous step is invalid, the system does not release the first segment of the next step. When the confirmation signal for the completion of the previous step is valid, but the execution permission status of the program segment of the first segment of the next step is prohibited, the system still does not release the first segment of the next step. Only when the confirmation signal for the completion of the previous step is valid and the execution permission status of the program segment of the first segment of the next step is allowed to execute, will the system allow the first segment of the next step to enter the controller buffer. Since the execution permission status of the program segment is synthesized by the parameter locking flag, the space locking flag, and the flow direction locking flag, the release of the first segment of the next step is no longer determined solely by the step status in the manufacturing execution system, but also depends on the actual completion result of the previous step, the equipment capacity boundary, the processing space boundary, and the step flow direction verification result.

[0099] In one embodiment of the present invention, when the processing program is re-uploaded or any program segment is modified, the system reads the verification value of the modified processing program file and compares it with the verification value of the program file recorded in the current program call object. When the two are inconsistent, the system determines the program segment number and the changed field. For parameter fields with the attribute of continued effectiveness, the system starts from the changed program segment and searches backwards along the program text line sequence for the first time the program segment explicitly records the same type of parameter.

[0100] When a subsequent program segment explicitly records the same parameter for the first time is found, the system identifies the program segment preceding the subsequent program segment that first explicitly records the same parameter as the affected program segment. When there is no program segment explicitly recording the same parameter after the changed program segment, the system identifies the program segment from the changed program segment to the end of the program segment as the affected program segment.

[0101] For fields that do not have a continuous effect attribute, the system identifies the changed program segments as affected program segments. When the jump target segment number, loop count, subroutine call number, subroutine start segment number, subroutine end segment number, or subroutine return segment number changes, the system identifies the corresponding jump source segment number, subroutine call source segment number, and the program segments affected by this flow relationship as affected program segments. When a modification involves multiple changed fields, the system identifies the affected program segments for each changed field separately and merges these affected program segments into a review segment set.

[0102] When a program segment is added, deleted, or its number is modified, the system regenerates the program segment records and step attribution mappings within the affected scope, and re-verifies the parameter locks, spatial locks, and flow locks within the affected scope. The system only re-verifies parameter locks, spatial locks, and flow locks for program segments within the review segment set, and re-synthesizes the execution permission status of the corresponding program segments. Program segments not included in the review segment set retain the lock tags and execution permission statuses already formed during the current program call. Through this process, the review scope after program revision is determined by the valid parameter source chain and program flow relationship, rather than by manual experience or historical operation records.

[0103] In some embodiments of the present invention, a collaborative control system for manufacturing execution is also disclosed, which includes a program call object creation module, a program segment record generation module, a window fixing and parameter space verification module, a process flow verification module, and an execution permission control module.

[0104] The program call object creation module reads work order dispatch records, process route records, program release records, and data returned from equipment communication channels. It creates a program call object when the equipment number, operation number, and program file checksum all match; if any one of these does not match, a file-level call blocking flag is generated. The output of the program call object creation module is either a program call object or a file-level call blocking flag.

[0105] The program segment record generation module parses the machining program according to the line order of the machining program text, generates program segment records containing valid parameters, auxiliary action instruction sub-records, jump information, loop counts, and subroutine information, and establishes a mapping between program segments and machining steps based on the start and end segment numbers of the machining steps. The output of the program segment record generation module is a set of program segment records and a mapping between program segments and machining steps.

[0106] The window fixing and parameter space verification module is used to fix the device capability window, spatial boundary window, and step continuation window of the program call object. Based on the device capability window, it performs parameter locking verification of the spindle, feed, rotary axis, tool, tool compensation, coordinate system, and auxiliary motion commands. Based on the device capability window and spatial boundary window, it performs spatial locking verification of the machine tool coordinate target and tool envelope. The output of the window fixing and parameter space verification module includes the device capability window, spatial boundary window, step continuation window, parameter locking marker, and spatial locking marker.

[0107] The step flow verification module verifies the flow of operations based on the mapping between program segments and steps, as well as the step continuation window. It checks the target segment number, loop count, subroutine start segment number, subroutine end segment number, and subroutine return segment number, and generates flow lock flags. The output of the step flow verification module is the flow lock flag. The execution permission control module combines the parameter lock flag, spatial lock flag, and flow lock flag into a program segment execution permission status. Based on this status, it controls the issuance, initiation, continuation, or blocking of program segments. The execution permission control module also identifies affected program segments when the processing program is re-uploaded or a program segment is modified, and triggers lock verification for these affected segments. The output of the execution permission control module is the program segment execution permission status, a list of lock segment numbers, a issued control command, a start control command, or a continuation / pause command.

[0108] The aforementioned modules can be deployed within the same manufacturing execution platform, or they can be deployed separately within the CNC machining program management platform, the manufacturing execution system, the equipment communication gateway, and the CNC equipment controller pre-verification module. The modules are linked via work order number, process number, program number, program version number, equipment number, program segment number, and program call object identifier. Any implementation that achieves the creation of the program call object, generation of program segment records, window fixation, lockout verification, execution permission synthesis, and program segment issuance, startup, and continuation control falls under the system implementation described in this invention.

[0109] The present invention is further disclosed below with reference to specific examples: This embodiment uses a vertical machining center to perform milling and drilling operations on a shell part as an example to illustrate the specific execution process of the machining program collaborative control method for manufacturing execution described in this invention.

[0110] In this embodiment, the work order number in the manufacturing execution system is WO20260428-015, the part number is PART-HSG-310, the operation number is OP20, and the planned equipment number is VMC-850-02. The machining program number registered in the CNC machining program management platform is P2048, the program version number is V3.2, the applicable operation number is OP20, and the program file verification value is A7C3-91D2-6F08. The equipment number read from the CNC equipment controller by the equipment communication gateway is VMC-850-02, the controller type is FANUC-0i-MF, the equipment online status is online, the current execution segment number is empty, the equipment pause status is invalid, and the equipment alarm status is no alarm.

[0111] The system compares the planned equipment number VMC-850-02 with the equipment number VMC-850-02 returned by the equipment communication channel, and the results are consistent. It also compares the process number OP20 with the applicable process number OP20 in the program release record, and the results are consistent. Furthermore, it compares the program file verification value A7C3-91D2-6F08 in the program release record with the real-time verification value A7C3-91D2-6F08 of the processing program file to be issued, and the results are consistent. Based on this, the system creates a program call object with the number CALL-OP20-P2048-001, and writes the work order number, process number, equipment number, program number, program version number, file verification value, and call time into this program call object.

[0112] In this embodiment, the process route record includes three steps. The first step is rough machining of the reference surface, step number STEP-01, step execution sequence number 1, and step segment number range N010 to N060; the second step is hole machining, step number STEP-02, step execution sequence number 2, step segment number range N070 to N130, and planned cycle count is 3; the third step is chamfering and cleaning, step number STEP-03, step execution sequence number 3, and step segment number range N140 to N180. The main program segments of the machining program to be issued are shown in Table 1.

[0113] Table 1. Main program segments of the processing program to be issued:

[0114] The system parses the machining program according to the line order of the program text and generates a program segment record for each segment. Taking N020 as an example, this program segment does not explicitly record the spindle speed, feed rate, tool number, tool compensation number, and coordinate system number. The system reads S4200, F600, T02, H02, and G54, which are already effective in the previous program segment N010, and writes them into the valid parameter field of N020. At the same time, it writes the corresponding source mark as the continuation source of the previous segment. Taking N030 as an example, this program segment explicitly records F180. The system writes F180 into the valid feed rate field of N030 and writes the source mark as the explicit source of this segment. N030 does not explicitly record the spindle speed, so the system continues to use S4200 as the valid spindle speed of N030.

[0115] For M03 and M08 appearing simultaneously in N010 and N070, the system generates two auxiliary action instruction sub-records respectively. Specifically, the first auxiliary action instruction sub-record for N010 has program segment number N010, instruction sequence number 1, and auxiliary action instruction number M03; the second auxiliary action instruction sub-record has program segment number N010, instruction sequence number 2, and auxiliary action instruction number M08. N070 generates two auxiliary action instruction sub-records in the same manner.

[0116] The system establishes a mapping between program segments and work steps based on the work step number range. N010 to N060 are assigned to work step STEP-01, with an execution sequence number of 1; N070 to N130 are assigned to work step STEP-02, with an execution sequence number of 2; and N140 to N180 are assigned to work step STEP-03, with an execution sequence number of 3. In this embodiment, there are no instances where program segment numbers are not assigned to work steps.

[0117] Table 2: System-defined device capability window in this embodiment:

[0118] Table 3: Spatial boundary windows fixed by the system in this embodiment:

[0119] Tables 2 and 3 respectively show the device capability window and the spatial boundary window fixed by the system in this embodiment.

[0120] In this embodiment, the current initial state of the step continuation window is as follows: current step number STEP-01, current step execution sequence number is 1, previous step completion confirmation signal is invalid, next step first segment number is N070, step access status is executable, rework permission identifier is invalid, equipment pause status is invalid, and spindle stop status is invalid.

[0121] The system first performs parameter locking checks on the valid parameters of each program segment. The effective spindle speed of N010 is S4200, which is within the allowable spindle speed range; the effective feed rate is F600, which is within the allowable feed speed range; the tool number T02 exists in the current valid tool position set; the tool offset number H02 exists in the enabled tool offset set; the coordinate system G54 exists in the enabled coordinate system set; and both auxiliary action commands M03 and M08 exist in the permitted auxiliary action command set. Therefore, the parameter locking field of N010 is set to the permitted state.

[0122] The effective spindle speed of N140 is S8500, which exceeds the upper limit of 8000 rpm allowed by the spindle in the equipment capability window. The system generates a spindle upper limit lockout flag for N140. This lockout flag records the program segment number N140, the parameter name as spindle speed, the program segment parameter value as S8500, the window field name as spindle allowable range, the boundary value as 8000 rpm, and the lockout reason code as SPINDLE-UPPER-LIMIT.

[0123] An auxiliary action instruction M64 appears in N160. The system reads the auxiliary action instruction license set and confirms that M64 does not appear in the license set. Therefore, an auxiliary action instruction lockout flag is generated for N160. This lockout flag records the program segment number N160, the parameter name as "auxiliary action instruction", the program segment parameter value as M64, the window field name as "auxiliary action instruction license set", and the lockout reason code as M-CODE-NOT-PERMITTED.

[0124] The system then performs spatial locking checks on the machine tool coordinate target and tool envelope. The axial target positions of the program segment N150 are X440.000, Y210.000, and Z8.000. After offsetting using the G54 coordinate system, the system obtains the corresponding X-axis machine tool coordinate target of N150 as 460 mm. This target exceeds the X-axis positive travel limit of 450 mm in the equipment capability window, and the system generates an X-axis positive travel limit over-limit locking mark for N150. This locking mark records the program segment number N150, the spatial object as the machine tool coordinate target, the window field name as the X-axis positive travel limit, and the locking reason code as X-POSITIVE-TRAVEL-LIMIT.

[0125] For N160, the system forms a tool sweep envelope based on the machine coordinate target of the previous program segment N150, the machine coordinate target of the current program segment N160, the T12 tool extension, and the T12 tool radius. After N160 is offset using the G54 coordinate system, the current machine coordinate target is located within the fixture occupancy boundary, and the tool sweep envelope overlaps with the fixture occupancy boundary. The system generates a fixture interference locking mark for N160. This locking mark records the program segment number N160, the spatial object as the tool sweep envelope, the window field name as the fixture occupancy boundary, the interference object as the fixture occupancy space, and the locking reason code as FIXTURE-INTERFERENCE.

[0126] The system further performs a step flow verification. N085 is a conditional jump segment, and the jump target segment number is N150. The system reads the attribution mapping and finds that N085 belongs to STEP-02, with an execution sequence number of 2; N150 belongs to STEP-03, with an execution sequence number of 3. When the current step is STEP-02, the execution sequence number of the jump target segment is later than the current step's execution sequence number. Therefore, the system generates a cross-step forward jump blocking flag for N085. This blocking flag records the segment number N085, the flow object as the jump target segment number N150, and the blocking reason code as FORWARD-JUMP-ACROSS-STEP.

[0127] N090 is a subroutine call segment. The system, based on the subroutine index table, confirms that the subroutine call number P100 corresponds to the subroutine start segment number N100, the subroutine end segment number N110, and the subroutine return segment number obtained by the controller is N120. N090, N100, N110, and N120 all belong to STEP-02; therefore, the subroutine start, end, and return segment numbers belong to the same step, and the system writes a subroutine flow permission flag. However, the loop count in N090 is 4, while the planned loop count recorded in STEP-02 is 3. The system generates a loop count lockout flag for N090. This lockout flag records the segment number N090, the segment loop count as 4, the planned loop count as 3, and the lockout reason code as LOOP-COUNT-EXCEEDED.

[0128] N170 is an unconditional jump segment, with jump target segment number N090. N170 belongs to STEP-03, and N090 belongs to STEP-02. The system reads the rework permission identifier, equipment pause status, and spindle stop status from the step sequence window. All three are invalid, therefore the system determines that N170 is a non-permitted jump and generates a non-permitted jump lockout flag for N170. This lockout flag records the segment number N170, the jump target segment number N090, and the lockout reason code UNPERMITTED-BACKWARD-JUMP.

[0129] The system combines the parameter locking field, spatial locking field, flow locking field, and step affiliation locking field of each program segment to obtain the program segment execution permission status as shown in Table 4.

[0130] Table 4: Program Segment Execution Permission Status

[0131] During the program segment distribution process, the system writes the program segments into the distribution queue according to the line order of the program text. When the next program segment to be distributed is N010 to N080, the system reads its execution permission status as "executable," and thus sends the corresponding program segment text to the device communication channel in sequence, recording the receiving confirmation segment number returned by the device. When the next program segment to be distributed is N085, the system reads that the execution permission status of N085 is "disallowed," stops distributing N085, writes a hold instruction to the device communication channel, and outputs the lockout segment number N085, the lockout type as flow lockout, the lockout object as jump target segment number N150, and the lockout reason code as FORWARD-JUMP-ACROSS-STEP to the operator.

[0132] If another device has already fully received the processing program, the system generates a list of lockout segment numbers based on the program segments in the prohibited execution state. This list includes N085, N090, N140, N150, N160, and N170. Before device startup, the system reads this list of lockout segment numbers and outputs a pre-start lockout prompt. If the device has already started and is executing up to segment N080, the device communication gateway reads that the current execution segment number is N080. The system determines that the next segment to be executed, N085, matches the lockout segment number list, and therefore writes a pause execution command to the device communication channel and outputs the lockout reason code corresponding to N085.

[0133] During the step-by-step control process, when the equipment executes to N060 and returns the final segment completion confirmation signal of STEP-01, the system updates the previous step's final segment completion confirmation signal in the step-by-step window to be valid and confirms the first segment number of the next step as N070. Before N070 enters the controller buffer, the system reads the program segment execution permission status of N070. Since N070 has not formed a parameter lockout, spatial lockout, or flow direction lockout, the system allows N070 to enter the controller buffer.

[0134] After the device executes to N130 and returns the STEP-02 end-segment completion confirmation signal, the system confirms the next step's first segment number as N140. Before N140 enters the controller buffer, the system reads the program segment execution permission status of N140 and triggers a review of the parameter locking result of N140. Because N140 has a spindle upper limit locking flag, the system does not release N140 into the controller buffer and outputs the program segment number N140, locking parameter S8500, window field name spindle allowed range, and locking reason code SPINDLE-UPPER-LIMIT to the operator.

[0135] In a program modification scenario, the operator changes S8500 to S7000 in N140. The system reads the modified program file checksum and confirms that it is inconsistent with the program file checksum recorded in the current program call object. Therefore, the system determines that the changed program segment number is N140, and the changed field is the spindle speed field. Since the spindle speed is a parameter with a continuous effect attribute, the system searches for the next program segment that explicitly records the spindle speed for the first time, starting from N140, along the program text line sequence. Because there are no program segments that explicitly record the spindle speed again after N140, the system identifies N140 to N180 as the affected program segments and only re-executes the interlock check on N140 to N180.

[0136] After re-verification, the effective spindle speed S7000 of N140 is within the allowable range of the spindle, the spindle upper limit lock mark is removed, and the parameter lock field of N140 is updated to the permitted state. However, N150 still has an X-axis positive travel over-limit lock mark, N160 still has auxiliary action command lock and fixture interference lock marks, and N170 still has an unpermitted bounce lock mark. Therefore, the system only updates the program segment execution permitted state of N140 to N180, while N010 to N130 retain the previously established permitted and lock states. Through this process, the verification range of the modified program is determined by the effective parameter source chain of the spindle speed, rather than a full re-verification of the entire machining program.

[0137] This embodiment illustrates that, when the processing program file-level matching is established, the present invention can further identify segment number-level risks such as program segment parameter out-of-bounds, spatial interference, cross-step jump, abnormal loop count, and unauthorized back jump, and control the issuance, startup, continuation, and modification of program segments accordingly.

[0138] Finally, it should be understood that the embodiments described in this specification are merely illustrative of the principles of the embodiments described herein. Other variations may also fall within the scope of this specification. Therefore, alternative configurations of the embodiments described herein are intended to be illustrative rather than limiting, and should be considered consistent with the teachings of this specification. Accordingly, the embodiments described herein are not limited to those explicitly introduced and described herein.

Claims

1. A manufacturing execution oriented machining program cooperative control method characterized by, Includes the following steps: Obtain work orders, processes, steps, equipment, and processing programs; when the processing program matches the verification values ​​of the processes, equipment, and documents, establish a program call object. The machining program is parsed segment by segment to generate program segment records containing valid parameters, instructions, jumps and subroutine information, and the program segment and process step attribution mapping is established according to the start and end segment numbers of the process steps; The device capability window, spatial boundary window, and step continuation window of the program calling object are fixedly bound. Based on the device capability window and spatial boundary window, the valid parameters of the program segment, machine tool coordinate target, tool envelope, and permission of auxiliary action instructions are checked, and parameter locking flags and spatial locking flags are generated. Based on the attribution mapping and the step continuation window, the step flow direction of the jump target segment number, the number of loops, the subroutine start and end segment numbers and the return segment number is checked, and a flow lock flag is generated. The parameter locking flag, spatial locking flag, and flow locking flag are combined into a program segment execution permission state. After the previous step's end segment is confirmed and before the next step's first segment enters the controller buffer, the program segment is controlled to be issued, started, continued, or blocked according to the program segment execution permission state.

2. The method of claim 1, wherein, The process of generating a program segment record containing valid parameters, instructions, jumps, and subroutine information includes: Read the segment number, spindle speed, feed rate, axial target position, rotary axis angle, tool number, tool compensation number, coordinate system number, auxiliary action instructions, jump instructions, number of loops, subroutine call number, subroutine start segment number, subroutine end segment number, and subroutine return segment number according to the line order of the program text; For parameters with a continuing effect attribute that are not recorded in the current program segment, write the corresponding valid parameters and their source markers that have taken effect in the previous program segment; For multiple auxiliary action instructions in the same program segment, generate auxiliary action instruction sub-records that are respectively bound to the program segment in the order of their appearance.

3. The method according to claim 1, characterized in that: The process of establishing the mapping between program segments and work steps based on the start and end segment numbers includes: comparing the program segment number with the start segment number and end segment number of the work step, respectively. When the program segment number falls within the segment number range of the corresponding work step, write the work step number to which the program segment belongs and the execution sequence number of the work step to which it belongs. When the program segment number does not fall within the segment number range of any step, a segment number not belonging to step lock mark is generated as the flow lock mark.

4. The method according to claim 1, characterized in that: The equipment capability window includes the spindle allowable range, feed allowable range, axial travel limit, rotary axis angle limit, tool magazine capacity and effective tool position set, tool compensation allowable range and enabled tool compensation set, coordinate system allowable range and enabled coordinate system set, and auxiliary action command allowable set; The spatial boundary window includes tool extension, fixture occupancy boundary, blank boundary, coordinate system offset, and tool compensation. The step continuation window includes the current step number, the current step execution sequence number, the confirmation signal for the completion of the last segment of the previous step, the first segment number of the next step, the step access status, the rework permission identifier, the equipment pause status, and the spindle stop status.

5. The method of claim 4, wherein, The parameter locking flag is generated based on the valid parameters of the verification program segment of the device capability window and the permission of auxiliary action instructions, specifically in the following manner: The effective spindle speed, effective feed rate, effective rotary axis angle, effective tool number, effective tool compensation number, and effective coordinate system number in the program segment are compared with the spindle allowable range, feed allowable range, rotary axis angle limit, tool magazine capacity, effective tool position set, tool compensation permitted range and enabled tool compensation set, and coordinate system permitted range and enabled coordinate system set in the equipment capability window, respectively. The auxiliary action command number in the program segment is matched with the auxiliary action command permitted set in the equipment capability window. If any comparison or match fails, a parameter lockout flag is generated for the corresponding program segment.

6. The method according to claim 4, characterized in that, The spatial locking mark is generated based on the equipment capability window and spatial boundary window, verifying the machine tool coordinate target and tool envelope. Specifically, the method is as follows: The machine tool coordinate target is synthesized based on the axial target position of the program segment, coordinate system offset, and tool compensation. A tool envelope is formed based on the machine tool coordinate target and the tool extension amount; The machine tool coordinate target is compared with the axial travel limit, and the tool envelope is compared with the fixture occupancy boundary and the blank boundary. When there is boundary crossing or interference, a spatial locking mark is generated.

7. The method according to claim 4, characterized in that, The workflow for verifying the target segment number includes: Read the step number and execution sequence number of the jump source segment number and jump target segment number, and read the current step number, current execution sequence number, current step access status, rework permission identifier, equipment pause status and spindle stop status from the step continuation window. When the target segment number belongs to the step number that is equal to the current step number and the current step's access status is executable, write the jump flow permission flag. When the execution sequence number of the jump target segment number is greater than the execution sequence number of the current step, a cross-step forward jump lock mark is generated as the flow lock mark. When the jump target segment number belongs to the step execution sequence number which is less than the current step execution sequence number, and the rework permission flag, equipment pause status and spindle stop status are all valid, write the rework jump permission flag. When the jump target segment number belongs to the step execution sequence number which is less than the current step execution sequence number and the rework permission identifier, equipment pause status and spindle stop status are not simultaneously valid, a non-permissioned jumpback lock mark is generated as the flow direction lock mark.

8. The method according to claim 1, characterized in that, The workflow for verifying the number of loop iterations, subroutine start and end segment numbers, and return segment number includes: Read the subroutine call source segment number, and compare the corresponding step numbers of the subroutine start segment number, subroutine end segment number, and subroutine return segment number with the corresponding step number of the call source segment number. When the corresponding step numbers of the subroutine start segment number, subroutine end segment number, and subroutine return segment number are all consistent with the corresponding step number of the call source segment number, write the subroutine flow permission flag. If any comparison is inconsistent, a subroutine flow direction lock flag is generated as the flow direction lock flag; The program segment loop count is compared with the planned loop count recorded in the corresponding work step. When the program segment loop count is not greater than the planned loop count, a loop count permission flag is written. When the number of iterations in the program segment exceeds the planned number of iterations, a loop count lock flag is generated as the flow lock flag.

9. The method according to claim 1, characterized in that, The execution of the license status control program segment according to the program segment includes issuing, starting, continuing, or blocking the program segment, including: After the previous step is completed and confirmed, and before the first program segment of the next step enters the controller buffer, the execution permission status of the first program segment is read. If the execution permission status is allowed, the first program segment is issued. If the execution permission status is prohibited, the issuance is stopped and the locking reason is output. When the processing program has been received by the equipment, a list of locked segment numbers is generated based on the program segments in the prohibited execution state in the program segment execution permission state. Based on the list of locked segment numbers and the current execution segment number of the equipment, a pause execution instruction is written when the next execution segment number hits the locked segment number. When the processing program is re-uploaded or the program segment is modified, the affected program segment corresponding to the parameter with the attribute of continued effectiveness is determined from the program segment that has changed to the program segment before the program segment in which the same type of valid parameter is first recorded. If no valid parameter of the same type is recorded after the changed program segment, the program segment from the changed program segment to the end of the program segment is determined as the affected program segment, and parameter locking, spatial locking and flow locking checks are re-executed only on the affected program segment.

10. A manufacturing execution-oriented collaborative control system for processing procedures, used to execute the method according to any one of claims 1-9, characterized in that, include: The program call object creation module is used to obtain work orders, processes, steps, equipment, and processing programs, and to create a program call object when the processing program matches the verification values ​​of the processes, equipment, and files. The program segment record generation module is used to parse the machining program by segment, generate program segment records containing valid parameters, instructions, jumps and subroutine information, and establish the attribution mapping between program segments and machining steps according to the start and end segment numbers of the machining steps; The window fixing and parameter space verification module is used to fix and bind the device capability window, spatial boundary window and work step continuation window of the program call object, and generate parameter locking mark and spatial locking mark; The process flow verification module is used to verify the process flow direction of the jump target segment number, the number of loops, the start and end segment numbers of the subroutine, and the return segment number according to the belonging mapping and the process continuation window, and generate a flow lock flag. The execution permission control module is used to combine the parameter lockout flag, spatial lockout flag and flow direction lockout flag into a program segment execution permission state, and control the program segment to be issued, started, continued or blocked according to the program segment execution permission state. When the processing program is re-uploaded or the program segment is modified, the module identifies the affected program segment and triggers the lockout check.