Numerical control system magnification adjustment method
Patent Information
- Application Number
- CN202311326581.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-10-13
AI Technical Summary
[0003]现有专利技术中,为了计算梯形速度模型中的首速度、中间速度、末速度,需要前后两周期的指令脉冲增量参与计算,即需要在当前周期指令还未发出时提前读取下一周期指令,即指令的执行相对于读取存在一个周期的滞后,当设备运行过程中需要暂停时,系统可能会因为存在一周期预读的指令而继续运行一周期而不是在完成当前周期指令后停止
[0015]根据本公开提供的数控系统倍率调整方法,通过当前指令周期与前一指令周期的速度构建速度曲线,由于构建速度曲线不涉及下一指令周期,因此,至少部分的解决了数控系统无法实时暂停的技术问题,实现了数控系统倍率调整的技术效果。
Smart Images

Figure CN117369369B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of machine tool control technology, and more specifically to a method for adjusting the magnification of a CNC system. Background Technology
[0002] In non-real-time interpolation CNC systems, rate control requires segmenting the interpolation time slices output by the interpolator and recalculating the increment of the command pulse per cycle. However, directly segmenting the time slices without smoothing the speed will result in a stepped speed variation, causing vibration during axis operation. Therefore, the key to rate control in non-real-time interpolation CNC systems lies in ensuring that the increment of the command pulse corresponding to the segmented time slices is relatively smooth.
[0003] In existing patented technologies, in order to calculate the initial velocity, intermediate velocity, and final velocity in the trapezoidal velocity model, the incremental instruction pulses of the preceding and following cycles are required to participate in the calculation. That is, the instruction of the next cycle needs to be read in advance before the instruction of the current cycle is issued. In other words, there is a one-cycle lag between the execution of the instruction and the reading. When the device needs to be paused during operation, the system may continue to run for one cycle because of the one-cycle pre-read instruction instead of stopping after completing the instruction of the current cycle. Summary of the Invention
[0004] In view of the above problems, this disclosure provides a method for adjusting the magnification of a CNC system.
[0005] This disclosure provides a method for adjusting the magnification of a CNC system, including: S1, constructing a restoration speed curve corresponding to the current instruction cycle, wherein the restoration speed curve is a uniform speed curve, the starting speed of the restoration speed curve is the instruction speed of the previous instruction cycle, and the ending speed of the restoration speed curve is the instruction speed of the current instruction cycle; S2, performing interpolation calculation based on the restoration speed curve and the current magnification.
[0006] According to an embodiment of this disclosure, constructing the restoration speed curve corresponding to the current instruction cycle includes: detecting whether a pause state is entered after the current instruction cycle ends; if so, generating a compensation cycle, wherein the starting speed of the restoration speed curve of the compensation cycle is the instruction speed of the current instruction cycle, and the ending speed is 0.
[0007] According to embodiments of this disclosure, detecting whether to enter a pause state after the current instruction cycle ends includes: detecting whether the current instruction cycle ends with a stop instruction; if the next instruction is a stop instruction, then entering a pause state after the current instruction cycle ends; or, detecting whether there is a next instruction after the current instruction cycle ends; if there is no next instruction, then entering a pause state after the current instruction cycle ends; or, detecting whether the current instruction cycle ends with a 0-pulse instruction; if the next instruction is a 0-pulse instruction, then entering a pause state after the current instruction cycle ends.
[0008] According to an embodiment of this disclosure, detecting whether a pause state has been entered after the current instruction cycle ends includes: in response to not entering a pause state after the current instruction cycle ends, receiving the next instruction, and using the next instruction cycle as the current instruction cycle, and executing step S1 again.
[0009] According to embodiments of this disclosure, the compensation period is equal to the length of the current instruction period.
[0010] According to embodiments of this disclosure, interpolation calculation based on the restoration speed curve and the current magnification includes: determining whether the remaining time slice length of the current instruction cycle is greater than the required time slice length of the current instruction cycle; wherein, the initial length of the required time slice length of the current instruction cycle is the required time slice length of the current magnification; if yes, then the remaining time slice of the current instruction cycle is divided into a time slice required by the current instruction cycle, and the pulse increment of the divided time slice is calculated and sent to the output buffer according to the restoration speed curve of the current instruction cycle; the remaining pulse count of the current instruction cycle is subtracted from the sent pulse increment; the pulse increment in the output buffer is output; the remaining time slice length of the current instruction cycle is subtracted from the required time slice length of the current instruction cycle, and the required time slice length of the current instruction cycle is reduced to 0; if no, then the remaining pulse count of the current instruction cycle is output to the output buffer; the required time slice length of the current instruction cycle is subtracted from the remaining time slice length of the current instruction cycle; the next instruction cycle is used as the current instruction cycle, and the restoration speed curve of the current instruction cycle is constructed; the remaining time slice length of the current instruction cycle is updated to the length of one instruction cycle; and then proceeding to the step of determining whether the remaining time slice length of the current instruction cycle is greater than the required time slice length of the current instruction cycle.
[0011] According to an embodiment of this disclosure, constructing the restoration speed curve corresponding to the current instruction cycle includes: in response to the current instruction cycle being the first instruction cycle, constructing the restoration speed curve of the first instruction cycle, wherein the initial speed of the restoration speed curve is 0, and the final speed of the restoration speed curve is the instruction speed of the first instruction cycle.
[0012] The second aspect of this disclosure provides a CNC system scaling adjustment device, comprising: a restoration speed curve module for constructing a restoration speed curve corresponding to the current instruction cycle, wherein the restoration speed curve is a uniform speed curve, the starting speed of the restoration speed curve is the instruction speed of the previous instruction cycle, and the ending speed of the restoration speed curve is the instruction speed of the current instruction cycle; and an interpolation calculation module for performing interpolation calculations based on the restoration speed curve and the current scaling factor.
[0013] A third aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the above-described CNC system scaling method.
[0014] A fourth aspect of this disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the above-described numerical control system scaling method.
[0015] According to the CNC system rate adjustment method provided in this disclosure, a speed curve is constructed by comparing the speed of the current instruction cycle with that of the previous instruction cycle. Since the construction of the speed curve does not involve the next instruction cycle, the technical problem that the CNC system cannot be paused in real time is solved at least partially, and the technical effect of CNC system rate adjustment is achieved. Attached Figure Description
[0016] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0017] Figure 1 A flowchart illustrating a CNC system magnification adjustment method according to an embodiment of the present disclosure is shown schematically.
[0018] Figure 2 A restoration speed curve according to an embodiment of the present disclosure is illustrated schematically;
[0019] Figure 3 A reduction rate curve according to another embodiment of the present disclosure is illustrated schematically;
[0020] Figure 4 A flowchart illustrating interpolation calculation according to an embodiment of the present disclosure is shown schematically;
[0021] Figure 5 A schematic diagram of the structure of a CNC system magnification adjustment device according to an embodiment of the present disclosure is shown.
[0022] Figure 6 A block diagram schematically illustrates an electronic device suitable for implementing a numerical control system magnification adjustment method according to an embodiment of the present disclosure. Detailed Implementation
[0023] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0024] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0025] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0026] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0027] It should be noted that the CNC system scaling method disclosed herein can be used in the field of machine tool control technology, or in any field other than machine tool control technology. The application field of this disclosure is not limited.
[0028] First, the technical terms used in this article are explained as follows:
[0029] Reverse command: If a motion segment with recalculated initial, final, and intermediate velocities is constructed, during rapid acceleration and deceleration, in order to ensure that the pulse increment of the constructed motion segment is consistent with the original command, an incorrect reverse command may be planned. When recalculating the speed, it is impossible to guarantee that the speed monotonicity is consistent with the original command.
[0030] Pulse increment: refers to moving a certain distance in a given direction based on given data. Pulse increment = speed × number of cycles.
[0031] Speed: refers to the number of pulses emitted within one cycle, measured in pulses per cycle.
[0032] Interpolation: Interpolation is the process by which a CNC system determines the tool's motion trajectory according to a certain method. It can also be described as a method of calculating the intermediate points between known points on a given curve using a specific algorithm. The CNC system divides the space between the start and end points of the curve described in the program segment into several slices based on a magnification factor, thus densifying the data and forming the required contour trajectory. In CNC machine tools, the tool cannot strictly follow the curve to be machined; it can only approximate the curve using a polygonal trajectory.
[0033] Time slice corresponding to the multiplier: When the multiplier is k%, the corresponding time slice length is k% × instruction cycle.
[0034] Figure 1 A flowchart illustrating a CNC system magnification adjustment method according to an embodiment of the present disclosure is shown, such as... Figure 1 As shown, an embodiment of this disclosure provides a method for adjusting the magnification of a CNC system, including: S1, constructing a restoration speed curve corresponding to the current instruction cycle, wherein the restoration speed curve is a uniform speed curve, the starting speed of the restoration speed curve is the instruction speed of the previous instruction cycle, and the ending speed of the restoration speed curve is the instruction speed of the current instruction cycle; S2, performing interpolation calculation based on the restoration speed curve and the current magnification.
[0035] Through the embodiments of this disclosure, a speed curve is constructed by comparing the speed of the current instruction cycle with that of the previous instruction cycle. This at least partially solves the problem that the CNC system cannot continue to run the next instruction cycle after being paused in real time due to the speed of the next instruction cycle being read in advance, thus achieving the technical effect of CNC system speed adjustment.
[0036] Based on the above embodiments, the restoration speed curve corresponding to the current instruction cycle is constructed, including: detecting whether the current instruction cycle has entered a pause state after it ends; if so, a compensation cycle is generated, and the starting speed of the restoration speed curve of the compensation cycle is the instruction speed of the current instruction cycle, and the ending speed is 0.
[0037] Through the embodiments of this disclosure, the missing pulse increments during operation are compensated by a compensation cycle. When a pause is required, only one compensation cycle needs to be added to make the displacement during the actual motion process consistent with the commanded displacement. At the same time, since the calculation of intermediate speed is not involved, the technical problem that incorrect reverse commands may be planned during rapid acceleration and deceleration in the trapezoidal velocity model is solved.
[0038] Optionally, when the compensation period is different from the current instruction period length, the total pulse increment before and after the rate adjustment may be different; optimally, Figure 2 The diagram schematically illustrates the restoration speed curve according to an embodiment of the present disclosure, where one bar corresponds to one instruction cycle, and one compensation cycle is equal in length to the current instruction cycle.
[0039] In this embodiment, the total pulse increment before and after the CNC system's magnification adjustment is:
[0040] Equation (1)
[0041] Equation (2)
[0042] Wherein, equation (1) represents the total pulse increment before the multiplier adjustment; equation (2) represents the total pulse increment after the multiplier adjustment; V1, V2, ..., V n T represents the speed of each instruction cycle in the CNC system; T represents the instruction cycle length; T c The compensation period length; when T c Equal to T, T=T c =1, then P1=P2.
[0043] Through the embodiments of this disclosure, by ensuring that the compensation period is the same as the instruction period length, a motion that decelerates to 0 is planned during the compensation period, so as to ensure that the total pulse increment of the speed curve after the CNC system's multiplier adjustment is the same as before the adjustment.
[0044] Figure 3 The diagram schematically illustrates a velocity curve according to another embodiment of this disclosure. In this embodiment, each bar in the figure corresponds to one instruction cycle, dividing each instruction cycle into a first time period and a second time period. The second time period of the previous instruction cycle and the first time period of the current instruction cycle constitute a motion segment between two adjacent cycles. The velocity of the previous instruction cycle is used as the initial velocity of the motion segment, and the velocity of the current instruction cycle is used as the final velocity of the motion segment to construct uniformly accelerated motion.
[0045] The total pulse increment of the motion segment during the two consecutive weeks before the rate adjustment is shown in equation (3):
[0046] Equation (3)
[0047] Among them, V m-1 V represents the speed of the previous instruction cycle. m The current instruction cycle speed is represented by T; T represents the number of cycles to maintain this speed.
[0048] The total pulse increment of the motion segment during the adjacent two weeks after the multiplier adjustment is shown in equation (4):
[0049] Equation (4)
[0050] It can be seen that P3=P4, that is, the pulse increment of the uniformly accelerated motion segment is always equal to the pulse increment of the two adjacent half cycles.
[0051] When the current instruction cycle ends and the system enters a pause state, optimally, a compensation cycle of half an instruction cycle is introduced, which together with the second time period of the previous instruction cycle constitutes a motion segment. The starting speed of the motion segment is the instruction speed of the previous instruction cycle, and the ending speed is 0.
[0052] Through the embodiments of this disclosure, since motion segments are constructed within adjacent two-week intervals, after receiving the current cycle instruction, only the motion up to the first time segment of the current cycle can be planned. The second time segment will participate in the planning of the next instruction cycle, thus introducing a half-cycle lag. When a pause is detected, a 0-pulse instruction cycle is added, which allows for the planning of a motion that decelerates to 0, with the displacement exactly equal to the half-cycle displacement of the remaining second time segment. Therefore, although there is a half-cycle lag, the problem of pre-reading the next instruction and running an extra instruction cycle is avoided, ensuring that the motion of the current cycle stops promptly after execution. Simultaneously, since the speed is not recalculated, the monotonicity of the planned speed is consistent with the original instruction, and no reverse instruction is generated.
[0053] Based on the above embodiments, detecting whether to enter a pause state after the current instruction cycle ends includes: detecting whether the current instruction cycle ends with a stop instruction; if the next instruction is a stop instruction, then entering a pause state after the current instruction cycle ends; or, detecting whether there is a next instruction after the current instruction cycle ends; if there is no next instruction, then entering a pause state after the current instruction cycle ends; or, detecting whether the current instruction cycle ends with a 0-pulse instruction; if the next instruction is a 0-pulse instruction, then entering a pause state after the current instruction cycle ends.
[0054] Based on the above embodiments, detecting whether the current instruction cycle ends and enters a pause state includes: in response to the current instruction cycle not entering a pause state, receiving the next instruction, taking the next instruction cycle as the current instruction cycle, and executing step S1 again.
[0055] Through the embodiments of this disclosure, a speed curve is cyclically constructed while the CNC system is operating without interruption, thus completing a full motion.
[0056] Figure 4 A flowchart illustrating interpolation calculation according to an embodiment of the present disclosure is shown schematically, such as Figure 4As shown, the interpolation calculation based on the restoration speed curve and the current multiplier includes: determining whether the remaining time slice length of the current instruction cycle is greater than the required time slice length of the current instruction cycle; wherein, the initial length of the required time slice length of the current instruction cycle is the required time slice length of the current multiplier; if yes, then the remaining time slice of the current instruction cycle is divided into a time slice required by the current instruction cycle, and the pulse increment of the divided time slice is calculated according to the restoration speed curve of the current instruction cycle and sent to the output buffer; the remaining pulse count of the current instruction cycle is subtracted from the sent pulse increment; the pulse increment in the output buffer is output; the remaining time slice length of the current instruction cycle is subtracted from the required time slice length of the current instruction cycle, and the required time slice length of the current instruction cycle is reduced to 0; if no, then the remaining pulse count of the current instruction cycle is output to the output buffer; the required time slice length of the current instruction cycle is subtracted from the remaining time slice length of the current instruction cycle; the next instruction cycle is used as the current instruction cycle, and the restoration speed curve of the current instruction cycle is constructed; the remaining time slice length of the current instruction cycle is updated to the length of one instruction cycle; and then the step of whether the remaining time slice length of the current instruction cycle is greater than the required time slice length of the current instruction cycle is performed.
[0057] Through the embodiments of this disclosure, after constructing a restoration speed curve by the previous instruction cycle and the current instruction cycle, time slices are divided, and corresponding pulse increments are issued according to the restoration speed curve to complete the multiplier adjustment of the CNC system.
[0058] Based on the above embodiments, such as Figure 2 As shown, constructing the restoration speed curve corresponding to the current instruction cycle includes, in response to the current instruction cycle being the first instruction cycle, constructing the restoration speed curve for the first instruction cycle, with the initial speed of the restoration speed curve being 0 and the final speed of the restoration speed curve being the instruction speed of the first instruction cycle.
[0059] Optionally, such as Figure 3 As shown, in response to the current instruction cycle being the first instruction cycle, a compensation cycle is added before the first instruction cycle. The length of the compensation cycle is half an instruction cycle. The compensation cycle and the first time period of the first instruction cycle constitute the first motion segment.
[0060] Based on the above-described CNC system magnification adjustment method, this disclosure also provides a CNC system magnification adjustment device. The following will be combined with... Figure 5 The device is described in detail.
[0061] Figure 5 A schematic block diagram of a CNC system magnification adjustment device according to an embodiment of the present disclosure is shown.
[0062] like Figure 5As shown, the CNC system magnification adjustment device 500 in this embodiment includes a speed curve restoration module 501 and an interpolation calculation module 502.
[0063] The speed curve restoration module 501 is used to construct the speed curve corresponding to the current instruction cycle. The speed curve restoration is a uniformly variable speed curve, the starting speed of the speed curve restoration is the instruction speed of the previous instruction cycle, and the ending speed of the speed curve restoration is the instruction speed of the current instruction cycle. In one embodiment, the speed curve restoration module 501 can be used to execute the operation S1 described above, which will not be repeated here.
[0064] The interpolation calculation module 502 is used to perform interpolation calculations based on the restoration speed curve and the current magnification. In one embodiment, the interpolation calculation module 502 can be used to perform the operation S2 described above, which will not be repeated here.
[0065] According to embodiments of this disclosure, any plurality of modules in the restored speed curve module 501 and the interpolation calculation module 502 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules can be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the restored speed curve module 501 and the interpolation calculation module 502 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging the circuitry, or implemented in any one of software, hardware, and firmware methods, or in a suitable combination of any of these. Alternatively, at least one of the restored speed curve module 501 and the interpolation calculation module 502 can be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0066] Figure 6 A block diagram schematically illustrates an electronic device suitable for implementing a CNC system magnification adjustment method according to an embodiment of the present disclosure.
[0067] like Figure 6As shown, an electronic device 600 according to an embodiment of this disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage portion 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.
[0068] RAM 603 stores various programs and data required for the operation of electronic device 600. Processor 601, ROM 602, and RAM 603 are interconnected via bus 604. Processor 601 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 602 and / or RAM 603. It should be noted that the programs may also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.
[0069] According to embodiments of this disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to a bus 604. The electronic device 600 may also include one or more of the following components connected to the I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 610 as needed so that computer programs read from it can be installed into the storage section 608 as needed.
[0070] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0071] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 602 and / or RAM 603 and / or one or more memories other than ROM 602 and RAM 603 described above.
[0072] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the CNC system magnification adjustment method provided in the embodiments of this disclosure.
[0073] When the computer program is executed by the processor 601, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0074] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and / or installed from the removable medium 611. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0075] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0076] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0077] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0078] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0079] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A method for adjusting the magnification of a numerical control system, characterized in that, include: S1, construct the restoration speed curve corresponding to the current instruction cycle. The restoration speed curve is a uniformly variable speed curve. The starting speed of the restoration speed curve is the instruction speed of the previous instruction cycle, and the ending speed of the restoration speed curve is the instruction speed of the current instruction cycle. S2, perform interpolation calculations based on the reduction rate curve and the current magnification; The construction of the restoration speed curve corresponding to the current instruction cycle includes: Detect whether the current instruction cycle has ended and the system has entered a pause state; If so, a compensation cycle is generated, wherein the starting speed of the restoration speed curve of the compensation cycle is the instruction speed of the current instruction cycle, and the ending speed is 0.
2. The CNC system magnification adjustment method according to claim 1, wherein, The step of detecting whether the current instruction cycle has ended and entered a pause state includes: Check if the next instruction is a stop instruction after the current instruction cycle ends; if the next instruction is a stop instruction, then enter the pause state after the current instruction cycle ends. Alternatively, check if there is a next instruction after the current instruction cycle ends; if there is no next instruction, enter a pause state after the current instruction cycle ends. Alternatively, check if the current instruction cycle ends with a 0-pulse instruction; if the next instruction is a 0-pulse instruction, then enter a pause state after the current instruction cycle ends.
3. The CNC system magnification adjustment method according to claim 1, wherein, The step of detecting whether the current instruction cycle has ended and entered a pause state includes: If the current instruction cycle ends without entering the pause state, the next instruction is received, and the next instruction cycle is used as the current instruction cycle to execute step S1 again.
4. The CNC system magnification adjustment method according to claim 1, wherein, The compensation period is equal to the length of the current instruction period.
5. The CNC system magnification adjustment method according to claim 1, wherein, The interpolation calculation based on the restoration rate curve and the current magnification includes: Determine whether the remaining time slice length of the current instruction cycle is greater than the time slice length required for the current instruction cycle; wherein, the initial length of the time slice length required for the current instruction cycle is the time slice length required for the current multiplier; If so, the remaining time slice of the current instruction cycle is divided into a time slice required by the current instruction cycle. Based on the restoration speed curve of the current instruction cycle, the pulse increment of the divided time slice is calculated and sent to the output buffer; the remaining number of pulses in the current instruction cycle is subtracted from the sent pulse increment; the pulse increment in the output buffer is output; the remaining time slice length of the current instruction cycle is subtracted from the required time slice length of the current instruction cycle, and the required time slice length of the current instruction cycle is reduced to 0. If not, output the remaining pulse count of the current instruction cycle to the output buffer; subtract the remaining time slice length of the current instruction cycle from the required time slice length of the current instruction cycle; take the next instruction cycle as the current instruction cycle and construct the restoration speed curve of the current instruction cycle; update the remaining time slice length of the current instruction cycle to the length of one instruction cycle; proceed to the step of determining whether the remaining time slice length of the current instruction cycle is greater than the required time slice length of the current instruction cycle.
6. The CNC system magnification adjustment method according to claim 1, wherein, The reconstruction speed curve corresponding to the current instruction cycle includes: In response to the current instruction cycle being the first instruction cycle, a restoration speed curve for the first instruction cycle is constructed, wherein the initial speed of the restoration speed curve is 0, and the final speed of the restoration speed curve is the instruction speed of the first instruction cycle.
7. A CNC system magnification adjustment device, comprising: The speed curve restoration module is used to construct the speed curve restoration corresponding to the current instruction cycle. The speed curve restoration is a uniformly variable speed curve. The starting speed of the speed curve restoration is the instruction speed of the previous instruction cycle, and the ending speed of the speed curve restoration is the instruction speed of the current instruction cycle. The interpolation calculation module is used to perform interpolation calculations based on the restoration speed curve and the current magnification. The construction of the restoration speed curve corresponding to the current instruction cycle includes: Detect whether the current instruction cycle has ended and the system has entered a pause state; If so, a compensation cycle is generated, wherein the starting speed of the restoration speed curve of the compensation cycle is the instruction speed of the current instruction cycle, and the ending speed is 0.
8. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Multiplying power control method of non-real-time interpolation numerical control system
CN113156890A