Method, system, electronic device and storage medium for judging movement position of take-out machine
By calculating the total running time of the axis and the pulse sending period, it is judged whether the axis has moved in place, which solves the problem of long running cycle caused by the hysteresis of the servo drive feedback signal, achieves more efficient control of the unloading machine, and shortens the running time.
Patent Information
- Application Number
- CN202211364908.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-02
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2042-11-02
AI Technical Summary
In the existing unloading machine control scheme, due to the hysteresis of the servo driver feedback signal, the unloading machine cannot respond quickly and the operation cycle is long, affecting work efficiency.
By calculating the total running time of the axis and the pulse sending period, it is judged whether the axis has moved in place, the advance in-position time and the cumulative number of pulse sending times to control the movement of the axis, avoiding the need to read the servo feedback position information before each pulse control signal is sent, and allowing other axes to Move synchronously when the axis is about to reach position.
It shortens the operation cycle of the unloader to judge whether it has moved in place, improves work efficiency, shortens the operation time, and improves the overall operation speed.
Smart Images

Figure CN115847395B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent device control technology, and more specifically, to a method, system, electronic device and storage medium for determining whether a take-out machine has moved into position. Background Art
[0002] As a key component of the robot, the take-out machine is widely used in various intelligent devices. In the existing take-out machine control solutions, such as Figure 1 As shown in the figure, the moving process of the knockout machine is:
[0003] 1. After the host computer B receives the moving instruction *ST=* sent by the host computer A, the instruction completion signal *EN=0 and the instruction execution signal *RUN=*.
[0004] 2. Divide the target position into many parts according to the speed, acceleration time, deceleration time and other parameters of the knockout machine, and then send the pulse control signal to the servo driver with a fixed sending cycle (for example, 4ms), and the servo driver controls the operation of the motor.
[0005] 3. During the operation of the motor, the encoder records the position of the motor in real time, and the servo driver feeds back the encoder position information to the host computer B. The host computer B compares the encoder position fed back by the servo, the judgment amplitude (5mm), and the target position. If |Feedback position-target position|≤judgment amplitude (5mm), it can be considered that the movement is in place, and the execution of the instruction execution completion signal *EN=* is executed, and the instruction execution signal *RUN=0 is executed. After the host computer A receives the instruction execution completion signal *EN=* sent by the host computer B, the host computer A executes a new movement instruction with *EN=* as the condition. All axes must wait until the axis moves into place before the next axis or the current axis can move. When the value of the above signals is 0, it means that the signal is invalid. When it is not 0, it means that the signal is valid.
[0006] In the above scheme, the servo drive position control is based on the feedback signal, and the PID control algorithm is used to achieve closed-loop control. Since the feedback signal has a certain hysteresis, the servo system cannot achieve a fast response and the operation cycle is long.
[0007] Therefore, it is necessary to study a solution that can shorten the running time. Summary of the invention
[0008] In view of the technical problems existing in the prior art, the present invention provides a method, system, electronic device and storage medium for a take-out machine to judge whether it has moved into place, which shortens the operation cycle of the take-out machine when judging whether it has moved into place and improves the working efficiency of the take-out machine.
[0009] According to a first aspect of the present invention, a method for determining whether a take-out machine has moved into position is provided, comprising:
[0010] Obtain the movement instruction ST of the current axis, calculate the total running time t of the current axis movement according to the parameters corresponding to the movement instruction ST, and calculate the total number of pulse transmissions N according to the total running time t and the pulse transmission period T;
[0011] A pulse control signal is sent to the current axis according to the pulse sending cycle T, and the advance time amplitude N1 is calculated according to the advance time t1 and the pulse sending cycle T. According to the advance time amplitude N1, the cumulative number of pulse sending times Nk and the total number of pulse sending times N, it is judged whether the current axis has moved into position, and the movement of the current axis and / or other axes is controlled according to the judgment result.
[0012] Based on the above technical solution, the present invention can also make the following improvements.
[0013] Optionally, the calculating the total running time t of the current axis movement according to the parameters corresponding to the movement instruction ST includes:
[0014] Step A, obtaining parameters corresponding to the movement instruction ST, the parameters including the distance s from the starting point to the target position, the acceleration time t1, the uniform speed time t2, the uniform speed v2, the maximum speed vmax, and the deceleration time t3;
[0015] Step B, assuming that the movement instruction ST operation process includes three stages: acceleration stage, uniform speed stage and deceleration stage, the maximum speed vmax is used as the uniform speed v2 assignment, and the uniform speed time t2 is calculated by formula (1):
[0016]
[0017] In formula (1), the distance s from the starting point to the target position is a preset constant value, the acceleration time t1 is an empirical value set based on experience for accelerating from the initial speed to the maximum speed vmax, and the deceleration time t3 is an empirical value set based on experience for decelerating from the maximum speed vmax to the initial speed;
[0018] Step C, compare the uniform speed time t2 with 0 to determine whether there is a uniform speed segment:
[0019] When the uniform speed time t2>0, it is determined that there is a uniform speed segment, and the total running time t of the current axis movement is calculated by formula (2):
[0020] t=t1+t2+t3 (2);
[0021] When the uniform speed time t2≤0, it is determined that there is no uniform speed segment. At this time, the total running time t of the current axis movement is calculated by formula (3):
[0022] t=t1+t3 (3).
[0023] Optionally, the calculating the total number of pulse transmissions N according to the total running time t and the pulse transmission period T includes:
[0024] The total running time t is divided by the pulse sending period T to obtain the total number of pulse sending times N.
[0025] Optionally, the step of calculating the advance time amplitude N1 according to the advance time t1 and the pulse transmission period T includes:
[0026] Preset the advance arrival time t1, which is the time deviation value of the current axis moving to the arrival position;
[0027] Calculate the advance arrival time amplitude N1 according to the following formula:
[0028] N1=t1 / T.
[0029] Optionally, judging whether the current axis has moved into position according to the advance arrival time amplitude N1, the cumulative number of pulse transmission times Nk and the total number of pulse transmission times N includes:
[0030] Send a pulse control signal to the servo driver of the current axis with a pulse sending period T. Each time a pulse control signal is sent, the cumulative number of pulse sending times Nk increases by 1, where Nk∈[0,N];
[0031] When Nk+N1<N, it is determined that the current axis has not moved to the position;
[0032] When Nk+N1≥N, it is determined that the current axis is about to move into position;
[0033] When Nk≥N, it is determined that the current axis has moved to the position.
[0034] Optionally, controlling the movement of the current axis and / or other axes according to the judgment result includes:
[0035] When it is determined that the current axis has not moved to the position, the pulse control signal continues to be sent to the servo driver of the current axis according to the pulse sending cycle T;
[0036] When it is determined that the current axis is about to move into position, the pulse control signal continues to be sent to the servo driver of the current axis according to the pulse sending cycle T, and the movement instructions of other axes of the knockout machine are allowed to be executed synchronously;
[0037] When it is determined that the current axis has moved to the position, the execution of the current movement instruction ST of the current axis is stopped.
[0038] According to a second aspect of the present invention, a system for determining whether a take-out machine is moved into position is provided, comprising:
[0039] An instruction parsing module, used to obtain the movement instruction ST of the current axis, and also used to calculate the total running time t of the current axis movement according to the parameters corresponding to the movement instruction ST, and also used to calculate the total number of pulse transmissions N according to the total running time t and the pulse transmission period T;
[0040] The movement control module is used to send a pulse control signal to the current axis according to the pulse sending period T, and is also used to calculate the advance time amplitude N1 according to the advance time t1 and the pulse sending period T, and is also used to judge whether the current axis has moved into position according to the advance time amplitude N1, the cumulative number of pulse sending times Nk and the total number of pulse sending times N, and is also used to control the movement of the current axis and / or other axes according to the judgment result.
[0041] According to a third aspect of the present invention, there is provided an electronic device, comprising a memory and a processor, wherein the processor is used to implement the steps of the above-mentioned method for determining whether a take-out machine has moved into position when executing a computer management program stored in the memory.
[0042] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium on which a computer management program is stored. When the computer management program is executed by a processor, the steps of the above-mentioned method for determining whether a take-out machine has moved into position are implemented.
[0043] The present invention provides a method, system, electronic device and storage medium for judging the movement into position of a take-out machine. It is not necessary to read the position information of the servo feedback before each pulse control signal is sent. By calculating the total number of pulses sent N, after sending the pulse data, the cumulative pulse sending number Nk, the advance arrival time amplitude N1 and the total number of pulses sent N are compared. When it is judged according to the comparison result that the current axis is about to reach the expected position, the new movement instructions of other axes can be executed. After the cumulative pulse sending number Nk reaches the total number of pulses sent N, the new movement instruction of the current axis can be executed. After each pulse data is sent, the number of sending is added by 1, and the cumulative number of pulse sending Nk is accumulated successively. The method of the present invention can execute new movement instructions in advance for axes that are not the same, and can shorten the operation cycle. The present invention does not need to wait for the position information of the servo feedback, thereby improving the operation cycle of the take-out machine and shortening the operation time. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A flow chart of a method for judging the movement position of an existing take-out machine;
[0045] Figure 2 A flowchart of a method for determining whether a take-out machine has moved into position provided by a certain embodiment of the present invention;
[0046] Figure 3A speed-time approximate waveform comparison diagram of a current axis movement process with a uniform speed segment and without a uniform speed segment provided by a certain embodiment of the present invention;
[0047] Figure 4 A block diagram of a system for judging the movement into position of a take-out machine provided by the present invention;
[0048] Figure 5 A schematic diagram of the hardware structure of a possible electronic device provided by the present invention;
[0049] Figure 6 A schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION
[0050] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0051] Terminology explanation:
[0052] *EN refers to the instruction completion signal of the current axis, and *RUN refers to the current instruction execution signal.
[0053] Explanation of the values of *EN signal and *RUN: When its value is 0, it indicates that the signal is invalid; when its value is not 0, it indicates that the signal is valid. In the entire manual, "*" is used to indicate the case where the signal value is not 0.
[0054] For example, *EN=0 means that the instruction completion signal is currently invalid, that is, the current instruction has not been executed to completion; *EN=* means that the instruction completion signal is currently valid, for example, the current instruction has been executed to completion; *RUN=0 means that the instruction execution signal is currently invalid, that is, the current instruction is in a non-executing state; *RUN=* means that the instruction execution signal is currently valid, that is, the current instruction is in an executing state, for example, the current move instruction ST is being executed.
[0055] Now combined Figure 1 and Figure 2 The solution of judging whether the take-out machine is in place in the prior art is compared with the solution of judging whether the take-out machine is in place provided by the present invention.
[0056] Figure 1 This is a flow chart of the method for judging whether a conventional take-out machine has moved into position mentioned in the background technology. Figure 1In the technical solution, 4ms is used as a pulse transmission cycle T, and a pulse control signal for controlling the movement of the current axis is sent every 4ms. However, before sending pulse data in each cycle, it is necessary to read the position information of the servo feedback through the host computer B, and then compare the feedback position information with the target position. When |feedback position-target position|≤ is determined to be in-place amplitude, a valid instruction completion signal *EN=* is sent to the host computer A. After receiving the instruction completion signal *EN=*, the host computer A starts to execute the new movement instruction of this axis. Since the feedback information of the servo drive has a certain lag, it will lead to problems such as a long operating cycle and slow operation of the knockout machine, which is not conducive to improving the working efficiency of the knockout machine.
[0057] Figure 2 The flowchart of applying the solution of the present invention to a certain implementation scenario is shown in FIG. Figure 2 As shown, the method for determining whether the knockout machine has moved into position provided in this embodiment similarly controls the operation of several axes through the upper computer A and controls the operation of the current axis through the upper computer B. The method includes:
[0058] The host computer A issues a movement instruction ST of the current axis, and the host computer B obtains the movement instruction ST of the current axis. The host computer B calculates the total running time t of the current axis movement according to the parameters corresponding to the movement instruction ST, and calculates the total number of pulse transmissions N according to the total running time t and the pulse transmission period T;
[0059] A pulse control signal is sent to the current axis according to the pulse sending cycle T, and the advance time amplitude N1 is calculated according to the advance time t1 and the pulse sending cycle T. According to the advance time amplitude N1, the cumulative number of pulse sending times Nk and the total number of pulse sending times N, it is judged whether the current axis has moved into position, and the movement of the current axis and / or other axes is controlled according to the judgment result.
[0060] It is understandable that, based on the defects in the background technology, the embodiment of the present invention proposes a method for the take-out machine to determine whether the machine has moved to the right position. Each movement instruction ST corresponds to a preset movement trajectory of a certain axis. Therefore, the total running time t and the pulse sending period T of the current axis movement can be calculated according to the parameters corresponding to the movement instruction ST. Figure 1, the pulse sending period T in this embodiment is still illustrated by 4ms. In the scheme of this embodiment, the target distance is divided into several small distances by the total number of pulse sending times N. Each time a pulse control signal is sent, the current axis is controlled to move a small distance. When the number of pulse control signal sending times reaches the total number of pulse sending times N, the current axis completes the entire distance and reaches the expected target position. In order to shorten the overall operation cycle of the take-out machine, under certain working conditions, other axes are allowed to start running when the current axis is about to reach the target position. Therefore, in this embodiment, an advance arrival time t1 is preset. For example, if the total operation time t is 5s, the last 1s in 5s can be regarded as the advance arrival time t1. At this time, the advance arrival time t1 is set to 1s. More specifically, when the current axis runs within the first 4s, it is considered that the current axis has not yet reached its intended position and needs to continue executing the movement instruction ST. At this time, the host computer B provides the host computer A with the instruction completion signal *EN=0 and the instruction execution signal *RUN=*, and the current axis continues to run while other axes do not run. After the current axis runs for 4s, it enters the countdown for the advance arrival time t1. It can be considered that during the last 1s of running time, the current axis is about to reach its intended position. At this time, the instruction completion signal *EN=* and the instruction execution signal *RUN=* can be output, indicating that the current axis needs to continue moving for a short period of time and other axes can start executing their corresponding movement instructions. After the current axis movement time reaches 5s, it is considered that the current axis has completed the current movement instruction ST and has reached the target position. At this time, the host computer B provides the host computer A with the instruction completion signal *EN=* and the instruction execution signal *RUN=0, and the current axis can continue to execute the next instruction.
[0061] This embodiment does not need to read the position information of the servo feedback before each pulse control signal is sent. By calculating the total number of pulses sent N, after sending the pulse data, the cumulative pulse sending number Nk, the advance time amplitude N1 and the total number of pulses sent N are compared. When the current axis is about to reach the expected position according to the comparison result, the new movement instructions of other axes can be executed. After the cumulative number of pulses sent Nk reaches the total number of pulses sent N, the new movement instructions of the current axis can be executed. After each pulse data is sent, the number of sends is added by 1, and the cumulative number of pulses sent Nk is accumulated one by one. The method of the present invention can execute new movement instructions in advance for axes that are not the same, shorten the operation cycle, increase the operation cycle of the knockout machine, and shorten the operation time.
[0062] In a possible implementation manner, the calculating the total running time t of the current axis movement according to the parameters corresponding to the movement instruction ST includes:
[0063] Step A, obtaining parameters corresponding to the movement instruction ST, the parameters including the distance s from the starting point to the target position, the acceleration time t1, the uniform speed time t2, the uniform speed v2, the maximum speed vmax, and the deceleration time t3;
[0064] It can be understood that, in general, the knockout machine divides the axis movement process into three stages: uniform acceleration, uniform speed, and uniform deceleration according to the set parameters corresponding to the movement instruction ST. The speed-time waveform is as follows: Figure 3 (a) shown.
[0065] Step B, assuming that the movement instruction ST operation process includes three stages: acceleration stage, uniform speed stage and deceleration stage. According to the distance s from the starting point to the target position, the acceleration time t1, the deceleration time t3 and the maximum speed vmax, the maximum speed vmax is used to assign the uniform speed v2, and the uniform speed time t2 is calculated by formula (1):
[0066]
[0067] In formula (1), the distance s from the starting point to the target position is a preset constant value, the acceleration time t1 is an empirical value set based on experience for accelerating from the initial speed to the maximum speed vmax, and the deceleration time t3 is an empirical value set based on experience for decelerating from the maximum speed vmax to the initial speed;
[0068] It is understandable that in the process of axis motion control, when the axis reaches the highest speed, its subsequent motion trend should be stable or slow down, so this includes Figure 3 (a) shows the motion of the uniform speed segment and Figure 3 (a) and Figure 3 (b) The motion of the deceleration section shown. Therefore, in step B, the maximum speed vmax of the axis is used as the reference value for calculating the uniform speed time t2, and then the value of the uniform speed time t2 calculated is used to determine whether there is a uniform speed section in the motion process of the axis.
[0069] Step C, compare the uniform speed time t2 with 0 to determine whether there is a uniform speed segment.
[0070] In actual operation, there is Figure 3 (a) and Figure 3 (b) Two cases, for example, when the distance s from the starting point to the target position is large, its motion waveform corresponds to Figure 3 (a) In this case, there is a uniform speed segment of motion; when the distance s from the starting point to the target position is small, its motion waveform corresponds to Figure 3(b) In this case, there is no uniform speed segment. After the axis accelerates from the initial speed to the system preset maximum speed vmax, it starts to decelerate and stops moving after reaching the target position. These two situations can be judged by whether there is a uniform speed time t2. The details are as follows:
[0071] When the uniform speed time t2>0, it is determined that there is a uniform speed segment, and the operation model of the axis is consistent with the assumed normal model, corresponding to Figure 3 In case (a), the total running time t of the current axis movement is calculated by formula (2):
[0072] t=t1+t2+t3 (2);
[0073] The uniform speed time t2 is calculated by formula (1), and the acceleration time t1 and deceleration time are still based on the empirical values preset by the system.
[0074] When the uniform speed time t2≤0, it is determined that there is no uniform speed segment. At this time, the operation model of the axis is inconsistent with the assumed usual model, corresponding to Figure 3 (b) In this case, the total running time t of the current axis movement is calculated by formula (3):
[0075] t=t1+t3 (3);
[0076] Since the maximum speed vmax of the axis operation is determined, the acceleration time t1 and deceleration time use the system preset empirical values. Therefore, the total running time t of the current axis movement can be directly obtained according to formula (3), which serves as the basis for the subsequent calculation steps.
[0077] In a possible embodiment, the calculating the total number of pulse transmissions N according to the total running time t and the pulse transmission period T includes:
[0078] The total running time t is divided by the pulse sending period T to obtain the total number of pulse sending times N.
[0079] It can be understood that in this embodiment, the total number of pulse transmissions N can be calculated by N=t / T, so that the target distance expected to be reached by the current axis can be decomposed into several small distances by the total number of pulse transmissions N, thereby realizing segmented control of the target distance.
[0080] In a possible implementation manner, the calculation of the advance time amplitude N1 according to the advance time t1 and the pulse sending period T includes:
[0081] Preset the advance arrival time t1, which is the time deviation value of the current axis moving to the arrival position;
[0082] Calculate the advance arrival time amplitude N1 according to the following formula:
[0083] N1=t1 / T.
[0084] It can be understood that the advance arrival time amplitude N1 can be calculated by the above calculation method.
[0085] In a possible implementation manner, judging whether the current axis has moved into position according to the advance arrival time amplitude N1, the cumulative number of pulse transmissions Nk and the total number of pulse transmissions N includes:
[0086] Send a pulse control signal to the servo driver of the current axis with a pulse sending period T. Each time a pulse control signal is sent, the cumulative number of pulse sending times Nk increases by 1, where Nk∈[0,N];
[0087] When Nk+N1<N, it is determined that the current axis has not moved to the position;
[0088] When Nk+N1≥N, it is determined that the current axis is about to move into position;
[0089] When Nk≥N, it is determined that the current axis has moved to the position.
[0090] In a possible implementation manner, controlling the movement of the current axis and / or other axes according to the judgment result includes:
[0091] When it is determined that the current axis has not moved to the position, the pulse control signal continues to be sent to the servo driver of the current axis according to the pulse sending cycle T;
[0092] When it is determined that the current axis is about to move into position, the pulse control signal continues to be sent to the servo driver of the current axis according to the pulse sending cycle T, and the movement instructions of other axes of the knockout machine are allowed to be executed synchronously;
[0093] When it is determined that the current axis has moved to the position, the execution of the current movement instruction ST of the current axis is stopped.
[0094] It is understandable that in the traditional scheme, there are only two types of judgment results: not moved into place and moved into place. When not moved into place, the current axis is controlled to continue to move. When moved into place, the current axis is controlled to stop executing the current movement instruction ST, and a new coaxial movement instruction can be executed. In addition to the above two judgment results, this embodiment also has a third judgment result: about to move into place. In the state of about to move into place, the position of the current axis is very close to the expected target position. In this state, the current axis is allowed to continue to move, and other axes can also be controlled to start moving. The axes cooperate with each other, thereby shortening the overall operation cycle of the knockout machine and improving its work efficiency.
[0095] Figure 4 A system structure diagram of a take-out machine for judging movement into position provided by an embodiment of the present invention, such as Figure 4As shown, a system for determining the movement of a take-out machine into position includes an instruction parsing module and a movement control module, wherein:
[0096] An instruction parsing module, used to obtain the movement instruction ST of the current axis, and also used to calculate the total running time t of the current axis movement according to the parameters corresponding to the movement instruction ST, and also used to calculate the total number of pulse transmissions N according to the total running time t and the pulse transmission period T;
[0097] The movement control module is used to send a pulse control signal to the current axis according to the pulse sending period T, and is also used to calculate the advance time amplitude N1 according to the advance time t1 and the pulse sending period T, and is also used to judge whether the current axis has moved into position according to the advance time amplitude N1, the cumulative number of pulse sending times Nk and the total number of pulse sending times N, and is also used to control the movement of the current axis and / or other axes according to the judgment result.
[0098] It can be understood that the system for judging whether a take-out machine has moved into position provided by the present invention corresponds to the method for judging whether a take-out machine has moved into position provided by the aforementioned embodiments. The relevant technical features of the system for judging whether a take-out machine has moved into position can refer to the relevant technical features of the method for judging whether a take-out machine has moved into position, and will not be repeated here.
[0099] See also Figure 5 , Figure 5 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 5 As shown, an embodiment of the present invention provides an electronic device 500, including a memory 510, a processor 520, and a computer program 511 stored in the memory 510 and executable on the processor 520. When the processor 520 executes the computer program 511, the following steps are implemented:
[0100] Obtain the movement instruction ST of the current axis, calculate the total running time t of the current axis movement according to the parameters corresponding to the movement instruction ST, and calculate the total number of pulse transmissions N according to the total running time t and the pulse transmission period T;
[0101] A pulse control signal is sent to the current axis according to the pulse sending cycle T, and the advance time amplitude N1 is calculated according to the advance time t1 and the pulse sending cycle T. According to the advance time amplitude N1, the cumulative number of pulse sending times Nk and the total number of pulse sending times N, it is judged whether the current axis has moved into position, and the movement of the current axis and / or other axes is controlled according to the judgment result.
[0102] See also Figure 6 , Figure 6 Schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. Figure 6As shown, this embodiment provides a computer-readable storage medium 600, on which a computer program 611 is stored. When the computer program 611 is executed by a processor, the following steps are implemented:
[0103] Obtain the movement instruction ST of the current axis, calculate the total running time t of the current axis movement according to the parameters corresponding to the movement instruction ST, and calculate the total number of pulse transmissions N according to the total running time t and the pulse transmission period T;
[0104] A pulse control signal is sent to the current axis according to the pulse sending cycle T, and the advance time amplitude N1 is calculated according to the advance time t1 and the pulse sending cycle T. According to the advance time amplitude N1, the cumulative number of pulse sending times Nk and the total number of pulse sending times N, it is judged whether the current axis has moved into position, and the movement of the current axis and / or other axes is controlled according to the judgment result.
[0105] A method, system and storage medium for judging whether a take-out machine has moved into position provided by an embodiment of the present invention does not need to read the position information of the servo feedback before each pulse control signal is sent. By calculating the total number of pulses sent N, after sending the pulse data, the cumulative number of pulses sent Nk, the advance time amplitude N1 and the total number of pulses sent N are compared. When it is determined according to the comparison result that the current axis is about to reach the expected position, the new movement instructions of other axes can be executed. After the cumulative number of pulses sent Nk reaches the total number of pulses sent N, the new movement instructions of the current axis can be executed. After each pulse data is sent, the number of transmissions is added by 1, and the cumulative number of pulses sent Nk is accumulated successively. For a take-out machine with multiple axes, the method of the present invention can execute new movement instructions in advance and shorten the operation cycle. The present invention does not need to wait for the position information fed back by the servo, thereby improving the operation cycle of the take-out machine and shortening the operation time.
[0106] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0107] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0108] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0109] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0110] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0111] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0112] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for determining whether a knockout machine has moved into position, characterized in that: include: Obtain the movement instruction ST of the current axis, calculate the total running time t of the current axis movement according to the parameters corresponding to the movement instruction ST, and calculate the total number of pulse transmissions N according to the total running time t and the pulse transmission period T; wherein, calculating the total running time t of the current axis movement according to the parameters corresponding to the movement instruction ST includes: Step A, obtaining parameters corresponding to the movement instruction ST, the parameters including the distance s from the starting point to the target position, the acceleration time t1, the uniform speed time t2, the uniform speed v2, the maximum speed vmax, and the deceleration time t3; Step B, assuming that the movement instruction ST operation process includes three stages: acceleration stage, uniform speed stage and deceleration stage, the maximum speed vmax is used as the uniform speed v2 assignment, and the uniform speed time t2 is calculated by formula (1): (1), In formula (1), the distance s from the starting point to the target position is a preset constant value, the acceleration time t1 is an empirical value set based on experience for accelerating from the initial speed to the maximum speed vmax, and the deceleration time t3 is an empirical value set based on experience for decelerating from the maximum speed vmax to the initial speed; Step C, compare the uniform speed time t2 with 0 to determine whether there is a uniform speed segment: When the uniform speed time t2>0, it is determined that there is a uniform speed segment, and the total running time t of the current axis movement is calculated by formula (2): t=t1+t2+t3(2); When the uniform speed time t2≤0, it is determined that there is no uniform speed segment. At this time, the total running time t of the current axis movement is calculated by formula (3): t=t1+t3(3); A pulse control signal is sent to the current axis according to the pulse sending cycle T, and the advance time amplitude N1 is calculated according to the advance time t1 and the pulse sending cycle T. According to the advance time amplitude N1, the cumulative number of pulse sending times Nk and the total number of pulse sending times N, it is judged whether the current axis has moved into position, and the movement of the current axis and / or other axes is controlled according to the judgment result.
2. A method for determining whether a take-out machine has moved into position according to claim 1, characterized in that: The calculating the total number of pulse transmissions N according to the total running time t and the pulse transmission period T comprises: The total running time t is divided by the pulse sending period T to obtain the total number of pulse sending times N.
3. The method for determining whether a take-out machine has moved into position according to claim 1, characterized in that: The calculation of the advance time amplitude N1 according to the advance time t1 and the pulse sending period T includes: Preset the advance arrival time t1, which is the time deviation value of the current axis moving to the arrival position; Calculate the advance arrival time amplitude N1 according to the following formula: N1=t1 / T.
4. The method for determining whether a take-out machine has moved into position according to claim 1, characterized in that: The method of judging whether the current axis has moved into position according to the advance arrival time amplitude N1, the cumulative pulse sending times Nk and the total pulse sending times N includes: Send a pulse control signal to the servo driver of the current axis with a pulse sending period T. Each time a pulse control signal is sent, the cumulative number of pulse sending times Nk increases by 1, where Nk∈[0,N]; When Nk+N1<N, it is determined that the current axis has not moved to the position; When Nk+N1≥N, it is determined that the current axis is about to move into position; When Nk≥N, it is determined that the current axis has moved to the position.
5. The method for determining whether a take-out machine has moved into position according to claim 1, characterized in that: The controlling the movement of the current axis and / or other axes according to the judgment result includes: When it is determined that the current axis has not moved to the position, the pulse control signal continues to be sent to the servo driver of the current axis according to the pulse sending cycle T; When it is determined that the current axis is about to move into position, the pulse control signal continues to be sent to the servo driver of the current axis according to the pulse sending cycle T, and the movement instructions of other axes of the knockout machine are allowed to be executed synchronously; When it is determined that the current axis has moved to the position, the execution of the current movement instruction ST of the current axis is stopped.
6. A system for judging whether a take-out machine has moved into position, characterized in that: include: The instruction parsing module is used to obtain the movement instruction ST of the current axis, and is also used to calculate the total running time t of the current axis movement according to the parameters corresponding to the movement instruction ST, and is also used to calculate the total number of pulse transmissions N according to the total running time t and the pulse transmission period T; wherein, the total running time t of the current axis movement is calculated according to the parameters corresponding to the movement instruction ST, including: Step A, obtaining parameters corresponding to the movement instruction ST, the parameters including the distance s from the starting point to the target position, the acceleration time t1, the uniform speed time t2, the uniform speed v2, the maximum speed vmax, and the deceleration time t3; Step B, assuming that the movement instruction ST operation process includes three stages: acceleration stage, uniform speed stage and deceleration stage, the maximum speed vmax is used as the uniform speed v2 assignment, and the uniform speed time t2 is calculated by formula (1): (1), In formula (1), the distance s from the starting point to the target position is a preset constant value, the acceleration time t1 is an empirical value set based on experience for accelerating from the initial speed to the maximum speed vmax, and the deceleration time t3 is an empirical value set based on experience for decelerating from the maximum speed vmax to the initial speed; Step C, compare the uniform speed time t2 with 0 to determine whether there is a uniform speed segment: When the uniform speed time t2>0, it is determined that there is a uniform speed segment, and the total running time t of the current axis movement is calculated by formula (2): t=t1+t2+t3(2); When the uniform speed time t2≤0, it is determined that there is no uniform speed segment. At this time, the total running time t of the current axis movement is calculated by formula (3): t=t1+t3(3); The movement control module is used to send a pulse control signal to the current axis according to the pulse sending period T, and is also used to calculate the advance time amplitude N1 according to the advance time t1 and the pulse sending period T, and is also used to judge whether the current axis has moved into position according to the advance time amplitude N1, the cumulative number of pulse sending times Nk and the total number of pulse sending times N, and is also used to control the movement of the current axis and / or other axes according to the judgment result.
7. An electronic device, characterized in that: It comprises a memory and a processor, wherein the processor is used to implement the steps of a method for determining movement into position of a take-out machine as described in any one of claims 1 to 5 when executing a computer management program stored in the memory.
8. A computer-readable storage medium, characterized in that: A computer management program is stored thereon, and when the computer management program is executed by the processor, the steps of a method for determining whether a take-out machine has moved into position as described in any one of claims 1 to 5 are implemented.
